> > 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?

In fact I don't know these functions, but when they were in the
Prelude can they be less important than those in the Monad
library? Why don't we move the classes and functions into a wonderful
Monad library already now for Haskell 98?

And, BTW, the library report defines types for zeroOrMore and
oneOrMore, which both are  (MonadPlus m) => m a -> m [a],
but doesn't mention them later.


Christian Sievers


Reply via email to