> |     class Monad m => MonadPlus m where
> |       mzero :: m a
> |       mplus :: m a -> m a -> m a
> | 
> | Why is this here?  It doesn't need to be in the prelude.  Just
> | leave it for the user to define (and then the user may pick
> | better names, like Ringad, zero, and <+>).  -- P
> 
> Yes, nuke MonadPlus. For Haskell 2 we can put these things in a
> wonderful Monad library.

I had thought that too many functions depend on MonadZero/Plus,
but actually, it's the following:

filterM :: MonadZero m => (a -> m Bool) -> [a] -> m [a]
guard   :: MonadZero m => Bool -> m ()
mfilter :: MonadZero m => (a -> Bool) -> m a -> m a
concatM :: MonadPlus m => [m a] -> m a

These would all vanish, along with MonadZero/Plus.
The Monad library itself doesn't mention MonadZero/Plus, as it happens.

Phil's proposal:
        delete class MonadZero, MonadPlus
        delete filterM, guard, mfilter, concatM

This is ok by me.  Does anyone object?

Simon


Reply via email to