Haddock version during build
David Waern
david.waern at gmail.com
Tue Jun 3 09:43:55 EDT 2008
2008/6/3 Duncan Coutts <duncan.coutts at worc.ox.ac.uk>:
> As I understand it the issues is that since haddock 2.x is using the ghc
> api and loads .hi files and then the .hi versions need to match up.
> Perhaps Simon or David can comment in more detail and about how we might
> relax the restriction.
The background is that Haddock needs the path to a GHC library
directory, to be able to initialize the GHC API. The path must belong
to an installed GHC of the same version that Haddock was built with.
In Cabal, we get the path from the configured GHC version. So we do a
check that it is the same version that Haddock was built with.
However, we don't *have* to use the configured GHC, it is just
convenient since we don't have to introduce a new flag, and because we
can be sure that it has all the required libraries installed.
We could introduce a Cabal flag for specifying the GHC version to use
with Haddock, but for the case of installing GHC with documentation,
wouldn't there be a problem if some of the core libraries require
newer versions of the core libraries installed with Haddock's GHC?
I usually install the documentation by first installing GHC without
docs, then installing Haddock with this GHC version, and then running
the docs installation.
David
More information about the Cvs-libraries
mailing list