<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Aug 24, 2010 at 7:16 PM, Gregory Collins <span dir="ltr"><<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>></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 <<a href="mailto:jwlato@gmail.com">jwlato@gmail.com</a>> writes:<br>
<br>
> Oleg included the error state to enable short-circuiting of<br>
> computation, and I guess everyone just left it in. Recently I've been<br>
> wondering if it should be removed, though, in favor requiring explicit<br>
> (i.e. explicit in the type sig) exceptions for everything. I'm not<br>
> sure if that would be more or less complicated.<br>
<br>
</div>If you don'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>