GHC's CPP and Cabal's unlit

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Feb 1 21:47:15 EST 2008


On Thu, 2008-01-31 at 14:43 +0000, Duncan Coutts wrote:
> On Thu, 2008-01-10 at 14:25 +0000, Alistair Bayley wrote:
> 
> > the comment block (like cabal does)
> >  - don't indent code relative to comments, because Haddock doesn't like this
> 
> Hmm, we will have to find another solution to this because the H98 unlit
> spec clearly states that '>' is to be replaced with a ' ', not just
> deleted. So if haddock barfs on code like:
> 
> -- a comment
> 
>  some code

So I downloaded takusen and tried this. Haddock does indeed barf. The
problem is worse though because we do not know how much to indent by to
fix things.

a comment

>some code


a comment

> some code

These are both valid literate Haskell. If we make comments indent by one
or two spaces then we break one or the other of these examples. The
latter style with two spaces is more common so we should probably go
with that until haddock can be fixed.

I'm cc'ing David for his opinion on the matter.

Duncan



More information about the cabal-devel mailing list