[Haskell-cafe] What are the MonadPlus laws?

Paul Hudak paul.hudak at yale.edu
Tue Jan 25 22:49:06 EST 2005


Good point; I suppose the constraint m /= _|_
should be added to the law.

ajb at spamcop.net wrote:
> The problem is this "law":
> 
>     m >>= \k -> mzero === mzero
> 
> I think this "law" is untrue for _all_ MonadPlus instances, and you can
> trivially check this by setting m to bottom.
> 
> Cheers,
> Andrew Bromage



More information about the Haskell-Cafe mailing list