Haskell Core Libraries (base package)ParentContentsIndex
Control.Monad
Portability portable
Stability provisional
Maintainer libraries@haskell.org
Description
class (Monad m) => MonadPlus m where
Methods
mzero :: m a
mplus :: m a -> m a -> m a
Instances
MonadPlus []
MonadPlus Maybe
MonadPlus IO
(Error e) => MonadPlus (Either e)
(Monad m, Error e) => MonadPlus (ErrorT e m)
(Monad m) => MonadPlus (ListT m)
(Monoid w, MonadPlus m) => MonadPlus (RWST r w s m)
(MonadPlus m) => MonadPlus (ReaderT r m)
(MonadPlus m) => MonadPlus (StateT s m)
(Monoid w, MonadPlus m) => MonadPlus (WriterT w m)
MonadPlus (GenParser tok st)
MonadPlus ReadP
MonadPlus ReadPrec
join :: (Monad m) => m (m a) -> m a
guard :: (MonadPlus m) => Bool -> m ()
when :: (Monad m) => Bool -> m () -> m ()
unless :: (Monad m) => Bool -> m () -> m ()
ap :: (Monad m) => m (a -> b) -> m a -> m b
msum :: (MonadPlus m) => [m a] -> m a
filterM :: (Monad m) => (a -> m Bool) -> [a] -> m [a]
mapAndUnzipM :: (Monad m) => (a -> m (b, c)) -> [a] -> m ([b], [c])
zipWithM :: (Monad m) => (a -> b -> m c) -> [a] -> [b] -> m [c]
zipWithM_ :: (Monad m) => (a -> b -> m c) -> [a] -> [b] -> m ()
foldM :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m a
liftM :: (Monad m) => (a1 -> r) -> m a1 -> m r
liftM2 :: (Monad m) => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
liftM3 :: (Monad m) => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
liftM4 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
liftM5 :: (Monad m) => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
class Monad m where
Methods
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a
Instances
(ArrowApply a) => Monad (ArrowMonad a)
Monad (Cont r)
(Monad m) => Monad (ContT r m)
(Error e) => Monad (Either e)
(Monad m, Error e) => Monad (ErrorT e m)
Monad Identity
(Monad m) => Monad (ListT m)
(Monoid w) => Monad (RWS r w s)
(Monoid w, Monad m) => Monad (RWST r w s m)
Monad ((->) r)
Monad (Reader r)
(Monad m) => Monad (ReaderT r m)
Monad (ST s)
Monad (State s)
(Monad m) => Monad (StateT s m)
(Monoid w) => Monad (Writer w)
(Monoid w, Monad m) => Monad (WriterT w m)
Monad Maybe
Monad Gen
Monad []
Monad IO
Monad (ST s)
Monad (GenParser tok st)
Monad ReadP
Monad ReadPrec
class Functor f where
Methods
fmap :: (a -> b) -> f a -> f b
Instances
Functor (Cont r)
(Monad m) => Functor (ContT r m)
Functor (Either e)
(Monad m) => Functor (ErrorT e m)
Functor Identity
(Monad m) => Functor (ListT m)
Functor (RWS r w s)
(Monad m) => Functor (RWST r w s m)
Functor ((->) r)
Functor (Reader r)
(Monad m) => Functor (ReaderT r m)
Functor (ST s)
Functor (State s)
(Monad m) => Functor (StateT s m)
Functor (Writer w)
(Monad m) => Functor (WriterT w m)
Functor Maybe
Functor Gen
(Ix i) => Functor (Array i)
Functor []
Functor IO
Functor (ST s)
Functor (GenParser tok st)
Functor ReadP
Functor ReadPrec
mapM :: (Monad m) => (a -> m b) -> [a] -> m [b]
mapM_ :: (Monad m) => (a -> m b) -> [a] -> m ()
sequence :: (Monad m) => [m a] -> m [a]
sequence_ :: (Monad m) => [m a] -> m ()
(=<<) :: (Monad m) => (a -> m b) -> m a -> m b
Produced by Haddock version 0.4