fused-effects-0.2.0.2: A fast, flexible, fused effect system.

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Lift

Synopsis

Documentation

newtype Lift sig (m :: * -> *) k Source #

Constructors

Lift 

Fields

Instances
Functor sig => Effect (Lift sig) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Lift sig m (m a) -> Lift sig n (n (f a)) Source #

Functor sig => HFunctor (Lift sig) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

fmap' :: (a -> b) -> Lift sig m a -> Lift sig m b Source #

hmap :: (forall x. m x -> n x) -> Lift sig m a -> Lift sig n a Source #

Monad m => Carrier (Lift m) (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

ret :: a -> LiftC m a Source #

eff :: Lift m (LiftC m) (LiftC m a) -> LiftC m a Source #

Functor sig => Functor (Lift sig m) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

fmap :: (a -> b) -> Lift sig m a -> Lift sig m b #

(<$) :: a -> Lift sig m b -> Lift sig m a #

sendM :: (Member (Lift n) sig, Carrier sig m, Functor n, Applicative m) => n a -> m a Source #

Given a Lift n constraint in a signature carried by m, sendM promotes arbitrary actions of type n a to m a. It is spiritually similar to lift from the MonadTrans typeclass.

runM :: Monad m => Eff (LiftC m) a -> m a Source #

Extract a Lifted Monadic action from an effectful computation.

newtype LiftC m a Source #

Constructors

LiftC 

Fields

Instances
Monad m => Carrier (Lift m) (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

ret :: a -> LiftC m a Source #

eff :: Lift m (LiftC m) (LiftC m a) -> LiftC m a Source #