darcs patch: Setup.lhs: added a specific haddock hook to deal with ...

I know that you are going to think I'm crazy, but I wanted to have package
name and description in the front page, and there they are:
http://gorgias.mine.nu/xmonad/
In order to get there I had to dig into cabal (interesting though): I came
out with this haddock hook, based on the original one. Basically:
cabal/haddock uses package description and title (from xmonad.cabal) only
when building libraries (I think it is supposed to be a feature). I though
that probably XMonad can be both: you are changing the way people think, after all!
Great being part of it...
andrea
Fri Jun 15 19:08:14 CEST 2007 Andrea Rossato

mailing_list:
I know that you are going to think I'm crazy, but I wanted to have package name and description in the front page, and there they are: http://gorgias.mine.nu/xmonad/
In order to get there I had to dig into cabal (interesting though): I came out with this haddock hook, based on the original one. Basically: cabal/haddock uses package description and title (from xmonad.cabal) only when building libraries (I think it is supposed to be a feature). I though that probably XMonad can be both: you are changing the way people think, after all!
Great being part of it... andrea
Fri Jun 15 19:08:14 CEST 2007 Andrea Rossato
* Setup.lhs: added a specific haddock hook to deal with xmonad documentation This patch adds a haddock hook to Cabal. Derived from Distribution.Simple.haddock it uses package description and synopsis for the html formatting.
I'm disinclined to add a cabal hook for this. Hooks are an unstable, discouraged way to extend the build system (and they're considered a security risk on hackage). The main reason not to use hooks is that someone with a slightly different cabal will not be able to build xmonad at all -- as the hooks api's won't match. For build system extensions we have the utils dir (e.g. already there's a script for generating the man page). -- Don

On Sun, Jun 17, 2007 at 04:22:14PM +1000, Donald Bruce Stewart wrote:
I'm disinclined to add a cabal hook for this. Hooks are an unstable, discouraged way to extend the build system (and they're considered a security risk on hackage). The main reason not to use hooks is that someone with a slightly different cabal will not be able to build xmonad at all -- as the hooks api's won't match.
We are actually adding a hook for the 'runhaskell Setup haddock' target, that is not affecting the build process anyhow. I submitted a bug report to the cabal system, since I think there's an agreement that binaries and libraries should have the same treatment with regard to documentation generation. We will see. For the time being the patch can be used by those who want a good looking html first page. It does nothing more after all. andrea
participants (2)
-
Andrea Rossato
-
dons@cse.unsw.edu.au