Haddock (software)

Command-line program documentation generator for Haskell


title: "Haddock (software)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["free-software-programmed-in-haskell", "free-documentation-generators", "source-code-documentation-formats", "software-using-the-bsd-license"] description: "Command-line program documentation generator for Haskell" topic_path: "general/free-software-programmed-in-haskell" source: "https://en.wikipedia.org/wiki/Haddock_(software)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Command-line program documentation generator for Haskell ::

::data[format=table title="Infobox Software"]

FieldValue
nameHaddock
developerSimon Marlow
releasedMay 1, 2002
latest release version
latest release date
operating systemCross-platform
platformx86, PowerPC
programming languageHaskell
genreDocumentation generation
licenseBSD-style license
websitehttp://haskell.org/haddock/
::

| name = Haddock | screenshot = | caption = | author = | developer = Simon Marlow | released = May 1, 2002 | latest release version = | latest release date = | latest preview version = | latest preview date = | operating system = Cross-platform | platform = x86, PowerPC | programming language = Haskell | genre = Documentation generation | license = BSD-style license | website = http://haskell.org/haddock/

Haddock is a free, portable command-line program documentation generator for Haskell.

Software

It is influenced by IDoc, HDoc, and Doxygen. It produces hyperlinked HTML 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 in SGML. It is often used in conjunction with darcs and Cabal. It is dependent on Glasgow Haskell Compiler (GHC), using a modified form of the HsParser (written in Happy) parser for Haskell included in GHC. Its lightweight markup is based on IDoc's. Haddock is contained in the Haskell Platform.

It is used by the GHC, Gtk2Hs and HTk projects, as well as xmonad.

Here is an example of Haddock markup: ::code[lang=haskell] -- | This is the documentation for 'square', which -- uses the () operator from "Prelude". -- It multiplies the @x@ argument against itself. square :: Integer -> Integer square x = xx ::

References

References

  1. Haddock runs on [[POSIX]]-compliant operating systems and [[Microsoft Windows]].
  2. "IDoc Manual - Installation".
  3. "Homepage of Armin Größlinger".
  4. "1.3. Contributors".
  5. [http://www.haskell.org/~simonmar/papers/haddock.pdf "Haddock: A Haskell Documentation Tool"] {{Webarchive. link. (2006-10-11 -(by Simon Marlow, ''Proceedings of the ACM SIGPLAN workshop on Haskell'', 2002; [[PDF]]))
  6. "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].

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

free-software-programmed-in-haskellfree-documentation-generatorssource-code-documentation-formatssoftware-using-the-bsd-license