Good Haskell Style
Alistair Bayley
alistair at abayley.org
Thu Aug 2 09:45:26 EDT 2007
> It uses -cpp if CPP is in the language extensions in the .cabal file.
So it does. So now Haddock completes, but produces very limited output.
> Perhaps unlitting should be done by converting all literate comments
> into {- ... -} style comments.
>
> Or something like that. Perhaps that's worth investigating and adding to
> ghc/cpphs or Cabal's own existing pure Haskell impl of unlitting.
As I alluded to earlier, I have a program which I wrote to do this. It
prefixes "--" rather than enclosing in {- -}, and it's not perfect
(there are a number of cases it doesn't handle, although I'm of the
opinion that you shouldn't be doing whatever it fails on). I'm
thinking it might be feasible to distribute this in the Takusen
release and hook it into the cabal "setup haddock" command to
preprocess the .lhs files.
I have been tempted to run it over our .lhs once and for all, and
convert everything to regular .hs files, but Oleg seems to like the
birdtrack style, so we've decided to stick with it for now.
Alistair
More information about the Libraries
mailing list