
Dear Haskell community, I'm proud to announce the release of Haddock 2.0.0.0! http://www.haskell.org/haddock http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haddock-2.0.0.0 Changes in version 2.0.0.0: * The GHC API is used as the front-end * Haddock now understands all syntax understood by GHC 6.8.2 * Haddock can generate documentation for some of the language extensions in GHC 6.8.2 * Format of module attributes has changed. The only way of specifiying module attributes is via a new OPTIONS_HADDOCK pragma. Example: {-# OPTIONS_HADDOCK hide, prune #-} * Haddock understands literate source files * Add a small library to read Haddock's interface files * Add a flag -B for passing the path to the GHC lib dir * Add a flag --optghc for passing options to GHC * Add a flag --ghc-version for printing the GHC version * Remove --use-package, --allow-missing-html, --ghc-pkg, in favour of only supporting --read-interface * Remove --package flag, the GHC flag -package-name can be used instead * Remove --no-implicit-prelude flag, the GHC flag -XNoImplicitPrelude can be used instead * Hoogle support temporarily removed It should be noted that this version of Haddock is not compatible with interface files from previous versions. Also, currently, when Haddock comes across a GHC language extension that it doesn't know how to render as HTML, it will bail out. If this happens to you, bug me about it, or help out by sending a patch. On the development side, Haddock has been slightly refactored for easier code navigation, and has the beginnings of a test suite. Haddock also ships with (as noted in the list of changes) a small, experimental library that can be used to read its interface files. Tools and IDE-type applications can use this library to e.g. look up the documentation for identifiers. The code repository is at http://code.haskell.org/haddock. David

Hello, I've just tried this with cabal
runghc Setup haddock --hyperlink-source --hscolour-css=..\hscolour.css
and I get this error.. Setup: haddock --hyperlink-source requires Haddock version 0.8 or later This looks like a bug in cabal rather than the new Haddock to me. Can anyone think of an easy workaround? Regards -- Adrian Hey

2008/1/8, Adrian Hey
Hello,
I've just tried this with cabal
runghc Setup haddock --hyperlink-source --hscolour-css=..\hscolour.css
and I get this error..
Setup: haddock --hyperlink-source requires Haddock version 0.8 or later
This looks like a bug in cabal rather than the new Haddock to me.
Can anyone think of an easy workaround?
Yes, you could switch to the darcs version of Cabal, where this has been fixed. I don't know if a release containing the fix has been made. David

On Jan 8, 2008 10:28 AM, David Waern
* Haddock now understands all syntax understood by GHC 6.8.2
Does Haddock still define __HADDOCK__? There's a lot of code that uses this flag just to hide something Haddock didn't know. -- Felipe.

Felipe Lessa wrote:
On Jan 8, 2008 10:28 AM, David Waern
wrote: * Haddock now understands all syntax understood by GHC 6.8.2
Does Haddock still define __HADDOCK__? There's a lot of code that uses this flag just to hide something Haddock didn't know.
Haddock itself never defined __HADDOCK__, because it didn't do the CPP preprocessing itself. Cabal adds __HADDOCK__ itself when preprocessing files for passing to Haddock. When used with Haddock version 2, Cabal no longer defines __HADDOCK__ when preprocessing. Haddock 2 can do the preprocessing itself, because it is processing the Haskell files using the GHC API. In this case, if you want __HADDOCK__ defined, you have to add it explicitly with --optghc -D__HADDOCK__. The easiest way to use Haddock 2 is via Cabal, which will automatically add the appropriate options for your package, including the right -B option which Haddock now needs in order that the GHC API can find its package database. Cheers, Simon

Now I see. Thanks David and Simon for the clarifications! =) -- Felipe.

On Jan 8, 2008 1:28 PM, David Waern
Dear Haskell community,
I'm proud to announce the release of Haddock 2.0.0.0!
Great! I already tested a dracs spanshot before the release and seemed to work well with TH code. Any idea about when will hackage adopt this version to generate its documentation?

2008/1/10, Alfonso Acosta
On Jan 8, 2008 1:28 PM, David Waern
wrote: Dear Haskell community,
I'm proud to announce the release of Haddock 2.0.0.0!
Great! I already tested a dracs spanshot before the release and seemed to work well with TH code.
Any idea about when will hackage adopt this version to generate its documentation?
Hmm, I'm not sure since I'm not involved in Hackage, but I can't think of anything that would stop Hackage from adopting it right away. David

On Tue, 8 Jan 2008, David Waern wrote:
Changes in version 2.0.0.0:
* The GHC API is used as the front-end
It's great to see this progress in Haddock. However, is Haddock now more difficult to port than before? Is there some bug- and feature request tracker for Haddock? I only know of http://www.haskell.org/haskellwiki/Haddock/Development_ideas and the first big point seems to be finished now. I like to have the following enhancements: * Optionally show qualifications of identifiers, that is print "Sequence.map" rather than "map", "Music.T" rather than just "T". The option for haddock could be --qualification QUAL QUAL=none (default) strip off qualification (just "map") QUAL=orig show the identifiers as they are written in the module (e.g. "map" or "List.map") QUAL=full show all identifiers with full qualification (Data.List.map) Actually I tried to implement it by myself in the old Haddock, but I could not precisely identify the place, where the qualification is removed. * Documentation of arguments of type constructors other than 'top level' arrows. E.g. T (a {- ^ arg -} -> b {- ^ result -} ) (a {- ^ arg -} -> b {- ^ result -} ) -> c (a {- ^ x coord -}, b {- ^ y coord -}) -> c It's probably difficult to format properly in HTML.

2008/1/16, Henning Thielemann
On Tue, 8 Jan 2008, David Waern wrote:
Changes in version 2.0.0.0:
* The GHC API is used as the front-end
It's great to see this progress in Haddock. However, is Haddock now more difficult to port than before?
Haddock is already ported to the GHC API, the wiki-page needs updating.
Is there some bug- and feature request tracker for Haddock? I only know of http://www.haskell.org/haskellwiki/Haddock/Development_ideas and the first big point seems to be finished now.
There is no bug-tracker yet. When community.haskell.org provides Trac, we might use that. For now, we're using the TODO file in the darcs repo (code.haskell.org/haddock).
I like to have the following enhancements:
* Optionally show qualifications of identifiers, that is print "Sequence.map" rather than "map", "Music.T" rather than just "T". The option for haddock could be --qualification QUAL QUAL=none (default) strip off qualification (just "map") QUAL=orig show the identifiers as they are written in the module (e.g. "map" or "List.map") QUAL=full show all identifiers with full qualification (Data.List.map) Actually I tried to implement it by myself in the old Haddock, but I could not precisely identify the place, where the qualification is removed.
* Documentation of arguments of type constructors other than 'top level' arrows. E.g. T (a {- ^ arg -} -> b {- ^ result -} ) (a {- ^ arg -} -> b {- ^ result -} ) -> c (a {- ^ x coord -}, b {- ^ y coord -}) -> c It's probably difficult to format properly in HTML.
I've added these to the TODO file. Thanks, David
participants (6)
-
Adrian Hey
-
Alfonso Acosta
-
David Waern
-
Felipe Lessa
-
Henning Thielemann
-
Simon Marlow