patch applied (cabal): Fudge comment indentation in unliting to work with haddock

Alistair Bayley alistair at
Mon Feb 4 16:01:05 EST 2008

On 04/02/2008, Ian Lynagh <igloo at> wrote:
> On Sat, Feb 02, 2008 at 08:28:35PM -0800, Duncan Coutts wrote:
> > Sat Feb  2 20:23:08 PST 2008  Duncan Coutts <duncan at>
> >   * Fudge comment indentation in unliting to work with haddock
> >   The rule is, if we see any bird track style code then we will indent all
> >   comments by two spaces so that it should line up with the code. Otherwise
> >   we use no indentation so that it'll work with latex style literate files.
> >   This makes it work for takusen (once you change the '.' lines to be blank).
> I haven't been following exactly what's been going on with this, but
> this sounds very wrong to me. Is this problem caused by using invisible
> spaces for comment continuation, or did using '.' have the same problem?

The problem is that Haddock expects comments to be indented to the
same level as the code. If not then it gives a parse error. My
solution was to not indent the birdtrack code, but Duncan pointed out
that this is not consistent with the H98 spec, and also can break some
code. So now we indent comments by two spaces instead. Obviously won't
work for code that's indented with ">" rather than "> ", so you can't
Haddock comment such code, but at least it won't break existing code.


More information about the cabal-devel mailing list