| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Effect.Lift
Synopsis
- newtype Lift sig m k = Lift {
- unLift :: sig (m k)
- sendM :: (Member (Lift n) sig, Carrier sig m, Functor n) => n a -> m a
- runM :: LiftC m a -> m a
- newtype LiftC m a = LiftC {
- runLiftC :: m a
- class (HFunctor sig, Monad m) => Carrier sig m | m -> sig
- class Member (sub :: (* -> *) -> * -> *) sup
- run :: PureC a -> a
Lift effect
Instances
| Functor sig => Effect (Lift sig) Source # | |
| Functor sig => HFunctor (Lift sig) Source # | |
| Monad m => Carrier (Lift m) (LiftC m) Source # | |
| Functor sig => Generic1 (Lift sig m :: Type -> Type) Source # | |
| (Functor sig, Functor m) => Functor (Lift sig m) Source # | |
| type Rep1 (Lift sig m :: Type -> Type) Source # | |
Defined in Control.Effect.Lift | |
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.
Lift carrier
Instances
| MonadTrans LiftC Source # | |
Defined in Control.Effect.Lift | |
| Monad m => Monad (LiftC m) Source # | |
| Functor m => Functor (LiftC m) Source # | |
| MonadFix m => MonadFix (LiftC m) Source # | |
Defined in Control.Effect.Lift | |
| MonadFail m => MonadFail (LiftC m) Source # | |
Defined in Control.Effect.Lift | |
| Applicative m => Applicative (LiftC m) Source # | |
| MonadIO m => MonadIO (LiftC m) Source # | |
Defined in Control.Effect.Lift | |
| Alternative m => Alternative (LiftC m) Source # | |
| MonadPlus m => MonadPlus (LiftC m) Source # | |
| MonadUnliftIO m => MonadUnliftIO (LiftC m) Source # | |
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 # | |
Re-exports
class (HFunctor sig, Monad m) => Carrier sig m | m -> sig Source #
The class of carriers (results) for algebras (effect handlers) over signatures (effects), whose actions are given by the eff method.
Minimal complete definition