[Haskell-cafe] Re: What are the MonadPlus laws?

Keean Schupke k.schupke at imperial.ac.uk
Wed Jan 26 03:41:33 EST 2005

David Menendez wrote:

>Philip Wadler listed those as the laws he "would usually insist on" in a
>1997 message[1].
>    [1] <http://www.dcs.gla.ac.uk/mail-www/haskell/msg00057.html>
>He also mentions two other possible, but problematic, laws:
>    m >>= \x -> mzero           == mzero
>    m >>= \x -> k x `mplus` h x == m >>= k `mplus` m >>= h
>The first doesn't hold when m is bottom. The second doesn't hold for
I would like to know what category MonadPlus represents... A Monad is a 
where the objects are functors and the operators are id and product both 
of which
are natural transformations... Presumably the 'laws' for a monad can be 
derived from this

I cannot find any reference to MonadPlus in category theory. At a guess 
I would say that
it was the same as a Monad except the operators are id and co-product 
(or sum)... That would mean the 'laws' would be exactly the same as a 
Monad, just with (0,+) instead of (1,*)...


More information about the Haskell-Cafe mailing list