Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/haddock
  • rae/haddock
  • sjakobi/haddock
  • RyanGlScott/haddock
  • mynguyenbmc/haddock
  • kcsongor/haddock
  • wz1000/haddock
  • dten/haddock
  • bgamari/haddock
  • abrar/haddock
  • obsidiansystems/haddock
  • inaki/haddock
  • hsyl20/haddock
  • JoshMeredith/haddock
  • matheus23/haddock
  • Gertjan423/haddock
  • ulysses4ever/haddock
  • facundominguez/haddock
  • SuedeHead/haddock
  • Haskell-mouse/haddock
  • fgaz/haddock
  • arybczak/haddock
  • coot/haddock
  • hithroc/haddock
  • ani/haddock
  • supersven/haddock
  • alt-romes/haddock
  • sspencer/haddock
  • Joald/haddock
  • raehik/haddock
  • lexi.lambda/haddock
  • torsten.schmits/haddock
  • Bodigrim/haddock
  • doyougnu/haddock
  • barci2/haddock
  • Jade/haddock
  • wavewave/haddock
  • soulomoon/haddock
  • tvh/haddock
  • trac-sjoerd_visscher/haddock
  • Kleidukos/haddock
  • mmzk1526/haddock
  • stephenjudkins/haddock
  • KommuSoft1/haddock
