On Mon, 14 Feb 2005 19:01:53 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I was thinking more along the lines of Ralf Hinze's nondeterminism > transformer monad: > > http://haskell.org/hawiki/NonDeterminism > > The relevant instance is this: > > instance (Monad m) => MonadPlus (NondetT m) > > That is, if m is a Monad, then NondetT m is a MonadPlus. This is not > true if a requirement for MonadPlus is that it include the "mzero is a > right zero for bind" law. Indeed, such a transformer is impossible to > write if that law is a requirement. > Ah, I see. You are quite right.
> > You claimed that monad transformers break the > > mzero-is-right-identity-for-bind law because they can be applied to > > IO. I say, it's not the monad transformers fault. They cannot possibly > > be expected to repair the law if they are given a faulty monad. > > IO is not a faulty monad. It satisfies all of the laws that a monad is > supposed to satisfy. > Sloppy terminology on my side again. What I meant to say is that any MonadPlus instance of IO is faulty if we insist on the mzero-is-right-identity-for-bind law. I agree with you that the law should be dropped. Cheers, /Josef _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe