boltzmann-brain
boltzmann-brain copied to clipboard
Compilation error with some symbol names
Compilation breaks if the entry point of my grammar is named S
, it seems to clash with some other type with the same identifier in the generated code.
Minimal working example:
@module Sampler
@size 1000
@generate S
S = Leaf
| Node S S.
The error:
/tmp/tmpap7caq9k/src/Sampler.hs:20:15: error:
Ambiguous occurrence ‘S’
It could refer to either ‘GHC.Generics.S’,
imported from ‘GHC.Generics’ at src/Sampler.hs:9:1-19
or ‘Sampler.S’, defined at src/Sampler.hs:19:1
|
20 | | Node S S
My setup:
$ python -c 'import paganini; print(paganini.__version__)'
1.4.0
$ git log --oneline | head -n 1
a85fcc3 Update link
Do you think it's possible to scope things so as to prevent that from ever happening? (I'm not very familiar with Haskell)
We should explicitly list what we need to import, so to avoid unnecessary clashes.