[Haskell-cafe] Haddock and literate Haskell: annotations must be marked as source?

Andy Gimblett haskell at gimbo.org.uk
Thu Sep 24 14:48:01 EDT 2009

On 24 Sep 2009, at 18:28, Duncan Coutts wrote:

> On Thu, 2009-09-24 at 17:49 +0100, Andy Gimblett wrote:
>> So: am I right that this is the intended/expected behaviour?  If not,
>> how does one get round it?  If so, could someone perhaps comment on
>> the prospects/complexity of implementing this - or the reasons why it
>> is in fact a bad idea?
> As Brad says, we implemented this in Cabal by doing a non-standard
> "unlit" operation. So cabal haddock will "do the right thing" for your
> examples. Running haddock directly and letting it do the unlitting  
> will
> get different results.

That's great news for me, except: that's what I tried first, and I've  
just tried it again and it still doesn't seem to work for me.  Perhaps  
I am doing something wrong...?

Here's a toy example LHS file: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9802

and here's the corresponding .cabal file: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=9803

and here's a screenshot of the resultant HTML: http://is.gd/3DzmT

(produced via "runghc Setup configure && runghc Setup haddock" )

Any idea what I'm doing wrong?

One thing I did try was removing the blank line between the annotation  
and the code.  Of course, that breaks the LHS rules, so it doesn't  
build.  (I wondered if it was special cased for this purpose.)

Thanks again,


More information about the Haskell-Cafe mailing list