BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
587 stars 165 forks source link

Glasgow extentions no longer sufficient #32

Closed rpglover64 closed 11 years ago

rpglover64 commented 11 years ago

Running bnfc -m -gadt -d Calc.cf generates files with the pragma {-# OPTIONS_GHC -fglasgow-exts #-}. Running make (without the document commands) produces the following output and fails:

happy -gca Calc/Par.y
unused terminals: 1
alex -g Calc/Lex.x
ghc --make Calc/Test.hs -o Calc/Test

Calc/Abs.hs:1:16: Warning:
    -fglasgow-exts is deprecated: Use individual extensions instead

Calc/ComposOp.hs:1:16: Warning:
    -fglasgow-exts is deprecated: Use individual extensions instead

Calc/Print.hs:1:16: Warning:
    -fglasgow-exts is deprecated: Use individual extensions instead
line-map.c: file "<command-line>" left but not entered
line-map.c: file "<command-line>" left but not entered
[3 of 8] Compiling Calc.Abs         ( Calc/Abs.hs, Calc/Abs.o )

Calc/Abs.hs:14:1:
    Illegal generalised algebraic data declaration for `Tree'
      (Use -XGADTs to allow GADTs)
    In the data declaration for `Tree'
make: *** [all] Error 1
rpglover64 commented 11 years ago

Patch here.

gdetrez commented 11 years ago

Merged, thanks