[Xmonad] GenerateManpage.hs uses Haddock-unfriendly tokens

Alex Tarkovsky alextarkovsky at gmail.com
Fri Sep 7 06:44:43 EDT 2007

While using Andrea's Haddock hacks against darcs to generate
documentation, I get:

  XMonadContrib/SetWMName.hs:"XMonadContrib/SetWMName.hs": 35:1: parse
error in doc string: [TokSpecial '@',TokString " Java hack\n",TokPara]

The offending line occurs inside a Haddock docstring:

  --  ((modMask .|. controlMask .|. shiftMask, xK_z), setWMName "LG3D")
-- @@ Java hack

The error happens because the token used by util/GenerateManpage.hs for
parsing key binding descriptions from comments is "@@", and '@' is a
reserved character in Haddock for enclosing code blocks. I'm surprised
it doesn't blow up in places other than SetWMName.hs as well (Haddock
seems buggy here).

I propose changing the manpage parser token from "@@" to something which
doesn't involve any of the reserved Haddock characters '/', ''', '`',
'"', '@', and '<'.

Alex Tarkovsky

More information about the Xmonad mailing list