Using Haddock 2.0 to build GHC libraries

David Waern davve at dtek.chalmers.se
Thu Oct 25 14:53:07 EDT 2007


Hi,

I'm trying to build docs from a GHC 6.8.0 source distribution using
Haddock 2.0. I'm just using "make" in the ghc root dir. When processing
the base package I get the following errors:

Foreign/Storable.hs:158:58:
    Couldn't match expected type `Integer' against inferred type `Int'
    In the first argument of `(*)', namely `off'
    In the second argument of `peekByteOff', namely
        `(off * sizeOf undef)'
    In the expression: peekByteOff ptr (off * sizeOf undef)

Foreign/Storable.hs:162:46:
    Couldn't match expected type `Integer' against inferred type `Int'
    In the first argument of `(*)', namely `off'
    In the second argument of `pokeByteOff', namely
        `(off * sizeOf val)'
    In the expression: pokeByteOff ptr (off * sizeOf val) val
haddock: Failed to load all needed modules

I think the errors come from the fact that not all GHC options used to
build the libraries are passed to Haddock 2.0, since the build system uses
cabal makefiles and Makfile.local when building libraries. Haddock 2.0 is
invoked directly from Cabal, which only knows the options from the
.cabal-files AFAIK.

Should Haddock support be added to cabal makefiles, or does anyone have a
better plan?

David



More information about the Cvs-ghc mailing list