Haddock is a
free, portable
command-line
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
program documentation
A documentation generator is a programming tool that generates software documentation intended for programmers ( API documentation) or end users ( end-user guide), or both, from a set of source code files, and in some cases, binary files. Some ...
generator for
Haskell
Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lan ...
. It is influenced by
IDoc
IDoc, short for Intermediate Document, is a SAP document format for business transaction data transfers.
Non SAP-systems can use IDocs as the standard interface (computing)
In computing, an interface is a shared boundary across which two or mo ...
,
HDoc, and
Doxygen
Doxygen ( ) is a documentation generator and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code. When used for analysis, Doxyge ...
.
It produces
hyperlink
In computing, a hyperlink, or simply a link, is a digital reference to data that the user can follow or be guided by clicking or tapping. A hyperlink points to a whole document or to a specific element within a document. Hypertext is text ...
ed
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
files from annotated Haskell (the documentation is embedded in
comments
Comment may refer to:
* Comment (linguistics) or rheme, that which is said about the topic (theme) of a sentence
* Bernard Comment (born 1960), Swiss writer and publisher
Computing
* Comment (computer programming), explanatory text or informa ...
)
source files, with additional information extracted from
type annotation
In computer science, a type signature or type annotation defines the inputs and outputs for a function, subroutine or method. A type signature includes the number, types, and order of the arguments contained by a function. A type signature is typ ...
s; it supports only partially generating documentation in
SGML
The Standard Generalized Markup Language (SGML; ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
* Declarative: Markup should d ...
.
It is often used in conjunction with
darcs
Darcs is a distributed version control system created by David Roundy. Key features include the ability to choose which changes to accept from other repositories, interaction with either other local (on-disk) repositories or remote repositories v ...
and
Cabal
A cabal is a group of people who are united in some close design, usually to promote their private views or interests in an ideology, a state, or another community, often by intrigue and usually unbeknownst to those who are outside their group. T ...
. It is dependent on
Glasgow Haskell Compiler
The Glasgow Haskell Compiler (GHC) is an open-source native code compiler for the functional programming language Haskell.
It provides a cross-platform environment for the writing and testing of Haskell code and it supports numerous extension ...
(GHC), using a modified form of the HsParser (written in
Happy)
parser
Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lati ...
for Haskell included in GHC.
Its lightweight markup is based on IDoc's.
["Haddock: A Haskell Documentation Tool"](_blank)
-(by Simon Marlow, ''Proceedings of the ACM SIGPLAN workshop on Haskell'', 2002; PDF
Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
) Haddock is contained in the
Haskell Platform
The Haskell Platform is a collection of software packages, tools and libraries that create a common platform for using and developing applications in Haskell. With the Haskell Platform, Haskell follows the same principle as Python: "Batteries in ...
.
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 Haddoc]
homepage
as well as
XMonad
xmonad is a dynamic window manager (tiling) for the X Window System, noted for being written in the functional programming language Haskell.
Window manager
Begun in March 2007, version 0.1 was announced in April 2007 as 500 lines of Haskell. ...
.
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
Haddock homepage
Free software programmed in Haskell
Free documentation generators
Software using the BSD license
{{programming-software-stub