@
*Main> throw ThisException `catch` \e -> putStrLn (\"Caught \" ++ show (e :: MyException))
Caught ThisException
@
*Main> throw ThisException catch
e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException
</p><pre> *Main> throw ThisException <code>catch</code> e -> putStrLn ("Caught " ++ show (e :: MyException)) Caught ThisException </pre><p>