haddock & web-friendly library links?

Simon Marlow simonmarhaskell at gmail.com
Fri Dec 15 10:50:28 EST 2006

Conal Elliott wrote:
> My library uses others (including base & wxHaskell), and so references 
> to types & identifiers from those libraries show up in my Haddock docs.  
> When I put the docs on the web, the links are bogus.  How can I get 
> those links to be web-accessible versions instead of my local versions?
> Similarly, I want to package up my library so that others can build on 
> top of it and have their published haddock documentation contain 
> web-accessible pointers to my doc.
> Have these issues been thought through?  Thanks,

I'm not suggesting that this is a long-term solution, but Haddock does let you 
link to docs at an arbitrary URL, using the --read-interface flag.  This isn't 
exposed through Cabal, but you can always find out the Haddock command that 
Cabal is executing and run a modified version by hand.

Ultimately I expect as part of the Hackage project we should automatically 
generate Haddock docs for all the packages and link them together.  This needs 
some thought, perhaps it's something we can talk about at Hac.

Another thing we could consider doing is putting a public Haddock URL in the 
.cabal file, and propagating this into the package configuration.  Then when you 
generate Haddock docs there could be an option to link to either local or 
external docs for other packages.


More information about the Libraries mailing list