[Haskell-cafe] No fish, please

Antoine Latter aslatter at gmail.com
Fri May 13 01:01:43 CEST 2011


On Thu, May 12, 2011 at 12:45 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> Both Hackage and Cabal seem to assume as a matter of course that I want to
> use Haddock to generate all my documentation. Suppose I decide to violate
> this assumption. Then what?
>
> 1. Is there some way I can include my own HTML documentation in the package
> tarball and have Hackage/Cabal use it?
>
> 2. Is there a way to tell Hackage/Cabal to use some tool besides Haddock?
>
>

Why do you want to do this? Maybe there is some other way to get what
you need. Is Haddock doing something wrong?

In addition, it would be pretty easy to break the links from the
Hackage page for your package into the documentation - it is all done
by convention.

That said, you can change your Setup.hs to call 'defaultMainWithHooks
yourHooks' instead of 'defaultMain'. The 'yourHooks' indetifier would
by of type Distribution.Simple.UserHooks (you would want to extend the
'simpleUserHooks' value). The record field you want to change is the
'haddockHook'.

I think you would also need to update your package description file to
indicate that you've customized the build, but I'm not 100% on that
step.

I have no idea how this interacts with the scripts currently run on
Hackage, so it might not even work for that.

Antoine

 _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list