scalaz/scalaz — comment on commit d71abed072f271dbcecd159d3fdaac516e49ebb6
File:  line 0
By ekmett:

At the very least, the "MonadPlus reform proposal" supplies part of what
you need, distinguishing Left Catch from Left Distribution (though left
distribution is actually a right distribution law).

http://www.haskell.org/haskellwiki/MonadPlus_Reform_Proposal

However, that proposal doesn't capture the impossibility of m >> mzero =
mzero in a world where IO qualified as a monad. To do that, you'd need to
do something much more radical.

Either by, requiring that every monad transformer that introduces
non-determinism works be something weaker than a monadplus or that they
require something stronger than a monad, to rollback effects. Since the
latter is largely impossible in a world with unrestricted effects like
scala, you're basically left fragmenting MonadPlus or MonadZero even
further to capture whether or not m >> mzero = mzero holds or just silently
ignoring the issue like the Haskell community has for the last 15 years.

-Edward

On Tue, Feb 14, 2012 at 4:49 PM, Jason Zaugg <
reply@reply.github.com
> wrote:

> Okay, it's back: b21cc2
>
> Two questions:
>
> 1. are we happy with my classification of "normal" and "strong" laws? I
> only added the "right zero" law to the latter category.
> 2. should we split MonadPlus into two (or more) type classes, each with
> the same interface, but with different laws?
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/scalaz/scalaz/commit/d71abed072f271dbcecd159d3fdaac516e49ebb6#commitcomment-966659
>