Reader +Control.Monad.Trans -package

module Control.Monad.Trans.Reader
transformers Control.Monad.Trans.Reader
Declaration of the ReaderT monad transformer, which adds a static environment to a given monad. If the computation is to modify the stored information, use Control.Monad.Trans.State instead.
type Reader r = ReaderT r Identity
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
The parameterizable reader monad. Computations are functions of a shared environment. The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.
ReaderT :: (r -> m a) -> ReaderT r m a
transformers Control.Monad.Trans.Reader
newtype ReaderT r m a
transformers Control.Monad.Trans.Reader
The reader monad transformer, which adds a read-only environment to the given monad. The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.
reader :: (Monoid w, Monad m) => (r -> a) -> RWST r w s m a
transformers Control.Monad.Trans.RWS.Lazy, transformers Control.Monad.Trans.RWS.Strict
Constructor for computations in the reader monad (equivalent to asks).
reader :: Monad m => (r -> a) -> ReaderT r m a
transformers Control.Monad.Trans.Reader
Constructor for computations in the reader monad (equivalent to asks).
mapReader :: (a -> b) -> Reader r a -> Reader r b
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Transform the value returned by a Reader. *  (mapReader f m) = f . > runReader
mapReaderT :: (m a -> n b) -> ReaderT r m a -> ReaderT r n b
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Transform the computation inside a ReaderT. *  (mapReaderT f m) = f . > runReaderT
runReader :: Reader r a -> r -> a
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Runs a Reader and extracts the final value from it. (The inverse of reader.)
runReaderT :: ReaderT r m a -> r -> m a
transformers Control.Monad.Trans.Reader
The underlying computation, as a function of the environment.
withReader :: (r' -> r) -> Reader r a -> Reader r' a
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Execute a computation in a modified environment (a specialization of withReaderT). *  (withReader f m) = runReader m > .
withReaderT :: (r' -> r) -> ReaderT r m a -> ReaderT r' m a
transformers Control.Monad.Trans.Reader, mtl Control.Monad.Reader
Execute a computation in a modified environment (a more general version of local). *  (withReaderT f m) = > runReaderT m .