[Haskell] Re: haddock not finding base lib docs -- $topdir ?

Simon Marlow simonmarhaskell at gmail.com
Tue Dec 5 04:57:37 EST 2006


Conal Elliott wrote:
> I'm running haddock for the first time, via cabal.  I get the following 
> message when i do "runhaskell Setup.hs haddock" on monadLib:
> 
>  Warning: cannot use package base-2.0:
>     HTML directory $topdir\html\libraries\base does not exist.
> 
> I do have c:/ghc/ghc-6.6/doc/html/libraries/base/.  Is there some way i 
> can let cabal know how to find it?  What is $topdir about?

This is due to the way GHC is installed on Windows, the package database doesn't 
have hardcoded pathnames, the idea being that you can move your GHC anywhere in 
the filesystem and it will still work.

Unfortunately this means that Haddock can't find the documentation for the packages.

One workaround is to specify the paths by hand, using Haddock's --read-interface 
flag.  You're using Haddock via Cabal though, so that doesn't work too well. 
The other workaround is to find GHC's package.conf file and replace the string 
$topdir with the literal path ("c:/ghc/ghc-6.6" in your case - perhaps you have 
to append "/doc" for the haddock fields, though).

I'll file a bug report against Cabal, we should really make this work.

Cheers,
	Simon


More information about the Haskell mailing list