DPH libs are re-haddocked every time
duncan.coutts at googlemail.com
Mon Jan 11 10:31:08 EST 2010
On Thu, 2010-01-07 at 14:29 +0000, Simon Marlow wrote:
> > I don't think haddock should be doing any pre-processing, but certainly
> > we should not be telling it to generate the same .o files as we do for
> > the main build.
> > So if we changed the way Cabal invokes haddock to point it to a
> > different directory for object files, would that be sufficient?
> That would avoid the problem. However, I dislike the fact that Haddock
> is recompiling the whole package just to produce documentation, when the
> package is already compiled.
Yeah. So I guess in Cabal at the moment we cannot avoid it because for
normal compilation we use ghc's unlit and cpp, but for haddock we do all
the pre-processing ourselves so haddock gets different files to compare
to .o files. The end solution should probably be that Cabal does all
preprocessing and gives ghc and haddock the same input files.
> Furthermore, in the GHC build system it
> seems like a waste of time to get Cabal to preprocess all the source
> files when we've already done it.
The core packages don't use .lhs much so this is probably ok. For
packages that use .lhs and haddock then we should use Cabal's unlit.
More information about the Cvs-ghc