8 Jan
2004
8 Jan
'04
10:02 a.m.
How do I instruct Haddock to preprocess the Haskell files. From your mail I thought that Haddock would do so by default but it complains at the first #ifdef it sees. Unfortunately, I didn't find any Haddock option similar to Hugs' -F.
I should really put this in the manual, since it gets asked so often. Anyway, you can use GHC to preprocess your source files before feeding them to Haddock: $ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs $ haddock -h Foo.raw-hs ... This also works to turn literate Haskell source into ... er ... illiterate source. Cheers, Simon