fused-effects-1.1.1.1: A fast, flexible, fused effect system.
Safe HaskellNone
LanguageHaskell2010

Control.Carrier.Lift

Description

A carrier for Lift allowing monadic actions to be lifted from an outer context into an inner one with sendM, and for an inner context to run actions in an outer one with liftWith.

Since: 1.0.0.0

Synopsis

Lift carrier

runM :: LiftC m a -> m a Source #

Extract a Lifted Monadic action from an effectful computation.

Since: 1.0.0.0

newtype LiftC m a Source #

Since: 1.0.0.0

Constructors

LiftC (m a) 

Instances

Instances details
MonadTrans LiftC Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

lift :: Monad m => m a -> LiftC m a #

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

Defined in Control.Carrier.Lift

Methods

(>>=) :: LiftC m a -> (a -> LiftC m b) -> LiftC m b #

(>>) :: LiftC m a -> LiftC m b -> LiftC m b #

return :: a -> LiftC m a #

Functor m => Functor (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

fmap :: (a -> b) -> LiftC m a -> LiftC m b #

(<$) :: a -> LiftC m b -> LiftC m a #

MonadFix m => MonadFix (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

mfix :: (a -> LiftC m a) -> LiftC m a #

MonadFail m => MonadFail (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

fail :: String -> LiftC m a #

Applicative m => Applicative (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

pure :: a -> LiftC m a #

(<*>) :: LiftC m (a -> b) -> LiftC m a -> LiftC m b #

liftA2 :: (a -> b -> c) -> LiftC m a -> LiftC m b -> LiftC m c #

(*>) :: LiftC m a -> LiftC m b -> LiftC m b #

(<*) :: LiftC m a -> LiftC m b -> LiftC m a #

MonadIO m => MonadIO (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

liftIO :: IO a -> LiftC m a #

Alternative m => Alternative (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

empty :: LiftC m a #

(<|>) :: LiftC m a -> LiftC m a -> LiftC m a #

some :: LiftC m a -> LiftC m [a] #

many :: LiftC m a -> LiftC m [a] #

MonadPlus m => MonadPlus (LiftC m) Source # 
Instance details

Defined in Control.Carrier.Lift

Methods

mzero :: LiftC m a #

mplus :: LiftC m a -> LiftC m a -> LiftC m a #

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

Defined in Control.Carrier.Lift

Methods

alg :: forall ctx (n :: Type -> Type) a. Functor ctx => Handler ctx n (LiftC m) -> Lift m n a -> ctx () -> LiftC m (ctx a) Source #

Lift effect