GHC's CPP and Cabal's unlit

Duncan Coutts duncan.coutts at
Thu Nov 29 08:37:49 EST 2007

On Thu, 2007-11-29 at 13:14 +0000, Bayley, Alistair wrote:

> I think that's the real question: should Cabal's unlit be faithful to
> the H98 standard, or should it be treated simply as a Haddock
> preprocessor? (and therefore can be a little lax)
> H98 does require that code and comments are properly separated by
> blank lines, where a blank line consists only of whitespace:
> So what I've proposed would be a deviation from the standard.
> I do need a way of ensuring that I can write paragraphs in contiguous
> comment blocks. e.g. so this
> |
> para 1
> para 2
> becomes
> -- |
> -- para 1
> -- para 2
> (Haddock will ignore the second paragraph).

Yes, I see. how about using {- -} brackets instead. Would that work

> Or maybe I can enhance the unlit algorithm so that it can detect
> whether or not a blank line precedes a program line and behave
> accordingly.

It would be nice if we can find an unlit extension that is compatible
with the H98 requirement and alo allows useful behaviour for haddock.


More information about the Libraries mailing list