module Control.Effect where
import Data.Effect (EffectF, EffectH, LiftFOE (unliftFOE))
import Data.Kind (Type)
class SendFOE (ins :: EffectF) f where
sendFOE :: ins a -> f a
type (<:) = SendFOE
infix 2 <:
class SendHOE (sig :: EffectH) f where
sendHOE :: sig f a -> f a
type (<<:) = SendHOE
infix 2 <<:
instance (SendFOE ins f) => SendHOE (LiftFOE ins) f where
sendHOE :: forall a. LiftFOE ins f a -> f a
sendHOE = ins a -> f a
forall a. ins a -> f a
forall (ins :: EffectF) (f :: EffectF) a.
SendFOE ins f =>
ins a -> f a
sendFOE (ins a -> f a)
-> (LiftFOE ins f a -> ins a) -> LiftFOE ins f a -> f a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LiftFOE ins f a -> ins a
forall (ins :: EffectF) (f :: EffectF) a. LiftFOE ins f a -> ins a
unliftFOE
{-# INLINE sendHOE #-}
type f ~> g = forall (x :: Type). f x -> g x
infixr 2 ~>