haddock-2.3.0 literate comments discarded from .lhs input

Alistair Bayley alistair at abayley.org
Sat Feb 7 16:31:47 EST 2009


2009/2/6 Duncan Coutts <duncan.coutts at worc.ox.ac.uk>:
>
> Yes, against my better judgement the code in Cabal for haddock-2.x does
> not run cpp or unliting like it does for haddock-0.x. Instead it assumes
> that haddock-2.x will do all the cpp and unliting itself. Obviously this
> mean the special unliting mode that Cabal provides is not usable with
> haddock-2.x.
>
> The solution is to do the pre-processing the same for haddock-0.x and
> 2.x. Generally the haddock code in Cabal is a horrible inconsistent
> mess. I believe Andrea Vezzosi has been looking at rewriting it, which
> is good news.

In Distribution.Simple.Haddock, in the haddock function we have:

    withLib pkg_descr () $ \lib -> do
        let bi = libBuildInfo lib
            modules = PD.exposedModules lib ++ otherModules bi
        inFiles <- getLibSourceFiles lbi lib
        unless isVersion2 $ mockAll bi inFiles

So I guess the easiest thing to do right now is remove the "unless
isVersion2 $" . I'm testing this at the moment, so when I get it
working (or not) I'll let you know, and maybe send a patch.

Alistair



More information about the cabal-devel mailing list