haddock command in cabal

Simon Marlow simonmar at microsoft.com
Tue Jan 18 04:59:10 EST 2005

On 18 January 2005 00:39, Isaac Jones wrote:

>>   - should process hidden modules as well as exposed ones.  The
>>     hidden modules might contain entities that are re-exported by an
>>     exposed module.  Hidden modules should use the #hide haddock
>> directive. 
> This is a bit yucky... AFAICT, it's not currently possible to tell
> haddock either via the command-line or via a config file or something
> which modules should be hidden?  One option is to munge the source
> code (hell, we're running cpphs on it, so we might as well, 'eh?).
> Could we get some way to do this with the command-line in future
> versions of haddock?

Sure.  For now, the workaround is for the programmer to add 
 -- #hide

to each hidden module.

>>   - we should install the haddock interface, and fill in the
>>   location in haddock_interfaces.  Similarly for the HTML, and
>>   haddock_html.
> I don't understand that part.  Is hadock_interfaces something in GHC's
> package config file or something?

It's in the InstalledPackageConfig.  For an ordinary package, I'd expect
that we should install the Haddock docs like this on Unix:


and then the InstalledPackageConfig should contain

   haddock_interface: $prefix/share/doc/<package>/<package>.haddock
   haddock_html:      $prefix/share/doc/<package>/html

In the future, Haddock will be able to use this information when
building documentation, so you'll be able to give -package flags to


More information about the Libraries mailing list