title: How can I use catch properly?
body: <p>When I use catch, I get this warning:</p>
  
  <pre><code>Warning: In the use of `catch'
           (imported from System.IO.Error):
           Deprecated: "Please use the new exceptions variant, Control.Exception.catch"
  </code></pre>
  
  <p>I've tried to use Control.Exception.catch instead, but I've been chasing errors down too many rat holes.   Can someone post an example where the 2nd arg of catch catches the UnsupportedOperation error thrown by getTemporaryDirectory?</p>
  
  <pre><code>tempdir &lt;- catch (getTemporaryDirectory) 
                   (\e -&gt; return ".")  
  </code></pre>
  
  <p>Also, how do I use the catch syntax in the catch docs:</p>
  
  <pre><code>catch f (\e -&gt; ... (e :: SomeException) ...)
  </code></pre>
  
  <p>I've tried every variation of that syntax I can think of, and I always get an error; it does not seem possible to enclose a type annotation(?) in parentheses like that in a lambda.  Extremely poor documentation in my opinion.  Unfortunately, that seems to be the standard that doc writers aspire to.</p>