Reader.Core_over_monad
module Monad : Preface_specs.MONAD
module Env : Preface_specs.Types.T0
type env = Env.t
The encapsulated state.
type 'a monad = 'a Monad.t
The inner monad.
type 'a t = env -> 'a monad
The type held by the reader monad.
val upper : 'a monad -> 'a t
promote monad into the transformation.
val run : 'a t -> env -> 'a monad
Run the reader and extract the value.
val ask : env t
Provides the monad environment.
val local : (env -> env) -> 'a t -> 'a t
Modify the environment and execute the reader.
val reader : (env -> 'a monad) -> 'a t
Build a reader from a function.