Haddock is invoked from the command line, like so:
haddock [option...] file...
Where each file is a filename containing a Haskell source module. All the modules specified on the command line will be processed together. When one module refers to an entity in another module being processed, the documentation will link directly to that entity.
Entities that cannot be found, for example because they are in a module that isn't being processed as part of the current batch, simply won't be hyperlinked in the generated documentation. Haddock will emit warnings listing all the indentifiers it couldn't resolve.
The modules should not be mutually recursive, as Haddock don't like swimming in circles.
The following options are available:
Output documentation in SGML DocBook format. NOTE: at time of writing this is only partially implemented and doesn't work.
Generate documentation in HTML format. Several files will be generated into the current directory (or the specified directory if the -o option is given), including the following:
The top level page of the documentation: lists the modules available, using indentation to represent the hierarchy if the modules are hierarchical.
The stylesheet used by the generated HTML. Feel free to modify this to change the colors or layout, or even specify your own stylesheet using the --css option.
An HTML page for each module.
The index, split into two (functions/constructors and types/classes, as per Haskell namespaces) and further split alphabetically.
Generate files into dir instead of the current directory.
Include links to the source files in the generated documentation, where URL is the base URL where the source files can be found.
Use title as the page heading for each page in the documentation.This will normally be the name of the library being documented.
The title should be a plain string (no markup please!).
Reserved for future expansion.
Specify a stylesheet to use instead of the default one that comes with Haddock. It should specify certain classes: see the default stylesheet for details.