Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use B as a constructor in haskell #128

Closed
gdetrez opened this issue Feb 6, 2015 · 0 comments
Closed

Cannot use B as a constructor in haskell #128

gdetrez opened this issue Feb 6, 2015 · 0 comments

Comments

@gdetrez
Copy link
Contributor
gdetrez commented Feb 6, 2015

With the following grammar:

B. Bar ::= "bar" ;

The compilation produce an error:

$ bnfc --haskell -m Test.cf
...
$ make
happy -gca ParTest.y
alex -g LexTest.x
ghc --make TestTest.hs -o TestTest
line-map.c: file "<command-line>" left but not entered
line-map.c: file "<command-line>" left but not entered
[1 of 7] Compiling ErrM             ( ErrM.hs, ErrM.o )
[2 of 7] Compiling AbsTest          ( AbsTest.hs, AbsTest.o )
[3 of 7] Compiling PrintTest        ( PrintTest.hs, PrintTest.o )
[4 of 7] Compiling SkelTest         ( SkelTest.hs, SkelTest.o )
[5 of 7] Compiling LexTest          ( LexTest.hs, LexTest.o )
[6 of 7] Compiling ParTest          ( ParTest.hs, ParTest.o )

ParTest.hs:58:19:
    Ambiguous occurrence `B'
    It could refer to either `AbsTest.B',
                             imported from `AbsTest' at ParTest.hs:5:1-14
                             (and originally defined at AbsTest.hs:10:12)
                          or `LexTest.B',
                             imported from `LexTest' at ParTest.hs:6:1-14
                             (and originally defined at LexTest.x:85:18)
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant