title: Is there a way to get the type of an exception in Haskell?
body: <p>Let's make the following assumptions:</p>
  
  <ul>
  <li>my program aborts due to an uncaught exception</li>
  <li>I have no idea what the type of that exception is</li>
  <li>the printed error message contains no hint on the exception type</li>
  </ul>
  
  <p>How would I find out the type of that exception?</p>
  
  <p>Minimal example:</p>
  
  <pre><code>main = error "foo"
  </code></pre>
  
  <p>(Here it's of course <code>ErrorCall</code>, but you can't tell from the error message.)</p>