<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Aug 24, 2010 at 7:16 PM, Gregory Collins <span dir="ltr">&lt;<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">John Lato &lt;<a href="mailto:jwlato@gmail.com">jwlato@gmail.com</a>&gt; writes:<br>
<br>
&gt; Oleg included the error state to enable short-circuiting of<br>
&gt; computation, and I guess everyone just left it in.  Recently I&#39;ve been<br>
&gt; wondering if it should be removed, though, in favor requiring explicit<br>
&gt; (i.e. explicit in the type sig) exceptions for everything.  I&#39;m not<br>
&gt; sure if that would be more or less complicated.<br>
<br>
</div>If you don&#39;t want to go all the way to checked exceptions, MonadCatchIO<br>
could also be a nice way to go here.<br>
<br></blockquote><div>Be *very* careful of combining MonadCatchIO and CPS: the MonadCatchIO instance for ContT does not perform correctly, and can call the exception handler twice. It might produce other erroneous behavior, but that was a bug that plagued me in persistent.</div>
<div><br></div><div>I would recommend looking at the failure package[1] for making the exceptions explicit in the type signature.</div><div><br></div><div>Michael</div><div><br></div><div>[1] <a href="http://hackage.haskell.org/package/failure">http://hackage.haskell.org/package/failure</a> </div>
</div></div>