<div class="gmail_quote">On Mon, Jan 5, 2009 at 2:13 PM, Luke Palmer <span dir="ltr">&lt;<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.com</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div class="gmail_quote"><div>Then your example can become::</div><div><br></div><div><span style="font-family: &#39;courier new&#39;, monospace; ">func = (mapError Left funcA &gt;&gt; mapError Right funcB) `catchError` (\e -&gt; ...)</span><br>
</div><div><br></div><div>Luke</div><div></div></div></blockquote><div><br></div><div>Oh bother! &nbsp;My new year&#39;s resolution: think before I speak.</div><div><br></div><div>While I do think this is the right answer, it is not the right answer in the status quo. &nbsp;This is because ErrorT e m is only a monad when e is an Error, which Either (and most types) are not. &nbsp;It will be the right answer when fail is factored out of Monad into MonadFail (which will happen someday hopefully), because then the typechecker will verify that the above composition cannot fail.</div>
<div><br></div><div>But now I can&#39;t think of a good answer. &nbsp;Darn.</div><div><br></div><div>Luke</div></div>