Integrating Cabal, Haddock, HsColour

Roberto Zunino zunino at di.unipi.it
Sun May 6 15:40:02 EDT 2007


Here's my final proposal. If everything is fine, I'll write the docs and
submit the patch.

New options:

** configure
  --with-hscolour=PATH       give the path to hscolour
  --hscolour-args=ARGS       give the args to hscolour
** haddock
  --executables      Run Haddock for Executables targets
  --hscolour[=PATH]  Also run hscolour (using PATH as the stylesheet, if
any)
** hscolour
  --executables  Run hscolour for Executables targets
  --css=PATH     Use a cascading style sheet

The --executables flag makes the doc-generating process to run for all
stanzas in the .cabal file, i.e. for generating docs for "executable"
pakages (Current patch also fixes related bug #102).

Note the --css flag to hscolour. This is very much needed: hscolour
expects the CSS file to be copied in the right directory, so either
Cabal or the user has to copy the CSS file. Very often, if not always,
you want to pass this flag to ./Setup hscolour, so that Cabal does it
for you.

Related to the above, ./Setup haddock --hscolour can take the PATH to
the CSS file. I'm not particulary happy about this, because it feels a
bit ad-hoc w.r.t. having a --with-hscolour-flags=[--css=...] , but the
latter seemed overkill to me.

Zun.


More information about the cabal-devel mailing list