Hi all,

I've been thinking about haddock 2 and GHC, and it's not clear to me
what the best way forwards is.

Haddock uses ghc-paths to work out where the GHC libdir is. This should
work fine for running haddock in the tree, but it won't work for
installing haddock as our builds are relocatable and ghc-paths bakes the
paths in.

We could use a shell wrapper around haddock for unix-like systems, and
add some code to haddock to automatically discover the location for
Windows. However, this sort of code is fiddly, and a pain to keep
working.

However, haddock would still have to support ghc-paths for standalone
builds. Also, I think that in a GHC tree we'd still have to pointlessly
link against ghc-paths, as I can't see a simple way to avoid it.

Alternatively, we could build haddock and haddock the libraries, but not
ship haddock with GHC. I think that some people prefer this anyway.
However, if we do that, people need to make sure that they install a
version of haddock that is compatible with their .haddock files.

There's also a problem where, at the point we are configuring the
libraries, we can't tell Cabal where haddock is because we haven't built
it yet. I think that the best way around this is to add a
--with-haddock=PATH flag to "Setup haddock".

So currently I'm thinking that the best way is:
* Build the ghc-paths library when building GHC, but don't install it
* Build haddock when building GHC, but don't install it
* Add the above flag to Cabal
* Advertise as best we can which version of haddock people need to work
  with a given GHC binary distribution

Any comments?


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to