yaftee-0.1.0.0: Yet Another heFTy-inspired Extensible Effect
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Yaftee.Eff

Synopsis

TYPE

type E (effs :: [HT]) = H (U effs) Source #

INJECTION

eff :: forall t (effs :: [(Type -> Type -> Type -> Type) -> Type -> Type -> Type -> Type]) a i o. Member (FromFirst t) effs => t a -> E effs i o a Source #

effBase :: forall t (effs :: [(Type -> Type -> Type -> Type) -> Type -> Type -> Type -> Type]) a i o. Base (FromFirst t) effs => t a -> E effs i o a Source #

effh :: forall h (effs :: [(Type -> Type -> Type -> Type) -> Type -> Type -> Type -> Type]) i o a. Member h effs => h (E effs) i o a -> E effs i o a Source #

PROJECTION

run :: E ('[] :: [HT]) i o a -> a Source #

runM :: Monad m => E '[FromFirst m] i o a -> m a Source #

HANDLE RELAY

handleRelay :: forall f t (effs :: [HT]) i o a. Loose (U effs) => (forall x. x -> f x) -> (forall x. f x -> x) -> (forall x i' o' y. t x -> (x -> E effs i' o' (f y)) -> E effs i' o' (f y)) -> E (FromFirst t ': effs) i o a -> E effs i o (f a) Source #

handleRelayS :: forall f s t (effs :: [HT]) i o a. Loose (U effs) => (forall x. s -> x -> f s x) -> (forall x. f s x -> s) -> (forall x. f s x -> x) -> (forall x i' o' y. t x -> (x -> s -> E effs i' o' y) -> s -> E effs i' o' y) -> E (FromFirst t ': effs) i o a -> s -> E effs i o (f s a) Source #

interpose :: forall eff (effs :: [(Type -> Type -> Type -> Type) -> Type -> Type -> Type -> Type]) i o a b. Member (FromFirst eff) effs => (a -> E effs i o b) -> (forall v. eff v -> (v -> E effs i o b) -> E effs i o b) -> E effs i o a -> E effs i o b Source #