<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">The issue is that a later mzero in the transformer cannot undo an earlier action in a lower monad.</span></blockquote>

<div><br></div>Precisely. Another example, for fun:<div><br></div><div><div><div><font face="courier new, monospace">>>> print (runMaybeT $ lift [1,2,3] >> mzero :: [Maybe Int])<br></font></div><div><font face="courier new, monospace">[Nothing, Nothing, Nothing]</font></div>

<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">>>> print (runMaybeT mzero :: [Maybe Int])</font></div></div><div><font face="courier new, monospace">[Nothing]</font><br>

</div></div><div><br></div><div>Actually, I'd say the problem <i>isn't </i>that a transformer "cannot undo earlier action in a lower monad." I'd just say that most transformers <i>happen to be implemented </i>in this "forgetful" manner. It's conceivable that we could implement some of them differently, in a way that would obey the MonadPlus laws. Whether or not obedience to this particular law is worthwhile... well, that's debatable.</div>

<div><br></div>-- Dan Burton</div>