patch applied (cabal): Fudge comment indentation in unliting to
work with haddock
igloo at earth.li
Mon Feb 4 16:37:02 EST 2008
On Mon, Feb 04, 2008 at 09:01:05PM +0000, Alistair Bayley wrote:
> On 04/02/2008, Ian Lynagh <igloo at earth.li> 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 haskell.org>
> > > * 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.
Ah, I see.
A more-correct thing to do might be to indent to the same depth as the
next token? That would have the additional advantage of being able to
document nested functions.
> 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
Not with literate comments, but you can if you use Haskell comments on
birdtrack lines, presumably. In fact, I hadn't appreciated that
non-Haskell comments would end up being picked up by haddock.
More information about the cabal-devel