<html><body>Thanks! That is a neat way. At least for exceptions which I know to exists and know how to trigger ;)<br><br>Tim<br><p><br>---------- Původní zpráva ----------<br>Od: Albert Y. C. Lai <trebla@vex.net><br>Datum: 7. 11. 2012<br>Předmět: Re: [Haskell-cafe] Where is the documentation on exception types kept?</p><blockquote>On 12-11-07 03:36 PM, timothyhobbs@seznam.cz wrote:<br>> I am trying to catch an "thread blocked on MVar indefinitely<br>> exception." Of course I can use ::SomeException as explained in<br>> <a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception.html#g:3">http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception.html#g:3</a><br>> but there is no explanation as to how to find the more case specific<br>> exceptions.<br><br>In general, because Exception instances are Typeable instances, you can <br>get a name, and then you can use that for searches.<br><br>import Control.Exception<br>import Data.Typeable<br><br>main = do<br> aida <- try (readFile "no")<br> case aida of<br> Left (SomeException e) -> print (typeOf e)<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br>Haskell-Cafe@haskell.org<br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a></blockquote></body></html>