Module Reader.Core_over_monad

Parameters

Signature

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.