Error in documentation for Control.Exception (base-4.*)
wren ng thornton
wren at freegeek.org
Wed Jun 29 17:49:39 CEST 2011
On 6/29/11 1:37 AM, Ivan Lazar Miljenovic wrote:
> This was caught by mbuf on #haskell: the example for the Exception
> class in Control.Exception as of base-4 needs some extra escaping for
> Haddock markup. It currently has:
>
> @
> *Main> throw ThisException `catch` \e -> putStrLn (\"Caught \" ++ show
> (e :: MyException))
> Caught ThisException
> @
>
> It should be (untested; I'm not sure of the backticks but I think it'll
work):
>
> @
> *Main> throw ThisException \`catch\` \\e -> putStrLn (\"Caught \" ++
> show (e :: MyException))
> Caught ThisException
> @
You should also escape the >. At least on older Haddock it was required,
not sure about newer Haddock (though it doesn't complain).
--
Live well,
~wren
More information about the Libraries
mailing list