Idris2Doc : Control.Monad.Reader.Interface

Control.Monad.Reader.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 : mstateType
Get the context
local : {auto {i_con:0} : MonadReaderstateTypem} -> (stateType -> stateType) -> ma -> ma
`local f c` runs the computation `c` in an environment modified by `f`.

Implementations:
Monadm => MonadReaderstateType (ReaderTstateTypem)
Monadm => MonadReaderr (RWSTrwsm)
MonadReaderrm => MonadReaderr (EitherTem)
MonadReaderrm => MonadReaderr (MaybeTm)
MonadReaderrm => MonadReaderr (StateTsm)
MonadReaderrm => MonadReaderr (WriterTwm)
ask : MonadReaderstateTypem => mstateType
Get the context
asks : MonadReaderstateTypem => (stateType -> a) -> ma
Evaluate a function in the context held by this computation
local : MonadReaderstateTypem => MonadReaderstateTypem => (stateType -> stateType) -> ma -> ma
`local f c` runs the computation `c` in an environment modified by `f`.