ANNOUNCE: Haddock version 2.0.0.0
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
Felipe Lessa wrote:
On Jan 8, 2008 10:28 AM, David Waern <david.waern@gmail.com> 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
participants (3)
-
David Waern -
Felipe Lessa -
Simon Marlow