44 results
Show changes
Commits on Source (1182)
Simon Marlow <simonmar@microsoft.com>, marlowsd@gmail.com, simonmar
Simon Hengel <simon.hengel@wiktory.org>
David Waern <david.waern@gmail.com>, davve@dtek.chalmers.se, david.waern@gmail.com, David Waern
Sven Panne <sven.panne@aedion.de>, panne
Neil Mitchell <http://www.cs.york.ac.uk/~ndm/>, Neil Mitchell
Ross Paterson <ross@soi.city.ac.uk>, ross
Simon Peyton-Jones <simonpj@microsoft.com>
Wolfgang Jeltsch <g9ks157k@acme.softbase.org>, wolfgang
Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
Benjamin Franksen <benjamin.franksen@bessy.de>
dist
doc/haddock
--------------------------------------------
-- Haddock 2.9.3
--------------------------------------------
A new version of Haddock, the Haskell documentation tool, is out!
This is the version that comes with GHC 7.2.1 (although that executable claims
it is version 2.9.2!)
Apologies to people who have sent in patches that haven't made it into this
release, they will go into the next one.
--------------------------------------------
-- Changes in version 2.9.3
--------------------------------------------
Changes in version 2.9.3
* Build with GHC 7.2.1
* Support blank lines in results of examples
* A type signatures for multiple names generates one signature in the output
* Minor bug fixes
--------------------------------------------
-- Links
--------------------------------------------
Homepage:
http://www.haskell.org/haddock
Hackage page:
http://hackage.haskell.org/package/haddock-2.9.0
Bugtracker and wiki:
http://trac.haskell.org/haddock
Mailing list:
haddock@projects.haskell.org
Code repository:
http://code.haskell.org/haddock
--------------------------------------------
-- Contributors
--------------------------------------------
The following people contributed patches to this release:
Max Bolingbroke
Ian Lynagh
Simon Hengel
Jose Pedro Magalhaes
Simon Peyton Jones
Michal Terepeta
David Waern
--------------------------------------------
-- Get Involved
--------------------------------------------
We would be very happy to get more contributors. To get involved, start by
grabbing the code:
http://code.haskell.org/haddock
Then take a look at the bug and feature tracker for things to work on:
http://trac.haskell.org/haddock
Changes in version 2.9.4
* Require GHC >= 7.2
* Support Alex 3.x
Changes in version 2.9.3
[This is the version that comes with GHC 7.2.1 although it claims it's 2.9.2!]
* Build with GHC 7.2.1
* Support blank lines in results of examples
* A type signature for multiple names generates one signature in the output
* Minor bug fixes
Changes in version 2.9.2
* Build with GHC 7.0.2
* Write Hoogle output in utf8; fixes GHC build on Windows
Changes in version 2.9.1
* Fix build in GHC tree
* Improve .cabal file
Changes in version 2.9.0
* Drop support for ghc < 7
* New flag --qual for qualification of names
* Print doc coverage information to stdout when generating docs
* Include an 'All' option in the A-Z subdivided index
* Make TOC group header identifiers validate
* Minor changes to the API
Changes in the version that comes with GHC 7.0.1
[This version claims it is 2.8.0 but is actually based on 2.8.1]
* Fix URL creation on Windows: Use / not \ in URLs.
* Support GHC 7.0
Changes in version 2.8.1
* Fix build on Windows with MinGW
Changes in version 2.8.0
* HTML backend completely rewritten to generate semantically rich XHTML
using the xhtml package.
* New default CSS based on the color scheme chosen for the new Haskell
wiki, with a pull-out tab for the synopsis.
* Theme engine based on CSS files. Themes can be switched from the
header menu. (New flags --built-in-themes and --theme. The latter
is an alias for --css which now has extended semantics).
* Markup support for executable examples/unit-tests. To be used with an
upcoming version of the DocTest program.
* Addition of a LaTeX backend.
* Frames-mode can be enabled from the header menu.
* Path to source entities can be specified per package, so that source
links work for cross-package documentation.
* Support for a second form of enumerated lists (1. 2. etc).
* Additions and changes to the Haddock API.
* New flag --no-tmp-comp-dir to tell Haddock to write and pick up
compilation files (.o, .hi, etc) to/from GHC's output directory instead
of a temporary directory.
* Various bug fixes.
-----------------------------------------------------------------------------
Changes in version 2.6.1 (bug fix release from the stable branch)
* Fix #128
-----------------------------------------------------------------------------
Changes in version 2.7.2
* Add Paths_haddock to library
-----------------------------------------------------------------------------
Changes in version 2.7.1:
* Fix problems with library part of .cabal file
-----------------------------------------------------------------------------
Changes in version 2.7.0:
* Instances can be commented
* The Haddock API now exposes more of the internals of Haddock
* Bug fixes (most importantly #128)
-----------------------------------------------------------------------------
Changes in version 2.6.0:
* Drop support for GHC 6.10.*
* Add support for GHC 6.12.1
* Cross-package documentation: full documentation show up when re-exporting
things coming from external packages
* Lexing and parsing the Haddock comment markup is now done in Haddock
again, instead of in GHC
* Slightly prettier printing of instance heads
* Support platforms for which GHC has no native code generator
* Add a flag --print-ghc-libdir
* Minor bug fixes
-----------------------------------------------------------------------------
Changed in version 2.5.0:
* Drop support for GHC 6.8.*
* Add support for GHC 6.10.3 and 6.10.4
* Revert to the old multi-page index for large packages (#106)
* Show GADT records in the generated documentation
* Create output directory if it doesn't exist (#104)
* Use the native codegen instead of compiling via C for TH modules
* Add --use-unicode flag for displaying prettier versions of common symbols
* Mutiple verbosity levels: remove --verbose and add --verbosity=n
-----------------------------------------------------------------------------
Changed in version 2.4.2:
* Support GHC 6.10.2
* Haddock no longer crashes on Template Haskell modules (#68)
(only with GHC 6.10.2 or above)
* Fix problem with Template Haskell-generated declarations disappearing (#59)
* Generate two anchors for each link for compatibility between IE and Opera
(#45)
* Improved error messages
* Show re-exports from external packages again (GHC ticket #2746)
* Store hidden modules in .haddock files again (needed by the haddock
library)
* Avoid processing boot modules
* Pragmas may exist between document comments and declarations
* Do not indicate that a constructor argument is unboxed
* Fix problem with with non-working links to ghc-prim
* Allow referring to a specific section within a module in a module link
(#65)
* Fixes to the Hoogle backend
* Improvements to the haddock library
* Many other fixes (including #67, #69, #58, #57)
-----------------------------------------------------------------------------
Changed in version 2.4.1:
* Depend on base 4.* when GHC >= 6.9, otherwise 3.*
-----------------------------------------------------------------------------
Changed in version 2.4.0:
* Add framed view of the HTML documentation
* Build with GHC 6.8.2 and 6.8.3 again
* Support images in documentation comments again
* Small improvements to the Hoogle output
* A few bugs has been fixed
-----------------------------------------------------------------------------
Changed in version 2.3.0:
* Support for GHC 6.10.1
* Slightly improved space usage
* Fix a bug that made hidden modules show up in the contents & index pages
* Fix a bug that made Haddock load modules twice
* Improvements to the Hoogle output
-----------------------------------------------------------------------------
Changed in version 2.2.2:
* Relax version dependency on ghc-paths
-----------------------------------------------------------------------------
Changes in version 2.2.1:
* Support for GHC 6.8.3
* The Hoogle backend is back, thanks to Neil Mitchell. The plan is to be
compatible with the upcoming Hoogle 4 pre-release
* Show associated types in the documentation for class declarations
* Show type family declarations
* Show type equality predicates
* Major bug fixes (#1 and #44)
* It is no longer required to specify the path to GHC's lib dir
* Remove unnecessary parenthesis in type signatures
-----------------------------------------------------------------------------
Changes in version 2.1.0:
* Fix a bug that made links point to the defining module instead
of the "best" one (e.g Int pointing to GHC.Base instead of Data.Int)
* Fix a couple of smaller bugs
* The representation of DocName was changed in the library
* Add a flag --no-warnings for turning off warnings
-----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
Changes in version 0.9:
* Infix type operators, e.g., first :: a~>a' -> (a,b)~>(a',b)
* Add a search box to the index page which automatically narrows
the index to the search as you type (thanks to Neil Mitchell).
* Add a --ghc-pkg flag
* Add a flag --allow-missing-html
* URL expansion for %%, %L, %{LINE}
* added substitution %{FILE///c}
* Lexing of /.../ is now more like '...', in that a / character must
be matched by another / character on the same line, otherwise it
is treated as a literal '/'. This removes a common source of
accidental parse errors in documentation.
* Various bugs were fixed.
* Cabal 1.2 is now required, and Haddock builds with GHC 6.8.x.
-----------------------------------------------------------------------------
Changes in version 0.8: Changes in version 0.8:
* Haddock has a Cabal build system, and will build on Windows without
Cygwin or MSYS. GHC 6.4 or later is required.
* New options: --comments-base, --comments-module, --comments-entity
for generating links to pages (eg. wiki) for collecting user comments.
* New options: --source-base, --source-module, --source-entity
for generating links to source code. Haddock now understands
{-# LINE #-} pragmas, which means it can figure out the correct
name for the source file even if the file is preprocessed.
* Haddock generates output for populating the Hoogle search engine.
* New markup <<url>> for including images.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Changes in version 0.7: Changes in version 0.7:
......
Copyright 2002, Simon Marlow. All rights reserved. Copyright 2002-2010, Simon Marlow. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
......
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
dir = utils/haddock
TOP = ../..
include $(TOP)/mk/sub-makefile.mk
...@@ -36,17 +36,12 @@ should all be ok). ...@@ -36,17 +36,12 @@ should all be ok).
Full documentation can be found in the doc/ subdirectory, in DocBook Full documentation can be found in the doc/ subdirectory, in DocBook
format. format.
Please send questions and suggestions to me: Please send questions and suggestions to:
David Waern <david.waern@gmail.com> or
Simon Marlow <simonmar@microsoft.com> Simon Marlow <simonmar@microsoft.com>
System Requirements
===================
Haddock currently requires GHC version 4.08 or later to compile.
[1] IDoc - A No Frills Haskell Interface Documentation System [1] IDoc - A No Frills Haskell Interface Documentation System
http://www.cse.unsw.edu.au/~chak/haskell/idoc/ http://www.cse.unsw.edu.au/~chak/haskell/idoc/
......
See http://github.com/waern/haskell-style-guide
-- ---------------------------------------------------------------------------
-- Before next release
-----------------------------------------------------------------------------
-- bugs
* HsParser bug: starting the module with '-- | doc' followed by a declaration
doesn't parse, because the '-- | doc' is interpreted as the module
documentation (the grammar has an S/R conflict because of this).
* We don't point module references ("..." in doc strings) to the correct
package, they are always assumed to be modules in the current package.
* For a non-home occurrence of an entity, we should point to the home
location in the doc somehow. This would help to distinguish
multiple functions with the same name (eg. we don't know whether
Prelude.catch is Control.Exception.catch vs. System.IO.Error.catch).
* The lexer should handle "...." in doc strings, only recognising it if the
contents looks like a module name.
* Mentioning a qualified identifer in doc loses the qualifier, even when
it is required? (see "[Haskell] auto-qualification of identifiers in
Haddock").
* A module re-export should only reference the target module if the
target module is imported without hiding any of its exports (otherwise
we should inline just the exported bits).
* remove the s/r conflicts I added to the grammar
* Support for the rest of GHC extensions in the parser:
- scoped type variables (return types left to do).
- template haskell
- explicit kind annotations
- infix type constructors
* Be a bit cleaner about error cases: some internal errors can be
generated by bugs in the Haskell source. Divide out the proper
internal error cases and emit proper error messages.
* derived instance support isn't quite right (doing it properly is
hard, though).
* The synopsis generated for a module with no docs should not attempt to
link to the doc for each entity. We need a different kind of summary
here: what we really want is just the documentation section but without
the extra whitespace between decls.
* We don't handle non-ASCII characters in doc comments. (need to specify
the encoding in the generated HTML too?).
* There's no way to refer explicitly to either a type/class
constructor or data constructor When there are more than one of
these with the same name. Perhaps introduce a special syntax for
them? (eg. ':C' means data constructor C?)
-----------------------------------------------------------------------------
-- features
* Haddock could compare interfaces from multiple versions of a module
and indicate changes between versions (eg. a small "new!" or
"changed!" icon, or "stable since 1.0").
* Something equivalent to JavaDoc's @since
* Source code: various people want to get at the source code from the docs.
* Optionally include source code for a function in its docs?
* Suggestion from Benjamin Pierce: generat separate HTML pages with the
source code, with anchors that you can link to from the docs.
Sounds fairly easy to implement...
* Parse and remember {-# SOURCE #-} imports, possibly do something sensible
with them?
* nested itemized and enumerated lists.
* There ought to be a way to include some structure in the "description"
(section headings, etc.) and possibly in other comments. (suggseted
by Daan).
* Comments on instance declarations? (suggested by Daan and Iavor).
* Comments on default method declarations? (suggested by Satnam).
* Comments on components of a tuple, for argument or return types.
* Add a search feature which just invokes Google?
* attributes for individual declarations, eg.
-- #abstract
or targetted to a specific decl:
-- #T: abstract
#long, #short, #noinstances (on a type or class)
#inline, #noinline on a module export
* Allow documentation annotations to explicitly name the entity they
refer to.
* In the contents page, indicate portability/stability of each module
somehow.
* Add back-references from the definition to the uses of types/classes
(perhaps in the index?)
* Add a link to the defining location of a re-exported entity
* fixities
* include file revision info in module headers
* Allow individual function arguments to be documented when the function
type is a record element?
* hiding instances?
* Add a way to indicate DEPRECATED functions/types/modules? Perhaps
parse the GHC DEPRECATED pragma?
-----------------------------------------------------------------------------
-- cosmetic
* Allow more parts of the documentation to be squashed and expanded?
* for a constructor, don't fill its entire cell with a grey background.
* switch to longer rendering form for datatypes when necessary?
* remove extra whitespace from the generated HTML to save space
# mini script for building the relocatable Windows binary distribution.
#
# sh build-windows-dist.sh
#
# NB. the Cabal that shipped with GHC 6.6 isn't enough for this, because it
# is missing this patch:
#
# Fri Oct 13 11:09:41 BST 2006 Simon Marlow <simonmar@microsoft.com>
# * Fix getDataDir etc. when bindir=$prefix
#
# So you need to use a more recent Cabal. GHC 6.6 is fine for building the
# package, though.
ghc --make Setup
./Setup configure --prefix=`pwd`/install --bindir='$prefix' --libdir='$prefix' --datadir='$prefix'
./Setup build
./Setup install
echo Now zip up `pwd`/install as "haddock-<version>-Win32.zip"
...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([Makefile]) ...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([Makefile])
dnl ** check for DocBook toolchain dnl ** check for DocBook toolchain
FP_CHECK_DOCBOOK_DTD FP_CHECK_DOCBOOK_DTD
FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl]) FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/xsl-stylesheets-*])
FP_PROG_FO_PROCESSOR FP_PROG_FO_PROCESSOR
AC_CONFIG_FILES([config.mk]) AC_CONFIG_FILES([config.mk])
......
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
utils/haddock/doc_DOCBOOK_SOURCES = utils/haddock/doc/haddock.xml
$(eval $(call docbook,utils/haddock/doc,haddock))
...@@ -10,13 +10,18 @@ ...@@ -10,13 +10,18 @@
<firstname>Simon</firstname> <firstname>Simon</firstname>
<surname>Marlow</surname> <surname>Marlow</surname>
</author> </author>
<address><email>simonmar@microsoft.com</email></address> <address><email>marlowsd@gmail.com</email></address>
<author>
<firstname>David</firstname>
<surname>Waern</surname>
</author>
<address><email>david.waern@gmail.com</email></address>
<copyright> <copyright>
<year>2004</year> <year>2010</year>
<holder>Simon Marlow</holder> <holder>Simon Marlow, David Waern</holder>
</copyright> </copyright>
<abstract> <abstract>
<para>This document describes Haddock version 0.8, a Haskell <para>This document describes Haddock version 2.10.0, a Haskell
documentation tool.</para> documentation tool.</para>
</abstract> </abstract>
</bookinfo> </bookinfo>
...@@ -42,7 +47,7 @@ ...@@ -42,7 +47,7 @@
code.</para> code.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>There is s tremendous amount of useful API documentation <para>There is a tremendous amount of useful API documentation
that can be extracted from just the bare source code, that can be extracted from just the bare source code,
including types of exported functions, definitions of data including types of exported functions, definitions of data
types and classes, and so on. Haddock can therefore generate types and classes, and so on. Haddock can therefore generate
...@@ -93,8 +98,8 @@ ...@@ -93,8 +98,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>We might want documentation in multiple formats - online <para>We might want documentation in multiple formats - online
and printed, for example. Haddock comes with HTML and DocBook and printed, for example. Haddock comes with HTML, LaTeX,
backends, and it is structured in such a way that adding new and Hoogle backends, and it is structured in such a way that adding new
back-ends is straightforward.</para> back-ends is straightforward.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -106,17 +111,11 @@ ...@@ -106,17 +111,11 @@
from its <ulink url="http://www.haskell.org/haddock/">web from its <ulink url="http://www.haskell.org/haddock/">web
site</ulink>.</para> site</ulink>.</para>
<para>Up-to-date sources can also be obtained from CVS. The <para>Up-to-date sources can also be obtained from our public
Haddock sources are under <literal>fptools/haddock</literal> in darcs repository. The Haddock sources are at
the <literal>fptools</literal> CVS repository, which also <literal>http://code.haskell.org/haddock</literal>. See
contains GHC, Happy, and several other projects. See <ulink <ulink url="http://www.darcs.net/">darcs.net</ulink> for more
url="http://www.haskell.org/ghc/docs/latest/html/building/sec-cvs.html">Using information on the darcs version control utility.</para>
The CVS Repository</ulink> for information on how to access the
CVS repository. Note that you need to check out the
<literal>fpconfig</literal> module first to get the generic
build system (the <literal>fptools</literal> directory), and
then check out <literal>fptools/haddock</literal> to get the
Haddock sources.</para>
</section> </section>
<section id="license"> <section id="license">
...@@ -126,7 +125,7 @@ ...@@ -126,7 +125,7 @@
Haddock source code, except where otherwise indicated.</para> Haddock source code, except where otherwise indicated.</para>
<blockquote> <blockquote>
<para>Copyright 2002, Simon Marlow. All rights reserved.</para> <para>Copyright 2002-2010, Simon Marlow. All rights reserved.</para>
<para>Redistribution and use in source and binary forms, with <para>Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the or without modification, are permitted provided that the
...@@ -162,6 +161,51 @@ ...@@ -162,6 +161,51 @@
</blockquote> </blockquote>
</section> </section>
<section>
<title>Contributors</title>
<para>Haddock was originally written by Simon Marlow. Since it is an open source
project, many people have contributed to its development over the years.
Below is a list of contributors in alphabetical order that we hope is
somewhat complete. If you think you are missing from this list, please contact
us.
</para>
<itemizedlist>
<listitem>Ashley Yakeley</listitem>
<listitem>Benjamin Franksen</listitem>
<listitem>Brett Letner</listitem>
<listitem>Clemens Fruhwirth</listitem>
<listitem>Conal Elliott</listitem>
<listitem>David Waern</listitem>
<listitem>Duncan Coutts</listitem>
<listitem>George Pollard</listitem>
<listitem>George Russel</listitem>
<listitem>Hal Daume</listitem>
<listitem>Ian Lynagh</listitem>
<listitem>Isaac Dupree</listitem>
<listitem>Joachim Breitner</listitem>
<listitem>Krasimir Angelov</listitem>
<listitem>Lennart Augustsson</listitem>
<listitem>Luke Plant</listitem>
<listitem>Malcolm Wallace</listitem>
<listitem>Mark Lentczner</listitem>
<listitem>Mark Shields</listitem>
<listitem>Neil Mitchell</listitem>
<listitem>Mike Thomas</listitem>
<listitem>Manuel Chakravarty</listitem>
<listitem>Oliver Brown</listitem>
<listitem>Roman Cheplyaka</listitem>
<listitem>Ross Paterson</listitem>
<listitem>Simon Hengel</listitem>
<listitem>Simon Marlow</listitem>
<listitem>Simon Peyton-Jones</listitem>
<listitem>Sigbjorn Finne</listitem>
<listitem>Stefan O'Rear</listitem>
<listitem>Sven Panne</listitem>
<listitem>Thomas Schilling</listitem>
<listitem>Wolfgang Jeltsch</listitem>
<listitem>Yitzchak Gale</listitem>
</itemizedlist>
</section>
<section> <section>
<title>Acknowledgements</title> <title>Acknowledgements</title>
...@@ -186,12 +230,9 @@ ...@@ -186,12 +230,9 @@
<para>and probably several others I've forgotten.</para> <para>and probably several others I've forgotten.</para>
<para>Thanks to the following people for useful feedback, <para>Thanks to the the members
discussion, patches, packaging, and moral support: Simon Peyton of <email>haskelldoc@haskell.org</email>,
Jones, Mark Shields, Manuel Chakravarty, Ross Patterson, Brett <email>haddock@projects.haskell.org</email> and everyone who
Letner, Sven Panne, Hal Daume, George Russell, Oliver Braun,
Ashley Yakeley, Malcolm Wallace, Krasimir Angelov, the members
of <email>haskelldoc@haskell.org</email>, and everyone who
contributed to the many libraries that Haddock makes use contributed to the many libraries that Haddock makes use
of.</para> of.</para>
</section> </section>
...@@ -209,9 +250,8 @@ ...@@ -209,9 +250,8 @@
</cmdsynopsis> </cmdsynopsis>
<para>Where each <replaceable>file</replaceable> is a filename <para>Where each <replaceable>file</replaceable> is a filename
containing a Haskell source module. Only plain Haskell source containing a Haskell source module (.hs) or a Literate Haskell source
files are accepted (but see <xref linkend="cpp"/> for instructions module (.lhs) or just a module name.</para>
on how to pre-process source files for feeding to Haddock).</para>
<para>All the modules specified on the command line will be <para>All the modules specified on the command line will be
processed together. When one module refers to an entity in processed together. When one module refers to an entity in
...@@ -227,9 +267,31 @@ ...@@ -227,9 +267,31 @@
<para>The modules should <emphasis>not</emphasis> be mutually <para>The modules should <emphasis>not</emphasis> be mutually
recursive, as Haddock don't like swimming in circles.</para> recursive, as Haddock don't like swimming in circles.</para>
<para>You must also specify an option for the output format.
Currently only the <option>-h</option> option for HTML and the
<option>--hoogle</option> option for outputting Hoogle data are
functional.</para>
<para>The packaging
tool <ulink url="http://www.haskell.org/ghc/docs/latest/html/Cabal/index.html">Cabal</ulink>
has Haddock support, and is often used instead of invoking Haddock
directly.</para>
<para>The following options are available:</para> <para>The following options are available:</para>
<variablelist> <variablelist>
<varlistentry>
<term>
<indexterm><primary><option>-B</option></primary></indexterm>
<option>-B</option> <replaceable>dir</replaceable>
</term>
<listitem>
<para>Tell GHC that that its lib directory is
<replaceable>dir</replaceable>. Can be used to override the default path.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-o</option></primary></indexterm> <indexterm><primary><option>-o</option></primary></indexterm>
...@@ -245,6 +307,20 @@ ...@@ -245,6 +307,20 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-l</option></primary></indexterm>
<option>-l</option> <replaceable>dir</replaceable>
</term>
<term>
<indexterm><primary><option>--lib</option></primary></indexterm>
<option>--lib</option>=<replaceable>dir</replaceable>
</term>
<listitem>
<para>Use Haddock auxiliary files (themes, javascript, etc...) in <replaceable>dir</replaceable>.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-i</option></primary></indexterm> <indexterm><primary><option>-i</option></primary></indexterm>
...@@ -278,22 +354,6 @@ ...@@ -278,22 +354,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>--use-package</option></primary></indexterm>
<option>--use-package</option>=<replaceable>package</replaceable>
</term>
<listitem>
<para>Like <option>--read-interface</option>, but use
<command>ghc-pkg</command> to locate the interface file and
HTML documentation for <replaceable>package</replaceable>,
to reference when generating the documentation.</para>
<para>Multiple <option>--use-package</option> options may
be given.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-D</option></primary></indexterm> <indexterm><primary><option>-D</option></primary></indexterm>
...@@ -317,35 +377,6 @@ ...@@ -317,35 +377,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-l</option></primary></indexterm>
<option>-l</option> <replaceable>dir</replaceable>
</term>
<term>
<indexterm><primary><option>--lib</option></primary></indexterm>
<option>--lib</option>=<replaceable>dir</replaceable>
</term>
<listitem>
<para>Use auxiliary files in <replaceable>dir</replaceable>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-S</option></primary></indexterm>
<option>-S</option>
</term>
<term>
<indexterm><primary><option>--docbook</option></primary></indexterm>
<option>--docbook</option>
</term>
<listitem>
<para>Reserved for future use (output documentation in DocBook XML
format).</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-h</option></primary></indexterm> <indexterm><primary><option>-h</option></primary></indexterm>
...@@ -361,6 +392,15 @@ ...@@ -361,6 +392,15 @@
specified directory if the <option>-o</option> option is specified directory if the <option>-o</option> option is
given), including the following:</para> given), including the following:</para>
<variablelist> <variablelist>
<varlistentry>
<term><filename><replaceable>module</replaceable>.html</filename></term>
<term><filename>mini_<replaceable>module</replaceable>.html</filename></term>
<listitem>
<para>An HTML page for each
<replaceable>module</replaceable>, and a "mini" page for
each used when viewing in frames.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><filename>index.html</filename></term> <term><filename>index.html</filename></term>
<listitem> <listitem>
...@@ -370,36 +410,33 @@ ...@@ -370,36 +410,33 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>haddock.css</filename></term> <term><filename>doc-index.html</filename></term>
<term><filename>doc-index-<replaceable>X</replaceable>.html</filename></term>
<listitem> <listitem>
<para>The stylesheet used by the generated HTML. Feel <para>The alphabetic index, possibly split into multiple
free to modify this to change the colors or pages if big enough.</para>
layout, or even specify your own stylesheet using the
<option>--css</option> option.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>haddock.js</filename></term> <term><filename>frames.html</filename></term>
<listitem> <listitem>
<para>A small piece of JavaScript for collapsing sections <para>The top level document when viewing in frames.</para>
of the generated HTML.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename><replaceable>module</replaceable>.html</filename></term> <term><filename><replaceable>some</replaceable>.css</filename></term>
<term><filename><replaceable>etc...</replaceable></filename></term>
<listitem> <listitem>
<para>An HTML page for each <para>Files needed for the themes used. Specify your themes
<replaceable>module</replaceable>.</para> using the <option>--theme</option> option.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>doc-index.html</filename></term> <term><filename>haddock-util.js</filename></term>
<term><filename>doc-index-XX.html</filename></term>
<listitem> <listitem>
<para>The index, split into two <para>Some JavaScript utilities used to implement some of the
(functions/constructors and types/classes, as per dynamic features like collapsable sections, and switching to
Haskell namespaces) and further split frames view.</para>
alphabetically.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
...@@ -407,61 +444,81 @@ ...@@ -407,61 +444,81 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-m</option></primary></indexterm> <indexterm><primary><option>--latex</option></primary></indexterm>
<option>-m</option> <option>--latex</option>
</term>
<term>
<indexterm><primary><option>--html-help</option></primary></indexterm>
<option>--html-help</option>
</term> </term>
<listitem> <listitem>
<para>(In HTML mode only) Produce extra contents and index <para>Generate documentation in LaTeX format. Several files
files for given HTML Help system. Currently supported Help will be generated into the current directory (or the
systems are Microsoft HTML Help 1.3 and 2.0 and GNOME DevHelp.</para> specified directory if the <option>-o</option> option is
given), including the following:</para>
<para>Using the Microsoft HTML Help system provides two
advantages over plain HTML: the help viewer gives you a nice
hierarchical folding contents pane on the left, and the
documentation files are compressed and therefore much
smaller (roughly a factor of 10). The disadvantage is that
the help can't be viewed over the web.</para>
<para>In order to create a compiled Microsoft help file, you
also need the Microsoft HTML Help compiler, which is
available free from
<ulink url="http://www.microsoft.com/">http://www.microsoft.com/</ulink>
(search for <quote>HTML Help compiler</quote>).</para>
<para>Viewers</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>Microsoft HTML Help Viewer</term> <term><filename><replaceable>package</replaceable>.tex</filename></term>
<listitem><para>Distributed with Microsoft Windows</para></listitem> <listitem>
</varlistentry> <para>The top-level LaTeX source file; to format the
<varlistentry> documentation into PDF you might run something like
<term><ulink url="http://xchm.sourceforge.net">xCHM</ulink></term> this:</para>
<listitem><para>a CHM viewer for UNIX (Linux, *BSD, Solaris), written by Razvan Cojocaru</para></listitem> <screen>
$ pdflatex <replaceable>package</replaceable>.tex</screen>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><ulink url="http://www.jouledata.com/MacProducts.html">JouleData Solutions' CHM Viewer</ulink></term> <term><filename>haddock.sty</filename></term>
<listitem><para>a comercial 100% native Cocoa .chm file viewer for the Mac OS X platform</para></listitem> <listitem>
<para>The default style. The file contains
definitions for various macros used in the LaTeX
sources generated by Haddock; to change the way the
formatted output looks, you might want to override
these by specifying your own style with
the <option>--latex-style</option> option.</para>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><ulink url="http://gnochm.sourceforge.net">GnoCHM</ulink></term> <term><filename><replaceable>module</replaceable>.tex</filename></term>
<listitem><para>a CHM file viewer. It is designed to integrate nicely with Gnome.</para></listitem> <listitem>
<para>The LaTeX documentation for
each <replaceable>module</replaceable>.</para>
</listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</listitem>
</varlistentry>
<para>The GNOME DevHelp also provides help viewer which looks like <varlistentry>
MSHelp viewer but the documentation files aren't compressed. <term>
The documentation can be viewed with any HTML browser but <indexterm><primary><option>--latex-style</option></primary></indexterm>
DevHelp gives you a nice hierarchical folding contents and <option>--latex-style=<replaceable>style</replaceable></option>
keyword index panes on the left. The DevHelp expects to see </term>
*.devhelp file in the folder where the documentation is placed. <listitem>
The file contains all required information <para>This option lets you override the default style used
to build the contents and index panes. by the LaTeX generated by the <option>--latex</option> option.
</para> Normally Haddock puts a
standard <filename>haddock.sty</filename> in the output
directory, and includes the
command <literal>\usepackage{haddock}</literal> in the
LaTeX source. If this option is given,
then <filename>haddock.sty</filename> is not generated,
and the command is
instead <literal>\usepackage{<replaceable>style</replaceable>}</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-S</option></primary></indexterm>
<option>-S</option>
</term>
<term>
<indexterm><primary><option>--docbook</option></primary></indexterm>
<option>--docbook</option>
</term>
<listitem>
<para>Reserved for future use (output documentation in DocBook XML
format).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -516,6 +573,17 @@ ...@@ -516,6 +573,17 @@
'<literal>v</literal>' or a type '<literal>t</literal>'. This is '<literal>v</literal>' or a type '<literal>t</literal>'. This is
only valid for the <option>--source-entity</option> option.</para> only valid for the <option>--source-entity</option> option.</para>
</listitem> </listitem>
<listitem>
<para>The string <literal>%L</literal> or <literal>%{LINE}</literal>
is replaced by the number of the line where the exported value or
type is defined. This is only valid for the
<option>--source-entity</option> option.</para>
</listitem>
<listitem>
<para>The string <literal>%%</literal> is replaced by
<literal>%</literal>.</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>For example, if your sources are online under some directory, <para>For example, if your sources are online under some directory,
...@@ -536,6 +604,18 @@ ...@@ -536,6 +604,18 @@
replace it with a character <replaceable>c</replaceable> use replace it with a character <replaceable>c</replaceable> use
<literal>%{MODULE/./<replaceable>c</replaceable>}</literal>.</para> <literal>%{MODULE/./<replaceable>c</replaceable>}</literal>.</para>
<para>Similarly, for the <literal>%{FILE}</literal> substitution
you may want to replace the '<literal>/</literal>' character in
the file names with some other character (especially for links
to colourised entity source code with a shared css file). To replace
it with a character <replaceable>c</replaceable> use
<literal>%{FILE///<replaceable>c</replaceable>}</literal>/</para>
<para>One example of a tool that can generate syntax-highlighted
HTML from your source code, complete with anchors suitable for use
from haddock, is
<ulink url="http://www.cs.york.ac.uk/fp/darcs/hscolour">hscolour</ulink>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -590,14 +670,68 @@ ...@@ -590,14 +670,68 @@
<literal>haddock --comments-base=<replaceable>url</replaceable> <literal>haddock --comments-base=<replaceable>url</replaceable>
--comments-module=<replaceable>url</replaceable>/%M</literal></para> --comments-module=<replaceable>url</replaceable>/%M</literal></para>
<para>If your Wiki system doesn't like the '<literal>.</literal>' <para>If your Wiki system doesn't like the '<literal>.</literal>' character
character in Haskell module names, you can replace it with a in Haskell module names, you can replace it with a different character. For
different character. For example to replace the example to replace the '<literal>.</literal>' characters with
'<literal>.</literal>' characters with '<literal>_</literal>' use '<literal>_</literal>' use <literal>haddock
<literal>haddock --comments-base=<replaceable>url</replaceable> --comments-base=<replaceable>url</replaceable>
--comments-module=<replaceable>url</replaceable>/%{MODULE/./_}</literal> --comments-module=<replaceable>url</replaceable>/%{MODULE/./_}</literal>
Similarly, you can replace the '<literal>/</literal>' in a file name (may
be useful for entity comments, but probably not.) </para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>--theme</option></primary></indexterm>
<option>--theme</option>=<replaceable>path</replaceable>
</term>
<listitem>
<para>Specify a theme to be used for HTML (<option>--html</option>)
documentation. If given multiple times then the pages will use the
first theme given by default, and have alternate style sheets for
the others. The reader can switch between themes with browsers that
support alternate style sheets, or with the "Style" menu that gets
added when the page is loaded. If
no themes are specified, then just the default built-in theme
("Ocean") is used.
</para> </para>
<para>The <replaceable>path</replaceable> parameter can be one of:
</para>
<itemizedlist>
<listitem>
<para>A <emphasis>directory</emphasis>: The base name of
the directory becomes the name of the theme. The directory
must contain exactly one
<filename><replaceable>some</replaceable>.css</filename> file.
Other files, usually image files, will be copied, along with
the <filename><replaceable>some</replaceable>.css</filename>
file, into the generated output directory.</para>
</listitem>
<listitem>
<para>A <emphasis>CSS file</emphasis>: The base name of
the file becomes the name of the theme.</para>
</listitem>
<listitem>
<para>The <emphasis>name</emphasis> of a built-in theme
("Ocean" or "Classic").</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>--built-in-themes</option></primary></indexterm>
<option>--built-in-themes</option>
</term>
<listitem>
<para>Includes the built-in themes ("Ocean" and "Classic").
Can be combined with <option>--theme</option>. Note that order
matters: The first specified theme will be the default.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -611,9 +745,7 @@ ...@@ -611,9 +745,7 @@
<option>--css</option>=<replaceable>file</replaceable> <option>--css</option>=<replaceable>file</replaceable>
</term> </term>
<listitem> <listitem>
<para>Specify a stylesheet to use instead of the default one <para>Deprecated aliases for <option>--theme</option></para>
that comes with Haddock. It should specify certain classes:
see the default stylesheet for details.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -656,45 +788,84 @@ ...@@ -656,45 +788,84 @@
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-n</option></primary></indexterm> <indexterm><primary><option>-q</option></primary></indexterm>
<option>-n</option> <option>-q</option> <replaceable>mode</replaceable>
</term> </term>
<term> <term>
<indexterm><primary><option>--no-implicit-prelude</option></primary></indexterm> <indexterm><primary><option>--qual</option></primary></indexterm>
<option>--no-implicit-prelude</option> <option>--qual</option>=<replaceable>mode</replaceable>
</term> </term>
<listitem> <listitem>
<para>Don't automatically import <literal>Prelude</literal> <para>
in every module. Used when producing documentation for the Specify how identifiers are qualified.
<literal>Prelude</literal> itself.</para> </para>
</listitem> <para>
<replaceable>mode</replaceable> should be one of
<itemizedlist>
<listitem>
<para>none (default): don't qualify any identifiers</para>
</listitem>
<listitem>
<para>full: always qualify identifiers completely</para>
</listitem>
<listitem>
<para>local: only qualify identifiers that are not part
of the module</para>
</listitem>
<listitem>
<para>relative: like local, but strip name of the module
from qualifications of identifiers in submodules</para>
</listitem>
</itemizedlist>
</para>
<para>
Example: If you generate documentation for module A, then the
identifiers A.x, A.B.y and C.z are qualified as follows.
</para>
<para>
<itemizedlist>
<listitem>
none: x, y, z
</listitem>
<listitem>
full: A.x, A.B.y, C.z
</listitem>
<listitem>
local: x, A.B.y, C.z
</listitem>
<listitem>
relative: x, B.y, C.z
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-d</option></primary></indexterm> <indexterm><primary><option>-?</option></primary></indexterm>
<option>-d</option> <option>-?</option>
</term> </term>
<term> <term>
<indexterm><primary><option>--debug</option></primary></indexterm> <indexterm><primary><option>--help</option></primary></indexterm>
<option>--debug</option> <option>--help</option>
</term> </term>
<listitem> <listitem>
<para>Produce extra debugging output.</para> <para>Display help and exit.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-?</option></primary></indexterm> <indexterm><primary><option>-V</option></primary></indexterm>
<option>-?</option> <option>-V</option>
</term> </term>
<term> <term>
<indexterm><primary><option>--help</option></primary></indexterm> <indexterm><primary><option>--version</option></primary></indexterm>
<option>--help</option> <option>--version</option>
</term> </term>
<listitem> <listitem>
<para>Display help and exit.</para> <para>Output version information and exit.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -718,61 +889,39 @@ ...@@ -718,61 +889,39 @@
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><option>-V</option></primary></indexterm> <indexterm><primary><option>--use-contents</option></primary></indexterm>
<option>-V</option> <option>--use-contents=<replaceable>URL</replaceable></option>
</term> </term>
<term>
<indexterm><primary><option>--version</option></primary></indexterm>
<option>--version</option>
</term>
<listitem>
<para>Output version information and exit.</para>
</listitem>
</varlistentry>
<varlistentry>
<term> <term>
<indexterm><primary><option>--use-index</option></primary></indexterm> <indexterm><primary><option>--use-index</option></primary></indexterm>
<option>--use-index=<replaceable>URL</replaceable></option> <option>--use-index=<replaceable>URL</replaceable></option>
</term> </term>
<listitem> <listitem>
<para>When generating HTML, do not generate an index. <para>When generating HTML, do not generate an index.
Instead, redirect the Index link on each page to Instead, redirect the Contents and/or Index link on each page to
<replaceable>URL</replaceable>. This option is intended for <replaceable>URL</replaceable>. This option is intended for
use in conjuction with <option>--gen-index</option> for use in conjuction with <option>--gen-contents</option> and/or
generating a separate index covering multiple <option>--gen-index</option> for
generating a separate contents and/or index covering multiple
libraries.</para> libraries.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>
<indexterm><primary><option>--gen-contents</option></primary></indexterm>
<option>--gen-contents</option>
</term>
<term> <term>
<indexterm><primary><option>--gen-index</option></primary></indexterm> <indexterm><primary><option>--gen-index</option></primary></indexterm>
<option>--gen-index</option> <option>--gen-index</option>
</term> </term>
<listitem> <listitem>
<para>Generate an HTML index containing entries pulled from <para>Generate an HTML contents and/or index containing entries pulled
all the specified interfaces (interfaces are specified using from all the specified interfaces (interfaces are specified using
<option>-i</option> or <option>--read-interface</option>). <option>-i</option> or <option>--read-interface</option>).
This is used to generate a single index for multiple sets of This is used to generate a single contents and/or index for multiple
Haddock documentation.</para> sets of Haddock documentation.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-k</option></primary></indexterm>
<option>-k</option> <replaceable>P</replaceable>
</term>
<term>
<indexterm><primary><option>--package</option></primary></indexterm>
<option>--package=</option><replaceable>P</replaceable>
</term>
<listitem>
<para>Set the package name for these modules to
<replaceable>P</replaceable>. In a combined index generated
with <option>--gen-index</option>, the package name for each
module is shown in the right-hand column.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -787,7 +936,7 @@ ...@@ -787,7 +936,7 @@
<literal>ignore-exports</literal> attribute (<xref <literal>ignore-exports</literal> attribute (<xref
linkend="module-attributes" />). This might be useful for linkend="module-attributes" />). This might be useful for
generating implementation documentation rather than interface generating implementation documentation rather than interface
documetnation, for example.</para> documentation, for example.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -803,34 +952,61 @@ ...@@ -803,34 +952,61 @@
atribute. (<xref linkend="module-attributes" />).</para> atribute. (<xref linkend="module-attributes" />).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>--optghc</option></primary></indexterm>
<option>--optghc</option>=<replaceable>option</replaceable>
</term>
<listitem>
<para>Pass <replaceable>option</replaceable> to GHC.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>-w</option></primary></indexterm>
<option>-w</option>
</term>
<term>
<indexterm><primary><option>--no-warnings</option></primary></indexterm>
<option>--no-warnings</option>
</term>
<listitem>
<para>Turn off all warnings.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<indexterm><primary><option>--no-tmp-comp-dir</option></primary></indexterm>
<option>--no-tmp-comp-dir</option>
</term>
<listitem>
<para>
Do not use a temporary directory for reading and writing compilation output files
(<literal>.o</literal>, <literal>.hi</literal>, and stub files). Instead, use the
present directory or another directory that you have explicitly told GHC to use
via the <literal>--optghc</literal> flag.
</para>
<para>
This flag can be used to avoid recompilation if compilation files already exist.
Compilation files are produced when Haddock has to process modules that make use of
Template Haskell, in which case Haddock compiles the modules using the GHC API.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
<section id="cpp"> <section id="cpp">
<title>Using literate or pre-processed source</title> <title>Using literate or pre-processed source</title>
<para>Haddock only accepts plain, non-literate, Haskell source. <para>Since Haddock uses GHC internally, both plain and
This means that if you program in Literate Haskell, or you need literate Haskell sources are accepted without the need for the user
to use the C pre-processor in your Haskell source, then you need to do anything. To use the C pre-processor, however,
to pre-process the files before feeding them to Haddock. This the user must pass the the <option>-cpp</option> option to GHC
is easily accomplished using GHC; for example, suppose we have a using <option>--optghc</option>.
Literate Haskell source file <filename>Foo.lhs</filename>, on </para>
which we also need to run the C pre-processor:</para>
<screen>
$ ghc -cpp -E -optP-P -D__HADDOCK__ Foo.lhs -o Foo.hs
$ haddock -h Foo.hs ...
</screen>
<para>The <option>-E</option> option to GHC says "stop after
pre-processing", the <option>-cpp</option> option turns on the C
pre-processor, the <option>-optP-P</option> option tells the C
pre-processor not to leave any extra dropping behind (see the
description of the <option>-P</option> option in the gcc manual
for details), and the <option>-D__HADDOCK__</option> option
defines the symbol <literal>__HADDOCK__</literal> when
pre-processing (this is sometimes handy if you need to any
pre-processing conditionals in your source which depend on
whether the source is going to be fed to Haddock).</para>
</section> </section>
</chapter> </chapter>
...@@ -1306,63 +1482,25 @@ import B ...@@ -1306,63 +1482,25 @@ import B
point locally to <literal>C.T</literal>.</para> point locally to <literal>C.T</literal>.</para>
</section> </section>
<section id="deriving">
<title>Derived instances</title>
<para>The <literal>deriving</literal> keyword in Haskell
presents a small problem for Haddock. Lacking a full type
system, Haddock has to figure out what the shape of the derived
instance is. There is currently a partial implementation of
this, but for some data types Haddock can't determine the shape
of the derived instance, and you see something like
&ldquo;???&rdquo; in the documentation.</para>
<para>One workaround for this is to use CPP (<xref linkend="cpp"
/>) to give Haddock explicit instance headers. Here is an
example from the OpenGL library:</para>
<programlisting>
data VertexArrayDescriptor a =
VertexArrayDescriptor !NumComponents !DataType !Stride !(Ptr a)
#ifdef __HADDOCK__
-- Help Haddock a bit, because it doesn't do any instance inference.
instance Eq (VertexArrayDescriptor a)
instance Ord (VertexArrayDescriptor a)
instance Show (VertexArrayDescriptor a)
#else
deriving ( Eq, Ord, Show )
#endif
</programlisting>
<para>As a rule of thumb, try <literal>deriving</literal> first,
and if that doesn't work then use the above workaround.</para>
</section>
<section id="module-attributes"> <section id="module-attributes">
<title>Module Attributes</title> <title>Module Attributes</title>
<para>Certain attributes may be specified for each module which <para>Certain attributes may be specified for each module which
affects the way that Haddock generates documentation for that affects the way that Haddock generates documentation for that
module. Attributes are specified in a comma-separated list in a module. Attributes are specified in a comma-separated list in an
<literal>-- #</literal> (or <literal>{-# OPTIONS_HADDOCK ... #-}</literal> pragma at the
<literal>{-&nbsp;#&nbsp;...&nbsp;-}</literal>) comment at the
top of the module, either before or after the module top of the module, either before or after the module
description. For example:</para> description. For example:</para>
<programlisting> <programlisting>
-- #hide, prune, ignore-exports {-# OPTIONS_HADDOCK hide, prune, ignore-exports #-}
-- |Module description -- |Module description
module A where module A where
... ...
</programlisting> </programlisting>
<para>The options and module description can be in either order, but <para>The options and module description can be in either order.</para>
remember to separate them using a blank line if you are using the
<literal>--</literal> style comments. Without the blank line in the
example above, the module description would be assumed to be part of
the options, and Haddock would complain about unrecognised
options.</para>
<para>The following attributes are currently understood by <para>The following attributes are currently understood by
Haddock:</para> Haddock:</para>
...@@ -1407,8 +1545,8 @@ module A where ...@@ -1407,8 +1545,8 @@ module A where
<varlistentry> <varlistentry>
<term> <term>
<indexterm><primary><literal>not-home</literal></primary> <indexterm><primary><literal>not-home</literal></primary></indexterm>
</indexterm> <literal>not-home</literal>
</term> </term>
<listitem> <listitem>
<para>Indicates that the current module should not be considered to <para>Indicates that the current module should not be considered to
...@@ -1442,19 +1580,24 @@ module A where ...@@ -1442,19 +1580,24 @@ module A where
<title>Special characters</title> <title>Special characters</title>
<para>The following characters have special meanings in <para>The following characters have special meanings in
documentation comments: <literal>/</literal>, documentation comments: <literal>\</literal>, <literal>/</literal>,
<literal>'</literal>, <literal>`</literal>, <literal>'</literal>, <literal>`</literal>,
<literal>"</literal>, <literal>@</literal>, <literal>"</literal>, <literal>@</literal>,
<literal>&lt;</literal>. To insert a literal occurrence of <literal>&lt;</literal>. To insert a literal occurrence of
one of these special characters, precede it with a backslash one of these special characters, precede it with a backslash
(<literal>\</literal>).</para> (<literal>\</literal>).</para>
<para>Additionally, the character <literal>&gt;</literal> has <para>Additionally, the character <literal>&gt;</literal> has
a special meaning at the beginning of a line, and the a special meaning at the beginning of a line, and the
following characters have special meanings at the beginning of following characters have special meanings at the beginning of
a paragraph: a paragraph:
<literal>*</literal>, <literal>-</literal>. These characters <literal>*</literal>, <literal>-</literal>. These characters
can also be escaped using <literal>\</literal>.</para> can also be escaped using <literal>\</literal>.</para>
<para>Furthermore, the character sequence <literal>&gt;&gt;&gt;</literal>
has a special meaning at the beginning of a line. To
escape it, just prefix the characters in the sequence with a
backslash.</para>
</section> </section>
<section> <section>
...@@ -1505,6 +1648,31 @@ module A where ...@@ -1505,6 +1648,31 @@ module A where
interprets markup as normal inside the code block.</para> interprets markup as normal inside the code block.</para>
</section> </section>
<section>
<title>Examples</title>
<para> Haddock has markup support for examples of interaction with a
<emphasis>read-eval-print loop (REPL)</emphasis>. An
example is introduced with
<literal>&gt;&gt;&gt;</literal> followed by an expression followed
by zero or more result lines:</para>
<programlisting>
-- | Two examples are given bellow:
--
-- &gt;&gt;&gt; fib 10
-- 55
--
-- &gt;&gt;&gt; putStrLn "foo\nbar"
-- foo
-- bar
</programlisting>
<para>Result lines that only contain the string
<literal>&lt;BLANKLINE&gt;</literal> are rendered as blank lines in the
generated documenation.</para>
</section>
<section> <section>
<title>Hyperlinked Identifiers</title> <title>Hyperlinked Identifiers</title>
......
utils/haddock_USES_CABAL = YES
utils/haddock_PACKAGE = haddock
utils/haddock_CONFIGURE_OPTS = --flag in-ghc-tree
utils/haddock_dist_SHELL_WRAPPER = YES
utils/haddock_dist_INSTALL_SHELL_WRAPPER = YES
utils/haddock_dist_INSTALL_SHELL_WRAPPER_NAME = haddock-ghc-$(ProjectVersion)
utils/haddock_dist_PROG = haddock$(exeext)
ifneq "$(BINDIST)" "YES"
$(INPLACE_BIN)/$(utils/haddock_dist_PROG): $(INPLACE_LIB)/html $(INPLACE_LIB)/latex
$(INPLACE_LIB)/html:
$(call removeTrees,$@)
"$(CP)" -R utils/haddock/html $@
$(INPLACE_LIB)/latex:
$(call removeTrees,$@)
"$(CP)" -R utils/haddock/latex $@
endif
ifeq "$(HADDOCK_DOCS)" "NO"
utils/haddock_dist_NOT_NEEDED = YES
endif
$(eval $(call build-prog,utils/haddock,dist,2))
utils/haddock_dist_MODULES += Paths_haddock
ifeq "$(HADDOCK_DOCS)" "YES"
install: install_utils/haddock_data
ifeq "$(Windows)" "NO"
install: install_utils/haddock_link
endif
endif
.PHONY: install_utils/haddock_data
install_utils/haddock_data:
$(foreach i,$(sort $(dir $(utils/haddock_dist_DATA_FILES))), \
$(call make-command,$(call INSTALL_DIR,"$(DESTDIR)$(ghclibdir)/$i")))
$(foreach i,$(utils/haddock_dist_DATA_FILES), \
$(call make-command,$(call INSTALL_DATA,$(INSTALL_OPTS),utils/haddock/$i,"$(DESTDIR)$(ghclibdir)/$(dir $i)")))
.PHONY: install_utils/haddock_link
install_utils/haddock_link:
$(call removeFiles,"$(DESTDIR)$(bindir)/haddock")
$(LN_S) $(utils/haddock_dist_INSTALL_SHELL_WRAPPER_NAME) "$(DESTDIR)$(bindir)/haddock"
BINDIST_EXTRAS += $(addprefix utils/haddock/,$(utils/haddock_dist_DATA_FILES))
name: haddock-ghc
version: 2.0
license: BSD3
license-file: LICENSE
copyright: (c) Simon Marlow, David Waern
author: Simon Marlow, David Waern
maintainer: David Waern <davve@dtek.chalmers.se>
stability: stable
homepage: http://www.haskell.org/haddock/
synopsis: Haddock is a documentation-generation tool for Haskell libraries
build-depends: base>=1.0, haskell98>=1.0, mtl>=1.0, ghc, network>=1.0, Cabal, FilePath>=0.11
extensions: CPP, PatternGuards
ghc-options: -fglasgow-exts
hs-source-dirs: src
exposed-modules:
Distribution.Haddock
other-modules:
Haddock.InterfaceFile
Haddock.Exception
Haddock.Types
data-files:
html/haddock-DEBUG.css
html/haddock.css
html/haddock.js
html/haskell_icon.gif
html/minus.gif
html/plus.gif
extra-source-files:
CHANGES
README
TODO
doc/Makefile
doc/README
doc/aclocal.m4
doc/config.mk.in
doc/configure.ac
doc/docbook-xml.mk
doc/fptools.css
doc/haddock.xml
examples/A.hs
examples/B.hs
examples/Bug1.hs
examples/Bug2.hs
examples/Bug3.hs
examples/Bug4.hs
examples/Bug6.hs
examples/Bug7.hs
examples/Bug8.hs
examples/Bug9.hs
examples/Hash.hs
examples/Hidden.hs
examples/Makefile
examples/NoLayout.hs
examples/Test.hs
examples/Visible.hs
examples/hide-bug/A.hs
examples/hide-bug/B.hs
examples/hide-bug/C.hs
examples/hide-bug/D.hs
haddock.spec
haskell.vim
src/haddock.sh
executable: haddock
hs-source-dirs: src
main-is: Main.hs
extensions: CPP, PatternGuards
ghc-options: -fglasgow-exts
other-modules:
Haddock.Utils.FastMutInt2
Haddock.Utils.BlockTable
Haddock.HaddockDB
Haddock.DevHelp
Haddock.HH
Haddock.HH2
Haddock.Hoogle
Haddock.Utils.Html
Haddock.ModuleTree
Haddock.Rename
Haddock.Types
Haddock.Utils
Haddock.Version
Haddock.Utils.Html
Haddock.Utils.GHC
Haddock.InterfaceFile
Haddock.Exception
Main
name: haddock
version: 2.10.0
synopsis: A documentation-generation tool for Haskell libraries
description: Haddock is a documentation-generation tool for Haskell
libraries
license: BSD3
license-file: LICENSE
author: Simon Marlow, David Waern
maintainer: David Waern <david.waern@gmail.com>
homepage: http://www.haskell.org/haddock/
bug-reports: http://trac.haskell.org/haddock
copyright: (c) Simon Marlow, David Waern
category: Documentation
build-type: Simple
cabal-version: >= 1.10
stability: experimental
extra-source-files:
CHANGES
README
doc/Makefile
doc/README
doc/aclocal.m4
doc/config.mk.in
doc/configure.ac
doc/docbook-xml.mk
doc/fptools.css
doc/haddock.xml
examples/A.hs
examples/B.hs
examples/Bug1.hs
examples/Bug2.hs
examples/Bug3.hs
examples/Bug4.hs
examples/Bug6.hs
examples/Bug7.hs
examples/Bug8.hs
examples/Bug9.hs
examples/Hash.hs
examples/Hidden.hs
examples/Makefile
examples/NoLayout.hs
examples/Test.hs
examples/Visible.hs
examples/hide-bug/A.hs
examples/hide-bug/B.hs
examples/hide-bug/C.hs
examples/hide-bug/D.hs
haddock.spec
haskell.vim
src/haddock.sh
-- The test files shouldn't have to go here, but the source files for
-- the test-suite stanzas don't get picked up by `cabal sdist`.
tests/html-tests/runtests.hs
data-files:
html/frames.html
html/haddock-util.js
html/Classic.theme/haskell_icon.gif
html/Classic.theme/minus.gif
html/Classic.theme/plus.gif
html/Classic.theme/xhaddock.css
html/Ocean.std-theme/hslogo-16.png
html/Ocean.std-theme/minus.gif
html/Ocean.std-theme/ocean.css
html/Ocean.std-theme/plus.gif
html/Ocean.std-theme/synopsis.png
latex/haddock.sty
flag in-ghc-tree
description: Are we in a GHC tree?
default: False
manual: True
flag test
default: False
manual: True
executable haddock
default-language: Haskell2010
-- In a GHC tree - in particular, in a source tarball - we don't
-- require alex or happy
if !flag(in-ghc-tree)
build-tools: alex >= 2.3, happy >= 1.18
build-depends:
base >= 4.3 && < 4.6,
filepath,
directory,
pretty,
containers,
array,
xhtml >= 3000.2 && < 3000.3,
Cabal >= 1.10,
ghc >= 7.2 && < 7.6
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
else
build-depends: ghc-paths
if flag(test)
cpp-options: -DTEST
build-depends: QuickCheck >= 2.1 && < 3
main-is: Main.hs
hs-source-dirs: src
default-extensions: CPP, DeriveDataTypeable,
ScopedTypeVariables, MagicHash
ghc-options: -funbox-strict-fields -O2 -Wall -fwarn-tabs
other-modules:
Haddock.Interface
Haddock.Interface.Rename
Haddock.Interface.Create
Haddock.Interface.AttachInstances
Haddock.Interface.LexParseRn
Haddock.Interface.ParseModuleHeader
Haddock.Lex
Haddock.Parse
Haddock.Utils
Haddock.Backends.Xhtml
Haddock.Backends.Xhtml.Decl
Haddock.Backends.Xhtml.DocMarkup
Haddock.Backends.Xhtml.Layout
Haddock.Backends.Xhtml.Names
Haddock.Backends.Xhtml.Themes
Haddock.Backends.Xhtml.Types
Haddock.Backends.Xhtml.Utils
Haddock.Backends.LaTeX
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
Haddock.ModuleTree
Haddock.Types
Haddock.Doc
Haddock.Version
Haddock.InterfaceFile
Haddock.Options
Haddock.GhcUtils
Haddock.Convert
library
default-language: Haskell2010
-- In a GHC tree - in particular, in a source tarball - we don't
-- require alex or happy
if !flag(in-ghc-tree)
build-tools: alex >= 2.3, happy >= 1.18
build-depends:
base >= 4.3 && < 4.6,
filepath,
directory,
pretty,
containers,
array,
xhtml >= 3000.2 && < 3000.3,
Cabal >= 1.10,
ghc >= 7.2 && < 7.6
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
else
build-depends: ghc-paths
if flag(test)
cpp-options: -DTEST
build-depends: QuickCheck >= 2.1 && < 3
hs-source-dirs: src
default-extensions: CPP, DeriveDataTypeable,
ScopedTypeVariables, MagicHash
ghc-options: -funbox-strict-fields -O2 -Wall -fwarn-tabs
exposed-modules:
Documentation.Haddock
other-modules:
Main
Haddock.Interface
Haddock.Interface.Rename
Haddock.Interface.Create
Haddock.Interface.AttachInstances
Haddock.Interface.LexParseRn
Haddock.Interface.ParseModuleHeader
Haddock.Lex
Haddock.Parse
Haddock.Utils
Haddock.Backends.Xhtml
Haddock.Backends.Xhtml.Decl
Haddock.Backends.Xhtml.DocMarkup
Haddock.Backends.Xhtml.Layout
Haddock.Backends.Xhtml.Names
Haddock.Backends.Xhtml.Themes
Haddock.Backends.Xhtml.Types
Haddock.Backends.Xhtml.Utils
Haddock.Backends.LaTeX
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
Haddock.ModuleTree
Haddock.Types
Haddock.Doc
Haddock.Version
Haddock.InterfaceFile
Haddock.Options
Haddock.GhcUtils
Haddock.Convert
Paths_haddock
if flag(in-ghc-tree)
buildable: False
test-suite html-tests
type: exitcode-stdio-1.0
default-language: Haskell2010
main-is: runtests.hs
hs-source-dirs: tests/html-tests
build-depends: base, directory, process, filepath, Cabal
source-repository head
type: git
location: http://darcs.haskell.org/haddock.git
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# If this file is part of a tarball, you can build RPMs directly from # If this file is part of a tarball, you can build RPMs directly from
# the tarball by using the following command: # the tarball by using the following command:
# #
# rpm -ta haddock-(VERSION)-src.tar.gz # rpm -ta haddock-(VERSION).tar.gz
# #
# The resulting package will be placed in the RPMS/(arch) subdirectory # The resulting package will be placed in the RPMS/(arch) subdirectory
# of your RPM build directory (usually /usr/src/redhat or ~/rpm), with # of your RPM build directory (usually /usr/src/redhat or ~/rpm), with
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# version label of your release tarball. # version label of your release tarball.
%define name haddock %define name haddock
%define version 0.8 %define version 2.10.0
%define release 1 %define release 1
Name: %{name} Name: %{name}
...@@ -55,7 +55,7 @@ should all be ok). ...@@ -55,7 +55,7 @@ should all be ok).
%setup %setup
%build %build
runhaskell Setup.lhs configure --prefix=%{prefix} runhaskell Setup.lhs configure --prefix=%{_prefix} --docdir=%{_datadir}/doc/packages/%{name}
runhaskell Setup.lhs build runhaskell Setup.lhs build
cd doc cd doc
test -f configure || autoreconf test -f configure || autoreconf
......
#!/bin/sh
exec "$executablename" -B"$topdir" -l"$topdir" ${1+"$@"}
" Attempt to add haddock highlighting for haskell comments
" It should be placed in ~/.vim/after/syntax/haskell.vim
" Brad Bowman <haddock.vim@bereft.net>
syn match hsHdocChunk "$\i\+" contained
syn match hsHdocMod /"\(\i\|[.]\)\+"/ contained
syn match hsHdocLink "'\(\i\|[.#]\)\+'" contained
syn region hsHdocAnchor start="\\\@<!#" skip="\\#" end="\\\@<!#" contained oneline
" I think emphasis can span multiple lines
syn region hsHdocEm start="\\\@<!/" skip="\\/" end="\\\@!/" contained oneline
syn region hsHdocURL start="\\\@<!<" end="\\\@<!>" contained oneline
syn region hsHdocCode start="\\\@<!@" skip="\\@" end="\\\@<!@" contained oneline
syn region hsHdocBCodeBlock start="^@\(\s\|$\)" end="^@\s*$" contained
syn region hsHdocLCodeBlock start="\(^\s*--\s*\)\@<=@\s*$" end="\(^\s*--\s*\)\@<=@\s*$" contained
syn match hsHdocBHeading "^\s*\*\+" contained
syn match hsHdocLHeading "\(^\s*--\s*\)\@<=\*\+" contained
syn match hsHdocBTracks "^\s*>" contained
" match only the > using a look-behind
syn match hsHdocLTracks "\(^\s*--\s*\)\@<=>" contained
" todo: numbered lists, mark haddock start separately
"syn match hsHdocStart "\([$^|]\|\*\+\)" contained
syn cluster hsHdocSpecial
\ contains=hsHdocMod,hsHdocLink,hsHdocEm,hsHdocCode,hsHdocURL,
\ hsHdocAnchor,hsHdocChunk
syn region hsHdocDef start="^\s*\(--\)\?\s*\[" end="\]" contained contains=hsHdocSpecial
syn region hsHdocLines start="--\s*\([$\^|]\|\*\+\)"
\ skip="^\s*\(--.*\)$"
\ end="^\s*\(\$\|--\)\@!"
\ contains=@hsHdocSpecial,hsHdocLTracks,hsHdocLHeading,hsHdocLCodeBlock,hsHdocDef
syn region hsHdocBlock start="{-\s*\([$\^|]\|\*\+\)" end="-}"
\ contains=@hsHdocSpecial,hsHdocBTracks,hsHdocBHeading,hsHdocBCodeBlock,hsHdocDef
syn sync minlines=20
if version >= 508 || !exists("did_haddock_syntax_inits")
if version < 508
let did_haddock_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink hsHdocLines hsHdoc
HiLink hsHdocBlock hsHdoc
HiLink hsHdoc PreProc
HiLink hsHdocAnchor Special
HiLink hsHdocChunk Special
HiLink hsHdocMod Special
HiLink hsHdocLink Special
HiLink hsHdocEm Special
HiLink hsHdocURL Special
HiLink hsHdocCode Special
HiLink hsHdocLHeading Special
HiLink hsHdocBHeading Special
HiLink hsHdocLTracks Special
HiLink hsHdocBTracks Special
HiLink hsHdocBCodeBlock Special
HiLink hsHdocLCodeBlock Special
HiLink hsHdocSpecial Special
delcommand HiLink
endif
" Options for vi: sw=2 sts=2 nowrap ft=vim
% Haddock-DH.tex
\begin{hcarentry}[updated]{Haddock}
\label{haddock}
\report{David Waern}%11/10
\status{experimental, maintained}
\makeheader
Haddock is a widely used documentation-generation tool for Haskell
library code. Haddock generates documentation by parsing and typechecking
Haskell source code directly and including documentation supplied by the
programmer in the form of specially-formatted comments in the source code
itself. Haddock has direct support in Cabal~\cref{cabal}, and is used to
generate the documentation for the hierarchical libraries that come with GHC,
Hugs, and nhc98
(\url{http://www.haskell.org/ghc/docs/latest/html/libraries}) as well as
the documentation on Hackage.
The latest release is version 2.8.1, released September 3 2010.
\Separate
Recent changes:
\begin{itemize}
\item HTML backend completely rewritten to generate semantically rich XHTML
using the xhtml package.
\item New default CSS based on the color scheme chosen for the new Haskell
wiki, with a pull-out tab for the synopsis.
\item Theme engine based on CSS files. Themes can be switched from the
header menu.
\item Markup support for executable examples/unit-tests.
\item Addition of a LaTeX backend.
\item Additions and changes to the Haddock API.
\item Various smaller new features and bug fixes.
\end{itemize}
\FuturePlans
\begin{itemize}
\item Although Haddock understands many GHC language extensions, we would like it to
understand all of them. Currently there are some constructs you cannot comment,
like GADTs and associated type synonyms.
\item Error messages is an area with room for improvement. We would like Haddock
to include accurate line numbers in markup syntax errors.
\item On the HTML rendering side we want to make more use of Javascript in order to make
the viewing experience better. The frames-mode could be improved this way, for
example.
\item Finally, the long term plan is to split Haddock into one program that creates
data from sources, and separate backend programs that use that data via the
Haddock API. This will scale better, not requiring adding new backends to Haddock
for every tool that needs its own format.
\end{itemize}
\FurtherReading
\begin{compactitem}
\item Haddock's homepage:
\url{http://www.haskell.org/haddock/}
\item Haddock's developer Wiki and Trac:
\url{http://trac.haskell.org/haddock}
\item Haddock's mailing list:
\url{haddock@@projects.haskell.org}
\end{compactitem}
\end{hcarentry}