extensible-effects-1.2.1: An Alternative to Monad Transformers

Safe HaskellTrustworthy



Lifting primitive Monad types to effectful computations. We only allow a single Lifted Monad because Monads aren't commutative (e.g. Maybe (IO a) is functionally distinct from IO (Maybe a)).



data Lift m v Source

Lift a Monad m to an effect.


Functor (Lift m) 
Typeable1 m => Typeable1 (Lift m) 
SetMember ((* -> *) -> * -> *) * Lift (Lift m) (:> * (Lift m) ()) 

lift :: (Typeable1 m, Member (Lift m) r, SetMember Lift (Lift m) r) => m a -> Eff r aSource

Lift a Monad to an Effect.

runLift :: (Monad m, Typeable1 m) => Eff (Lift m :> ()) w -> m wSource

The handler of Lift requests. It is meant to be terminal: we only allow a single Lifted Monad.