<div dir="ltr">On Fri, Sep 14, 2012 at 9:08 PM, Andrew Pennebaker <span dir="ltr">&lt;<a href="mailto:andrew.pennebaker@gmail.com" target="_blank">andrew.pennebaker@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Given that Maybe and Either don&#39;t modify state, nor do they communicate with outside interfaces, nor do they specify computation ordering, I don&#39;t understand why they&#39;re implemented as monads. Why not a primitive typeclass or even datatype declaration?</blockquote>
</div>

</div>
</blockquote></div><div><br></div>They&#39;re not used in their monadic guise as often as they should be, IMO.  Either String has for a while been an &quot;error monad&quot; (more commonly, EitherT String as ErrorT) but has annoying shortcomings --- but they&#39;re an obvious mechanism for reporting and tracking / short-circuiting failure in computations (carrying a failure reason in the case of Either).<br clear="all">
<div><br></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>