Re: Error in documentation for Control.Exception (base-4.*)

29 Jun
2011
29 Jun
'11
11:49 a.m.
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
5078
Age (days ago)
5078
Last active (days ago)
0 comments
1 participants
participants (1)
-
wren ng thornton