[Haskell-cafe] What is MonadPlus good for?

Josef Svenningsson josef.svenningsson at gmail.com
Mon Feb 14 10:20:13 EST 2005

On Mon, 14 Feb 2005 10:07:41 -0500, Jacques Carette <carette at mcmaster.ca> wrote:
> Josef Svenningsson <josef.svenningsson at gmail.com> wrote:
> > 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.
> Doesn't that argue for allowing proven and unproven Monads in Haskell?
I believe you misunderstand me. The point that I was trying to make
was about monad transformers. I was saying that the best they can do
with respect to a law is to preserve it, which I believe all monad
transformers should do. Otherwise they don't deserve the name.

Turning to monad they should certainly fulfil the laws we associate
with a monad. Otherwise they wouldn't be monads! I am not proposing or
encouraging that one should declare a data type an instance of monad
if they do not obey the monad laws.



More information about the Haskell-Cafe mailing list