That doesn't work, if modules contain some executable code. Simple test:
# test.nim
import cirruParser / types as cpTypes
import anotherModule / types as otherTypes
p1()
p2()
Run
# cirruParser/types.nim
proc p1* = echo "cirruParser"
Run
# anotherModule/types.nim
proc p2* = echo "anotherModule"
Run
Another one:
# test.nim
import cirruParser / types as cpTypes
import anotherModule / types as otherTypes
Run
# cirruParser/types.nim
echo "cirruTypes"
Run
# anotherModule/types.nim
echo "otherTypes"
Run
They fail at C side, as described above (one and the same C output file is used
for both).
With only types or constants in both imported modules it works, because no C
files are generated for them then.