Integrating Cabal, Haddock, HsColour

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) http://www.di.unipi.it/~zunino/tmp/dist/doc/html/Cabal/Distribution-Program.... 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? - Are the options above good choices? - Is the directory tree OK? Currently Haddock creates (under dist/doc/html) lib/Module.html lib/Module-SubMod.html lib/exe1/... lib/exe2/... while ./Setup hscolour adds (also under dist/doc/html) lib/src/Module.html lib/src/Module-Submod.html lib/src/hscolour.css lib/exe1/src/... lib/exe2/src/... (lib is the package name, exeN are the targets of the other stanzas in the .cabal file) This is so that Haddock can use relative links to sources. - Currently, you can run ./Setup haddock and ./Setup hscolour in any order, and they work. You can run haddock without hscolour, and vice versa. Links will be broken only if you pass --link-to-hscolour and do not run hscolour. Should I instead merge these subcommands so to have a single ./Setup haddock --hscolour running everything? Zun.

Hi
I've just extended Cabal so to generate docs with links to highlighted sources. Now
generates HTML as this one: (run on Cabal itself)
Thanks, I have been looking for this for a while! I was thinking of implementing it myself, but never had the time...
- Is this worth including in the next Cabal version?
Yes!!!!
- Are the options above good choices?
Should I instead merge these subcommands so to have a single ./Setup haddock --hscolour running everything?
Yes I would vote for: runhaskell Setup hscolour (runs hscolour only) runhaskell Setup haddock --hscolour (does both) That way you can still get hscolouring, even if you don't want haddock, and can easily get both with one command. Thanks a lot! Neil
participants (2)
-
Neil Mitchell
-
Roberto Zunino