[Xmonad] GenerateManpage.hs uses Haddock-unfriendly tokens

Don Stewart dons at galois.com
Fri Sep 7 12:14:50 EDT 2007


alextarkovsky:
> 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 '<'.
> 

That's a reasonable idea. Is there some markup from some other system we can borrow?


More information about the Xmonad mailing list