fused-effects-0.3.1.0: 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

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

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

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

ret :: a -> LiftC m a Source #

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

Defined in Control.Effect.Lift

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) => 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 :: LiftC m a -> m a Source #

Extract a Lifted Monadic action from an effectful computation.

newtype LiftC m a Source #

Constructors

LiftC 

Fields

Instances
MonadTrans LiftC Source # 
Instance details

Defined in Control.Effect.Lift

Methods

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

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

Defined in Control.Effect.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 #

fail :: String -> LiftC m a #

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

Defined in Control.Effect.Lift

Methods

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

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

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

Defined in Control.Effect.Lift

Methods

fail :: String -> LiftC m a #

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

Defined in Control.Effect.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.Effect.Lift

Methods

liftIO :: IO a -> LiftC m a #

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

Defined in Control.Effect.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.Effect.Lift

Methods

mzero :: LiftC m a #

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

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

Defined in Control.Effect.Lift

Methods

askUnliftIO :: LiftC m (UnliftIO (LiftC m))

withRunInIO :: ((forall a. LiftC m a -> IO a) -> IO b) -> LiftC m b

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

Defined in Control.Effect.Lift

Methods

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

ret :: a -> LiftC m a Source #