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

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 @ It may even be better to use the new support for examples in Haddock (section 3.8.5 of http://www.haskell.org/haddock/doc/html/ch03s08.html ): @
throw ThisException \`catch\` \\e -> putStrLn (\"Caught \" ++ show (e :: MyException)) Caught ThisException @
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
participants (2)
-
Ian Lynagh
-
Ivan Lazar Miljenovic