GHC's CPP and Cabal's unlit

Duncan Coutts duncan.coutts at
Thu Jan 31 10:41:59 EST 2008

On Thu, 2008-01-31 at 14:37 +0000, Alistair Bayley wrote:
> On 31/01/2008, Duncan Coutts <duncan.coutts at> wrote:
> > I'm going to try and get this integrated. I'm not happy yet with the
> > issue about blank lines vs '.' lines etc etc. I think that needs a wider
> > discussion but I don't want to hold up what we already have.
> OK. Ian voted for '.' as empty line, so I went with that as it was the
> only comment, and was a positive one.
> What exactly are you not happy with? Is it the unsightliness of the
> periods in comments, or something else?

Partly. I've never liked that convention. It seems quite unnecessary
in .cabal files.

My main complaint is that it does not correspond to any existing
practise in haddock docs. There are some people who use haddock style
markup in .lhs files and we should aim to make it straightforward for
them to convert.

Also, as I've said it's not clear to me that it is even needed. It's
only for the case where you want to have a haddock doc for something and
then an intervening non-haddock comment before the actual definition.
The obvious solution there is just to move that non-haddock comment
somewhere else, like before the haddock doc, or inside or after the

> As for a wider discussion, I'm all for it, but I believe the impact of
> this change on existing code should be negligible (pending further
> testing, of course), so I'm not sure if we're going to get much
> interest. I'm trying to solve the problem in a way that's useful for
> me now, and, I hope, in a way that's useful for others. I get the
> impression that I'm a pretty small minority in trying to generate
> Haddock docs from .lhs source.

You are, but that's only because it doesn't currently work :-).

In particular I'd like to know how well it works for Jon Fairbairn who
has .lhs code that uses haddock markup and he uses a little
pre-processor to convert it.


More information about the cabal-devel mailing list