Precisely. Another example, for fun:The issue is that a later mzero in the transformer cannot undo an earlier action in a lower monad.>>> print (runMaybeT $ lift [1,2,3] >> mzero :: [Maybe Int])[Nothing, Nothing, Nothing]>>> print (runMaybeT mzero :: [Maybe Int])[Nothing]
Actually, I'd say the problem isn't that a transformer "cannot undo earlier action in a lower monad." I'd just say that most transformers happen to be implemented 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.-- Dan Burton
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe