- ( MonadPlus ( -- class context: Monad
- mzero -- :: (MonadPlus m) => m a
- , mplus -- :: (MonadPlus m) => m a -> m a -> m a
- )
+ (
+ -- * Functor and monad classes
+
+ Functor(fmap)
+ , Monad((>>=), (>>), return, fail)
+
+ , MonadPlus ( -- class context: Monad
+ mzero -- :: (MonadPlus m) => m a
+ , mplus -- :: (MonadPlus m) => m a -> m a -> m a
+ )
+ -- * Functions
+
+ -- ** Naming conventions
+ -- $naming
+
+ -- ** Basic @Monad@ functions
+
+ , mapM -- :: (Monad m) => (a -> m b) -> [a] -> m [b]
+ , mapM_ -- :: (Monad m) => (a -> m b) -> [a] -> m ()
+ , forM -- :: (Monad m) => [a] -> (a -> m b) -> m [b]
+ , forM_ -- :: (Monad m) => [a] -> (a -> m b) -> m ()
+ , sequence -- :: (Monad m) => [m a] -> m [a]
+ , sequence_ -- :: (Monad m) => [m a] -> m ()
+ , (=<<) -- :: (Monad m) => (a -> m b) -> m a -> m b
+ , (>=>) -- :: (Monad m) => (a -> m b) -> (b -> m c) -> (a -> m c)
+ , (<=<) -- :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
+ , forever -- :: (Monad m) => m a -> m b
+ , void
+
+ -- ** Generalisations of list functions
+