You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate entries in connection with Alex and Happy #406
$ hpack && cabal build
generated Foo.cabal
Resolving dependencies...
Error:
Module name LBNF.Lex is exported multiple times.
In the stanza 'library'
In the inplace package 'Foo...'
Not opposed to your suggestion of remove duplicates. But I would still want to have the full picture first.
How did Lex.hs/Par.hs end up in your source tree? I would assume that Cabal generates them in dist/build/autogen (or some new-style equivalent).
These files have been sitting in the source tree since I originally did not use any cabal configuration for this project (just a Makefile). To generate a cabal file, I used hpack and then ran into the problem of duplicates.
I think in case of Alex and Happy, my problem can be circumvented by not checking in the generated hs files into the source tree. However, Alex and Happy are natively supported by Cabal. Other build tools (such as my own, BNFC) do not enjoy the support by Cabal. Therefore, I also check in the files generated by the build tool into the source tree.
Activity
Fix sol#406 by nubbing module list generated from source files
sol commentedon Nov 10, 2020
@andreasabel hey! Thanks for bringing this up!
Not opposed to your suggestion of remove duplicates. But I would still want to have the full picture first.
How did
Lex.hs/Par.hsend up in your source tree? I would assume that Cabal generates them indist/build/autogen(or somenew-styleequivalent).Fix #406 by nubbing module list generated from source files
andreasabel commentedon Nov 11, 2020
Thanks for the quick fix.
These files have been sitting in the source tree since I originally did not use any cabal configuration for this project (just a Makefile). To generate a cabal file, I used hpack and then ran into the problem of duplicates.
I think in case of Alex and Happy, my problem can be circumvented by not checking in the generated hs files into the source tree. However, Alex and Happy are natively supported by Cabal. Other build tools (such as my own, BNFC) do not enjoy the support by Cabal. Therefore, I also check in the files generated by the build tool into the source tree.