haddock-2.3.0 literate comments discarded from .lhs input

Andrea Vezzosi sanzhiyan at gmail.com
Thu Mar 19 06:10:06 EDT 2009

On Wed, Mar 18, 2009 at 10:54 PM, Alistair Bayley <alistair at abayley.org> wrote:
>> Ok, all of Andrea's haddock changes are in Cabal HEAD now, so if you'd
>> like to look at the .lhs situation now that'd be great.
> I've finally tested this. It looks like Distribution.Simple.Haddock
> module does what I want; now I just have to deal with the haddock
> problems.
> BTW, would it be a good idea to add (yet) another cabal flag that
> retains temp files/directories? This would make it a lot easier to
> diagnose issues with preprocessed source without having to modify and
> rebuild cabal.
To be honest there isn't a compelling reason to delete the
intermediate files/directories, we could just use a fixed location
under dist/ to store them.
It can only lead to bugs if we don't overwrite some relevant files
with up to date versions the next time the user calls cabal haddock,
but that's already the case for dist/build.

> The 2 haddock problems I have now are:
> (1) When cabal calls haddock it passes:
> --read-interface=$httptopdir/doc/libraries/base,c:\ghc\ghc-6.10.1/doc/libraries/base\base.haddock
> This results in links in the html docs like this (e.g. for Either):
> file:///C:/bayleya/eclipse/workspace/takusen/src/dist/doc/html/Takusen/$httptopdir/doc/libraries/base/Data-Either.html#t%3AEither
> i.e. the $httptopdir isn't being expanded, or whatever is meant to happen to it.
> Is this a haddock issue, or a cabal issue?
Those variables are supposed to be expanded by Cabal, and here on linux i get:
I'm going to try on windows to see if that's the problem.

> (2) Also, there seems to be a bug in Haddock where preformatted text
> in the HTML output
> has extra CR inserted before the CRLF. Presumably this only affects
> Windows users. I assume I should raise this with Gwern.
> Alistair

More information about the cabal-devel mailing list