Does this mean that code which relies on ++ and do notation with Maybe
will stop working?

-Alex-

On Fri, 6 Nov 1998, Simon Peyton-Jones wrote:

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

___________________________________________________________________
S. Alexander Jacobson                   i2x Media  
1-212-697-0184 voice                    1-212-697-1427 fax



Reply via email to