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
RE: MonadZero (concluded)
S. Alexander Jacobson Fri, 6 Nov 1998 11:10:29 -0500 (Eastern Standard Time)
- MonadZero (concluded) Simon Peyton-Jones
- Re: MonadZero (concluded) Philip Wadler
- Re: MonadZero (concluded) Olaf Chitil
- Re: MonadZero (concluded) Ralf Hinze
- RE: MonadZero (concluded) Simon Peyton-Jones
- Re: MonadZero (concluded) S. Alexander Jacobson
- Re: MonadZero (concluded) Meurig Sage
- RE: MonadZero (concluded) Ralf Hinze
- Re: MonadZero (concluded) Lennart Augustsson
- RE: MonadZero (concluded) S. Alexander Jacobson
- RE: MonadZero (concluded) Christian Sievers
- Re: MonadZero (concluded) Erik Meijer
- Re: MonadZero (concluded) Erik Meijer
- RE: MonadZero (concluded) Simon Peyton-Jones
- RE: MonadZero (concluded) Hans Aberg