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
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: