Re: [Hs-Generics] how to automatically create and install documentations of a package?

Hi Daneel, On Sat, Sep 19, 2009 at 13:58, Daneel Yaitskov wrote:
Recently I've found wonderful thing cabal can install packages itself! It can even install those packages which need for final one. But I'm disturbed cabal doesn't create the documentation of a package by default. It manually makes "runhaskell Setup haddock".
Who knows?
I believe you can do 'cabal haddock', but I don't know why it doesn't do it by default. BTW, the Haskell Café is typically more suitable for questions such as these. The Generics list is more specifically for generic programming discussions while the Haskell Café serves a broader audience. I've CC'd haskell-cafe@ to see if anybody there knows the answer to your question. Regards, Sean

On Sat, Sep 19, 2009 at 11:59 AM, Sean Leather
Hi Daneel,
On Sat, Sep 19, 2009 at 13:58, Daneel Yaitskov wrote:
Recently I've found wonderful thing cabal can install packages itself! It can even install those packages which need for final one. But I'm disturbed cabal doesn't create the documentation of a package by default. It manually makes "runhaskell Setup haddock".
Who knows?
I believe you can do 'cabal haddock', but I don't know why it doesn't do it by default.
BTW, the Haskell Café is typically more suitable for questions such as these. The Generics list is more specifically for generic programming discussions while the Haskell Café serves a broader audience. I've CC'd haskell-cafe@ to see if anybody there knows the answer to your question.
Regards, Sean
If you use cabal-install (as you should!), you can have it build haddocks by customizing ~/.cabal/config and adding: documentation: True -- gwern

Gwern Branwen wrote:
If you use cabal-install (as you should!), you can have it build haddocks by customizing ~/.cabal/config and adding:
documentation: True
Is there a way to make it automatically update a single contents page with links to the documentation of all installed packages? I have been doing this manually every time I cabal-install something, by running a little shell script which looks through all the packages directories for "html" directories and ".haddock" files and compiles them all into a call to "haddock --gen-contents". Mike

Hi Michael, Michael Shulman wrote:
Is there a way to make it automatically update a single contents page with links to the documentation of all installed packages?
See: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/focus=53560 http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/focus=53572 HTH, Martijn.

On 21 Sep 2009, at 09:14, Martijn van Steenbergen wrote:
Michael Shulman wrote:
Is there a way to make it automatically update a single contents page with links to the documentation of all installed packages?
See: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/ focus=53560 http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/ focus=53572
Seeing this today (I'm catching up on haskell-cafe!) made me want this too, so I rolled my own. Main nice feature: I pointed it at the hackage CSS file, so it's pleasingly familiar/pretty. Anything that doesn't have a 'html/index.html' in it gets indexed separately at the end. I used Python. I was going for quick and dirty. Sorry, Dijkstra! Haskell next time, I promise! :-) More info, screenshots, and code here: http://gimbo.org.uk/blog/2009/09/23/generating-an-index-of-haskell-haddock-d... Best, -Andy

Andy Gimblett wrote:
Is there a way to make it automatically update a single contents page with links to the documentation of all installed packages?
See: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/focus=53560 http://thread.gmane.org/gmane.comp.lang.haskell.cafe/53531/focus=53572
Seeing this today (I'm catching up on haskell-cafe!) made me want this too, so I rolled my own.
Thanks! Actually, this looks like maybe what I really wanted: http://hackage.haskell.org/trac/hackage/ticket/516 I'll probably keep using my script for now, though, until a new version of cabal is released with doc-index-file. I've copied my little script below in case anyone else wants a lightweight solution. Mike #!/bin/bash # This script, when run in a directory containing subdirectories of # the form pkg-1.1.1/html with haddock documentation, builds a master # table of contents for all this documentation, including all the # system-installed libraries from SYSDOCPATH. SYSDOCPATH=/usr/share/doc/ghc6-doc/libraries args="" # Skip the 'ghc' package, which has a lot of packages we don't care about for dir in $(find $SYSDOCPATH -type d -path '*libraries/*' -and -not -name 'ghc'); do pushd $dir >/dev/null for thing in $(find . -name '*.haddock'); do args="$args -i $dir,$dir/$thing" done popd >/dev/null done for dir in $(find . -type d -name 'html'); do pushd $dir >/dev/null for thing in $(find . -name '*.haddock'); do args="$args -i $dir,$dir/$thing" done popd >/dev/null done haddock --gen-contents $args
participants (5)
-
Andy Gimblett
-
Gwern Branwen
-
Martijn van Steenbergen
-
Michael Shulman
-
Sean Leather