<html><body>Thanks!&nbsp; That is a neat way.&nbsp; 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 &lt;trebla@vex.net&gt;<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>&gt; I am trying to catch an "thread blocked on MVar indefinitely<br>&gt; exception."  Of course I can use ::SomeException as explained in<br>&gt; <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>&gt; but there is no explanation as to how to find the more case specific<br>&gt; 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 &lt;- try (readFile "no")<br>   case aida of<br>     Left (SomeException e) -&gt; 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>