- interface MonadReader : Type -> (Type -> Type) -> Type
A computation which runs in a static context and produces an output
Parameters: stateType, m
Constraints: Monad m
Methods:
- ask : m stateType
Get the context
- local : (stateType -> stateType) -> m a -> m a
`local f c` runs the computation `c` in an environment modified by `f`.
Implementations:
- Monad m => MonadReader stateType (ReaderT stateType m)
- Monad m => MonadReader r (RWST r w s m)
- MonadReader r m => MonadReader r (EitherT e m)
- MonadReader r m => MonadReader r (MaybeT m)
- MonadReader r m => MonadReader r (StateT s m)
- MonadReader r m => MonadReader r (WriterT w m)
- ask : MonadReader stateType m => m stateType
Get the context
Totality: total- asks : MonadReader stateType m => (stateType -> a) -> m a
Evaluate a function in the context held by this computation
Totality: total- local : MonadReader stateType m => (stateType -> stateType) -> m a -> m a
`local f c` runs the computation `c` in an environment modified by `f`.
Totality: total