[xmonad] xmonad-contrib, Haddock, and You!

Brent Yorgey byorgey at gmail.com
Wed Dec 19 17:19:16 EST 2007

Hi all!

In order to help encourage good documentation, I just pushed a patch to
xmonad-contrib to include haddock generation in the automatic darcs test. In
other words, the haddock documentation must build without errors in order to
record a patch.  To ease the pain a bit, here's a quick summary of Things
You Should Know about haddock documentation for contributed extension

* all exported functions in contributed modules should have a haddock-style
comment saying what they do.  Haddock-style comments look like this:
-- | This is a haddock-style comment
Note the vertical pipe character (and the spaces around it!).

* You can quote literal code blocks by using "birdtracks", like this:

> foo x = x + h
>     where h = 3

Be sure to leave blank lines both before and after any such code blocks!  It
won't parse correctly without the blank lines.

* Inline literal code fragments can be surrounded by @at symbols at .

* To include a hyperlink to another function in the module, surround the
function name in 'single quotes'.  To link to another module, surround the
module name in "double quotes".

* To include literal single or double quotes, frontslashes, backslashes, at
symbols, etc., escape them with backslashes, \"like this\".  Not escaping
things like this is another common reason your documentation might fail to

For more detail, you should have a look at the Haddock user
And of course, the best advice overall is to just look at the style of other
extensions, and emulate it.

Happy hacking!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20071219/46b4a72d/attachment-0001.htm

More information about the xmonad mailing list