| Haskell Hierarchical Libraries (mtl package) | Contents | Index
Control.Monad.Reader |
Portability | non-portable (multi-param classes, functional dependencies)
Stability | experimental
Maintainer | libraries@haskell.org
Description
Declaration of the Monoid class,and instances for list and functions Inspired by the paper Functional Programming with Overloading and Higher-Order Polymorphism, Mark P Jones (http://www.cse.ogi.edu/~mpj/) Advanced School of Functional Programming, 1995.
Documentation
class Monad m => MonadReader r m | m -> r where
Methods
ask :: m r
local :: (r -> r) -> m a -> m a
Instances
MonadReader r (Reader r)
MonadReader r ((->) r)
MonadReader s m => MonadReader s (ListT m)
(Error e, MonadReader r m) => MonadReader r (ErrorT e m)
Monad m => MonadReader r (ReaderT r m)
MonadReader r m => MonadReader r (StateT s m)
(Monoid w, MonadReader r m) => MonadReader r (WriterT w m)
MonadReader r' m => MonadReader r' (ContT r m)
Monoid w => MonadReader r (RWS r w s)
(Monoid w, Monad m) => MonadReader r (RWST r w s m)
asks :: MonadReader r m => (r -> a) -> m a
newtype Reader r a
Constructors
Reader |
runReader :: (r -> a) |
Instances
MonadReader r (Reader r)
Functor (Reader r)
Monad (Reader r)
MonadFix (Reader r)
mapReader :: (a -> b) -> Reader r a -> Reader r b
withReader :: (r' -> r) -> Reader r a -> Reader r' a
newtype ReaderT r m a
Constructors
ReaderT |
runReaderT :: (r -> m a) |
Instances
MonadError e m => MonadError e (ReaderT r m)
Monad m => MonadReader r (ReaderT r m)
MonadState s m => MonadState s (ReaderT r m)
MonadWriter w m => MonadWriter w (ReaderT r m)
MonadTrans (ReaderT r)
Monad m => Functor (ReaderT r m)
Monad m => Monad (ReaderT r m)
MonadCont m => MonadCont (ReaderT r m)
MonadFix m => MonadFix (ReaderT r m)
MonadIO m => MonadIO (ReaderT r m)
MonadPlus m => MonadPlus (ReaderT r m)
mapReaderT :: (m a -> n b) -> ReaderT w m a -> ReaderT w n b
withReaderT :: (r' -> r) -> ReaderT r m a -> ReaderT r' m a
module Control.Monad
module Control.Monad.Fix
module Control.Monad.Trans
Produced by Haddock version 0.7