You can do a lot of static analysis of this kind with a macro.
[here](https://rosettacode.org/wiki/Category:Nim) is a snippet on rosettacode
that could get you started if you felt like making some of that tooling
Yeah. Something like that.
And is there a easy way to extract what types are defined in a nim file?
And the same for what procs and their arguments and results are defined in a
nim file?
It sounds like the 'Organise Imports' feature that Java IDEs provide, which:
* Removes unused imports
* Adds missing imports where there's only one possibility
* Prompts the user with choices if there are multiple possibilities for a
missing import
* Sorts the imports alphabetically (I th
It's not clear to me what you mean, the Nim compiler produces "unused import"
messages but there is no tooling support for cleaning them up.
Is there any tool that analyse a nim library and fix the required imports? I
mean something that analyse the types defined by each file and the dependencies
required by each file and perform the required imports with the information
available.
I have created bindings for a big library using c2n