- Haddock (software)
Infobox Software
name = Haddock
caption =
author =
developer = Simon Marlow
released =May 1 ,2002
latest release version = 2.0.0.0
latest release date =January 8 ,2008
latest preview version =
latest preview date =
operating system =Cross-platform
programming language = Haskell
genre = Documentation generation
license =BSD-style license
website = http://haskell.org/haddock/Haddock is a free, portable [Haddock runs on
POSIX -compliant operating systems andMicrosoft Windows .]command-line program documentation generator for Haskell. It is influenced byIDoc [http://www.cse.unsw.edu.au/~chak/haskell/idoc/doc/install.html] ,HDoc [http://www.fmi.uni-passau.de/~groessli/hdoc/] , andDoxygen . [http://haskell.org/haddock/haddock-html-0.8/ch01s03.html 1.3. Acknowledgements ] ] It produceshyperlink edHTML files from annotated Haskell (the documentation is embedded in comments) source files, with additional information extracted from type annotations ; it supports only partially generating documentation inSGML . It is often used in conjunction withdarcs and Cabal. It is dependent on GHC, using a modified form of the HsParser (written in Happy)parser for Haskell included in GHC and does not accept literate Haskell source code. ["Haddock only accepts plain, non-literate, Haskell source. This means that if you program in Literate Haskell, or you need to use the C pre-processor in your Haskell source, then you need to pre-process the files before feeding them to Haddock." From [http://haskell.org/haddock/haddock-html-0.8/invoking.html "Chapter 2. Invoking Haddock"] ] Its lightweight markup is based on IDoc's [http://www.haskell.org/~simonmar/papers/haddock.pdf "Haddock: A Haskell Documentation Tool"] -(by Simon Marlow, "Proceedings of the ACM SIGPLAN workshop on Haskell", 2002;PDF )] . The entire implementation is approximately 2200lines of code .It is used by the GHC, Gtk2Hs and HTk projects ["Haddock is being used to document the new hierarchical Haskell libraries. The documentation generated for the libraries shipped with the latest release of GHC is here. The Gtk2Hs project is using Haddock to build reference documentation. The HTk project is using Haddock to generate its library documentation." From the Haddock [http://haskell.org/haddock/ homepage] .] , as well as
XMonad and Yi.Here is an example of Haddock markup: -- | This is the documentation for 'square', which uses the (*) operator from "Prelude". It multiplies the @x@ argument against itself. square :: Integer -> Integer square x = x*x
References
External links
* [http://haskell.org/haddock/ Haddock Website ]
Wikimedia Foundation. 2010.