std.effect.lift

Implementation of the Lift effect

Types

type Lift m r a = 
    | Lift (m a)
    .. r

The Lift effect allows a regular monad (usually IO) to be used in an Eff monad

Values

let lift m : forall r m a . m a -> Eff [| lift : Lift m | r |] a

"Lifts" a monadic action into the Eff monad. Since monads do not compose this can only be

let run_lift eff : forall a m . [Monad m] -> Eff [| lift : Lift m |] a -> m a

Eliminates the lifted monad m. Can only be used once all other effects have been eliminated