[Conal Elliott] Re: getting cabal to pass more info to haddock

Ross Paterson ross at soi.city.ac.uk
Mon Feb 19 12:36:58 EST 2007

On Fri, Jan 19, 2007 at 05:18:07PM -0800, Conal Elliott wrote:
> So now I have just a new pair of flags enable-use-packages &
> disable-use-packages, which control whether haddock gets
> automatically-generated --use-package flags.

There's a similar (but simpler) problem with generating Haddock
documentation for HackageDB.  The trouble is that --use-package is
half right: it gives the interface file you want, but the wrong URL for
cross-references.  (And there's no way to override it, because haddock
doesn't know which package a --read-interface option relates to.)

For HackageDB, I think the appropriate thing would be for Cabal to use
ghc-pkg to get the haddock-interfaces field (instead of asking haddock to
ask ghc-pkg for it), but for the user to be able to override the HTML URL
at configure time.  For HackageDB, a suitable template would be


That wouldn't work for Conal's situation, where the URLs for his own
packages point at a different place than the ones distributed with GHC.

More information about the cabal-devel mailing list