heftia-effects-0.4.0.0: higher-order effects done right
Safe HaskellNone
LanguageGHC2021

Control.Monad.Hefty.ShiftReset

Documentation

type ShiftFix ans (eh :: [(Type -> Type) -> Type -> Type]) (ef :: [EffectF]) = Shift ans (ShiftBase ans eh ef) Source #

newtype ShiftBase ans (eh :: [(Type -> Type) -> Type -> Type]) (ef :: [EffectF]) a Source #

Constructors

ShiftBase 

Fields

Instances

Instances details
Applicative (ShiftBase ans eh ef) Source # 
Instance details

Defined in Control.Monad.Hefty.ShiftReset

Methods

pure :: a -> ShiftBase ans eh ef a #

(<*>) :: ShiftBase ans eh ef (a -> b) -> ShiftBase ans eh ef a -> ShiftBase ans eh ef b #

liftA2 :: (a -> b -> c) -> ShiftBase ans eh ef a -> ShiftBase ans eh ef b -> ShiftBase ans eh ef c #

(*>) :: ShiftBase ans eh ef a -> ShiftBase ans eh ef b -> ShiftBase ans eh ef b #

(<*) :: ShiftBase ans eh ef a -> ShiftBase ans eh ef b -> ShiftBase ans eh ef a #

Functor (ShiftBase ans eh ef) Source # 
Instance details

Defined in Control.Monad.Hefty.ShiftReset

Methods

fmap :: (a -> b) -> ShiftBase ans eh ef a -> ShiftBase ans eh ef b #

(<$) :: a -> ShiftBase ans eh ef b -> ShiftBase ans eh ef a #

Monad (ShiftBase ans eh ef) Source # 
Instance details

Defined in Control.Monad.Hefty.ShiftReset

Methods

(>>=) :: ShiftBase ans eh ef a -> (a -> ShiftBase ans eh ef b) -> ShiftBase ans eh ef b #

(>>) :: ShiftBase ans eh ef a -> ShiftBase ans eh ef b -> ShiftBase ans eh ef b #

return :: a -> ShiftBase ans eh ef a #

evalShift :: forall ans (ef :: [EffectF]). Eff '[ShiftFix ans ('[] :: [(Type -> Type) -> Type -> Type]) ef] ef ans -> Eff ('[] :: [EffectH]) ef ans Source #

runShift :: forall a (ef :: [EffectF]) ans. (a -> Eff ('[] :: [EffectH]) ef ans) -> Eff '[ShiftFix ans ('[] :: [(Type -> Type) -> Type -> Type]) ef] ef a -> Eff ('[] :: [EffectH]) ef ans Source #

withShift :: forall ans (eh :: [EffectH]) (ef :: [EffectF]). Eff '[ShiftFix ans ('[] :: [(Type -> Type) -> Type -> Type]) '[Eff eh ef]] '[Eff eh ef] ans -> Eff eh ef ans Source #

runShift_ :: forall (r :: [EffectH]) (ef :: [EffectF]) x. Eff (Shift_ (Eff r ef) ': r) ef x -> Eff r ef x Source #

runReset :: forall (r :: [(Type -> Type) -> Type -> Type]) (ef :: [EffectF]) x. Eff (Reset ': r) ef x -> Eff r ef x Source #