<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">I'm not sure what should be the proper solution. Perhaps to change the laws to:</span><br style="font-family:arial,sans-serif;font-size:13.333333969116211px">

<span style="font-family:arial,sans-serif;font-size:13.333333969116211px">  return x >> mzero  =  mzero<br></span><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">  (v >> mzero) >>= f  =  (v >> mzero)`</span><br style="font-family:arial,sans-serif;font-size:13.333333969116211px">

<span style="font-family:arial,sans-serif;font-size:13.333333969116211px">That is, if an expression ends with `mzero`, it behaves like `mzero`.</span></blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">

These laws are redundant with existing laws. The first:</div><div class="gmail_extra"><br></div><div class="gmail_extra">    return x >> z = z</div><div class="gmail_extra"><br></div><div class="gmail_extra">Is true forall x and z, and can be proven by just the monad laws. The second:</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">    (v >> mzero) >>= f  =  (v >> mzero)</span><br></div><div class="gmail_extra">

<br></div><div class="gmail_extra">Can be proven by the associativity of monadic operations:</div><div class="gmail_extra"><br></div><div class="gmail_extra">    (v >> mzero) >>= f  =  v >> (mzero >>= f)</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">And the other MonadPlus law already states that (mzero >>= f) = mzero. So I don't think any new laws are needed. I just think the (v >> mzero = mzero) law should be removed, or else a *lot* of instances of MonadPlus need to come with a disclaimer that they are not law-abiding.</div>

<div class="gmail_extra"><br clear="all"><div>-- Dan Burton</div></div></div>