Integrating Cabal, Haddock, HsColour

Simon Marlow simonmarhaskell at
Thu Apr 26 03:52:08 EDT 2007

Roberto Zunino wrote:
> I've just extended Cabal so to generate docs with links to highlighted
> sources. Now
> ./Setup configure
> ./Setup haddock --link-to-hscolour
> ./Setup hscolour --css my_own_stylesheet.css
> generates HTML as this one: (run on Cabal itself)
> Click on the "Source" links on the right. You will be sent to the exact
> line. The whole Cabal docs+sources are online. Colours have been chosen
> to match my emacs configuration :-P .
> This relies on a couple of minor tweaks to Haddock and HsColour which I
> darcs-sent this morning to the authors.
> Comments are welcome.
> - Is this worth including in the next Cabal version?

Looks really nice!  (BTW, cabal-devel at is a better place to discuss 
Cabal improvements).

I'm happy for it to go in.

> - Are the options above good choices?

I'd make 'Setup haddock --hscolour' do both steps.

> - Is the directory tree OK? Currently Haddock creates (under dist/doc/html)

Looks fine.


More information about the cabal-devel mailing list