#s causing errors when -cpp not given

Ian Lynagh igloo@earth.li
Sat, 26 Jan 2002 12:49:08 +0000


Hi all

I've just been looking at using cpp in Haskell scripts and I am rather
confused. I can't see anything in the report which gives special meaning
to # in the surrounding text of literate scripts, yet if I put such
things in (both cpp directives and random things) both nhc98 and ghc
give me errors:

$ rm Foo.{o,hi}; nhc98 -c Foo.lhs -o Foo.o         
Unknown preprocessor directive at line 4 in file ./Foo.lhs        
ifdef QQ

$ rm Foo.{o,hi}; ghc -c Foo.lhs -o Foo.o     
Foo.lhs:4: parse error on input `#'

Are ghc and nhc98 being incompatible with Haskell 98?


Thanks
Ian