On Mon, Feb 3, 2014 at 3:00 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Mon, Feb 3, 2014 at 5:51 PM, Dan Burton <danburton.email@gmail.com> wrote:
Indeed this issue is not limited merely to multiple failure values.

    >>> runMaybeT $ lift (putStrLn "effect") >> mzero
    effect
    >>> runMaybeT mzero

So you're right. This law is being violated 

I thought it was fairly well known that IO violates one of the monad laws, in a way that would lead to this?

The choice of IO for the underlying monad is irrelevant.  The issue is that a later mzero in the transformer cannot undo an earlier action in a lower monad.  For example:

>>> Prelude Control.Monad.Maybe Control.Monad.State> runStateT (runMaybeT $ (lift $ put "bar") >> mzero) "foo"
(Nothing,"bar")
>>> Prelude Control.Monad.Maybe Control.Monad.State> runStateT (runMaybeT mzero) "foo"
(Nothing,"foo")