HADDOCK(1)
π HADDOCK(1) π
okay bestie, gather round, because we're about to talk about haddock β the documentation tool for annotated Haskell source code, and yes, it lives in manual section 1, and yes, it's iconic. β¨
π¦ SYNOPSIS π¦
haddock [options] file...
πΈ DESCRIPTION πΈ
so this manual page is just the lil brief rundown of the haddock command, fr fr. the extensive documentation lives in a bunch of other formats β DVI, PostScript, HTML, the whole wardrobe β and you can peep the pointers down in SEE ALSO.
file is a filename that holds a Haskell source module. every module you hand over on the command line gets processed together, like one big group project π«Ά. and the cute part? when one module refers to an entity that's in another module you're also processing, the docs will link straight to that entity. hyperlink slay.
now, entities that can't be found β say, because they're chillin' in a module that's not part of the current batch β simply will not get hyperlinked in the generated documentation. no drama, they're just unlinked. but haddock will emit warnings listing every single identifier it couldn't resolve, so you'll know exactly who ghosted you. π
β οΈ and this is the important one: the modules should not be mutually recursive. haddock does not like swimming in circles. periodt.
β¨ OPTIONS β¨
these programs follow the usual GNU command line syntax, with long options starting with two dashes (`--'). here's the summary, bestie. for the complete description, go read the other documentation. π
-o DIR,--odir=DIRβ the directory where the output files go π-i FILE,--read-interface=FILEβ read an interface from FILE.-D FILE,--dump-interface=FILEβ dump an interface for these modules into FILE.-l DIR,--lib=DIRβ where Haddock's auxiliary files live π-h,--htmlβ generate documentation in HTML format. several files get generated into the current directory (or into whatever directory you gave with the-ooption), and they include:index.htmlβ the top level page of the documentation: lists the modules available, and uses indentation to show the hierarchy if the modules are hierarchical. main character page ngl πhaddock.cssβ the stylesheet the generated HTML uses. feel free to modify this to change the colors or the layout, or even specify your own stylesheet with the--cssoption. glow-up permitted. πmodule.htmlβ an HTML page for each module.doc-index.html,doc-index-XX.htmlβ the index, split into two (functions/constructors and types/classes, as per Haskell namespaces) and then split further alphabetically. organized queen. ποΈ
--hoogleβ output for Hoogle--html-help=formatβ produce index and table of contents inmshelp,mshelp2ordevhelpformat (with-h)--source-base=URLβ include links to the source files in the generated documentation, where URL is the base URL where the source files can be found.-s URL,--source-module=URLβ include links to the source files in the generated documentation, where URL is a source code link for each module (using the%{FILE}or%{MODULE}vars).--source-entity=URLβ include links to the source files in the generated documentation, where URL is a source code link for each entity (using the%{FILE},%{MODULE}or%{NAME}vars).--comments-base=URLβ URL for a comments link on the contents and index pages.--comments-module=URLβ URL for a comments link for each module (using the%{MODULE}var).--comments-entity=URLβ URL for a comments link for each entity (using the%{FILE},%{MODULE}or%{NAME}vars).--css=FILEβ use the CSS FILE instead of the default stylesheet that comes withhaddockfor HTML output. it should specify certain classes: see the default stylesheet for details.-p FILE,--prologue=FILEβ specify a file containing prologue text.-t TITLE,--title=TITLEβ 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!). keep it simple, bestie. π
-k NAME,--package=NAMEβ specify the package name (optional).-n,--no-implicit-preludeβ do not assumePreludeis imported-d,--debugβ enable extra debugging output. π-?,--helpβ display help.-V,--versionβ display version.-v,--verboseβ verbose status reporting. she's chatty. π¬--use-contents=URLβ use a separately-generated HTML contents page.--gen-contentsβ generate an HTML contents from specified interfaces.--use-index=URLβ use a separately-generated HTML index.--gen-indexβ generate an HTML index from specified interfaces.--ignore-all-exportsβ behave as if all modules have theignore-exportsatribute--hide=MODULEβ behave as if MODULE has thehideattribute.--use-package=PACKAGEβ the modules being processed depend on PACKAGE.
π FILES π
/usr/bin/haddock/usr/share/haddock-2.6.1/html/plus.gif/usr/share/haddock-2.6.1/html/minus.gif/usr/share/haddock-2.6.1/html/haskell_icon.gif/usr/share/haddock-2.6.1/html/haddock.js/usr/share/haddock-2.6.1/html/haddock.css/usr/share/haddock-2.6.1/html/haddock-DEBUG.css
π SEE ALSO π
/usr/share/doc/haddock/- the Haddock homepage (<http://haskell.org/haddock/>)
π COPYRIGHT π
Haddock version 2.6.1
Copyright 2006-2010 Simon Marlow <simonmar@microsoft.com>, Dawid Waern <david.waern@gmail.com>. All rights reserved.
π§ AUTHOR π§
This manual page was written by Michael Weber <michaelw@debian.org> for the Debian GNU/Linux system (but may be used by others).
okay that's the whole thing, bestie β go document something gorgeous. this was Haddock, version 2.6.1, dated July 2010, and you can find it filed under HADDOCK(1). no cap, ily, bye! πβ¨π
π¦ where this page comes from
- epel 10: ghc9.12-compiler 9.12.4-17.el10_3 Β· BSD-3-Clause
- fedora 43: ghc9.12-compiler 9.12.4-17.fc43 Β· BSD-3-Clause
- fedora 44: ghc9.12-compiler 9.12.3-14.fc44 Β· BSD-3-Clause
- fedora 44: ghc9.12-compiler 9.12.4-17.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms