title: When should I prefer readIO over read? (or vice-versa)
body: <p>I was trying to grok the tradeoffs in picking <code>readIO</code> over <code>read</code>, and I wrote these 2 snippets</p>
  
  <pre><code>&gt; map read . words &lt;$&gt; getLine :: IO [Int]
  1 2 a
  [1,2,*** Exception: Prelude.read: no parse
  &gt; mapM readIO . words =&lt;&lt; getLine :: IO [Int]
  1 2 a
  *** Exception: user error (Prelude.readIO: no parse)
  </code></pre>
  
  <p>I understand that throwing exceptions in pure code (just like <code>read</code> does) is often bad, but usually I always use read inside the IO monad, and thus I should be able to catch the exception almost always.</p>
  
  <p><code>readIO</code> isn't used in as many snippets/examples/tutorials from what I've seen, but otoh carrying the possibility for error in the type seems a good thing, and collecting all the <code>Read a</code> in a single IO with <code>mapM</code> yields the errors earlier than the first example with plain <code>map</code>. Failing fast is usually a coveted property.</p>
  
  <p>Should I go around and replace all the <code>read</code>s with <code>readIO</code>s?</p>