data-effects 0.3.0.1 → 0.4.0.0
raw patch · 28 files changed
+1112/−548 lines, 28 filesdep +co-log-coredep +containersdep +unbounded-delaysdep ~basedep ~data-effects-coredep ~data-effects-thPVP ok
version bump matches the API change (PVP)
Dependencies added: co-log-core, containers, unbounded-delays, unliftio
Dependency ranges changed: base, data-effects-core, data-effects-th
API changes (from Hackage documentation)
- Data.Effect.Accum: pattern LLook :: forall a w f. () => (a ~ w, ()) => LiftFOE (Accum w) f a
- Data.Effect.Accum: pattern LAdd :: forall a f1 f2 w. () => (a ~ (), ()) => w -> LiftFOE (Accum f1) f2 a
- Data.Effect.Accum: type LAccum w = LiftFOE Accum w
- Data.Effect.Chronicle: [Absolve] :: forall a (f :: Type -> Type) c. a -> f a -> ChronicleH c f a
- Data.Effect.Chronicle: [Condemn] :: forall (f :: Type -> Type) a c. f a -> ChronicleH c f a
- Data.Effect.Chronicle: [Confess] :: forall c a. c -> ChronicleF c a
- Data.Effect.Chronicle: [Dictate] :: forall c. c -> ChronicleF c ()
- Data.Effect.Chronicle: [Memento] :: forall (f :: Type -> Type) a1 c. f a1 -> ChronicleH c f (Either c a1)
- Data.Effect.Chronicle: absolve :: forall a c f. SendHOE (ChronicleH c) f => a -> f a -> f a
- Data.Effect.Chronicle: absolve' :: forall {k} (tag :: k) a c f. SendHOE (TagH (ChronicleH c) tag) f => a -> f a -> f a
- Data.Effect.Chronicle: absolve'' :: forall {k} (key :: k) a c f. SendHOEBy key (ChronicleH c) f => a -> f a -> f a
- Data.Effect.Chronicle: chronicle :: (ChronicleF c <: f, Applicative f) => These c a -> f a
- Data.Effect.Chronicle: condemn :: forall a c f. SendHOE (ChronicleH c) f => f a -> f a
- Data.Effect.Chronicle: condemn' :: forall {k} (tag :: k) a c f. SendHOE (TagH (ChronicleH c) tag) f => f a -> f a
- Data.Effect.Chronicle: condemn'' :: forall {k} (key :: k) a c f. SendHOEBy key (ChronicleH c) f => f a -> f a
- Data.Effect.Chronicle: confess :: forall c a f. SendFOE (ChronicleF c) f => c -> f a
- Data.Effect.Chronicle: confess' :: forall {k} (tag :: k) c a f. SendFOE (Tag (ChronicleF c) tag) f => c -> f a
- Data.Effect.Chronicle: confess'' :: forall {k} (key :: k) c a f. SendFOEBy key (ChronicleF c) f => c -> f a
- Data.Effect.Chronicle: data ChronicleF c a
- Data.Effect.Chronicle: data ChronicleH c (f :: Type -> Type) a
- Data.Effect.Chronicle: dictate :: SendFOE (ChronicleF c) f => c -> f ()
- Data.Effect.Chronicle: dictate' :: forall {k} (tag :: k) c f. SendFOE (Tag (ChronicleF c) tag) f => c -> f ()
- Data.Effect.Chronicle: dictate'' :: forall {k} (key :: k) c f. SendFOEBy key (ChronicleF c) f => c -> f ()
- Data.Effect.Chronicle: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Chronicle.ChronicleH c)
- Data.Effect.Chronicle: memento :: forall a c f. SendHOE (ChronicleH c) f => f a -> f (Either c a)
- Data.Effect.Chronicle: memento' :: forall {k} (tag :: k) a c f. SendHOE (TagH (ChronicleH c) tag) f => f a -> f (Either c a)
- Data.Effect.Chronicle: memento'' :: forall {k} (key :: k) a c f. SendHOEBy key (ChronicleH c) f => f a -> f (Either c a)
- Data.Effect.Chronicle: pattern LDictate :: forall a c f. () => (a ~ (), ()) => c -> LiftFOE (ChronicleF c) f a
- Data.Effect.Chronicle: type LChronicleF c = LiftFOE ChronicleF c
- Data.Effect.Concurrent.Parallel: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Parallel
- Data.Effect.Concurrent.Parallel: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Poll
- Data.Effect.Concurrent.Parallel: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Race
- Data.Effect.Concurrent.Parallel: instance (Data.Effect.Concurrent.Parallel.Parallel Control.Effect.<<: f, GHC.Base.Applicative f) => GHC.Base.Applicative (Data.Effect.Concurrent.Parallel.Concurrently f)
- Data.Effect.Concurrent.Parallel: instance (Data.Effect.Concurrent.Parallel.Race Control.Effect.<<: f, Data.Effect.Concurrent.Parallel.Halt Control.Effect.<: f, Data.Effect.Concurrent.Parallel.Parallel Control.Effect.<<: f, GHC.Base.Applicative f) => GHC.Base.Alternative (Data.Effect.Concurrent.Parallel.Concurrently f)
- Data.Effect.Concurrent.Parallel: instance GHC.Base.Functor f => GHC.Base.Functor (Data.Effect.Concurrent.Parallel.Concurrently f)
- Data.Effect.Concurrent.Parallel: instance GHC.Base.Functor t => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Concurrent.Parallel.For t)
- Data.Effect.Concurrent.Parallel: pattern LHalt :: forall a f a1. () => (a ~ a1, ()) => LiftFOE Halt f a
- Data.Effect.Concurrent.Parallel: type LHalt = LiftFOE Halt
- Data.Effect.Concurrent.Timer: pattern LWait :: forall a f. () => (a ~ (), ()) => DiffTime -> LiftFOE CyclicTimer f a
- Data.Effect.Concurrent.Timer: pattern LClock :: forall a f. () => (a ~ DiffTime, ()) => LiftFOE Timer f a
- Data.Effect.Concurrent.Timer: type LCyclicTimer = LiftFOE CyclicTimer
- Data.Effect.Concurrent.Timer: type LTimer = LiftFOE Timer
- Data.Effect.Cont: [CallCC] :: forall a (m :: Type -> Type). (forall r. () => (a -> m r) -> m a) -> CallCC m a
- Data.Effect.Cont: callCC :: forall a m. SendHOE CallCC m => (forall r. () => (a -> m r) -> m a) -> m a
- Data.Effect.Cont: callCC' :: forall {k} (tag :: k) a m. SendHOE (TagH CallCC tag) m => (forall r. () => (a -> m r) -> m a) -> m a
- Data.Effect.Cont: callCC'' :: forall {k} (key :: k) a m. SendHOEBy key CallCC m => (forall r. () => (a -> m r) -> m a) -> m a
- Data.Effect.Cont: data CallCC (m :: Type -> Type) a
- Data.Effect.Coroutine: pattern LYield :: forall a1 b a2 f. () => (a1 ~ b, ()) => a2 -> LiftFOE (Yield a2 b) f a1
- Data.Effect.Coroutine: type LYield a b = LiftFOE Yield a b
- Data.Effect.Coroutine: yield_ :: Yield a () <: f => a -> f ()
- Data.Effect.Except: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Except.Catch e)
- Data.Effect.Except: pattern LThrow :: forall a e f a1. () => (a ~ a1, ()) => e -> LiftFOE (Throw e) f a
- Data.Effect.Except: type LThrow e = LiftFOE Throw e
- Data.Effect.Fail: pattern LFail :: forall a f a1. () => (a ~ a1, ()) => String -> LiftFOE Fail f a
- Data.Effect.Fail: type LFail = LiftFOE Fail
- Data.Effect.Fix: [Mfix] :: forall a (f :: Type -> Type). (a -> f a) -> Fix f a
- Data.Effect.Fix: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.Fix.Fix
- Data.Effect.Fix: mfix :: forall a f. SendHOE Fix f => (a -> f a) -> f a
- Data.Effect.Fix: mfix' :: forall {k} (tag :: k) a f. SendHOE (TagH Fix tag) f => (a -> f a) -> f a
- Data.Effect.Fix: mfix'' :: forall {k} (key :: k) a f. SendHOEBy key Fix f => (a -> f a) -> f a
- Data.Effect.Fresh: pattern LFresh :: forall a i f. () => (a ~ i, ()) => LiftFOE (Fresh i) f a
- Data.Effect.Fresh: type LFresh i = LiftFOE Fresh i
- Data.Effect.Input: pattern LInput :: forall a i f. () => (a ~ i, ()) => LiftFOE (Input i) f a
- Data.Effect.Input: type LInput i = LiftFOE Input i
- Data.Effect.KVStore: pattern LLookupKV :: forall a v k f. () => (a ~ Maybe v, ()) => k -> LiftFOE (KVStore k v) f a
- Data.Effect.KVStore: type LKVStore k v = LiftFOE KVStore k v
- Data.Effect.Log: pattern LLog :: forall a msg f. () => (a ~ (), ()) => msg -> LiftFOE (Log msg) f a
- Data.Effect.Log: type LLog msg = LiftFOE Log msg
- Data.Effect.NonDet: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.NonDet.ChooseH
- Data.Effect.NonDet: pattern LChoose :: forall a f. () => (a ~ Bool, ()) => LiftFOE Choose f a
- Data.Effect.NonDet: type LChoose = LiftFOE Choose
- Data.Effect.NonDet: type LEmpty = LiftFOE Empty
- Data.Effect.Output: pattern LOutput :: forall a o f. () => (a ~ (), ()) => o -> LiftFOE (Output o) f a
- Data.Effect.Output: type LOutput o = LiftFOE Output o
- Data.Effect.Provider: (.!) :: forall {k} i f a b. (SendHOEBy (ProviderKey (Const1 Identity :: () -> Type -> Type) (Const i :: () -> Type)) (Provider' (Const1 Identity :: k -> Type -> Type) (Const i :: k -> Type) (Const1 b :: k -> Type -> Type)) f, Functor f) => i -> ((f ~> b) -> b a) -> f a
- Data.Effect.Provider: (..!) :: forall {k} ctx i (p :: k) f a b. SendHOEBy (ProviderKey ctx i) (Provider' ctx i b) f => i p -> ((f ~> b p) -> b p a) -> f (ctx p a)
- Data.Effect.Provider: Const2 :: ff f a -> Const2 (ff :: k -> k1 -> Type) (x :: k2) (f :: k) (a :: k1)
- Data.Effect.Provider: [Provide] :: forall {k} (i :: k -> Type) (p :: k) (f :: Type -> Type) (b :: k -> Type -> Type) a1 (ctx :: k -> Type -> Type). i p -> ((forall x. () => f x -> b p x) -> b p a1) -> Provider' ctx i b f (ctx p a1)
- Data.Effect.Provider: [getConst2] :: Const2 (ff :: k -> k1 -> Type) (x :: k2) (f :: k) (a :: k1) -> ff f a
- Data.Effect.Provider: data Provider' (ctx :: k -> Type -> Type) (i :: k -> Type) (b :: k -> Type -> Type) (f :: Type -> Type) a
- Data.Effect.Provider: data ProviderKey (ctx :: k) (i :: k1)
- Data.Effect.Provider: infix 2 ..!
- Data.Effect.Provider: instance forall k (ctx :: k -> * -> *) (i :: k -> *) (b :: k -> * -> *). (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Provider.Provider' ctx i b)
- Data.Effect.Provider: instance forall k (ff :: (* -> *) -> * -> *) (x :: k). Data.Comp.Multi.HFunctor.HFunctor ff => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Provider.Const2 ff x)
- Data.Effect.Provider: newtype Const2 (ff :: k -> k1 -> Type) (x :: k2) (f :: k) (a :: k1)
- Data.Effect.Provider: provide' :: forall {k1} (tag :: k1) {k2} i (p :: k2) b a ctx f. SendHOE (TagH (Provider' ctx i b) tag) f => i p -> ((forall x. () => f x -> b p x) -> b p a) -> f (ctx p a)
- Data.Effect.Provider: provide'' :: forall {k1} (key :: k1) {k2} i (p :: k2) b a ctx f. SendHOEBy key (Provider' ctx i b) f => i p -> ((forall x. () => f x -> b p x) -> b p a) -> f (ctx p a)
- Data.Effect.Provider: type Provider_ i (b :: Type -> Type) = Provider Const1 Identity :: () -> Type -> Type Const i :: () -> Type Const1 b :: () -> Type -> Type
- Data.Effect.Reader: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Reader.Local r)
- Data.Effect.Reader: pattern LAsk :: forall a r f. () => (a ~ r, ()) => LiftFOE (Ask r) f a
- Data.Effect.Reader: type LAsk r = LiftFOE Ask r
- Data.Effect.Resource: [BracketOnExcept] :: forall (f :: Type -> Type) a1 a. f a1 -> (a1 -> f ()) -> (a1 -> f a) -> Resource f a
- Data.Effect.Resource: [Bracket] :: forall (f :: Type -> Type) a1 a. f a1 -> (a1 -> f ()) -> (a1 -> f a) -> Resource f a
- Data.Effect.Resource: bracket :: forall a b f. SendHOE Resource f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracket' :: forall {k} (tag :: k) a b f. SendHOE (TagH Resource tag) f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracket'' :: forall {k} (key :: k) a b f. SendHOEBy key Resource f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracketOnExcept :: forall a b f. SendHOE Resource f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracketOnExcept' :: forall {k} (tag :: k) a b f. SendHOE (TagH Resource tag) f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracketOnExcept'' :: forall {k} (key :: k) a b f. SendHOEBy key Resource f => f a -> (a -> f ()) -> (a -> f b) -> f b
- Data.Effect.Resource: bracketOnExcept_ :: (Resource <<: f, Functor f) => f a -> f b -> f c -> f c
- Data.Effect.Resource: bracket_ :: (Resource <<: f, Functor f) => f a -> f b -> f c -> f c
- Data.Effect.Resource: data Resource (f :: Type -> Type) a
- Data.Effect.Resource: finally :: (Resource <<: f, Applicative f) => f a -> f () -> f a
- Data.Effect.Resource: finally_ :: (Resource <<: f, Applicative f) => f a -> f b -> f a
- Data.Effect.Resource: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.Resource.Resource
- Data.Effect.Resource: onException :: (Resource <<: f, Applicative f) => f a -> f () -> f a
- Data.Effect.Resource: onException_ :: (Resource <<: f, Applicative f) => f a -> f b -> f a
- Data.Effect.Select: pattern LSelect :: forall a r f a1. () => (a ~ a1, ()) => ((a1 -> r) -> a1) -> LiftFOE (Select r) f a
- Data.Effect.Select: type LSelect r = LiftFOE Select r
- Data.Effect.ShiftReset: [Reset] :: forall (m :: Type -> Type) a. m a -> Reset m a
- Data.Effect.ShiftReset: [ShiftF] :: forall ans a. ((a -> ans) -> ans) -> ShiftF ans a
- Data.Effect.ShiftReset: [Shift] :: forall ans (n :: Type -> Type) (m :: Type -> Type) a. ((a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> Shift' ans n m a
- Data.Effect.ShiftReset: [Shift_'] :: forall a (n :: Type -> Type) (m :: Type -> Type). (forall ans. () => (a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> Shift_' n m a
- Data.Effect.ShiftReset: callCC :: forall a m ans n. (SendHOEBy ShiftKey (Shift' ans n) m, Monad m, Monad n) => ((a -> n ans) -> m a) -> m a
- Data.Effect.ShiftReset: data Reset (m :: Type -> Type) a
- Data.Effect.ShiftReset: data Shift' ans (n :: Type -> Type) (m :: Type -> Type) a
- Data.Effect.ShiftReset: data ShiftF ans a
- Data.Effect.ShiftReset: data ShiftKey
- Data.Effect.ShiftReset: data Shift_' (n :: Type -> Type) (m :: Type -> Type) a
- Data.Effect.ShiftReset: data Shift_Key
- Data.Effect.ShiftReset: embed :: forall (m :: Type -> Type) ans (n :: Type -> Type). (SendHOEBy ShiftKey (Shift' ans n) m, Monad n) => n ~> m
- Data.Effect.ShiftReset: embedF :: forall ans (n :: Type -> Type) (m :: Type -> Type). (ShiftF (n ans) <: m, Monad n) => n ~> m
- Data.Effect.ShiftReset: exit :: forall a m ans (n :: Type -> Type). (SendHOEBy ShiftKey (Shift' ans n) m, Applicative n) => ans -> m a
- Data.Effect.ShiftReset: exitF :: ShiftF ans <: m => ans -> m a
- Data.Effect.ShiftReset: fromShiftF :: forall n ans (m :: Type -> Type) x. ShiftF (n ans) x -> Shift ans n m x
- Data.Effect.ShiftReset: getCC :: forall m ans n. (SendHOEBy ShiftKey (Shift' ans n) m, Monad m, Monad n) => m (n ans)
- Data.Effect.ShiftReset: getCC_ :: forall m n. (SendHOEBy Shift_Key (Shift_' n) m, Functor n) => m (n ())
- Data.Effect.ShiftReset: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.ShiftReset.Shift' ans n)
- Data.Effect.ShiftReset: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.ShiftReset.Shift_' n)
- Data.Effect.ShiftReset: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor Data.Effect.ShiftReset.Reset
- Data.Effect.ShiftReset: pattern LShiftF :: forall a ans f a1. () => (a ~ a1, ()) => ((a1 -> ans) -> ans) -> LiftFOE (ShiftF ans) f a
- Data.Effect.ShiftReset: reset :: forall a m. SendHOE Reset m => m a -> m a
- Data.Effect.ShiftReset: reset' :: forall {k} (tag :: k) a m. SendHOE (TagH Reset tag) m => m a -> m a
- Data.Effect.ShiftReset: reset'' :: forall {k} (key :: k) a m. SendHOEBy key Reset m => m a -> m a
- Data.Effect.ShiftReset: shift :: forall ans n a m. SendHOEBy ShiftKey (Shift' ans n) m => ((a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift' :: forall {k} (tag :: k) ans n a m. SendHOE (TagH (Shift' ans n) tag) m => ((a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift'' :: forall {k} (key :: k) ans n a m. SendHOEBy key (Shift' ans n) m => ((a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift'_ :: forall ans n a m. SendHOE (Shift' ans n) m => ((a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shiftF :: forall ans a f. SendFOE (ShiftF ans) f => ((a -> ans) -> ans) -> f a
- Data.Effect.ShiftReset: shiftF' :: forall {k} (tag :: k) ans a f. SendFOE (Tag (ShiftF ans) tag) f => ((a -> ans) -> ans) -> f a
- Data.Effect.ShiftReset: shiftF'' :: forall {k} (key :: k) ans a f. SendFOEBy key (ShiftF ans) f => ((a -> ans) -> ans) -> f a
- Data.Effect.ShiftReset: shift_' :: forall a n m. SendHOEBy Shift_Key (Shift_' n) m => (forall ans. () => (a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift_'' :: forall {k} (tag :: k) a n m. SendHOE (TagH (Shift_' n) tag) m => (forall ans. () => (a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift_''' :: forall {k} (key :: k) a n m. SendHOEBy key (Shift_' n) m => (forall ans. () => (a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: shift_''_ :: forall a n m. SendHOE (Shift_' n) m => (forall ans. () => (a -> n ans) -> (forall x. () => m x -> n x) -> n ans) -> m a
- Data.Effect.ShiftReset: type LShiftF ans = LiftFOE ShiftF ans
- Data.Effect.ShiftReset: type Shift ans (n :: Type -> Type) = ShiftKey ##> Shift' ans n
- Data.Effect.ShiftReset: type Shift_ (n :: Type -> Type) = Shift_Key ##> Shift_' n
- Data.Effect.State: pattern LGet :: forall a s f. () => (a ~ s, ()) => LiftFOE (State s) f a
- Data.Effect.State: pattern LPut :: forall a s f. () => (a ~ (), ()) => s -> LiftFOE (State s) f a
- Data.Effect.State: type LState s = LiftFOE State s
- Data.Effect.Unlift: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Unlift.UnliftBase b)
- Data.Effect.Unlift: withRunInIO' :: forall {k} (tag :: k) f a. (UnliftIO ## tag) <<: f => ((f ~> IO) -> IO a) -> f a
- Data.Effect.Unlift: withRunInIO'' :: forall {k} (key :: k) f a. SendHOEBy key UnliftIO f => ((f ~> IO) -> IO a) -> f a
- Data.Effect.Writer: instance (() :: Constraint) => Data.Comp.Multi.HFunctor.HFunctor (Data.Effect.Writer.WriterH w)
- Data.Effect.Writer: pattern LTell :: forall a w f. () => (a ~ (), ()) => w -> LiftFOE (Tell w) f a
- Data.Effect.Writer: type LTell w = LiftFOE Tell w
+ Data.Effect.Accum: add'_ :: forall (w_arA6 :: Type) f_arA7 es_arBo ff_arBn c_arBp. (Free c_arBp ff_arBn, f_arA7 ~ Eff ff_arBn es_arBo, In (Accum w_arA6) es_arBo) => w_arA6 -> f_arA7 ()
+ Data.Effect.Accum: data AccumLabel
+ Data.Effect.Accum: instance Data.Effect.FirstOrder (Data.Effect.Accum.Accum w)
+ Data.Effect.Accum: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Accum.Accum w)
+ Data.Effect.Accum: look'_ :: forall (w_arA8 :: Type) f_arA9 es_arBD ff_arBC c_arBE. (Free c_arBE ff_arBC, f_arA9 ~ Eff ff_arBC es_arBD, In (Accum w_arA8) es_arBD) => f_arA9 w_arA8
+ Data.Effect.CC: [Jump] :: forall (ref :: Type -> Type) a1 (a :: Type -> Type) b. ref a1 -> a1 -> CC ref a b
+ Data.Effect.CC: [SubFork] :: forall (ref :: Type -> Type) (a :: Type -> Type) a1. CC ref a (Either (ref a1) a1)
+ Data.Effect.CC: callCC :: forall a ref es ff c. (CC ref :> es, Monad (Eff ff es), Free c ff) => ((forall b. a -> Eff ff es b) -> Eff ff es a) -> Eff ff es a
+ Data.Effect.CC: callCC_ :: forall (ref :: Type -> Type) a b (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (CC ref :> es, Monad (Eff ff es), Free c ff) => ((a -> Eff ff es b) -> Eff ff es a) -> Eff ff es a
+ Data.Effect.CC: data () => CC (ref :: Type -> Type) (a :: Type -> Type) b
+ Data.Effect.CC: getCC :: forall a ref es ff c. (CC ref :> es, Monad (Eff ff es), Free c ff) => Eff ff es (Eff ff es a)
+ Data.Effect.CC: jump :: forall (ref_acIi :: Type -> Type) (a1_acIm :: Type) (b_acIk :: Type) a_acIj es_ar97 ff_ar96 c_ar98. (Free c_ar98 ff_ar96, a_acIj ~ Eff ff_ar96 es_ar97, (:>) (CC ref_acIi) es_ar97) => ref_acIi a1_acIm -> a1_acIm -> a_acIj b_acIk
+ Data.Effect.CC: jump' :: forall key_ar9b (ref_acIi :: Type -> Type) (a1_acIm :: Type) (b_acIk :: Type) a_acIj es_ar9d ff_ar9c c_ar9e. (Free c_ar9e ff_ar9c, a_acIj ~ Eff ff_ar9c es_ar9d, Has key_ar9b (CC ref_acIi) es_ar9d) => ref_acIi a1_acIm -> a1_acIm -> a_acIj b_acIk
+ Data.Effect.CC: jump'' :: forall tag_ar9h (ref_acIi :: Type -> Type) (a1_acIm :: Type) (b_acIk :: Type) a_acIj es_ar9j ff_ar9i c_ar9k. (Free c_ar9k ff_ar9i, a_acIj ~ Eff ff_ar9i es_ar9j, (:>) (Tagged tag_ar9h (CC ref_acIi)) es_ar9j) => ref_acIi a1_acIm -> a1_acIm -> a_acIj b_acIk
+ Data.Effect.CC: jump'_ :: forall (ref_acIi :: Type -> Type) (a1_acIm :: Type) (b_acIk :: Type) a_acIj es_ar9o ff_ar9n c_ar9p. (Free c_ar9p ff_ar9n, a_acIj ~ Eff ff_ar9n es_ar9o, In (CC ref_acIi) es_ar9o) => ref_acIi a1_acIm -> a1_acIm -> a_acIj b_acIk
+ Data.Effect.CC: sub :: forall ref a b (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (CC ref :> es, Monad (Eff ff es), Free c ff) => (ref a -> Eff ff es b) -> (a -> Eff ff es b) -> Eff ff es b
+ Data.Effect.CC: subFork :: forall (ref_acIi :: Type -> Type) (a1_acIl :: Type) a_acIj es_ar8T ff_ar8S c_ar8U. (Free c_ar8U ff_ar8S, a_acIj ~ Eff ff_ar8S es_ar8T, (:>) (CC ref_acIi) es_ar8T) => a_acIj (Either (ref_acIi a1_acIl) a1_acIl)
+ Data.Effect.CC: subFork' :: forall key_ar8V (ref_acIi :: Type -> Type) (a1_acIl :: Type) a_acIj es_ar8X ff_ar8W c_ar8Y. (Free c_ar8Y ff_ar8W, a_acIj ~ Eff ff_ar8W es_ar8X, Has key_ar8V (CC ref_acIi) es_ar8X) => a_acIj (Either (ref_acIi a1_acIl) a1_acIl)
+ Data.Effect.CC: subFork'' :: forall tag_ar8Z (ref_acIi :: Type -> Type) (a1_acIl :: Type) a_acIj es_ar91 ff_ar90 c_ar92. (Free c_ar92 ff_ar90, a_acIj ~ Eff ff_ar90 es_ar91, (:>) (Tagged tag_ar8Z (CC ref_acIi)) es_ar91) => a_acIj (Either (ref_acIi a1_acIl) a1_acIl)
+ Data.Effect.CC: subFork'_ :: forall (ref_acIi :: Type -> Type) (a1_acIl :: Type) a_acIj es_ar94 ff_ar93 c_ar95. (Free c_ar95 ff_ar93, a_acIj ~ Eff ff_ar93 es_ar94, In (CC ref_acIi) es_ar94) => a_acIj (Either (ref_acIi a1_acIl) a1_acIl)
+ Data.Effect.Concurrent.Parallel: data ForLabel
+ Data.Effect.Concurrent.Parallel: data HaltLabel
+ Data.Effect.Concurrent.Parallel: data ParallelLabel
+ Data.Effect.Concurrent.Parallel: data PollLabel
+ Data.Effect.Concurrent.Parallel: data RaceLabel
+ Data.Effect.Concurrent.Parallel: for'_ :: forall (t_aq4R :: Type -> Type) (a_X0 :: Type) f_aq4S es_aqmC ff_aqmB c_aqmD. (Free c_aqmD ff_aqmB, f_aq4S ~ Eff ff_aqmB es_aqmC, In (For t_aq4R) es_aqmC) => t_aq4R (f_aq4S a_X0) -> f_aq4S (t_aq4R a_X0)
+ Data.Effect.Concurrent.Parallel: halt'_ :: forall (a_apf2 :: Type) f_apf1 es_aphf ff_aphe c_aphg. (Free c_aphg ff_aphe, f_apf1 ~ Eff ff_aphe es_aphf, In Halt es_aphf) => f_apf1 a_apf2
+ Data.Effect.Concurrent.Parallel: haltToIO :: MonadIO m => Halt ~~> m
+ Data.Effect.Concurrent.Parallel: instance (Data.Effect.Concurrent.Parallel.Parallel Data.Effect.OpenUnion.:> es, GHC.Base.Applicative (Control.Effect.Eff ff es), Control.Effect.Free c ff) => GHC.Base.Applicative (Data.Effect.Concurrent.Parallel.Concurrently ff es)
+ Data.Effect.Concurrent.Parallel: instance (Data.Effect.Concurrent.Parallel.Race Data.Effect.OpenUnion.:> es, Data.Effect.Concurrent.Parallel.Halt Data.Effect.OpenUnion.:> es, Data.Effect.Concurrent.Parallel.Parallel Data.Effect.OpenUnion.:> es, GHC.Base.Applicative (Control.Effect.Eff ff es), Control.Effect.Free c ff) => GHC.Base.Alternative (Data.Effect.Concurrent.Parallel.Concurrently ff es)
+ Data.Effect.Concurrent.Parallel: instance Data.Effect.FirstOrder Data.Effect.Concurrent.Parallel.Halt
+ Data.Effect.Concurrent.Parallel: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Halt
+ Data.Effect.Concurrent.Parallel: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Parallel
+ Data.Effect.Concurrent.Parallel: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Poll
+ Data.Effect.Concurrent.Parallel: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Parallel.Race
+ Data.Effect.Concurrent.Parallel: instance GHC.Base.Functor (Control.Effect.Eff ff es) => GHC.Base.Functor (Data.Effect.Concurrent.Parallel.Concurrently ff es)
+ Data.Effect.Concurrent.Parallel: instance GHC.Base.Functor t => Data.Effect.HFunctor.HFunctor (Data.Effect.Concurrent.Parallel.For t)
+ Data.Effect.Concurrent.Parallel: liftP2'_ :: forall (a_X0 :: Type) (b_X1 :: Type) (c_apf5 :: Type) f_apf6 es_apsA ff_apsz c_apsB. (Free c_apsB ff_apsz, f_apf6 ~ Eff ff_apsz es_apsA, In Parallel es_apsA) => (a_X0 -> b_X1 -> c_apf5) -> f_apf6 a_X0 -> f_apf6 b_X1 -> f_apf6 c_apf5
+ Data.Effect.Concurrent.Parallel: parallelToIO :: MonadUnliftIO m => Parallel ~~> m
+ Data.Effect.Concurrent.Parallel: parallelToSequential :: Applicative (Eff ff es) => Parallel ~~> Eff ff es
+ Data.Effect.Concurrent.Parallel: poldl'_ :: forall (a_X0 :: Type) (b_X1 :: Type) (r_aptt :: Type) f_apts es_aq4w ff_aq4v c_aq4x. (Free c_aq4x ff_aq4v, f_apts ~ Eff ff_aq4v es_aq4w, In Poll es_aq4w) => (a_X0 -> Maybe b_X1 -> f_apts (Either r_aptt a_X0)) -> f_apts a_X0 -> f_apts b_X1 -> f_apts r_aptt
+ Data.Effect.Concurrent.Parallel: pollToIO :: MonadUnliftIO m => Poll ~~> m
+ Data.Effect.Concurrent.Parallel: race'_ :: forall (a_apf0 :: Type) f_apeZ es_apt3 ff_apt2 c_apt4. (Free c_apt4 ff_apt2, f_apeZ ~ Eff ff_apt2 es_apt3, In Race es_apt3) => f_apeZ a_apf0 -> f_apeZ a_apf0 -> f_apeZ a_apf0
+ Data.Effect.Concurrent.Parallel: raceToIO :: MonadUnliftIO m => Race ~~> m
+ Data.Effect.Concurrent.Parallel: runConcurrentIO :: forall a es ff c. (UnliftIO :> es, Emb IO :> es, forall es'. Monad (Eff ff es'), Free c ff) => Eff ff (Parallel ': (Race ': (Poll ': (Halt ': es)))) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runForAsParallel :: forall t a es ff c. (Parallel :> es, Traversable t, Applicative (Eff ff es), Free c ff) => Eff ff (For t ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runHaltIO :: forall a es ff c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Halt ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runParallelAsSequential :: forall a es ff c. (Applicative (Eff ff es), Free c ff) => Eff ff (Parallel ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runParallelIO :: forall a es ff c. (UnliftIO :> es, Emb IO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Parallel ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runPollIO :: forall a es ff c. (Emb IO :> es, UnliftIO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Poll ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Parallel: runRaceIO :: forall a es ff c. (Emb IO :> es, UnliftIO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Race ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Timer: clock'_ :: forall f_aodC es_aogc ff_aogb c_aogd. (Free c_aogd ff_aogb, f_aodC ~ Eff ff_aogb es_aogc, In Timer es_aogc) => f_aodC DiffTime
+ Data.Effect.Concurrent.Timer: data CyclicTimerLabel
+ Data.Effect.Concurrent.Timer: data TimerLabel
+ Data.Effect.Concurrent.Timer: instance Data.Effect.FirstOrder Data.Effect.Concurrent.Timer.CyclicTimer
+ Data.Effect.Concurrent.Timer: instance Data.Effect.FirstOrder Data.Effect.Concurrent.Timer.Timer
+ Data.Effect.Concurrent.Timer: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Timer.CyclicTimer
+ Data.Effect.Concurrent.Timer: instance Data.Effect.HFunctor.HFunctor Data.Effect.Concurrent.Timer.Timer
+ Data.Effect.Concurrent.Timer: restartClock :: forall a ff es c. (Timer :> es, Monad (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es a
+ Data.Effect.Concurrent.Timer: runTimerIO :: forall a ff es c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Timer ': es) a -> Eff ff es a
+ Data.Effect.Concurrent.Timer: sleep'_ :: forall f_aofc es_aogt ff_aogs c_aogu. (Free c_aogu ff_aogs, f_aofc ~ Eff ff_aogs es_aogt, In Timer es_aogt) => DiffTime -> f_aofc ()
+ Data.Effect.Concurrent.Timer: wait'_ :: forall f_aogQ es_aoSM ff_aoSL c_aoSN. (Free c_aoSN ff_aoSL, f_aogQ ~ Eff ff_aoSL es_aoSM, In CyclicTimer es_aoSM) => DiffTime -> f_aogQ ()
+ Data.Effect.Coroutine: data YieldLabel
+ Data.Effect.Coroutine: inputToYield :: Input i f a -> Yield () i f a
+ Data.Effect.Coroutine: instance Data.Effect.FirstOrder (Data.Effect.Coroutine.Yield a b)
+ Data.Effect.Coroutine: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Coroutine.Yield a b)
+ Data.Effect.Coroutine: outputToYield :: Output o f a -> Yield o () f a
+ Data.Effect.Coroutine: yield'_ :: forall (a_antM :: Type) (b_antN :: Type) f_antO es_anuQ ff_anuP c_anuR. (Free c_anuR ff_anuP, f_antO ~ Eff ff_anuP es_anuQ, In (Yield a_antM b_antN) es_anuQ) => a_antM -> f_antO b_antN
+ Data.Effect.Except: catch'_ :: forall (b_alSP :: Type) (e_alSN :: Type) a_alSO es_alTb ff_alTa c_alTc. (Free c_alTc ff_alTa, a_alSO ~ Eff ff_alTa es_alTb, In (Catch e_alSN) es_alTb) => a_alSO b_alSP -> (e_alSN -> a_alSO b_alSP) -> a_alSO b_alSP
+ Data.Effect.Except: runCatchIO :: forall e es ff a c. (UnliftIO :> es, Emb IO :> es, Exception e, Monad (Eff ff es), Free c ff) => Eff ff (Catch e ': es) a -> Eff ff es a
+ Data.Effect.Except: runThrowIO :: forall e es ff a c. (Emb IO :> es, Exception e, Monad (Eff ff es), Free c ff) => Eff ff (Throw e ': es) a -> Eff ff es a
+ Data.Effect.Except: throw'_ :: forall (e_alHI :: Type) (b_alHK :: Type) a_alHJ es_alI4 ff_alI3 c_alI5. (Free c_alI5 ff_alI3, a_alHJ ~ Eff ff_alI3 es_alI4, In (Throw e_alHI) es_alI4) => e_alHI -> a_alHJ b_alHK
+ Data.Effect.Fail: fail'_ :: forall (b_aluG :: Type) a_aluF es_aluZ ff_aluY c_alv0. (Free c_alv0 ff_aluY, a_aluF ~ Eff ff_aluY es_aluZ, In Fail es_aluZ) => String -> a_aluF b_aluG
+ Data.Effect.Fail: runFailIO :: forall es a ff c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => Eff ff (Fail ': es) a -> Eff ff es a
+ Data.Effect.Fix: [Efix] :: forall b (a :: Type -> Type). (b -> a b) -> Fix a b
+ Data.Effect.Fix: efix :: forall (b_aljK :: Type) a_aljJ es_aljO ff_aljN c_aljP. (Free c_aljP ff_aljN, a_aljJ ~ Eff ff_aljN es_aljO, (:>) Fix es_aljO) => (b_aljK -> a_aljJ b_aljK) -> a_aljJ b_aljK
+ Data.Effect.Fix: efix' :: forall key_aljR (b_aljK :: Type) a_aljJ es_aljT ff_aljS c_aljU. (Free c_aljU ff_aljS, a_aljJ ~ Eff ff_aljS es_aljT, Has key_aljR Fix es_aljT) => (b_aljK -> a_aljJ b_aljK) -> a_aljJ b_aljK
+ Data.Effect.Fix: efix'' :: forall tag_aljW (b_aljK :: Type) a_aljJ es_aljY ff_aljX c_aljZ. (Free c_aljZ ff_aljX, a_aljJ ~ Eff ff_aljX es_aljY, (:>) (Tagged tag_aljW Fix) es_aljY) => (b_aljK -> a_aljJ b_aljK) -> a_aljJ b_aljK
+ Data.Effect.Fix: efix'_ :: forall (b_aljK :: Type) a_aljJ es_alk2 ff_alk1 c_alk3. (Free c_alk3 ff_alk1, a_aljJ ~ Eff ff_alk1 es_alk2, In Fix es_alk2) => (b_aljK -> a_aljJ b_aljK) -> a_aljJ b_aljK
+ Data.Effect.Fresh: data FreshLabel
+ Data.Effect.Fresh: fresh'_ :: forall (i_al7q :: Type) f_al7r es_al8g ff_al8f c_al8h. (Free c_al8h ff_al8f, f_al7r ~ Eff ff_al8f es_al8g, In (Fresh i_al7q) es_al8g) => f_al7r i_al7q
+ Data.Effect.Fresh: instance Data.Effect.FirstOrder (Data.Effect.Fresh.Fresh i)
+ Data.Effect.Fresh: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Fresh.Fresh i)
+ Data.Effect.Input: data InputLabel
+ Data.Effect.Input: input'_ :: forall (i_akGL :: Type) f_akGM es_akHB ff_akHA c_akHC. (Free c_akHC ff_akHA, f_akGM ~ Eff ff_akHA es_akHB, In (Input i_akGL) es_akHB) => f_akGM i_akGL
+ Data.Effect.Input: instance Data.Effect.FirstOrder (Data.Effect.Input.Input i)
+ Data.Effect.Input: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Input.Input i)
+ Data.Effect.Input: runInputConst :: forall i es ff a c. (Applicative (Eff ff es), Free c ff) => i -> Eff ff (Input i ': es) a -> Eff ff es a
+ Data.Effect.Input: runInputEff :: forall i es ff a c. Free c ff => Eff ff es i -> Eff ff (Input i ': es) a -> Eff ff es a
+ Data.Effect.KVStore: data KVStoreLabel
+ Data.Effect.KVStore: instance Data.Effect.FirstOrder (Data.Effect.KVStore.KVStore k v)
+ Data.Effect.KVStore: instance Data.Effect.HFunctor.HFunctor (Data.Effect.KVStore.KVStore k v)
+ Data.Effect.KVStore: lookupKV'_ :: forall (k_amKI :: Type) (v_amKJ :: Type) f_amKK es_amMl ff_amMk c_amMm. (Free c_amMm ff_amMk, f_amKK ~ Eff ff_amMk es_amMl, In (KVStore k_amKI v_amKJ) es_amMl) => k_amKI -> f_amKK (Maybe v_amKJ)
+ Data.Effect.KVStore: runKVStoreAsState :: forall k v es ff c. (Ord k, State (Map k v) :> es, Monad (Eff ff es), Free c ff) => Eff ff (KVStore k v ': es) ~> Eff ff es
+ Data.Effect.KVStore: runKVStoreIORef :: forall k v a es ff c. (Ord k, Emb IO :> es, forall es'. Monad (Eff ff es'), Free c ff) => Map k v -> Eff ff (KVStore k v ': es) a -> Eff ff es (Map k v, a)
+ Data.Effect.KVStore: updateKV'_ :: forall (k_amKL :: Type) (v_amKM :: Type) f_amKN es_amMG ff_amMF c_amMH. (Free c_amMH ff_amMF, f_amKN ~ Eff ff_amMF es_amMG, In (KVStore k_amKL v_amKM) es_amMG) => k_amKL -> Maybe v_amKM -> f_amKN ()
+ Data.Effect.Log: data LogLabel
+ Data.Effect.Log: instance Data.Effect.FirstOrder (Data.Effect.Log.Log msg)
+ Data.Effect.Log: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Log.Log msg)
+ Data.Effect.Log: log'_ :: forall (msg_aklJ :: Type) f_aklK es_akmF ff_akmE c_akmG. (Free c_akmG ff_akmE, f_aklK ~ Eff ff_akmE es_akmF, In (Log msg_aklJ) es_akmF) => msg_aklJ -> f_aklK ()
+ Data.Effect.Log: runLogAction :: forall msg a es ff c. Free c ff => LogAction (Eff ff es) msg -> Eff ff (Log msg ': es) a -> Eff ff es a
+ Data.Effect.Log: runLogActionEmbed :: forall msg f a es ff c. (Emb f :> es, Free c ff) => LogAction f msg -> Eff ff (Log msg ': es) a -> Eff ff es a
+ Data.Effect.Log: runLogAsOutput :: forall msg a es ff c. (Output msg :> es, Free c ff) => Eff ff (Log msg ': es) a -> Eff ff es a
+ Data.Effect.Log: runOutputAsLog :: forall msg a es ff c. (Log msg :> es, Free c ff) => Eff ff (Output msg ': es) a -> Eff ff es a
+ Data.Effect.NonDet: EmptyException :: EmptyException
+ Data.Effect.NonDet: branch :: forall es a ff c. (Choose :> es, Monad (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es a -> Eff ff es a
+ Data.Effect.NonDet: choice :: forall es a ff c. (Choose :> es, Empty :> es, Monad (Eff ff es), Free c ff) => [a] -> Eff ff es a
+ Data.Effect.NonDet: choiceH :: forall es a ff c. (ChooseH :> es, Empty :> es, Monad (Eff ff es), Free c ff) => [a] -> Eff ff es a
+ Data.Effect.NonDet: choose'_ :: forall a_ajzg es_ajzv ff_ajzu c_ajzw. (Free c_ajzw ff_ajzu, a_ajzg ~ Eff ff_ajzu es_ajzv, In Choose es_ajzv) => a_ajzg Bool
+ Data.Effect.NonDet: chooseH'_ :: forall (b_ajJe :: Type) a_ajJd es_ajJA ff_ajJz c_ajJB. (Free c_ajJB ff_ajJz, a_ajJd ~ Eff ff_ajJz es_ajJA, In ChooseH es_ajJA) => a_ajJd b_ajJe -> a_ajJd b_ajJe -> a_ajJd b_ajJe
+ Data.Effect.NonDet: data EmptyException
+ Data.Effect.NonDet: empty'_ :: forall (b_ajoU :: Type) a_ajoT es_ajpa ff_ajp9 c_ajpb. (Free c_ajpb ff_ajp9, a_ajoT ~ Eff ff_ajp9 es_ajpa, In Empty es_ajpa) => a_ajoT b_ajoU
+ Data.Effect.NonDet: infixl 3 `branch`
+ Data.Effect.NonDet: instance GHC.Exception.Type.Exception Data.Effect.NonDet.EmptyException
+ Data.Effect.NonDet: instance GHC.Show.Show Data.Effect.NonDet.EmptyException
+ Data.Effect.NonDet: runChooseH :: forall es a ff c. (Choose :> es, Monad (Eff ff es), Free c ff) => Eff ff (ChooseH ': es) a -> Eff ff es a
+ Data.Effect.NonDet: runNonDetIO :: forall es a ff c. (UnliftIO :> es, Emb IO :> es, forall f. Monad (Eff ff f), Free c ff) => Eff ff (ChooseH ': (Empty ': es)) a -> Eff ff es (Either SomeException a)
+ Data.Effect.NonDet: runNonDetShift :: forall ans a es ref ff c. (Monoid ans, Shift ans ref :> es, forall f. Monad (ff f), Free c ff) => Eff ff (Choose ': (Empty ': es)) a -> Eff ff es a
+ Data.Effect.Output: data OutputLabel
+ Data.Effect.Output: ignoreOutput :: forall o es ff a c. (Applicative (Eff ff es), Free c ff) => Eff ff (Output o ': es) a -> Eff ff es a
+ Data.Effect.Output: instance Data.Effect.FirstOrder (Data.Effect.Output.Output o)
+ Data.Effect.Output: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Output.Output o)
+ Data.Effect.Output: output'_ :: forall (o_aiXF :: Type) f_aiXG es_aiYB ff_aiYA c_aiYC. (Free c_aiYC ff_aiYA, f_aiXG ~ Eff ff_aiYA es_aiYB, In (Output o_aiXF) es_aiYB) => o_aiXF -> f_aiXG ()
+ Data.Effect.Output: runOutputEff :: forall o es ff a c. Free c ff => (o -> Eff ff es ()) -> Eff ff (Output o ': es) a -> Eff ff es a
+ Data.Effect.Provider: ScopeC :: Eff ff (Each fs s ++ (Scoped ff t i fs r ': r)) a -> ScopeC ff t i fs r s a
+ Data.Effect.Provider: ScopeC_ :: Eff ff (es ++ (Scoped_ ff t i es r ': r)) a -> ScopeC_ ff t i es r a
+ Data.Effect.Provider: [Scope] :: forall s t i a f b. i s -> ((forall x. f x -> b s x) -> b s a) -> Scope t i b f (t s a)
+ Data.Effect.Provider: [unScopeC] :: ScopeC ff t i fs r s a -> Eff ff (Each fs s ++ (Scoped ff t i fs r ': r)) a
+ Data.Effect.Provider: [unScopeC_] :: ScopeC_ ff t i es r a -> Eff ff (es ++ (Scoped_ ff t i es r ': r)) a
+ Data.Effect.Provider: data Scope t i b :: Effect
+ Data.Effect.Provider: data ScopeLabel (t :: k -> Type -> Type) (i :: k -> Type)
+ Data.Effect.Provider: instance forall k (t :: k -> * -> *) (i :: k -> *) (b :: k -> * -> *). Data.Effect.HFunctor.HFunctor (Data.Effect.Provider.Scope t i b)
+ Data.Effect.Provider: newtype ScopeC ff t i fs r s a
+ Data.Effect.Provider: newtype ScopeC_ ff t i es r a
+ Data.Effect.Provider: provide_ :: forall i a es' es r ff c. (Provider ff Identity i es r :> es', forall es''. Functor (Eff ff es''), Free c ff) => i -> ((Eff ff es' ~> Eff ff (es ++ (Provider ff Identity i es r ': r))) -> Eff ff (es ++ (Provider ff Identity i es r ': r)) a) -> Eff ff es' a
+ Data.Effect.Provider: provide__ :: forall a es' es r ff c. (Provider ff Identity () es r :> es', forall es''. Functor (Eff ff es''), Free c ff) => ((Eff ff es' ~> Eff ff (es ++ (Provider ff Identity () es r ': r))) -> Eff ff (es ++ (Provider ff Identity () es r ': r)) a) -> Eff ff es' a
+ Data.Effect.Provider: runProvider :: forall t i a es r ff c. (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff) => (forall x. i -> Eff ff (es ++ (Provider ff t i es r ': r)) x -> Eff ff (Provider ff t i es r ': r) (t x)) -> Eff ff (Provider ff t i es r ': r) a -> Eff ff r a
+ Data.Effect.Provider: runProvider_ :: forall i a es r ff c. (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff) => (forall x. i -> Eff ff (es ++ (Provider ff Identity i es r ': r)) x -> Eff ff (Provider ff Identity i es r ': r) x) -> Eff ff (Provider ff Identity i es r ': r) a -> Eff ff r a
+ Data.Effect.Provider: runProvider__ :: forall a es r ff c. (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff) => (forall x. Eff ff (es ++ (Provider ff Identity () es r ': r)) x -> Eff ff (Provider ff Identity () es r ': r) x) -> Eff ff (Provider ff Identity () es r ': r) a -> Eff ff r a
+ Data.Effect.Provider: runScoped :: forall t i a es r ff c. (KnownLength es, Free c ff) => (forall s x. i s -> Eff ff (Each es s ++ (Scoped ff t i es r ': r)) x -> Eff ff (Scoped ff t i es r ': r) (t s x)) -> Eff ff (Scoped ff t i es r ': r) a -> Eff ff r a
+ Data.Effect.Provider: runScoped_ :: forall t i a es r ff c. (KnownLength es, Free c ff) => (forall p x. i p -> Eff ff (es ++ (Scoped_ ff t i es r ': r)) x -> Eff ff (Scoped_ ff t i es r ': r) (t p x)) -> Eff ff (Scoped_ ff t i es r ': r) a -> Eff ff r a
+ Data.Effect.Provider: scope :: forall {k_ai7h :: Type} (s_X0 :: k_ai7h) (t_ai6e :: k_ai7h -> Type -> Type) (i_ai6f :: k_ai7h -> Type) (a_X1 :: Type) (b_ai6i :: k_ai7h -> Type -> Type) f_ai6h es_ai8m ff_ai8l c_ai8n. (Free c_ai8n ff_ai8l, f_ai6h ~ Eff ff_ai8l es_ai8m, (:>) (Scope t_ai6e i_ai6f b_ai6i) es_ai8m) => i_ai6f s_X0 -> ((forall (x_ai6j :: Type). f_ai6h x_ai6j -> b_ai6i s_X0 x_ai6j) -> b_ai6i s_X0 a_X1) -> f_ai6h (t_ai6e s_X0 a_X1)
+ Data.Effect.Provider: scope' :: forall key_ai8q {k_ai7h :: Type} (s_X0 :: k_ai7h) (t_ai6e :: k_ai7h -> Type -> Type) (i_ai6f :: k_ai7h -> Type) (a_X1 :: Type) (b_ai6i :: k_ai7h -> Type -> Type) f_ai6h es_ai8s ff_ai8r c_ai8t. (Free c_ai8t ff_ai8r, f_ai6h ~ Eff ff_ai8r es_ai8s, Has key_ai8q (Scope t_ai6e i_ai6f b_ai6i) es_ai8s) => i_ai6f s_X0 -> ((forall (x_ai6j :: Type). f_ai6h x_ai6j -> b_ai6i s_X0 x_ai6j) -> b_ai6i s_X0 a_X1) -> f_ai6h (t_ai6e s_X0 a_X1)
+ Data.Effect.Provider: scope'' :: forall tag_ai8w {k_ai7h :: Type} (s_X0 :: k_ai7h) (t_ai6e :: k_ai7h -> Type -> Type) (i_ai6f :: k_ai7h -> Type) (a_X1 :: Type) (b_ai6i :: k_ai7h -> Type -> Type) f_ai6h es_ai8y ff_ai8x c_ai8z. (Free c_ai8z ff_ai8x, f_ai6h ~ Eff ff_ai8x es_ai8y, (:>) (Tagged tag_ai8w (Scope t_ai6e i_ai6f b_ai6i)) es_ai8y) => i_ai6f s_X0 -> ((forall (x_ai6j :: Type). f_ai6h x_ai6j -> b_ai6i s_X0 x_ai6j) -> b_ai6i s_X0 a_X1) -> f_ai6h (t_ai6e s_X0 a_X1)
+ Data.Effect.Provider: scope'_ :: forall {k_ai7h :: Type} (s_X0 :: k_ai7h) (t_ai6e :: k_ai7h -> Type -> Type) (i_ai6f :: k_ai7h -> Type) (a_X1 :: Type) (b_ai6i :: k_ai7h -> Type -> Type) f_ai6h es_ai8D ff_ai8C c_ai8E. (Free c_ai8E ff_ai8C, f_ai6h ~ Eff ff_ai8C es_ai8D, In (Scope t_ai6e i_ai6f b_ai6i) es_ai8D) => i_ai6f s_X0 -> ((forall (x_ai6j :: Type). f_ai6h x_ai6j -> b_ai6i s_X0 x_ai6j) -> b_ai6i s_X0 a_X1) -> f_ai6h (t_ai6e s_X0 a_X1)
+ Data.Effect.Provider: scoped :: forall t i s a es' es r ff c. (Scoped ff t i es r :> es', Free c ff) => i s -> ((Eff ff es' ~> Eff ff (Each es s ++ (Scoped ff t i es r ': r))) -> Eff ff (Each es s ++ (Scoped ff t i es r ': r)) a) -> Eff ff es' (t s a)
+ Data.Effect.Provider: scoped_ :: forall t i s a es' es r ff c. (Scoped_ ff t i es r :> es', Free c ff) => i s -> ((Eff ff es' ~> Eff ff (es ++ (Scoped_ ff t i es r ': r))) -> Eff ff (es ++ (Scoped_ ff t i es r ': r)) a) -> Eff ff es' (t s a)
+ Data.Effect.Provider: type Scoped ff t i es r = Scope t i (ScopeC ff t i es r)
+ Data.Effect.Provider: type Scoped_ ff t i es r = Scope t i (Const1 (ScopeC_ ff t i es r))
+ Data.Effect.Reader: ask'_ :: forall (r_abrg :: Type) a_abrh es_ahxX ff_ahxW c_ahxY. (Free c_ahxY ff_ahxW, a_abrh ~ Eff ff_ahxW es_ahxX, In (Ask r_abrg) es_ahxX) => a_abrh r_abrg
+ Data.Effect.Reader: handleLocal :: forall r es ff c. (Applicative (Eff ff es), Ask r `In` es, Free c ff) => Local r ~~> Eff ff es
+ Data.Effect.Reader: handleLocalFor :: forall r es ff c. (Applicative (Eff ff es), Free c ff) => Membership (Ask r) es -> Local r ~~> Eff ff es
+ Data.Effect.Reader: local'_ :: forall (r_absm :: Type) (b_abso :: Type) a_absn es_ahIp ff_ahIo c_ahIq. (Free c_ahIq ff_ahIo, a_absn ~ Eff ff_ahIo es_ahIp, In (Local r_absm) es_ahIp) => (r_absm -> r_absm) -> a_absn b_abso -> a_absn b_abso
+ Data.Effect.Reader: runAsk :: forall r es ff a c. (Applicative (Eff ff es), Free c ff) => r -> Eff ff (Ask r ': es) a -> Eff ff es a
+ Data.Effect.Reader: runLocal :: forall r es ff a c. (Applicative (Eff ff es), Ask r `In` es, Free c ff) => Eff ff (Local r ': es) a -> Eff ff es a
+ Data.Effect.Reader: runReader :: forall r es ff a c. (forall es'. Applicative (Eff ff es'), Free c ff) => r -> Eff ff (Local r ': (Ask r ': es)) a -> Eff ff es a
+ Data.Effect.Select: data SelectLabel
+ Data.Effect.Select: instance Data.Effect.FirstOrder (Data.Effect.Select.Select r)
+ Data.Effect.Select: instance Data.Effect.HFunctor.HFunctor (Data.Effect.Select.Select r)
+ Data.Effect.Select: select'_ :: forall (a_ae9j :: Type) (r_ae9k :: Type) f_ae9l es_aeau ff_aeat c_aeav. (Free c_aeav ff_aeat, f_ae9l ~ Eff ff_aeat es_aeau, In (Select r_ae9k) es_aeau) => ((a_ae9j -> r_ae9k) -> a_ae9j) -> f_ae9l a_ae9j
+ Data.Effect.Shift: abort :: forall (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (b_acG3 :: Type) a_acG2 es_acGW ff_acGV c_acGX. (Free c_acGX ff_acGV, a_acG2 ~ Eff ff_acGV es_acGW, (:>) (Shift ans_acG0 ref_acG1) es_acGW) => ans_acG0 -> a_acG2 b_acG3
+ Data.Effect.Shift: abort' :: forall key_acGZ (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (b_acG3 :: Type) a_acG2 es_acH1 ff_acH0 c_acH2. (Free c_acH2 ff_acH0, a_acG2 ~ Eff ff_acH0 es_acH1, Has key_acGZ (Shift ans_acG0 ref_acG1) es_acH1) => ans_acG0 -> a_acG2 b_acG3
+ Data.Effect.Shift: abort'' :: forall tag_acH4 (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (b_acG3 :: Type) a_acG2 es_acH6 ff_acH5 c_acH7. (Free c_acH7 ff_acH5, a_acG2 ~ Eff ff_acH5 es_acH6, (:>) (Tagged tag_acH4 (Shift ans_acG0 ref_acG1)) es_acH6) => ans_acG0 -> a_acG2 b_acG3
+ Data.Effect.Shift: abort'_ :: forall (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (b_acG3 :: Type) a_acG2 es_acHa ff_acH9 c_acHb. (Free c_acHb ff_acH9, a_acG2 ~ Eff ff_acH9 es_acHa, In (Shift ans_acG0 ref_acG1) es_acHa) => ans_acG0 -> a_acG2 b_acG3
+ Data.Effect.Shift: call :: forall (ref_acG1 :: Type -> Type) (a1_acG5 :: Type) (ans_acG0 :: Type) a_acG2 es_acGA ff_acGz c_acGB. (Free c_acGB ff_acGz, a_acG2 ~ Eff ff_acGz es_acGA, (:>) (Shift ans_acG0 ref_acG1) es_acGA) => ref_acG1 a1_acG5 -> a1_acG5 -> a_acG2 ans_acG0
+ Data.Effect.Shift: call' :: forall key_acGE (ref_acG1 :: Type -> Type) (a1_acG5 :: Type) (ans_acG0 :: Type) a_acG2 es_acGG ff_acGF c_acGH. (Free c_acGH ff_acGF, a_acG2 ~ Eff ff_acGF es_acGG, Has key_acGE (Shift ans_acG0 ref_acG1) es_acGG) => ref_acG1 a1_acG5 -> a1_acG5 -> a_acG2 ans_acG0
+ Data.Effect.Shift: call'' :: forall tag_acGK (ref_acG1 :: Type -> Type) (a1_acG5 :: Type) (ans_acG0 :: Type) a_acG2 es_acGM ff_acGL c_acGN. (Free c_acGN ff_acGL, a_acG2 ~ Eff ff_acGL es_acGM, (:>) (Tagged tag_acGK (Shift ans_acG0 ref_acG1)) es_acGM) => ref_acG1 a1_acG5 -> a1_acG5 -> a_acG2 ans_acG0
+ Data.Effect.Shift: call'_ :: forall (ref_acG1 :: Type -> Type) (a1_acG5 :: Type) (ans_acG0 :: Type) a_acG2 es_acGR ff_acGQ c_acGS. (Free c_acGS ff_acGQ, a_acG2 ~ Eff ff_acGQ es_acGR, In (Shift ans_acG0 ref_acG1) es_acGR) => ref_acG1 a1_acG5 -> a1_acG5 -> a_acG2 ans_acG0
+ Data.Effect.Shift: getShiftCC :: forall es ans ref ff c. (Shift ans ref :> es, Monad (Eff ff es), Free c ff) => Eff ff es (Eff ff es ans)
+ Data.Effect.Shift: runCCAsShift :: forall a es ans ref ff c. (Shift ans ref :> es, Monad (Eff ff es), Free c ff) => Eff ff (CC ref ': es) a -> Eff ff es a
+ Data.Effect.Shift: runCCOnShift :: forall a es ans ref ff c. (Shift ans ref :> es, Monad (Eff ff es), Free c ff) => Eff ff (CC (Op (Eff ff es ans)) ': es) a -> Eff ff es a
+ Data.Effect.Shift: shift :: forall a es ans ref ff c. (Shift ans ref :> es, Monad (Eff ff es), Free c ff) => ((a -> Eff ff es ans) -> Eff ff es ans) -> Eff ff es a
+ Data.Effect.Shift: subShift :: forall a b es ans ref ff c. (Shift ans ref :> es, Monad (Eff ff es), Free c ff) => (ref a -> Eff ff es b) -> (a -> Eff ff es b) -> Eff ff es b
+ Data.Effect.Shift: subShiftFork :: forall (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (a1_acG4 :: Type) a_acG2 es_acGm ff_acGl c_acGn. (Free c_acGn ff_acGl, a_acG2 ~ Eff ff_acGl es_acGm, (:>) (Shift ans_acG0 ref_acG1) es_acGm) => a_acG2 (Either (ref_acG1 a1_acG4) a1_acG4)
+ Data.Effect.Shift: subShiftFork' :: forall key_acGo (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (a1_acG4 :: Type) a_acG2 es_acGq ff_acGp c_acGr. (Free c_acGr ff_acGp, a_acG2 ~ Eff ff_acGp es_acGq, Has key_acGo (Shift ans_acG0 ref_acG1) es_acGq) => a_acG2 (Either (ref_acG1 a1_acG4) a1_acG4)
+ Data.Effect.Shift: subShiftFork'' :: forall tag_acGs (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (a1_acG4 :: Type) a_acG2 es_acGu ff_acGt c_acGv. (Free c_acGv ff_acGt, a_acG2 ~ Eff ff_acGt es_acGu, (:>) (Tagged tag_acGs (Shift ans_acG0 ref_acG1)) es_acGu) => a_acG2 (Either (ref_acG1 a1_acG4) a1_acG4)
+ Data.Effect.Shift: subShiftFork'_ :: forall (ans_acG0 :: Type) (ref_acG1 :: Type -> Type) (a1_acG4 :: Type) a_acG2 es_acGx ff_acGw c_acGy. (Free c_acGy ff_acGw, a_acG2 ~ Eff ff_acGw es_acGx, In (Shift ans_acG0 ref_acG1) es_acGx) => a_acG2 (Either (ref_acG1 a1_acG4) a1_acG4)
+ Data.Effect.State: askToGet :: forall r es ff a c. (State r `In` es, Free c ff) => Eff ff (Ask r ': es) a -> Eff ff es a
+ Data.Effect.State: evalStateIORef :: forall s es ff a c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => s -> Eff ff (State s ': es) a -> Eff ff es a
+ Data.Effect.State: execStateIORef :: forall s es ff a c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => s -> Eff ff (State s ': es) a -> Eff ff es s
+ Data.Effect.State: get'_ :: forall (s_abpp :: Type) a_abpq es_abpI ff_abpH c_abpJ. (Free c_abpJ ff_abpH, a_abpq ~ Eff ff_abpH es_abpI, In (State s_abpp) es_abpI) => a_abpq s_abpp
+ Data.Effect.State: localToState :: forall r es ff a c. (State r `In` es, Monad (Eff ff es), Free c ff) => Eff ff (Local r ': es) a -> Eff ff es a
+ Data.Effect.State: put'_ :: forall (s_abpp :: Type) a_abpq es_abpZ ff_abpY c_abq0. (Free c_abq0 ff_abpY, a_abpq ~ Eff ff_abpY es_abpZ, In (State s_abpp) es_abpZ) => s_abpp -> a_abpq ()
+ Data.Effect.State: runStateIORef :: forall s es ff a c. (Emb IO :> es, Monad (Eff ff es), Free c ff) => s -> Eff ff (State s ': es) a -> Eff ff es (s, a)
+ Data.Effect.Unlift: runUnliftBase :: forall b ff a c. (c b, Free c ff) => Eff ff '[UnliftBase b, Emb b] a -> b a
+ Data.Effect.Unlift: runUnliftIO :: (MonadUnliftIO m, Free c ff, c m) => Eff ff '[UnliftIO, Emb m] a -> m a
+ Data.Effect.Unlift: withRunInBase'_ :: forall (b_ab1H :: Type -> Type) (a_ab1J :: Type) f_ab1I es_ab24 ff_ab23 c_ab25. (Free c_ab25 ff_ab23, f_ab1I ~ Eff ff_ab23 es_ab24, In (UnliftBase b_ab1H) es_ab24) => ((forall (x_ab1O :: Type). f_ab1I x_ab1O -> b_ab1H x_ab1O) -> b_ab1H a_ab1J) -> f_ab1I a_ab1J
+ Data.Effect.Writer: censor'_ :: forall (w_aaCy :: Type) (b_aaCA :: Type) a_aaCz es_aaDi ff_aaDh c_aaDj. (Free c_aaDj ff_aaDh, a_aaCz ~ Eff ff_aaDh es_aaDi, In (WriterH w_aaCy) es_aaDi) => (w_aaCy -> w_aaCy) -> a_aaCz b_aaCA -> a_aaCz b_aaCA
+ Data.Effect.Writer: censorPre :: forall w es ff a c. (Tell w `In` es, Free c ff) => (w -> w) -> Eff ff es a -> Eff ff es a
+ Data.Effect.Writer: listen'_ :: forall (a1_aaCB :: Type) (w_aaCy :: Type) a_aaCz es_aaCX ff_aaCW c_aaCY. (Free c_aaCY ff_aaCW, a_aaCz ~ Eff ff_aaCW es_aaCX, In (WriterH w_aaCy) es_aaCX) => a_aaCz a1_aaCB -> a_aaCz (w_aaCy, a1_aaCB)
+ Data.Effect.Writer: tell'_ :: forall (w_aaii :: Type) a_aaij es_aaiC ff_aaiB c_aaiD. (Free c_aaiD ff_aaiB, a_aaij ~ Eff ff_aaiB es_aaiC, In (Tell w_aaii) es_aaiC) => w_aaii -> a_aaij ()
- Data.Effect.Accum: [Add] :: forall w1 w. w1 -> Accum w ()
+ Data.Effect.Accum: [Add] :: w -> Accum w f ()
- Data.Effect.Accum: [Look] :: forall w. Accum w w
+ Data.Effect.Accum: [Look] :: Accum w f w
- Data.Effect.Accum: add :: forall w f1 f2. SendFOE (Accum f1) f2 => w -> f2 ()
+ Data.Effect.Accum: add :: forall (w_arA6 :: Type) f_arA7 es_arBa ff_arB9 c_arBb. (Free c_arBb ff_arB9, f_arA7 ~ Eff ff_arB9 es_arBa, (:>) (Accum w_arA6) es_arBa) => w_arA6 -> f_arA7 ()
- Data.Effect.Accum: add' :: forall {k} (tag :: k) w f1 f2. SendFOE (Tag (Accum f1) tag) f2 => w -> f2 ()
+ Data.Effect.Accum: add' :: forall key_arBd (w_arA6 :: Type) f_arA7 es_arBf ff_arBe c_arBg. (Free c_arBg ff_arBe, f_arA7 ~ Eff ff_arBe es_arBf, Has key_arBd (Accum w_arA6) es_arBf) => w_arA6 -> f_arA7 ()
- Data.Effect.Accum: add'' :: forall {k} (key :: k) w f1 f2. SendFOEBy key (Accum f1) f2 => w -> f2 ()
+ Data.Effect.Accum: add'' :: forall tag_arBi (w_arA6 :: Type) f_arA7 es_arBk ff_arBj c_arBl. (Free c_arBl ff_arBj, f_arA7 ~ Eff ff_arBj es_arBk, (:>) (Tagged tag_arBi (Accum w_arA6)) es_arBk) => w_arA6 -> f_arA7 ()
- Data.Effect.Accum: data Accum w a
+ Data.Effect.Accum: data Accum w :: Effect
- Data.Effect.Accum: look :: SendFOE (Accum w) f => f w
+ Data.Effect.Accum: look :: forall (w_arA8 :: Type) f_arA9 es_arBs ff_arBr c_arBt. (Free c_arBt ff_arBr, f_arA9 ~ Eff ff_arBr es_arBs, (:>) (Accum w_arA8) es_arBs) => f_arA9 w_arA8
- Data.Effect.Accum: look' :: forall {k} (tag :: k) w f. SendFOE (Tag (Accum w) tag) f => f w
+ Data.Effect.Accum: look' :: forall key_arBu (w_arA8 :: Type) f_arA9 es_arBw ff_arBv c_arBx. (Free c_arBx ff_arBv, f_arA9 ~ Eff ff_arBv es_arBw, Has key_arBu (Accum w_arA8) es_arBw) => f_arA9 w_arA8
- Data.Effect.Accum: look'' :: forall {k} (key :: k) w f. SendFOEBy key (Accum w) f => f w
+ Data.Effect.Accum: look'' :: forall tag_arBy (w_arA8 :: Type) f_arA9 es_arBA ff_arBz c_arBB. (Free c_arBB ff_arBz, f_arA9 ~ Eff ff_arBz es_arBA, (:>) (Tagged tag_arBy (Accum w_arA8)) es_arBA) => f_arA9 w_arA8
- Data.Effect.Concurrent.Parallel: Concurrently :: f a -> Concurrently (f :: k -> Type) (a :: k)
+ Data.Effect.Concurrent.Parallel: Concurrently :: Eff ff es a -> Concurrently ff es a
- Data.Effect.Concurrent.Parallel: [For] :: forall (t :: Type -> Type) (f :: Type -> Type) a1. t (f a1) -> For t f (t a1)
+ Data.Effect.Concurrent.Parallel: [For] :: t (f a) -> For t f (t a)
- Data.Effect.Concurrent.Parallel: [Halt] :: forall a. Halt a
+ Data.Effect.Concurrent.Parallel: [Halt] :: Halt f a
- Data.Effect.Concurrent.Parallel: [LiftP2] :: forall a1 b a (f :: Type -> Type). (a1 -> b -> a) -> f a1 -> f b -> Parallel f a
+ Data.Effect.Concurrent.Parallel: [LiftP2] :: (a -> b -> c) -> f a -> f b -> Parallel f c
- Data.Effect.Concurrent.Parallel: [Poldl] :: forall a1 b (f :: Type -> Type) a. (a1 -> Maybe b -> f (Either a a1)) -> f a1 -> f b -> Poll f a
+ Data.Effect.Concurrent.Parallel: [Poldl] :: (a -> Maybe b -> f (Either r a)) -> f a -> f b -> Poll f r
- Data.Effect.Concurrent.Parallel: [Race] :: forall (f :: Type -> Type) a. f a -> f a -> Race f a
+ Data.Effect.Concurrent.Parallel: [Race] :: f a -> f a -> Race f a
- Data.Effect.Concurrent.Parallel: [runConcurrently] :: Concurrently (f :: k -> Type) (a :: k) -> f a
+ Data.Effect.Concurrent.Parallel: [runConcurrently] :: Concurrently ff es a -> Eff ff es a
- Data.Effect.Concurrent.Parallel: cancelBy :: (Poll <<: f, Applicative f) => f a -> f b -> f (Maybe a, b)
+ Data.Effect.Concurrent.Parallel: cancelBy :: forall a b es ff c. (Poll :> es, Applicative (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es b -> Eff ff es (Maybe a, b)
- Data.Effect.Concurrent.Parallel: cancels :: (Poll <<: f, Applicative f) => f a -> f b -> f (a, Maybe b)
+ Data.Effect.Concurrent.Parallel: cancels :: forall a b es ff c. (Poll :> es, Applicative (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es b -> Eff ff es (a, Maybe b)
- Data.Effect.Concurrent.Parallel: data For (t :: Type -> Type) (f :: Type -> Type) a
+ Data.Effect.Concurrent.Parallel: data For (t :: Type -> Type) :: Effect
- Data.Effect.Concurrent.Parallel: data Halt a
+ Data.Effect.Concurrent.Parallel: data Halt :: Effect
- Data.Effect.Concurrent.Parallel: data Parallel (f :: Type -> Type) a
+ Data.Effect.Concurrent.Parallel: data Parallel :: Effect
- Data.Effect.Concurrent.Parallel: data Poll (f :: Type -> Type) a
+ Data.Effect.Concurrent.Parallel: data Poll :: Effect
- Data.Effect.Concurrent.Parallel: data Race (f :: Type -> Type) a
+ Data.Effect.Concurrent.Parallel: data Race :: Effect
- Data.Effect.Concurrent.Parallel: for :: forall t a f. SendHOE (For t) f => t (f a) -> f (t a)
+ Data.Effect.Concurrent.Parallel: for :: forall (t_aq4R :: Type -> Type) (a_X0 :: Type) f_aq4S es_aqmo ff_aqmn c_aqmp. (Free c_aqmp ff_aqmn, f_aq4S ~ Eff ff_aqmn es_aqmo, (:>) (For t_aq4R) es_aqmo) => t_aq4R (f_aq4S a_X0) -> f_aq4S (t_aq4R a_X0)
- Data.Effect.Concurrent.Parallel: for' :: forall {k} (tag :: k) t a f. SendHOE (TagH (For t) tag) f => t (f a) -> f (t a)
+ Data.Effect.Concurrent.Parallel: for' :: forall key_aqmr (t_aq4R :: Type -> Type) (a_X0 :: Type) f_aq4S es_aqmt ff_aqms c_aqmu. (Free c_aqmu ff_aqms, f_aq4S ~ Eff ff_aqms es_aqmt, Has key_aqmr (For t_aq4R) es_aqmt) => t_aq4R (f_aq4S a_X0) -> f_aq4S (t_aq4R a_X0)
- Data.Effect.Concurrent.Parallel: for'' :: forall {k} (key :: k) t a f. SendHOEBy key (For t) f => t (f a) -> f (t a)
+ Data.Effect.Concurrent.Parallel: for'' :: forall tag_aqmw (t_aq4R :: Type -> Type) (a_X0 :: Type) f_aq4S es_aqmy ff_aqmx c_aqmz. (Free c_aqmz ff_aqmx, f_aq4S ~ Eff ff_aqmx es_aqmy, (:>) (Tagged tag_aqmw (For t_aq4R)) es_aqmy) => t_aq4R (f_aq4S a_X0) -> f_aq4S (t_aq4R a_X0)
- Data.Effect.Concurrent.Parallel: forToParallel :: forall (f :: Type -> Type) (t :: Type -> Type). (Parallel <<: f, Traversable t, Applicative f) => For t f ~> f
+ Data.Effect.Concurrent.Parallel: forToParallel :: forall t a es ff c. (Parallel :> es, Traversable t, Applicative (Eff ff es), Free c ff) => For t (Eff ff es) a -> Eff ff es a
- Data.Effect.Concurrent.Parallel: halt :: forall a f. SendFOE Halt f => f a
+ Data.Effect.Concurrent.Parallel: halt :: forall (a_apf2 :: Type) f_apf1 es_aph4 ff_aph3 c_aph5. (Free c_aph5 ff_aph3, f_apf1 ~ Eff ff_aph3 es_aph4, (:>) Halt es_aph4) => f_apf1 a_apf2
- Data.Effect.Concurrent.Parallel: halt' :: forall {k} (tag :: k) a f. SendFOE (Tag Halt tag) f => f a
+ Data.Effect.Concurrent.Parallel: halt' :: forall key_aph6 (a_apf2 :: Type) f_apf1 es_aph8 ff_aph7 c_aph9. (Free c_aph9 ff_aph7, f_apf1 ~ Eff ff_aph7 es_aph8, Has key_aph6 Halt es_aph8) => f_apf1 a_apf2
- Data.Effect.Concurrent.Parallel: halt'' :: forall {k} (key :: k) a f. SendFOEBy key Halt f => f a
+ Data.Effect.Concurrent.Parallel: halt'' :: forall tag_apha (a_apf2 :: Type) f_apf1 es_aphc ff_aphb c_aphd. (Free c_aphd ff_aphb, f_apf1 ~ Eff ff_aphb es_aphc, (:>) (Tagged tag_apha Halt) es_aphc) => f_apf1 a_apf2
- Data.Effect.Concurrent.Parallel: liftP2 :: forall a b c f. SendHOE Parallel f => (a -> b -> c) -> f a -> f b -> f c
+ Data.Effect.Concurrent.Parallel: liftP2 :: forall (a_X0 :: Type) (b_X1 :: Type) (c_apf5 :: Type) f_apf6 es_apsg ff_apsf c_apsh. (Free c_apsh ff_apsf, f_apf6 ~ Eff ff_apsf es_apsg, (:>) Parallel es_apsg) => (a_X0 -> b_X1 -> c_apf5) -> f_apf6 a_X0 -> f_apf6 b_X1 -> f_apf6 c_apf5
- Data.Effect.Concurrent.Parallel: liftP2' :: forall {k} (tag :: k) a b c f. SendHOE (TagH Parallel tag) f => (a -> b -> c) -> f a -> f b -> f c
+ Data.Effect.Concurrent.Parallel: liftP2' :: forall key_apsl (a_X0 :: Type) (b_X1 :: Type) (c_apf5 :: Type) f_apf6 es_apsn ff_apsm c_apso. (Free c_apso ff_apsm, f_apf6 ~ Eff ff_apsm es_apsn, Has key_apsl Parallel es_apsn) => (a_X0 -> b_X1 -> c_apf5) -> f_apf6 a_X0 -> f_apf6 b_X1 -> f_apf6 c_apf5
- Data.Effect.Concurrent.Parallel: liftP2'' :: forall {k} (key :: k) a b c f. SendHOEBy key Parallel f => (a -> b -> c) -> f a -> f b -> f c
+ Data.Effect.Concurrent.Parallel: liftP2'' :: forall tag_apss (a_X0 :: Type) (b_X1 :: Type) (c_apf5 :: Type) f_apf6 es_apsu ff_apst c_apsv. (Free c_apsv ff_apst, f_apf6 ~ Eff ff_apst es_apsu, (:>) (Tagged tag_apss Parallel) es_apsu) => (a_X0 -> b_X1 -> c_apf5) -> f_apf6 a_X0 -> f_apf6 b_X1 -> f_apf6 c_apf5
- Data.Effect.Concurrent.Parallel: liftP3 :: (Parallel <<: f, Applicative f) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
+ Data.Effect.Concurrent.Parallel: liftP3 :: forall a b c d es ff con. (Parallel :> es, Free con ff) => (a -> b -> c -> d) -> Eff ff es a -> Eff ff es b -> Eff ff es c -> Eff ff es d
- Data.Effect.Concurrent.Parallel: newtype Concurrently (f :: k -> Type) (a :: k)
+ Data.Effect.Concurrent.Parallel: newtype Concurrently ff es a
- Data.Effect.Concurrent.Parallel: poldl :: forall a b r f. SendHOE Poll f => (a -> Maybe b -> f (Either r a)) -> f a -> f b -> f r
+ Data.Effect.Concurrent.Parallel: poldl :: forall (a_X0 :: Type) (b_X1 :: Type) (r_aptt :: Type) f_apts es_aq4c ff_aq4b c_aq4d. (Free c_aq4d ff_aq4b, f_apts ~ Eff ff_aq4b es_aq4c, (:>) Poll es_aq4c) => (a_X0 -> Maybe b_X1 -> f_apts (Either r_aptt a_X0)) -> f_apts a_X0 -> f_apts b_X1 -> f_apts r_aptt
- Data.Effect.Concurrent.Parallel: poldl' :: forall {k} (tag :: k) a b r f. SendHOE (TagH Poll tag) f => (a -> Maybe b -> f (Either r a)) -> f a -> f b -> f r
+ Data.Effect.Concurrent.Parallel: poldl' :: forall key_aq4h (a_X0 :: Type) (b_X1 :: Type) (r_aptt :: Type) f_apts es_aq4j ff_aq4i c_aq4k. (Free c_aq4k ff_aq4i, f_apts ~ Eff ff_aq4i es_aq4j, Has key_aq4h Poll es_aq4j) => (a_X0 -> Maybe b_X1 -> f_apts (Either r_aptt a_X0)) -> f_apts a_X0 -> f_apts b_X1 -> f_apts r_aptt
- Data.Effect.Concurrent.Parallel: poldl'' :: forall {k} (key :: k) a b r f. SendHOEBy key Poll f => (a -> Maybe b -> f (Either r a)) -> f a -> f b -> f r
+ Data.Effect.Concurrent.Parallel: poldl'' :: forall tag_aq4o (a_X0 :: Type) (b_X1 :: Type) (r_aptt :: Type) f_apts es_aq4q ff_aq4p c_aq4r. (Free c_aq4r ff_aq4p, f_apts ~ Eff ff_aq4p es_aq4q, (:>) (Tagged tag_aq4o Poll) es_aq4q) => (a_X0 -> Maybe b_X1 -> f_apts (Either r_aptt a_X0)) -> f_apts a_X0 -> f_apts b_X1 -> f_apts r_aptt
- Data.Effect.Concurrent.Parallel: race :: forall a f. SendHOE Race f => f a -> f a -> f a
+ Data.Effect.Concurrent.Parallel: race :: forall (a_apf0 :: Type) f_apeZ es_apsM ff_apsL c_apsN. (Free c_apsN ff_apsL, f_apeZ ~ Eff ff_apsL es_apsM, (:>) Race es_apsM) => f_apeZ a_apf0 -> f_apeZ a_apf0 -> f_apeZ a_apf0
- Data.Effect.Concurrent.Parallel: race' :: forall {k} (tag :: k) a f. SendHOE (TagH Race tag) f => f a -> f a -> f a
+ Data.Effect.Concurrent.Parallel: race' :: forall key_apsQ (a_apf0 :: Type) f_apeZ es_apsS ff_apsR c_apsT. (Free c_apsT ff_apsR, f_apeZ ~ Eff ff_apsR es_apsS, Has key_apsQ Race es_apsS) => f_apeZ a_apf0 -> f_apeZ a_apf0 -> f_apeZ a_apf0
- Data.Effect.Concurrent.Parallel: race'' :: forall {k} (key :: k) a f. SendHOEBy key Race f => f a -> f a -> f a
+ Data.Effect.Concurrent.Parallel: race'' :: forall tag_apsW (a_apf0 :: Type) f_apeZ es_apsY ff_apsX c_apsZ. (Free c_apsZ ff_apsX, f_apeZ ~ Eff ff_apsX es_apsY, (:>) (Tagged tag_apsW Race) es_apsY) => f_apeZ a_apf0 -> f_apeZ a_apf0 -> f_apeZ a_apf0
- Data.Effect.Concurrent.Timer: [Clock] :: Timer DiffTime
+ Data.Effect.Concurrent.Timer: [Clock] :: Timer f DiffTime
- Data.Effect.Concurrent.Timer: [Sleep] :: DiffTime -> Timer ()
+ Data.Effect.Concurrent.Timer: [Sleep] :: DiffTime -> Timer f ()
- Data.Effect.Concurrent.Timer: [Wait] :: DiffTime -> CyclicTimer ()
+ Data.Effect.Concurrent.Timer: [Wait] :: DiffTime -> CyclicTimer f ()
- Data.Effect.Concurrent.Timer: clock :: SendFOE Timer f => f DiffTime
+ Data.Effect.Concurrent.Timer: clock :: forall f_aodC es_aog1 ff_aog0 c_aog2. (Free c_aog2 ff_aog0, f_aodC ~ Eff ff_aog0 es_aog1, (:>) Timer es_aog1) => f_aodC DiffTime
- Data.Effect.Concurrent.Timer: clock' :: forall {k} (tag :: k) f. SendFOE (Tag Timer tag) f => f DiffTime
+ Data.Effect.Concurrent.Timer: clock' :: forall key_aog3 f_aodC es_aog5 ff_aog4 c_aog6. (Free c_aog6 ff_aog4, f_aodC ~ Eff ff_aog4 es_aog5, Has key_aog3 Timer es_aog5) => f_aodC DiffTime
- Data.Effect.Concurrent.Timer: clock'' :: forall {k} (key :: k) f. SendFOEBy key Timer f => f DiffTime
+ Data.Effect.Concurrent.Timer: clock'' :: forall tag_aog7 f_aodC es_aog9 ff_aog8 c_aoga. (Free c_aoga ff_aog8, f_aodC ~ Eff ff_aog8 es_aog9, (:>) (Tagged tag_aog7 Timer) es_aog9) => f_aodC DiffTime
- Data.Effect.Concurrent.Timer: cyclicTimer :: (Timer <: m, Yield () DiffTime <: m, Monad m) => m a
+ Data.Effect.Concurrent.Timer: cyclicTimer :: forall a es ff c. (Timer :> es, Yield () DiffTime :> es, Monad (Eff ff es), Free c ff) => Eff ff es a
- Data.Effect.Concurrent.Timer: data CyclicTimer a
+ Data.Effect.Concurrent.Timer: data CyclicTimer :: Effect
- Data.Effect.Concurrent.Timer: data Timer a
+ Data.Effect.Concurrent.Timer: data Timer :: Effect
- Data.Effect.Concurrent.Timer: measureTime :: (Timer <: m, Monad m) => m a -> m (DiffTime, a)
+ Data.Effect.Concurrent.Timer: measureTime :: forall a es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es (DiffTime, a)
- Data.Effect.Concurrent.Timer: periodicTimer :: (Timer <: m, Yield () () <: m, Monad m) => DiffTime -> m a
+ Data.Effect.Concurrent.Timer: periodicTimer :: forall a es ff c. (Timer :> es, Yield () () :> es, Monad (Eff ff es), Free c ff) => DiffTime -> Eff ff es a
- Data.Effect.Concurrent.Timer: runCyclic :: (Timer <: m, Monad m) => m DiffTime -> m () -> m a
+ Data.Effect.Concurrent.Timer: runCyclic :: forall a es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => Eff ff es DiffTime -> Eff ff es () -> Eff ff es a
- Data.Effect.Concurrent.Timer: runPeriodic :: (Timer <: m, Monad m) => DiffTime -> m () -> m a
+ Data.Effect.Concurrent.Timer: runPeriodic :: forall a es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => DiffTime -> Eff ff es () -> Eff ff es a
- Data.Effect.Concurrent.Timer: sleep :: SendFOE Timer f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: sleep :: forall f_aofc es_aogf ff_aoge c_aogg. (Free c_aogg ff_aoge, f_aofc ~ Eff ff_aoge es_aogf, (:>) Timer es_aogf) => DiffTime -> f_aofc ()
- Data.Effect.Concurrent.Timer: sleep' :: forall {k} (tag :: k) f. SendFOE (Tag Timer tag) f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: sleep' :: forall key_aogi f_aofc es_aogk ff_aogj c_aogl. (Free c_aogl ff_aogj, f_aofc ~ Eff ff_aogj es_aogk, Has key_aogi Timer es_aogk) => DiffTime -> f_aofc ()
- Data.Effect.Concurrent.Timer: sleep'' :: forall {k} (key :: k) f. SendFOEBy key Timer f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: sleep'' :: forall tag_aogn f_aofc es_aogp ff_aogo c_aogq. (Free c_aogq ff_aogo, f_aofc ~ Eff ff_aogo es_aogp, (:>) (Tagged tag_aogn Timer) es_aogp) => DiffTime -> f_aofc ()
- Data.Effect.Concurrent.Timer: sleepUntil :: (Timer <: m, Monad m) => DiffTime -> m (Maybe DiffTime)
+ Data.Effect.Concurrent.Timer: sleepUntil :: forall es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => DiffTime -> Eff ff es (Maybe DiffTime)
- Data.Effect.Concurrent.Timer: wait :: SendFOE CyclicTimer f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: wait :: forall f_aogQ es_aoSy ff_aoSx c_aoSz. (Free c_aoSz ff_aoSx, f_aogQ ~ Eff ff_aoSx es_aoSy, (:>) CyclicTimer es_aoSy) => DiffTime -> f_aogQ ()
- Data.Effect.Concurrent.Timer: wait' :: forall {k} (tag :: k) f. SendFOE (Tag CyclicTimer tag) f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: wait' :: forall key_aoSB f_aogQ es_aoSD ff_aoSC c_aoSE. (Free c_aoSE ff_aoSC, f_aogQ ~ Eff ff_aoSC es_aoSD, Has key_aoSB CyclicTimer es_aoSD) => DiffTime -> f_aogQ ()
- Data.Effect.Concurrent.Timer: wait'' :: forall {k} (key :: k) f. SendFOEBy key CyclicTimer f => DiffTime -> f ()
+ Data.Effect.Concurrent.Timer: wait'' :: forall tag_aoSG f_aogQ es_aoSI ff_aoSH c_aoSJ. (Free c_aoSJ ff_aoSH, f_aogQ ~ Eff ff_aoSH es_aoSI, (:>) (Tagged tag_aoSG CyclicTimer) es_aoSI) => DiffTime -> f_aogQ ()
- Data.Effect.Concurrent.Timer: withElapsedTime :: (Timer <: m, Monad m) => (m DiffTime -> m a) -> m a
+ Data.Effect.Concurrent.Timer: withElapsedTime :: forall a es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => (Eff ff es DiffTime -> Eff ff es a) -> Eff ff es a
- Data.Effect.Coroutine: Continue :: a -> (b -> f (Status f a b r)) -> Status (f :: Type -> Type) a b r
+ Data.Effect.Coroutine: Continue :: a -> (b -> f (Status f a b r)) -> Status f a b r
- Data.Effect.Coroutine: Done :: r -> Status (f :: Type -> Type) a b r
+ Data.Effect.Coroutine: Done :: r -> Status f a b r
- Data.Effect.Coroutine: [Yield] :: forall a b. a -> Yield a b b
+ Data.Effect.Coroutine: [Yield] :: a -> Yield a b f b
- Data.Effect.Coroutine: data Status (f :: Type -> Type) a b r
+ Data.Effect.Coroutine: data Status f a b r
- Data.Effect.Coroutine: data Yield a b c
+ Data.Effect.Coroutine: data Yield a b :: Effect
- Data.Effect.Coroutine: yield :: SendFOE (Yield a b) f => a -> f b
+ Data.Effect.Coroutine: yield :: forall (a_antM :: Type) (b_antN :: Type) f_antO es_anuC ff_anuB c_anuD. (Free c_anuD ff_anuB, f_antO ~ Eff ff_anuB es_anuC, (:>) (Yield a_antM b_antN) es_anuC) => a_antM -> f_antO b_antN
- Data.Effect.Coroutine: yield' :: forall {k} (tag :: k) a b f. SendFOE (Tag (Yield a b) tag) f => a -> f b
+ Data.Effect.Coroutine: yield' :: forall key_anuF (a_antM :: Type) (b_antN :: Type) f_antO es_anuH ff_anuG c_anuI. (Free c_anuI ff_anuG, f_antO ~ Eff ff_anuG es_anuH, Has key_anuF (Yield a_antM b_antN) es_anuH) => a_antM -> f_antO b_antN
- Data.Effect.Coroutine: yield'' :: forall {k} (key :: k) a b f. SendFOEBy key (Yield a b) f => a -> f b
+ Data.Effect.Coroutine: yield'' :: forall tag_anuK (a_antM :: Type) (b_antN :: Type) f_antO es_anuM ff_anuL c_anuN. (Free c_anuN ff_anuL, f_antO ~ Eff ff_anuL es_anuM, (:>) (Tagged tag_anuK (Yield a_antM b_antN)) es_anuM) => a_antM -> f_antO b_antN
- Data.Effect.Except: [Catch] :: forall (f :: Type -> Type) a e. f a -> (e -> f a) -> Catch e f a
+ Data.Effect.Except: [Catch] :: forall (a :: Type -> Type) b e. a b -> (e -> a b) -> Catch e a b
- Data.Effect.Except: [Throw] :: forall e a. e -> Throw e a
+ Data.Effect.Except: [Throw] :: forall e (a :: Type -> Type) b. e -> Throw e a b
- Data.Effect.Except: catch :: forall a e f. SendHOE (Catch e) f => f a -> (e -> f a) -> f a
+ Data.Effect.Except: catch :: forall (b_alSP :: Type) (e_alSN :: Type) a_alSO es_alSU ff_alST c_alSV. (Free c_alSV ff_alST, a_alSO ~ Eff ff_alST es_alSU, (:>) (Catch e_alSN) es_alSU) => a_alSO b_alSP -> (e_alSN -> a_alSO b_alSP) -> a_alSO b_alSP
- Data.Effect.Except: catch' :: forall {k} (tag :: k) a e f. SendHOE (TagH (Catch e) tag) f => f a -> (e -> f a) -> f a
+ Data.Effect.Except: catch' :: forall key_alSY (b_alSP :: Type) (e_alSN :: Type) a_alSO es_alT0 ff_alSZ c_alT1. (Free c_alT1 ff_alSZ, a_alSO ~ Eff ff_alSZ es_alT0, Has key_alSY (Catch e_alSN) es_alT0) => a_alSO b_alSP -> (e_alSN -> a_alSO b_alSP) -> a_alSO b_alSP
- Data.Effect.Except: catch'' :: forall {k} (key :: k) a e f. SendHOEBy key (Catch e) f => f a -> (e -> f a) -> f a
+ Data.Effect.Except: catch'' :: forall tag_alT4 (b_alSP :: Type) (e_alSN :: Type) a_alSO es_alT6 ff_alT5 c_alT7. (Free c_alT7 ff_alT5, a_alSO ~ Eff ff_alT5 es_alT6, (:>) (Tagged tag_alT4 (Catch e_alSN)) es_alT6) => a_alSO b_alSP -> (e_alSN -> a_alSO b_alSP) -> a_alSO b_alSP
- Data.Effect.Except: data Catch e (f :: Type -> Type) a
+ Data.Effect.Except: data () => Catch e (a :: Type -> Type) b
- Data.Effect.Except: data Throw e a
+ Data.Effect.Except: data () => Throw e (a :: Type -> Type) b
- Data.Effect.Except: joinEither :: (Throw e <: m, Monad m) => m (Either e a) -> m a
+ Data.Effect.Except: joinEither :: forall e es a ff c. (Throw e :> es, Monad (Eff ff es), Free c ff) => Eff ff es (Either e a) -> Eff ff es a
- Data.Effect.Except: liftEither :: (Throw e <: f, Applicative f) => Either e a -> f a
+ Data.Effect.Except: liftEither :: forall e es a ff c. (Throw e :> es, Applicative (Eff ff es), Free c ff) => Either e a -> Eff ff es a
- Data.Effect.Except: onExcept :: (Catch e <<: f, Throw e <: f, Applicative f) => f a -> f () -> f a
+ Data.Effect.Except: onExcept :: forall e es ff a c. (Catch e :> es, Throw e :> es, Applicative (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es () -> Eff ff es a
- Data.Effect.Except: throw :: forall e a f. SendFOE (Throw e) f => e -> f a
+ Data.Effect.Except: throw :: forall (e_alHI :: Type) (b_alHK :: Type) a_alHJ es_alHQ ff_alHP c_alHR. (Free c_alHR ff_alHP, a_alHJ ~ Eff ff_alHP es_alHQ, (:>) (Throw e_alHI) es_alHQ) => e_alHI -> a_alHJ b_alHK
- Data.Effect.Except: throw' :: forall {k} (tag :: k) e a f. SendFOE (Tag (Throw e) tag) f => e -> f a
+ Data.Effect.Except: throw' :: forall key_alHT (e_alHI :: Type) (b_alHK :: Type) a_alHJ es_alHV ff_alHU c_alHW. (Free c_alHW ff_alHU, a_alHJ ~ Eff ff_alHU es_alHV, Has key_alHT (Throw e_alHI) es_alHV) => e_alHI -> a_alHJ b_alHK
- Data.Effect.Except: throw'' :: forall {k} (key :: k) e a f. SendFOEBy key (Throw e) f => e -> f a
+ Data.Effect.Except: throw'' :: forall tag_alHY (e_alHI :: Type) (b_alHK :: Type) a_alHJ es_alI0 ff_alHZ c_alI1. (Free c_alI1 ff_alHZ, a_alHJ ~ Eff ff_alHZ es_alI0, (:>) (Tagged tag_alHY (Throw e_alHI)) es_alI0) => e_alHI -> a_alHJ b_alHK
- Data.Effect.Except: withExcept :: (Catch e <<: f, Throw e <: f, Applicative f) => f a -> (e -> f ()) -> f a
+ Data.Effect.Except: withExcept :: forall e es a ff c. (Catch e :> es, Throw e :> es, Applicative (Eff ff es), Free c ff) => Eff ff es a -> (e -> Eff ff es ()) -> Eff ff es a
- Data.Effect.Fail: [Fail] :: forall a. String -> Fail a
+ Data.Effect.Fail: [Fail] :: forall (a :: Type -> Type) b. String -> Fail a b
- Data.Effect.Fail: data Fail a
+ Data.Effect.Fail: data () => Fail (a :: Type -> Type) b
- Data.Effect.Fail: fail :: forall a f. SendFOE Fail f => String -> f a
+ Data.Effect.Fail: fail :: forall (b_aluG :: Type) a_aluF es_aluL ff_aluK c_aluM. (Free c_aluM ff_aluK, a_aluF ~ Eff ff_aluK es_aluL, (:>) Fail es_aluL) => String -> a_aluF b_aluG
- Data.Effect.Fail: fail' :: forall {k} (tag :: k) a f. SendFOE (Tag Fail tag) f => String -> f a
+ Data.Effect.Fail: fail' :: forall key_aluO (b_aluG :: Type) a_aluF es_aluQ ff_aluP c_aluR. (Free c_aluR ff_aluP, a_aluF ~ Eff ff_aluP es_aluQ, Has key_aluO Fail es_aluQ) => String -> a_aluF b_aluG
- Data.Effect.Fail: fail'' :: forall {k} (key :: k) a f. SendFOEBy key Fail f => String -> f a
+ Data.Effect.Fail: fail'' :: forall tag_aluT (b_aluG :: Type) a_aluF es_aluV ff_aluU c_aluW. (Free c_aluW ff_aluU, a_aluF ~ Eff ff_aluU es_aluV, (:>) (Tagged tag_aluT Fail) es_aluV) => String -> a_aluF b_aluG
- Data.Effect.Fix: data Fix (f :: Type -> Type) a
+ Data.Effect.Fix: data () => Fix (a :: Type -> Type) b
- Data.Effect.Fresh: [Fresh] :: forall i. Fresh i i
+ Data.Effect.Fresh: [Fresh] :: Fresh i f i
- Data.Effect.Fresh: data Fresh i a
+ Data.Effect.Fresh: data Fresh i :: Effect
- Data.Effect.Fresh: fresh :: SendFOE (Fresh i) f => f i
+ Data.Effect.Fresh: fresh :: forall (i_al7q :: Type) f_al7r es_al85 ff_al84 c_al86. (Free c_al86 ff_al84, f_al7r ~ Eff ff_al84 es_al85, (:>) (Fresh i_al7q) es_al85) => f_al7r i_al7q
- Data.Effect.Fresh: fresh' :: forall {k} (tag :: k) i f. SendFOE (Tag (Fresh i) tag) f => f i
+ Data.Effect.Fresh: fresh' :: forall key_al87 (i_al7q :: Type) f_al7r es_al89 ff_al88 c_al8a. (Free c_al8a ff_al88, f_al7r ~ Eff ff_al88 es_al89, Has key_al87 (Fresh i_al7q) es_al89) => f_al7r i_al7q
- Data.Effect.Fresh: fresh'' :: forall {k} (key :: k) i f. SendFOEBy key (Fresh i) f => f i
+ Data.Effect.Fresh: fresh'' :: forall tag_al8b (i_al7q :: Type) f_al7r es_al8d ff_al8c c_al8e. (Free c_al8e ff_al8c, f_al7r ~ Eff ff_al8c es_al8d, (:>) (Tagged tag_al8b (Fresh i_al7q)) es_al8d) => f_al7r i_al7q
- Data.Effect.Input: [Input] :: forall i. Input i i
+ Data.Effect.Input: [Input] :: Input i f i
- Data.Effect.Input: data Input i a
+ Data.Effect.Input: data Input i :: Effect
- Data.Effect.Input: input :: SendFOE (Input i) f => f i
+ Data.Effect.Input: input :: forall (i_akGL :: Type) f_akGM es_akHq ff_akHp c_akHr. (Free c_akHr ff_akHp, f_akGM ~ Eff ff_akHp es_akHq, (:>) (Input i_akGL) es_akHq) => f_akGM i_akGL
- Data.Effect.Input: input' :: forall {k} (tag :: k) i f. SendFOE (Tag (Input i) tag) f => f i
+ Data.Effect.Input: input' :: forall key_akHs (i_akGL :: Type) f_akGM es_akHu ff_akHt c_akHv. (Free c_akHv ff_akHt, f_akGM ~ Eff ff_akHt es_akHu, Has key_akHs (Input i_akGL) es_akHu) => f_akGM i_akGL
- Data.Effect.Input: input'' :: forall {k} (key :: k) i f. SendFOEBy key (Input i) f => f i
+ Data.Effect.Input: input'' :: forall tag_akHw (i_akGL :: Type) f_akGM es_akHy ff_akHx c_akHz. (Free c_akHz ff_akHx, f_akGM ~ Eff ff_akHx es_akHy, (:>) (Tagged tag_akHw (Input i_akGL)) es_akHy) => f_akGM i_akGL
- Data.Effect.Input: inputs :: (Input i <: f, Functor f) => (i -> a) -> f a
+ Data.Effect.Input: inputs :: forall i es ff a c. (Input i :> es, Functor (Eff ff es), Free c ff) => (i -> a) -> Eff ff es a
- Data.Effect.KVStore: [LookupKV] :: forall k v. k -> KVStore k v (Maybe v)
+ Data.Effect.KVStore: [LookupKV] :: k -> KVStore k v f (Maybe v)
- Data.Effect.KVStore: [UpdateKV] :: forall k v. k -> Maybe v -> KVStore k v ()
+ Data.Effect.KVStore: [UpdateKV] :: k -> Maybe v -> KVStore k v f ()
- Data.Effect.KVStore: data KVStore k v a
+ Data.Effect.KVStore: data KVStore k v :: Effect
- Data.Effect.KVStore: deleteKV :: forall v k f. KVStore k v <: f => k -> f ()
+ Data.Effect.KVStore: deleteKV :: forall v k es ff c. (KVStore k v :> es, Free c ff) => k -> Eff ff es ()
- Data.Effect.KVStore: existsKV :: forall v k f. (KVStore k v <: f, Functor f) => k -> f Bool
+ Data.Effect.KVStore: existsKV :: forall v k es ff c. (KVStore k v :> es, Functor (Eff ff es), Free c ff) => k -> Eff ff es Bool
- Data.Effect.KVStore: lookupKV :: SendFOE (KVStore k v) f => k -> f (Maybe v)
+ Data.Effect.KVStore: lookupKV :: forall (k_amKI :: Type) (v_amKJ :: Type) f_amKK es_amM7 ff_amM6 c_amM8. (Free c_amM8 ff_amM6, f_amKK ~ Eff ff_amM6 es_amM7, (:>) (KVStore k_amKI v_amKJ) es_amM7) => k_amKI -> f_amKK (Maybe v_amKJ)
- Data.Effect.KVStore: lookupKV' :: forall {k1} (tag :: k1) k2 v f. SendFOE (Tag (KVStore k2 v) tag) f => k2 -> f (Maybe v)
+ Data.Effect.KVStore: lookupKV' :: forall key_amMa (k_amKI :: Type) (v_amKJ :: Type) f_amKK es_amMc ff_amMb c_amMd. (Free c_amMd ff_amMb, f_amKK ~ Eff ff_amMb es_amMc, Has key_amMa (KVStore k_amKI v_amKJ) es_amMc) => k_amKI -> f_amKK (Maybe v_amKJ)
- Data.Effect.KVStore: lookupKV'' :: forall {k1} (key :: k1) k2 v f. SendFOEBy key (KVStore k2 v) f => k2 -> f (Maybe v)
+ Data.Effect.KVStore: lookupKV'' :: forall tag_amMf (k_amKI :: Type) (v_amKJ :: Type) f_amKK es_amMh ff_amMg c_amMi. (Free c_amMi ff_amMg, f_amKK ~ Eff ff_amMg es_amMh, (:>) (Tagged tag_amMf (KVStore k_amKI v_amKJ)) es_amMh) => k_amKI -> f_amKK (Maybe v_amKJ)
- Data.Effect.KVStore: lookupOrThrowKV :: (KVStore k v <: m, Throw e <: m, Monad m) => (k -> e) -> k -> m v
+ Data.Effect.KVStore: lookupOrThrowKV :: forall k v e es ff c. (KVStore k v :> es, Throw e :> es, Monad (Eff ff es), Free c ff) => (k -> e) -> k -> Eff ff es v
- Data.Effect.KVStore: modifyKV :: (KVStore k v <: m, Monad m) => v -> (v -> v) -> k -> m ()
+ Data.Effect.KVStore: modifyKV :: forall k v es ff c. (KVStore k v :> es, Monad (Eff ff es), Free c ff) => v -> (v -> v) -> k -> Eff ff es ()
- Data.Effect.KVStore: updateKV :: SendFOE (KVStore k v) f => k -> Maybe v -> f ()
+ Data.Effect.KVStore: updateKV :: forall (k_amKL :: Type) (v_amKM :: Type) f_amKN es_amMp ff_amMo c_amMq. (Free c_amMq ff_amMo, f_amKN ~ Eff ff_amMo es_amMp, (:>) (KVStore k_amKL v_amKM) es_amMp) => k_amKL -> Maybe v_amKM -> f_amKN ()
- Data.Effect.KVStore: updateKV' :: forall {k1} (tag :: k1) k2 v f. SendFOE (Tag (KVStore k2 v) tag) f => k2 -> Maybe v -> f ()
+ Data.Effect.KVStore: updateKV' :: forall key_amMt (k_amKL :: Type) (v_amKM :: Type) f_amKN es_amMv ff_amMu c_amMw. (Free c_amMw ff_amMu, f_amKN ~ Eff ff_amMu es_amMv, Has key_amMt (KVStore k_amKL v_amKM) es_amMv) => k_amKL -> Maybe v_amKM -> f_amKN ()
- Data.Effect.KVStore: updateKV'' :: forall {k1} (key :: k1) k2 v f. SendFOEBy key (KVStore k2 v) f => k2 -> Maybe v -> f ()
+ Data.Effect.KVStore: updateKV'' :: forall tag_amMz (k_amKL :: Type) (v_amKM :: Type) f_amKN es_amMB ff_amMA c_amMC. (Free c_amMC ff_amMA, f_amKN ~ Eff ff_amMA es_amMB, (:>) (Tagged tag_amMz (KVStore k_amKL v_amKM)) es_amMB) => k_amKL -> Maybe v_amKM -> f_amKN ()
- Data.Effect.KVStore: writeKV :: KVStore k v <: f => k -> v -> f ()
+ Data.Effect.KVStore: writeKV :: forall k v es ff c. (KVStore k v :> es, Free c ff) => k -> v -> Eff ff es ()
- Data.Effect.Log: [Log] :: forall msg. msg -> Log msg ()
+ Data.Effect.Log: [Log] :: msg -> Log msg f ()
- Data.Effect.Log: data Log msg a
+ Data.Effect.Log: data Log msg :: Effect
- Data.Effect.Log: log :: SendFOE (Log msg) f => msg -> f ()
+ Data.Effect.Log: log :: forall (msg_aklJ :: Type) f_aklK es_akmr ff_akmq c_akms. (Free c_akms ff_akmq, f_aklK ~ Eff ff_akmq es_akmr, (:>) (Log msg_aklJ) es_akmr) => msg_aklJ -> f_aklK ()
- Data.Effect.Log: log' :: forall {k} (tag :: k) msg f. SendFOE (Tag (Log msg) tag) f => msg -> f ()
+ Data.Effect.Log: log' :: forall key_akmu (msg_aklJ :: Type) f_aklK es_akmw ff_akmv c_akmx. (Free c_akmx ff_akmv, f_aklK ~ Eff ff_akmv es_akmw, Has key_akmu (Log msg_aklJ) es_akmw) => msg_aklJ -> f_aklK ()
- Data.Effect.Log: log'' :: forall {k} (key :: k) msg f. SendFOEBy key (Log msg) f => msg -> f ()
+ Data.Effect.Log: log'' :: forall tag_akmz (msg_aklJ :: Type) f_aklK es_akmB ff_akmA c_akmC. (Free c_akmC ff_akmA, f_aklK ~ Eff ff_akmA es_akmB, (:>) (Tagged tag_akmz (Log msg_aklJ)) es_akmB) => msg_aklJ -> f_aklK ()
- Data.Effect.NonDet: [ChooseH] :: forall (f :: Type -> Type) a. f a -> f a -> ChooseH f a
+ Data.Effect.NonDet: [ChooseH] :: forall (a :: Type -> Type) b. a b -> a b -> ChooseH a b
- Data.Effect.NonDet: [Choose] :: Choose Bool
+ Data.Effect.NonDet: [Choose] :: forall (a :: Type -> Type). Choose a Bool
- Data.Effect.NonDet: [Empty] :: forall a. Empty a
+ Data.Effect.NonDet: [Empty] :: forall (a :: Type -> Type) b. Empty a b
- Data.Effect.NonDet: choose :: SendFOE Choose f => f Bool
+ Data.Effect.NonDet: choose :: forall a_ajzg es_ajzk ff_ajzj c_ajzl. (Free c_ajzl ff_ajzj, a_ajzg ~ Eff ff_ajzj es_ajzk, (:>) Choose es_ajzk) => a_ajzg Bool
- Data.Effect.NonDet: choose' :: forall {k} (tag :: k) f. SendFOE (Tag Choose tag) f => f Bool
+ Data.Effect.NonDet: choose' :: forall key_ajzm a_ajzg es_ajzo ff_ajzn c_ajzp. (Free c_ajzp ff_ajzn, a_ajzg ~ Eff ff_ajzn es_ajzo, Has key_ajzm Choose es_ajzo) => a_ajzg Bool
- Data.Effect.NonDet: choose'' :: forall {k} (key :: k) f. SendFOEBy key Choose f => f Bool
+ Data.Effect.NonDet: choose'' :: forall tag_ajzq a_ajzg es_ajzs ff_ajzr c_ajzt. (Free c_ajzt ff_ajzr, a_ajzg ~ Eff ff_ajzr es_ajzs, (:>) (Tagged tag_ajzq Choose) es_ajzs) => a_ajzg Bool
- Data.Effect.NonDet: chooseH :: forall a f. SendHOE ChooseH f => f a -> f a -> f a
+ Data.Effect.NonDet: chooseH :: forall (b_ajJe :: Type) a_ajJd es_ajJj ff_ajJi c_ajJk. (Free c_ajJk ff_ajJi, a_ajJd ~ Eff ff_ajJi es_ajJj, (:>) ChooseH es_ajJj) => a_ajJd b_ajJe -> a_ajJd b_ajJe -> a_ajJd b_ajJe
- Data.Effect.NonDet: chooseH' :: forall {k} (tag :: k) a f. SendHOE (TagH ChooseH tag) f => f a -> f a -> f a
+ Data.Effect.NonDet: chooseH' :: forall key_ajJn (b_ajJe :: Type) a_ajJd es_ajJp ff_ajJo c_ajJq. (Free c_ajJq ff_ajJo, a_ajJd ~ Eff ff_ajJo es_ajJp, Has key_ajJn ChooseH es_ajJp) => a_ajJd b_ajJe -> a_ajJd b_ajJe -> a_ajJd b_ajJe
- Data.Effect.NonDet: chooseH'' :: forall {k} (key :: k) a f. SendHOEBy key ChooseH f => f a -> f a -> f a
+ Data.Effect.NonDet: chooseH'' :: forall tag_ajJt (b_ajJe :: Type) a_ajJd es_ajJv ff_ajJu c_ajJw. (Free c_ajJw ff_ajJu, a_ajJd ~ Eff ff_ajJu es_ajJv, (:>) (Tagged tag_ajJt ChooseH) es_ajJv) => a_ajJd b_ajJe -> a_ajJd b_ajJe -> a_ajJd b_ajJe
- Data.Effect.NonDet: data Choose a
+ Data.Effect.NonDet: data () => Choose (a :: Type -> Type) b
- Data.Effect.NonDet: data ChooseH (f :: Type -> Type) a
+ Data.Effect.NonDet: data () => ChooseH (a :: Type -> Type) b
- Data.Effect.NonDet: data Empty a
+ Data.Effect.NonDet: data () => Empty (a :: Type -> Type) b
- Data.Effect.NonDet: empty :: forall a f. SendFOE Empty f => f a
+ Data.Effect.NonDet: empty :: forall (b_ajoU :: Type) a_ajoT es_ajoZ ff_ajoY c_ajp0. (Free c_ajp0 ff_ajoY, a_ajoT ~ Eff ff_ajoY es_ajoZ, (:>) Empty es_ajoZ) => a_ajoT b_ajoU
- Data.Effect.NonDet: empty' :: forall {k} (tag :: k) a f. SendFOE (Tag Empty tag) f => f a
+ Data.Effect.NonDet: empty' :: forall key_ajp1 (b_ajoU :: Type) a_ajoT es_ajp3 ff_ajp2 c_ajp4. (Free c_ajp4 ff_ajp2, a_ajoT ~ Eff ff_ajp2 es_ajp3, Has key_ajp1 Empty es_ajp3) => a_ajoT b_ajoU
- Data.Effect.NonDet: empty'' :: forall {k} (key :: k) a f. SendFOEBy key Empty f => f a
+ Data.Effect.NonDet: empty'' :: forall tag_ajp5 (b_ajoU :: Type) a_ajoT es_ajp7 ff_ajp6 c_ajp8. (Free c_ajp8 ff_ajp6, a_ajoT ~ Eff ff_ajp6 es_ajp7, (:>) (Tagged tag_ajp5 Empty) es_ajp7) => a_ajoT b_ajoU
- Data.Effect.Output: [Output] :: forall o. o -> Output o ()
+ Data.Effect.Output: [Output] :: o -> Output o f ()
- Data.Effect.Output: data Output o a
+ Data.Effect.Output: data Output o :: Effect
- Data.Effect.Output: output :: SendFOE (Output o) f => o -> f ()
+ Data.Effect.Output: output :: forall (o_aiXF :: Type) f_aiXG es_aiYn ff_aiYm c_aiYo. (Free c_aiYo ff_aiYm, f_aiXG ~ Eff ff_aiYm es_aiYn, (:>) (Output o_aiXF) es_aiYn) => o_aiXF -> f_aiXG ()
- Data.Effect.Output: output' :: forall {k} (tag :: k) o f. SendFOE (Tag (Output o) tag) f => o -> f ()
+ Data.Effect.Output: output' :: forall key_aiYq (o_aiXF :: Type) f_aiXG es_aiYs ff_aiYr c_aiYt. (Free c_aiYt ff_aiYr, f_aiXG ~ Eff ff_aiYr es_aiYs, Has key_aiYq (Output o_aiXF) es_aiYs) => o_aiXF -> f_aiXG ()
- Data.Effect.Output: output'' :: forall {k} (key :: k) o f. SendFOEBy key (Output o) f => o -> f ()
+ Data.Effect.Output: output'' :: forall tag_aiYv (o_aiXF :: Type) f_aiXG es_aiYx ff_aiYw c_aiYy. (Free c_aiYy ff_aiYw, f_aiXG ~ Eff ff_aiYw es_aiYx, (:>) (Tagged tag_aiYv (Output o_aiXF)) es_aiYx) => o_aiXF -> f_aiXG ()
- Data.Effect.Provider: Const1 :: f a -> Const1 (f :: k -> Type) (x :: k1) (a :: k)
+ Data.Effect.Provider: Const1 :: f a -> Const1 f x (a :: Type)
- Data.Effect.Provider: [getConst1] :: Const1 (f :: k -> Type) (x :: k1) (a :: k) -> f a
+ Data.Effect.Provider: [getConst1] :: Const1 f x (a :: Type) -> f a
- Data.Effect.Provider: newtype Const1 (f :: k -> Type) (x :: k1) (a :: k)
+ Data.Effect.Provider: newtype Const1 f x (a :: Type)
- Data.Effect.Provider: provide :: forall {k} i (p :: k) b a ctx f. SendHOE (Provider' ctx i b) f => i p -> ((forall x. () => f x -> b p x) -> b p a) -> f (ctx p a)
+ Data.Effect.Provider: provide :: forall t i a es' es r ff c. (Provider ff t i es r :> es', forall es''. Functor (Eff ff es''), Free c ff) => i -> ((Eff ff es' ~> Eff ff (es ++ (Provider ff t i es r ': r))) -> Eff ff (es ++ (Provider ff t i es r ': r)) a) -> Eff ff es' (t a)
- Data.Effect.Provider: type Provider (ctx :: k -> Type -> Type) (i :: k -> Type) (b :: k -> Type -> Type) = ProviderKey ctx i ##> Provider' ctx i b
+ Data.Effect.Provider: type Provider ff t i e es = Scoped_ ff (Const1 t) (Const i :: () -> Type) e es
- Data.Effect.Reader: [Ask] :: forall r. Ask r r
+ Data.Effect.Reader: [Ask] :: forall r (a :: Type -> Type). Ask r a r
- Data.Effect.Reader: [Local] :: forall r (f :: Type -> Type) a. (r -> r) -> f a -> Local r f a
+ Data.Effect.Reader: [Local] :: forall r (a :: Type -> Type) b. (r -> r) -> a b -> Local r a b
- Data.Effect.Reader: ask :: SendFOE (Ask r) f => f r
+ Data.Effect.Reader: ask :: forall (r_abrg :: Type) a_abrh es_ahxM ff_ahxL c_ahxN. (Free c_ahxN ff_ahxL, a_abrh ~ Eff ff_ahxL es_ahxM, (:>) (Ask r_abrg) es_ahxM) => a_abrh r_abrg
- Data.Effect.Reader: ask' :: forall {k} (tag :: k) r f. SendFOE (Tag (Ask r) tag) f => f r
+ Data.Effect.Reader: ask' :: forall key_ahxO (r_abrg :: Type) a_abrh es_ahxQ ff_ahxP c_ahxR. (Free c_ahxR ff_ahxP, a_abrh ~ Eff ff_ahxP es_ahxQ, Has key_ahxO (Ask r_abrg) es_ahxQ) => a_abrh r_abrg
- Data.Effect.Reader: ask'' :: forall {k} (key :: k) r f. SendFOEBy key (Ask r) f => f r
+ Data.Effect.Reader: ask'' :: forall tag_ahxS (r_abrg :: Type) a_abrh es_ahxU ff_ahxT c_ahxV. (Free c_ahxV ff_ahxT, a_abrh ~ Eff ff_ahxT es_ahxU, (:>) (Tagged tag_ahxS (Ask r_abrg)) es_ahxU) => a_abrh r_abrg
- Data.Effect.Reader: asks :: (Ask r <: f, Functor f) => (r -> a) -> f a
+ Data.Effect.Reader: asks :: forall r es ff a c. (Ask r :> es, Functor (Eff ff es), Free c ff) => (r -> a) -> Eff ff es a
- Data.Effect.Reader: data Ask r a
+ Data.Effect.Reader: data () => Ask r (a :: Type -> Type) b
- Data.Effect.Reader: data Local r (f :: Type -> Type) a
+ Data.Effect.Reader: data () => Local r (a :: Type -> Type) b
- Data.Effect.Reader: local :: forall r a f. SendHOE (Local r) f => (r -> r) -> f a -> f a
+ Data.Effect.Reader: local :: forall (r_absm :: Type) (b_abso :: Type) a_absn es_ahI8 ff_ahI7 c_ahI9. (Free c_ahI9 ff_ahI7, a_absn ~ Eff ff_ahI7 es_ahI8, (:>) (Local r_absm) es_ahI8) => (r_absm -> r_absm) -> a_absn b_abso -> a_absn b_abso
- Data.Effect.Reader: local' :: forall {k} (tag :: k) r a f. SendHOE (TagH (Local r) tag) f => (r -> r) -> f a -> f a
+ Data.Effect.Reader: local' :: forall key_ahIc (r_absm :: Type) (b_abso :: Type) a_absn es_ahIe ff_ahId c_ahIf. (Free c_ahIf ff_ahId, a_absn ~ Eff ff_ahId es_ahIe, Has key_ahIc (Local r_absm) es_ahIe) => (r_absm -> r_absm) -> a_absn b_abso -> a_absn b_abso
- Data.Effect.Reader: local'' :: forall {k} (key :: k) r a f. SendHOEBy key (Local r) f => (r -> r) -> f a -> f a
+ Data.Effect.Reader: local'' :: forall tag_ahIi (r_absm :: Type) (b_abso :: Type) a_absn es_ahIk ff_ahIj c_ahIl. (Free c_ahIl ff_ahIj, a_absn ~ Eff ff_ahIj es_ahIk, (:>) (Tagged tag_ahIi (Local r_absm)) es_ahIk) => (r_absm -> r_absm) -> a_absn b_abso -> a_absn b_abso
- Data.Effect.Select: [Select] :: forall a r. ((a -> r) -> a) -> Select r a
+ Data.Effect.Select: [Select] :: ((a -> r) -> a) -> Select r f a
- Data.Effect.Select: data Select r a
+ Data.Effect.Select: data Select r :: Effect
- Data.Effect.Select: select :: forall a r f. SendFOE (Select r) f => ((a -> r) -> a) -> f a
+ Data.Effect.Select: select :: forall (a_ae9j :: Type) (r_ae9k :: Type) f_ae9l es_aeag ff_aeaf c_aeah. (Free c_aeah ff_aeaf, f_ae9l ~ Eff ff_aeaf es_aeag, (:>) (Select r_ae9k) es_aeag) => ((a_ae9j -> r_ae9k) -> a_ae9j) -> f_ae9l a_ae9j
- Data.Effect.Select: select' :: forall {k} (tag :: k) a r f. SendFOE (Tag (Select r) tag) f => ((a -> r) -> a) -> f a
+ Data.Effect.Select: select' :: forall key_aeaj (a_ae9j :: Type) (r_ae9k :: Type) f_ae9l es_aeal ff_aeak c_aeam. (Free c_aeam ff_aeak, f_ae9l ~ Eff ff_aeak es_aeal, Has key_aeaj (Select r_ae9k) es_aeal) => ((a_ae9j -> r_ae9k) -> a_ae9j) -> f_ae9l a_ae9j
- Data.Effect.Select: select'' :: forall {k} (key :: k) a r f. SendFOEBy key (Select r) f => ((a -> r) -> a) -> f a
+ Data.Effect.Select: select'' :: forall tag_aeao (a_ae9j :: Type) (r_ae9k :: Type) f_ae9l es_aeaq ff_aeap c_aear. (Free c_aear ff_aeap, f_ae9l ~ Eff ff_aeap es_aeaq, (:>) (Tagged tag_aeao (Select r_ae9k)) es_aeaq) => ((a_ae9j -> r_ae9k) -> a_ae9j) -> f_ae9l a_ae9j
- Data.Effect.State: [Get] :: forall s. State s s
+ Data.Effect.State: [Get] :: forall s (a :: Type -> Type). State s a s
- Data.Effect.State: [Put] :: forall s. s -> State s ()
+ Data.Effect.State: [Put] :: forall s (a :: Type -> Type). s -> State s a ()
- Data.Effect.State: data State s a
+ Data.Effect.State: data () => State s (a :: Type -> Type) b
- Data.Effect.State: get :: SendFOE (State s) f => f s
+ Data.Effect.State: get :: forall (s_abpp :: Type) a_abpq es_abpx ff_abpw c_abpy. (Free c_abpy ff_abpw, a_abpq ~ Eff ff_abpw es_abpx, (:>) (State s_abpp) es_abpx) => a_abpq s_abpp
- Data.Effect.State: get' :: forall {k} (tag :: k) s f. SendFOE (Tag (State s) tag) f => f s
+ Data.Effect.State: get' :: forall key_abpz (s_abpp :: Type) a_abpq es_abpB ff_abpA c_abpC. (Free c_abpC ff_abpA, a_abpq ~ Eff ff_abpA es_abpB, Has key_abpz (State s_abpp) es_abpB) => a_abpq s_abpp
- Data.Effect.State: get'' :: forall {k} (key :: k) s f. SendFOEBy key (State s) f => f s
+ Data.Effect.State: get'' :: forall tag_abpD (s_abpp :: Type) a_abpq es_abpF ff_abpE c_abpG. (Free c_abpG ff_abpE, a_abpq ~ Eff ff_abpE es_abpF, (:>) (Tagged tag_abpD (State s_abpp)) es_abpF) => a_abpq s_abpp
- Data.Effect.State: gets :: (State s <: f, Functor f) => (s -> a) -> f a
+ Data.Effect.State: gets :: forall s es a ff c. (State s :> es, Functor (Eff ff es), Free c ff) => (s -> a) -> Eff ff es a
- Data.Effect.State: modify :: (State s <: m, Monad m) => (s -> s) -> m ()
+ Data.Effect.State: modify :: forall s es ff c. (State s :> es, Monad (Eff ff es), Free c ff) => (s -> s) -> Eff ff es ()
- Data.Effect.State: put :: SendFOE (State s) f => s -> f ()
+ Data.Effect.State: put :: forall (s_abpp :: Type) a_abpq es_abpL ff_abpK c_abpM. (Free c_abpM ff_abpK, a_abpq ~ Eff ff_abpK es_abpL, (:>) (State s_abpp) es_abpL) => s_abpp -> a_abpq ()
- Data.Effect.State: put' :: forall {k} (tag :: k) s f. SendFOE (Tag (State s) tag) f => s -> f ()
+ Data.Effect.State: put' :: forall key_abpO (s_abpp :: Type) a_abpq es_abpQ ff_abpP c_abpR. (Free c_abpR ff_abpP, a_abpq ~ Eff ff_abpP es_abpQ, Has key_abpO (State s_abpp) es_abpQ) => s_abpp -> a_abpq ()
- Data.Effect.State: put'' :: forall {k} (key :: k) s f. SendFOEBy key (State s) f => s -> f ()
+ Data.Effect.State: put'' :: forall tag_abpT (s_abpp :: Type) a_abpq es_abpV ff_abpU c_abpW. (Free c_abpW ff_abpU, a_abpq ~ Eff ff_abpU es_abpV, (:>) (Tagged tag_abpT (State s_abpp)) es_abpV) => s_abpp -> a_abpq ()
- Data.Effect.Unlift: data UnliftBase (b :: Type -> Type) (f :: Type -> Type) a
+ Data.Effect.Unlift: data () => UnliftBase (b :: Type -> Type) (f :: Type -> Type) a
- Data.Effect.Unlift: withRunInBase :: forall b a f. SendHOE (UnliftBase b) f => ((forall x. () => f x -> b x) -> b a) -> f a
+ Data.Effect.Unlift: withRunInBase :: forall (b_ab1H :: Type -> Type) (a_ab1J :: Type) f_ab1I es_ab1Q ff_ab1P c_ab1R. (Free c_ab1R ff_ab1P, f_ab1I ~ Eff ff_ab1P es_ab1Q, (:>) (UnliftBase b_ab1H) es_ab1Q) => ((forall (x_ab1O :: Type). f_ab1I x_ab1O -> b_ab1H x_ab1O) -> b_ab1H a_ab1J) -> f_ab1I a_ab1J
- Data.Effect.Unlift: withRunInBase' :: forall {k} (tag :: k) b a f. SendHOE (TagH (UnliftBase b) tag) f => ((forall x. () => f x -> b x) -> b a) -> f a
+ Data.Effect.Unlift: withRunInBase' :: forall key_ab1T (b_ab1H :: Type -> Type) (a_ab1J :: Type) f_ab1I es_ab1V ff_ab1U c_ab1W. (Free c_ab1W ff_ab1U, f_ab1I ~ Eff ff_ab1U es_ab1V, Has key_ab1T (UnliftBase b_ab1H) es_ab1V) => ((forall (x_ab1O :: Type). f_ab1I x_ab1O -> b_ab1H x_ab1O) -> b_ab1H a_ab1J) -> f_ab1I a_ab1J
- Data.Effect.Unlift: withRunInBase'' :: forall {k} (key :: k) b a f. SendHOEBy key (UnliftBase b) f => ((forall x. () => f x -> b x) -> b a) -> f a
+ Data.Effect.Unlift: withRunInBase'' :: forall tag_ab1Y (b_ab1H :: Type -> Type) (a_ab1J :: Type) f_ab1I es_ab20 ff_ab1Z c_ab21. (Free c_ab21 ff_ab1Z, f_ab1I ~ Eff ff_ab1Z es_ab20, (:>) (Tagged tag_ab1Y (UnliftBase b_ab1H)) es_ab20) => ((forall (x_ab1O :: Type). f_ab1I x_ab1O -> b_ab1H x_ab1O) -> b_ab1H a_ab1J) -> f_ab1I a_ab1J
- Data.Effect.Unlift: withRunInIO :: UnliftIO <<: f => ((f ~> IO) -> IO a) -> f a
+ Data.Effect.Unlift: withRunInIO :: forall es ff a c. (UnliftIO :> es, Free c ff) => ((Eff ff es ~> IO) -> IO a) -> Eff ff es a
- Data.Effect.Writer: [Censor] :: forall w (f :: Type -> Type) a. (w -> w) -> f a -> WriterH w f a
+ Data.Effect.Writer: [Censor] :: forall w (a :: Type -> Type) b. (w -> w) -> a b -> WriterH w a b
- Data.Effect.Writer: [Listen] :: forall (f :: Type -> Type) a1 w. f a1 -> WriterH w f (w, a1)
+ Data.Effect.Writer: [Listen] :: forall (a :: Type -> Type) a1 w. a a1 -> WriterH w a (w, a1)
- Data.Effect.Writer: [Tell] :: forall w. w -> Tell w ()
+ Data.Effect.Writer: [Tell] :: forall w (a :: Type -> Type). w -> Tell w a ()
- Data.Effect.Writer: censor :: forall w a f. SendHOE (WriterH w) f => (w -> w) -> f a -> f a
+ Data.Effect.Writer: censor :: forall (w_aaCy :: Type) (b_aaCA :: Type) a_aaCz es_aaD1 ff_aaD0 c_aaD2. (Free c_aaD2 ff_aaD0, a_aaCz ~ Eff ff_aaD0 es_aaD1, (:>) (WriterH w_aaCy) es_aaD1) => (w_aaCy -> w_aaCy) -> a_aaCz b_aaCA -> a_aaCz b_aaCA
- Data.Effect.Writer: censor' :: forall {k} (tag :: k) w a f. SendHOE (TagH (WriterH w) tag) f => (w -> w) -> f a -> f a
+ Data.Effect.Writer: censor' :: forall key_aaD5 (w_aaCy :: Type) (b_aaCA :: Type) a_aaCz es_aaD7 ff_aaD6 c_aaD8. (Free c_aaD8 ff_aaD6, a_aaCz ~ Eff ff_aaD6 es_aaD7, Has key_aaD5 (WriterH w_aaCy) es_aaD7) => (w_aaCy -> w_aaCy) -> a_aaCz b_aaCA -> a_aaCz b_aaCA
- Data.Effect.Writer: censor'' :: forall {k} (key :: k) w a f. SendHOEBy key (WriterH w) f => (w -> w) -> f a -> f a
+ Data.Effect.Writer: censor'' :: forall tag_aaDb (w_aaCy :: Type) (b_aaCA :: Type) a_aaCz es_aaDd ff_aaDc c_aaDe. (Free c_aaDe ff_aaDc, a_aaCz ~ Eff ff_aaDc es_aaDd, (:>) (Tagged tag_aaDb (WriterH w_aaCy)) es_aaDd) => (w_aaCy -> w_aaCy) -> a_aaCz b_aaCA -> a_aaCz b_aaCA
- Data.Effect.Writer: data Tell w a
+ Data.Effect.Writer: data () => Tell w (a :: Type -> Type) b
- Data.Effect.Writer: data WriterH w (f :: Type -> Type) a
+ Data.Effect.Writer: data () => WriterH w (a :: Type -> Type) b
- Data.Effect.Writer: listen :: forall a w f. SendHOE (WriterH w) f => f a -> f (w, a)
+ Data.Effect.Writer: listen :: forall (a1_aaCB :: Type) (w_aaCy :: Type) a_aaCz es_aaCJ ff_aaCI c_aaCK. (Free c_aaCK ff_aaCI, a_aaCz ~ Eff ff_aaCI es_aaCJ, (:>) (WriterH w_aaCy) es_aaCJ) => a_aaCz a1_aaCB -> a_aaCz (w_aaCy, a1_aaCB)
- Data.Effect.Writer: listen' :: forall {k} (tag :: k) a w f. SendHOE (TagH (WriterH w) tag) f => f a -> f (w, a)
+ Data.Effect.Writer: listen' :: forall key_aaCM (a1_aaCB :: Type) (w_aaCy :: Type) a_aaCz es_aaCO ff_aaCN c_aaCP. (Free c_aaCP ff_aaCN, a_aaCz ~ Eff ff_aaCN es_aaCO, Has key_aaCM (WriterH w_aaCy) es_aaCO) => a_aaCz a1_aaCB -> a_aaCz (w_aaCy, a1_aaCB)
- Data.Effect.Writer: listen'' :: forall {k} (key :: k) a w f. SendHOEBy key (WriterH w) f => f a -> f (w, a)
+ Data.Effect.Writer: listen'' :: forall tag_aaCR (a1_aaCB :: Type) (w_aaCy :: Type) a_aaCz es_aaCT ff_aaCS c_aaCU. (Free c_aaCU ff_aaCS, a_aaCz ~ Eff ff_aaCS es_aaCT, (:>) (Tagged tag_aaCR (WriterH w_aaCy)) es_aaCT) => a_aaCz a1_aaCB -> a_aaCz (w_aaCy, a1_aaCB)
- Data.Effect.Writer: pass :: (Tell w <: m, WriterH w <<: m, Monad m) => m (w -> w, a) -> m a
+ Data.Effect.Writer: pass :: forall w a (es :: [Effect]) (ff :: (Type -> Type) -> Type -> Type) (c :: (Type -> Type) -> Constraint). (Tell w :> es, WriterH w :> es, Monad (Eff ff es), Free c ff) => Eff ff es (w -> w, a) -> Eff ff es a
- Data.Effect.Writer: tell :: SendFOE (Tell w) f => w -> f ()
+ Data.Effect.Writer: tell :: forall (w_aaii :: Type) a_aaij es_aaio ff_aain c_aaip. (Free c_aaip ff_aain, a_aaij ~ Eff ff_aain es_aaio, (:>) (Tell w_aaii) es_aaio) => w_aaii -> a_aaij ()
- Data.Effect.Writer: tell' :: forall {k} (tag :: k) w f. SendFOE (Tag (Tell w) tag) f => w -> f ()
+ Data.Effect.Writer: tell' :: forall key_aair (w_aaii :: Type) a_aaij es_aait ff_aais c_aaiu. (Free c_aaiu ff_aais, a_aaij ~ Eff ff_aais es_aait, Has key_aair (Tell w_aaii) es_aait) => w_aaii -> a_aaij ()
- Data.Effect.Writer: tell'' :: forall {k} (key :: k) w f. SendFOEBy key (Tell w) f => w -> f ()
+ Data.Effect.Writer: tell'' :: forall tag_aaiw (w_aaii :: Type) a_aaij es_aaiy ff_aaix c_aaiz. (Free c_aaiz ff_aaix, a_aaij ~ Eff ff_aaix es_aaiy, (:>) (Tagged tag_aaiw (Tell w_aaii)) es_aaiy) => w_aaii -> a_aaij ()
Files
- ChangeLog.md +6/−0
- data-effects.cabal +27/−21
- src/Data/Effect/Accum.hs +6/−10
- src/Data/Effect/CC.hs +39/−0
- src/Data/Effect/Chronicle.hs +0/−27
- src/Data/Effect/Concurrent/Parallel.hs +177/−28
- src/Data/Effect/Concurrent/Timer.hs +73/−25
- src/Data/Effect/Cont.hs +0/−12
- src/Data/Effect/Coroutine.hs +29/−18
- src/Data/Effect/Except.hs +44/−31
- src/Data/Effect/Fail.hs +24/−7
- src/Data/Effect/Fix.hs +13/−7
- src/Data/Effect/Fresh.hs +5/−9
- src/Data/Effect/Input.hs +31/−8
- src/Data/Effect/KVStore.hs +54/−15
- src/Data/Effect/Log.hs +34/−3
- src/Data/Effect/NonDet.hs +103/−23
- src/Data/Effect/Output.hs +24/−7
- src/Data/Effect/Provider.hs +152/−58
- src/Data/Effect/Reader.hs +68/−21
- src/Data/Effect/Resource.hs +0/−56
- src/Data/Effect/Select.hs +4/−6
- src/Data/Effect/Shift.hs +61/−0
- src/Data/Effect/ShiftReset.hs +0/−72
- src/Data/Effect/State.hs +79/−15
- src/Data/Effect/Unlift.hs +29/−19
- src/Data/Effect/Writer.hs +22/−42
- src/Prelude.hs +8/−8
ChangeLog.md view
@@ -17,3 +17,9 @@ ## 0.3.0.1 -- 2024-11-03 * Fixed build error for GHC 9.4.1.++## 0.4.0.0 -- 2025-04-16++* Adopt to the new v4 interface.+ * Unified first-order and higher-order effect interfaces.+ * Added a generic `Eff` carrier type.
data-effects.cabal view
@@ -1,6 +1,6 @@-cabal-version: 2.4+cabal-version: 3.0 name: data-effects-version: 0.3.0.1+version: 0.4.0.0 -- A short (one-line) description of the package. synopsis: A basic framework for effect systems based on effects represented by GADTs.@@ -19,11 +19,11 @@ -- The license under which the package is released. license: MPL-2.0 license-file: LICENSE-author: Sayo Koyoneda <ymdfield@outlook.jp>-maintainer: Sayo Koyoneda <ymdfield@outlook.jp>+author: Sayo contributors <ymdfield@outlook.jp>+maintainer: ymdfield <ymdfield@outlook.jp> -- A copyright notice.-copyright: 2023-2024 Sayo Koyoneda+copyright: 2023-2025 Sayo contributors category: Control, Effect extra-doc-files:@@ -31,18 +31,20 @@ NOTICE README.md -tested-with:- GHC == 9.8.2- GHC == 9.4.1- GHC == 9.2.8+tested-with: GHC == {9.2.8, 9.4.8, 9.6.7, 9.8.4, 9.10.1, 9.12.2} +common warnings+ ghc-options: -Wall -Wredundant-constraints+ source-repository head type: git location: https://github.com/sayo-hs/data-effects- tag: v0.3.0.1+ tag: v0.4.0 subdir: data-effects library+ import: warnings+ exposed-modules: Data.Effect.Reader Data.Effect.Writer@@ -56,15 +58,13 @@ Data.Effect.Output Data.Effect.Fix Data.Effect.Fail- Data.Effect.Cont- Data.Effect.Chronicle- Data.Effect.Resource Data.Effect.Fresh Data.Effect.Concurrent.Parallel Data.Effect.Concurrent.Timer Data.Effect.Unlift Data.Effect.Provider- Data.Effect.ShiftReset+ Data.Effect.CC+ Data.Effect.Shift Data.Effect.KVStore Data.Effect.Log @@ -72,14 +72,13 @@ Data.Effect, Data.Effect.TH, Data.Effect.Tag,- Data.Effect.Key,- Data.Effect.Key.TH, Data.Effect.HFunctor, Data.Effect.HFunctor.HCont, Data.Effect.HFunctor.TH,+ Data.Effect.OpenUnion, Control.Effect,- Control.Effect.Tag,- Control.Effect.Key,+ Control.Effect.Interpret,+ Control.Effect.Transform, -- Modules included in this executable, other than Main. other-modules:@@ -88,15 +87,20 @@ -- LANGUAGE extensions used by modules in this package. -- other-extensions: build-depends:- base >= 4.16.4 && < 4.21,- data-effects-core ^>= 0.2,- data-effects-th ^>= 0.2,+ base >= 4.16.4 && < 4.22,+ data-effects-core ^>= 0.4,+ data-effects-th ^>= 0.4, these ^>= 1.2, data-default >= 0.7.1 && < 0.9, text >= 2.0 && < 2.2, lens >= 5.2.3 && < 5.4, time >= 1.11.1 && < 1.15, infinite-list ^>= 0.1.1,+ unliftio,+ containers,+ co-log-core,+ unbounded-delays ^>= 0.1.1,+ time >= 1.11.1 && < 1.15, hs-source-dirs: src ghc-options: -Wall@@ -116,6 +120,8 @@ PartialTypeSignatures test-suite test+ import: warnings+ main-is: Driver.hs hs-source-dirs: test build-depends:
src/Data/Effect/Accum.hs view
@@ -1,20 +1,16 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp-Stability : experimental-Portability : portable -} module Data.Effect.Accum where -data Accum w a where- Add :: w -> Accum f ()- Look :: Accum w w+data Accum w :: Effect where+ Add :: w -> Accum w f ()+ Look :: Accum w f w -makeEffectF [''Accum]+makeEffectF ''Accum
+ src/Data/Effect/CC.hs view
@@ -0,0 +1,39 @@+{-# HLINT ignore "Avoid lambda" #-}+{-# LANGUAGE AllowAmbiguousTypes #-}+{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}++-- SPDX-License-Identifier: MPL-2.0++{- |+Copyright : (c) 2024-2025 Sayo contributors+License : MPL-2.0 (see the LICENSE file)+Maintainer : ymdfield@outlook.jp+-}+module Data.Effect.CC (+ module Data.Effect.CC,+ CC (SubFork, Jump),+ callCC_,+ sub,+)+where++import Control.Effect (callCC_, sub)+import Data.Effect (CC (Jump, SubFork))+import Data.Function (fix)++makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''CC++callCC+ :: forall a ref es ff c+ . (CC ref :> es, Monad (Eff ff es), Free c ff)+ => ((forall b. a -> Eff ff es b) -> Eff ff es a)+ -> Eff ff es a+callCC f = sub (\x -> f $ jump x) pure+{-# INLINE callCC #-}++getCC+ :: forall a ref es ff c+ . (CC ref :> es, Monad (Eff ff es), Free c ff)+ => Eff ff es (Eff ff es a)+getCC = callCC_ $ pure . fix+{-# INLINE getCC #-}
− src/Data/Effect/Chronicle.hs
@@ -1,27 +0,0 @@-{-# LANGUAGE AllowAmbiguousTypes #-}---- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.--module Data.Effect.Chronicle where--import Data.Functor (($>))-import Data.These (These (That, These, This))--data ChronicleF c a where- Dictate :: c -> ChronicleF c ()- Confess :: c -> ChronicleF c a--data ChronicleH c f a where- Memento :: f a -> ChronicleH c f (Either c a)- Absolve :: a -> f a -> ChronicleH c f a- Condemn :: f a -> ChronicleH c f a--makeEffect [''ChronicleF] [''ChronicleH]--chronicle :: (ChronicleF c <: f, Applicative f) => These c a -> f a-chronicle = \case- This c -> confess c- That x -> pure x- These c x -> dictate c $> x
src/Data/Effect/Concurrent/Parallel.hs view
@@ -1,10 +1,12 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE UndecidableInstances #-} -- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2024 Sayo Koyoneda+Copyright : (c) 2024-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -16,10 +18,27 @@ import Control.Applicative (liftA2) #endif import Control.Applicative (Alternative (empty, (<|>)))+import Control.Monad (forever)+import Data.Effect (Emb, UnliftIO)+import Data.Function (fix) import Data.Tuple (swap)+import UnliftIO (+ MonadIO,+ MonadUnliftIO,+ atomically,+ liftIO,+ mask,+ newEmptyTMVarIO,+ putTMVar,+ readTMVar,+ tryReadTMVar,+ uninterruptibleMask_,+ withRunInIO,+ )+import UnliftIO.Concurrent (forkIO, killThread, threadDelay) -- | An `Applicative`-based effect for executing computations in parallel.-data Parallel f a where+data Parallel :: Effect where -- | Executes two actions in parallel and blocks until both are complete. -- Finally, aggregates the execution results based on the specified function. LiftP2@@ -32,36 +51,44 @@ -> Parallel f c -- | An effect that blocks a computation indefinitely.-data Halt (a :: Type) where+data Halt :: Effect where -- | Blocks a computation indefinitely.- Halt :: Halt a+ Halt :: Halt f a {- | An effect that adopts the result of the computation that finishes first among two computations and cancels the other. -}-data Race f (a :: Type) where+data Race :: Effect where -- | Adopts the result of the computation that finishes first among two -- computations and cancels the other. Race :: f a -> f a -> Race f a -makeEffect [''Halt] [''Parallel, ''Race]+makeEffectF ''Halt+makeEffectsH [''Parallel, ''Race] {- | A wrapper that allows using the `Parallel` effect in the form of `Applicative` / `Alternative` instances. -}-newtype Concurrently f a = Concurrently {runConcurrently :: f a}- deriving (Functor)+newtype Concurrently ff es a = Concurrently {runConcurrently :: Eff ff es a} -instance (Parallel <<: f, Applicative f) => Applicative (Concurrently f) where+deriving instance (Functor (Eff ff es)) => Functor (Concurrently ff es)++instance+ (Parallel :> es, Applicative (Eff ff es), Free c ff)+ => Applicative (Concurrently ff es)+ where pure = Concurrently . pure {-# INLINE pure #-} liftA2 f (Concurrently a) (Concurrently b) = Concurrently $ liftP2 f a b {-# INLINE liftA2 #-} -instance (Race <<: f, Halt <: f, Parallel <<: f, Applicative f) => Alternative (Concurrently f) where+instance+ (Race :> es, Halt :> es, Parallel :> es, Applicative (Eff ff es), Free c ff)+ => Alternative (Concurrently ff es)+ where empty = Concurrently halt {-# INLINE empty #-} @@ -73,21 +100,22 @@ Finally, aggregates the execution results based on the specified function. -} liftP3- :: (Parallel <<: f, Applicative f)+ :: forall a b c d es ff con+ . (Parallel :> es, Free con ff) => (a -> b -> c -> d) -- ^ A function that aggregates the three execution results.- -> f a+ -> Eff ff es a -- ^ The first action to be executed in parallel.- -> f b+ -> Eff ff es b -- ^ The second action to be executed in parallel.- -> f c+ -> Eff ff es c -- ^ The third action to be executed in parallel.- -> f d+ -> Eff ff es d liftP3 f a b = liftP2 ($) (liftP2 f a b) {-# INLINE liftP3 #-} -- | An effect that realizes polling and cancellation of actions running in parallel.-data Poll f a where+data Poll :: Effect where -- | Performs polling on an action running in parallel in the form of a fold. -- -- First, the parallel execution of two actions begins.@@ -107,39 +135,160 @@ -- ^ The second action to be executed in parallel; the target of polling. -> Poll f r -makeEffectH [''Poll]+makeEffectH ''Poll -- | Executes two actions in parallel. If the first action completes before the second, the second action is canceled. cancels- :: (Poll <<: f, Applicative f)- => f a+ :: forall a b es ff c+ . (Poll :> es, Applicative (Eff ff es), Free c ff)+ => Eff ff es a -- ^ The action that controls the cancellation.- -> f b+ -> Eff ff es b -- ^ The action to be canceled.- -> f (a, Maybe b)+ -> Eff ff es (a, Maybe b) cancels = poldl $ curry $ pure . Left {-# INLINE cancels #-} -- | Executes two actions in parallel. If the second action completes before the first, the first action is canceled. cancelBy- :: (Poll <<: f, Applicative f)- => f a+ :: forall a b es ff c+ . (Poll :> es, Applicative (Eff ff es), Free c ff)+ => Eff ff es a -- ^ The action to be canceled.- -> f b+ -> Eff ff es b -- ^ The action that controls the cancellation.- -> f (Maybe a, b)+ -> Eff ff es (Maybe a, b) cancelBy = flip $ poldl $ curry $ pure . Left . swap {-# INLINE cancelBy #-} -- | An effect for parallel computations based on a `Traversable` container @t@.-data For (t :: Type -> Type) f a where+data For (t :: Type -> Type) :: Effect where -- | Executes in parallel the actions stored within a `Traversable` container @t@. For :: t (f a) -> For t f (t a) -makeEffectH_ [''For]+makeEffectH_ ''For makeHFunctor' ''For \(t :< _) -> [t|Functor $t|] -- | Converts the `Traversable` container-based parallel computation effect t`For` into the `Applicative`-based parallel computation effect `Parallel`.-forToParallel :: (Parallel <<: f, Traversable t, Applicative f) => For t f ~> f+forToParallel+ :: forall t a es ff c+ . (Parallel :> es, Traversable t, Applicative (Eff ff es), Free c ff)+ => For t (Eff ff es) a+ -> Eff ff es a forToParallel (For iters) = runConcurrently $ traverse Concurrently iters {-# INLINE forToParallel #-}++runConcurrentIO+ :: forall a es ff c+ . (UnliftIO :> es, Emb IO :> es, forall es'. Monad (Eff ff es'), Free c ff)+ => Eff ff (Parallel ': Race ': Poll ': Halt ': es) a+ -> Eff ff es a+runConcurrentIO = runHaltIO . runPollIO . runRaceIO . runParallelIO+{-# INLINE runConcurrentIO #-}++runParallelIO+ :: forall a es ff c+ . (UnliftIO :> es, Emb IO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Parallel ': es) a+ -> Eff ff es a+runParallelIO = interpret parallelToIO+{-# INLINE runParallelIO #-}++parallelToIO :: (MonadUnliftIO m) => Parallel ~~> m+parallelToIO (LiftP2 f a b) =+ withRunInIO \run -> do+ var <- newEmptyTMVarIO+ mask \restore -> do+ t <- forkIO do+ x <- restore $ run a+ atomically $ putTMVar var x++ y <- restore $ run b++ atomically do+ x <- readTMVar var+ pure $ f x y+ <* uninterruptibleMask_ (killThread t)+{-# INLINE parallelToIO #-}++runPollIO+ :: forall a es ff c+ . (Emb IO :> es, UnliftIO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Poll ': es) a+ -> Eff ff es a+runPollIO = interpret pollToIO+{-# INLINE runPollIO #-}++runRaceIO+ :: forall a es ff c+ . (Emb IO :> es, UnliftIO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Race ': es) a+ -> Eff ff es a+runRaceIO = interpret raceToIO+{-# INLINE runRaceIO #-}++runHaltIO+ :: forall a es ff c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Halt ': es) a+ -> Eff ff es a+runHaltIO = interpret haltToIO+{-# INLINE runHaltIO #-}++raceToIO :: (MonadUnliftIO m) => Race ~~> m+raceToIO (Race a b) =+ withRunInIO \run -> do+ var <- newEmptyTMVarIO+ mask \restore -> do+ let runThread m = forkIO do+ x <- restore $ run m+ atomically $ putTMVar var x++ t1 <- runThread a+ t2 <- runThread b++ atomically (readTMVar var)+ <* uninterruptibleMask_ (killThread t1 *> killThread t2)+{-# INLINE raceToIO #-}++pollToIO :: (MonadUnliftIO m) => Poll ~~> m+pollToIO (Poldl f a b) =+ withRunInIO \run -> do+ var <- newEmptyTMVarIO+ mask \restore -> do+ t <- forkIO do+ x <- restore $ run b+ atomically $ putTMVar var x++ restore (run a) >>= fix \next acc -> do+ poll <- atomically $ tryReadTMVar var+ restore (run $ f acc poll) >>= \case+ Left r -> do+ uninterruptibleMask_ $ killThread t+ pure r+ Right acc' -> next acc'+{-# INLINE pollToIO #-}++haltToIO :: (MonadIO m) => Halt ~~> m+haltToIO Halt = liftIO $ forever $ threadDelay maxBound+{-# INLINE haltToIO #-}++runParallelAsSequential+ :: forall a es ff c+ . (Applicative (Eff ff es), Free c ff)+ => Eff ff (Parallel ': es) a+ -> Eff ff es a+runParallelAsSequential = interpret parallelToSequential+{-# INLINE runParallelAsSequential #-}++parallelToSequential :: (Applicative (Eff ff es)) => Parallel ~~> Eff ff es+parallelToSequential (LiftP2 f a b) = liftA2 f a b+{-# INLINE parallelToSequential #-}++runForAsParallel+ :: forall t a es ff c+ . (Parallel :> es, Traversable t, Applicative (Eff ff es), Free c ff)+ => Eff ff (For t ': es) a+ -> Eff ff es a+runForAsParallel = interpret forToParallel+{-# INLINE runForAsParallel #-}
src/Data/Effect/Concurrent/Timer.hs view
@@ -1,11 +1,9 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2024 Sayo Koyoneda+Copyright : (c) 2024-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -13,65 +11,81 @@ -} module Data.Effect.Concurrent.Timer where +import Control.Concurrent.Thread.Delay qualified as Thread+import Control.Effect (perform)+import Control.Effect.Interpret (interpose) import Control.Monad (when)+import Control.Monad.IO.Class (liftIO)+import Data.Effect (Emb) import Data.Effect.Coroutine (Yield, yield) import Data.Function (fix) import Data.Functor ((<&>)) import Data.Time (DiffTime)+import Data.Time.Clock (diffTimeToPicoseconds, picosecondsToDiffTime)+import GHC.Clock (getMonotonicTimeNSec) -- | An effect for time-related operations.-data Timer a where+data Timer :: Effect where -- | Retrieves the current relative time from an arbitrary fixed reference point. -- The reference point does not change within the context of that scope.- Clock :: Timer DiffTime+ Clock :: Timer f DiffTime -- | Temporarily suspends computation for the specified duration.- Sleep :: DiffTime -> Timer ()+ Sleep :: DiffTime -> Timer f () -makeEffectF [''Timer]+makeEffectF ''Timer {- | Creates a scope where elapsed time can be obtained. An action to retrieve the elapsed time, re-zeroed at the start of the scope, is passed to the scope. -} withElapsedTime- :: (Timer <: m, Monad m)- => (m DiffTime -> m a)+ :: forall a es ff c+ . (Timer :> es, Monad (Eff ff es), Free c ff)+ => (Eff ff es DiffTime -> Eff ff es a) -- ^ A scope where the elapsed time can be obtained. -- An action to retrieve the elapsed time is passed as an argument.- -> m a+ -> Eff ff es a withElapsedTime f = do start <- clock f $ clock <&> (`subtract` start)+{-# INLINE withElapsedTime #-} -- | Returns the time taken for a computation along with the result as a pair.-measureTime :: (Timer <: m, Monad m) => m a -> m (DiffTime, a)+measureTime+ :: forall a es ff c+ . (Timer :> es, Monad (Eff ff es), Free c ff)+ => Eff ff es a+ -> Eff ff es (DiffTime, a) measureTime m = withElapsedTime \elapsedTime -> do r <- m elapsedTime <&> (,r)+{-# INLINE measureTime #-} {- | Temporarily suspends computation until the relative time from the fixed reference point in the current scope's context, as given by the argument. If the specified resume time has already passed, returns the elapsed time (positive value) in `Just`. -}-sleepUntil :: (Timer <: m, Monad m) => DiffTime -> m (Maybe DiffTime)+sleepUntil :: forall es ff c. (Timer :> es, Monad (Eff ff es), Free c ff) => DiffTime -> Eff ff es (Maybe DiffTime) sleepUntil t = do now <- clock when (t > now) do sleep $ t - now pure if t < now then Just (now - t) else Nothing+{-# INLINE sleepUntil #-} {- | Repeats a computation indefinitely. Controls so that each loop occurs at a specific time interval. If the computation time exceeds and the requested interval cannot be realized, the excess delay occurs, which accumulates and is not canceled. -} runCyclic- :: (Timer <: m, Monad m)- => m DiffTime+ :: forall a es ff c+ . (Timer :> es, Monad (Eff ff es), Free c ff)+ => Eff ff es DiffTime -- ^ An action called at the start of each loop to determine the time interval until the next loop. -- For example, @pure 1@ would control the loop to have a 1-second interval.- -> m ()+ -> Eff ff es () -- ^ The computation to repeat.- -> m a+ -> Eff ff es a runCyclic deltaTime a = do t0 <- clock flip fix t0 \next t -> do@@ -79,18 +93,20 @@ a delay <- sleepUntil t' next $ maybe t' (t' +) delay+{-# INLINE runCyclic #-} {- | Controls to repeat a specified computation at fixed time intervals. A specialized version of `runCyclic`. If the computation time exceeds and the requested interval cannot be realized, the excess delay occurs, which accumulates and is not canceled. -} runPeriodic- :: (Timer <: m, Monad m)+ :: forall a es ff c+ . (Timer :> es, Monad (Eff ff es), Free c ff) => DiffTime -- ^ Loop interval- -> m ()+ -> Eff ff es () -- ^ The computation to repeat.- -> m a+ -> Eff ff es a runPeriodic interval = runCyclic (pure interval) {-# INLINE runPeriodic #-} @@ -98,7 +114,11 @@ Calls `yield` of a coroutine at fixed intervals. If the computation time exceeds and the requested interval cannot be realized, the excess delay occurs, which accumulates and is not canceled. -}-periodicTimer :: forall m a. (Timer <: m, Yield () () <: m, Monad m) => DiffTime -> m a+periodicTimer+ :: forall a es ff c+ . (Timer :> es, Yield () () :> es, Monad (Eff ff es), Free c ff)+ => DiffTime+ -> Eff ff es a periodicTimer interval = runPeriodic interval $ yield () {-# INLINE periodicTimer #-} @@ -107,13 +127,41 @@ Controls so that the time returned by `yield` becomes the time interval until the next loop. If the computation time exceeds and the requested interval cannot be realized, the excess delay occurs, which accumulates and is not canceled. -}-cyclicTimer :: forall m a. (Timer <: m, Yield () DiffTime <: m, Monad m) => m a+cyclicTimer+ :: forall a es ff c+ . (Timer :> es, Yield () DiffTime :> es, Monad (Eff ff es), Free c ff)+ => Eff ff es a cyclicTimer = runCyclic (yield ()) (pure ()) {-# INLINE cyclicTimer #-} -- | An effect that realizes control of wait times such that the specified time becomes the interval until the next @wait@ when @wait@ is executed repeatedly.-data CyclicTimer a where+data CyclicTimer :: Effect where -- | Controls the wait time so that when @wait@ is executed repeatedly, the specified time becomes the interval until the next @wait@.- Wait :: DiffTime -> CyclicTimer ()+ Wait :: DiffTime -> CyclicTimer f () -makeEffectF [''CyclicTimer]+makeEffectF ''CyclicTimer++runTimerIO+ :: forall a ff es c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Timer ': es) a+ -> Eff ff es a+runTimerIO =+ interpret \case+ Clock -> do+ t <- getMonotonicTimeNSec & liftIO+ pure $ picosecondsToDiffTime $ fromIntegral t * 1000+ Sleep t ->+ Thread.delay (diffTimeToPicoseconds t `quot` 1000_000) & liftIO+{-# INLINE runTimerIO #-}++-- | Re-zeros the clock time in the local scope.+restartClock :: forall a ff es c. (Timer :> es, Monad (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es a+restartClock a = do+ t0 <- clock+ a & interpose \case+ Clock -> do+ t <- clock+ pure $ t - t0+ other -> perform other+{-# INLINE restartClock #-}
− src/Data/Effect/Cont.hs
@@ -1,12 +0,0 @@-{-# LANGUAGE AllowAmbiguousTypes #-}---- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.--module Data.Effect.Cont where--data CallCC m a where- CallCC :: (forall r. (a -> m r) -> m a) -> CallCC m a--makeEffect' (def & noDeriveHFunctor) noExtTemplate [] [''CallCC]
src/Data/Effect/Coroutine.hs view
@@ -1,12 +1,10 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- | Copyright : (c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis King- (c) 2023-2024 Sayo Koyoneda+ (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -17,22 +15,19 @@ module Data.Effect.Coroutine where import Control.Monad ((>=>))+import Data.Effect.Input (Input (Input))+import Data.Effect.Output (Output (Output)) {- | An effect for coroutines. Realizes an operation that transfers control to the caller of the computation with coroutines along with a value of type @a@, and receives a value of type @b@ from the caller. -}-data Yield a b (c :: Type) where+data Yield a b :: Effect where -- | Transfers control to the caller of the computation with coroutines along with a value of type @a@, and receives a value of type @b@ from the caller.- Yield :: a -> Yield a b b--makeEffectF [''Yield]+ Yield :: a -> Yield a b f b --- | A version of `yield` where the value returned from the caller of the computation with coroutines is unit.-yield_ :: (Yield a () <: f) => a -> f ()-yield_ = yield-{-# INLINE yield_ #-}+makeEffectF ''Yield {- | The execution result when handling a computation that includes the t`Yield` effect. A computation that may include suspension.@@ -55,9 +50,12 @@ -> Status m a b x -- ^ Computation status to extend -> m (Status m a b r)-continueStatus kk = \case- Done x -> kk x- Continue a k -> pure . Continue a $ k >=> continueStatus kk+continueStatus kk = loop+ where+ loop = \case+ Done x -> kk x+ Continue a k -> pure . Continue a $ k >=> continueStatus kk+{-# INLINE continueStatus #-} -- | Repeats the computation until the final result is obtained by continuing the computation using the specified handler each time it suspends. loopStatus@@ -67,6 +65,19 @@ -> Status m a b r -- ^ A computation that may include suspension. -> m r-loopStatus f = \case- Done r -> pure r- Continue a k -> f a >>= k >>= loopStatus f+loopStatus f = loop+ where+ loop = \case+ Done r -> pure r+ Continue a k -> f a >>= k >>= loopStatus f+{-# INLINE loopStatus #-}++-- | Converts the t'Input' effect into the [coroutine]("Data.Effect.Coroutine")'s t'Yield' effect.+inputToYield :: Input i f a -> Yield () i f a+inputToYield Input = Yield ()+{-# INLINE inputToYield #-}++-- | Converts the t'Output' effect into the [coroutine]("Data.Effect.Coroutine")'s t'Yield' effect.+outputToYield :: Output o f a -> Yield o () f a+outputToYield (Output o) = Yield o+{-# INLINE outputToYield #-}
src/Data/Effect/Except.hs view
@@ -1,42 +1,36 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE QuantifiedConstraints #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp An effect to escape from the normal control structure with an exception value in the middle of a context. -}-module Data.Effect.Except where---- | An effect to escape from the normal control structure with an exception value of type @e@ in the middle of a context.-data Throw e (a :: Type) where- -- | Throws an exception; that is, escapes from the normal control structure with an exception value in the middle of a context.- Throw :: e -> Throw e a+module Data.Effect.Except (+ module Data.Effect.Except,+ Catch (..),+ Throw (..),+)+where --- | An effect to catch exceptions.-data Catch e f (a :: Type) where- -- | Catches exceptions within a scope and processes them according to the given exception handler.- Catch- :: f a- -- ^ The scope in which to catch exceptions.- -> (e -> f a)- -- ^ Exception handler. Defines the processing to perform when an exception is thrown within the scope.- -> Catch e f a+import Data.Effect (Catch (Catch), Emb, Throw (Throw), UnliftIO)+import UnliftIO (Exception, throwIO)+import UnliftIO qualified as IO -makeEffect [''Throw] [''Catch]+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Throw+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''Catch -- | Throws the given `Either` value as an exception if it is `Left`.-liftEither :: (Throw e <: f, Applicative f) => Either e a -> f a+liftEither :: forall e es a ff c. (Throw e :> es, Applicative (Eff ff es), Free c ff) => Either e a -> Eff ff es a liftEither = either throw pure {-# INLINE liftEither #-} -- | Throws the result of the given action as an exception if it is `Left`.-joinEither :: (Throw e <: m, Monad m) => m (Either e a) -> m a+joinEither :: forall e es a ff c. (Throw e :> es, Monad (Eff ff es), Free c ff) => Eff ff es (Either e a) -> Eff ff es a joinEither = (>>= either throw pure) {-# INLINE joinEither #-} @@ -52,23 +46,42 @@ -- | If an exception occurs, executes the given exception handler, but the exception is not stopped there and is rethrown. withExcept- :: (Catch e <<: f, Throw e <: f, Applicative f)- => f a+ :: forall e es a ff c+ . (Catch e :> es, Throw e :> es, Applicative (Eff ff es), Free c ff)+ => Eff ff es a -- ^ Scope to which the exception handler applies- -> (e -> f ())+ -> (e -> Eff ff es ()) -- ^ Exception handler- -> f a+ -> Eff ff es a withExcept thing after = thing `catch` \e -> after e *> throw e {-# INLINE withExcept #-} -- | If an exception occurs, executes the specified action, but the exception is not stopped there and is rethrown. onExcept- :: forall e f a- . (Catch e <<: f, Throw e <: f, Applicative f)- => f a+ :: forall e es ff a c+ . (Catch e :> es, Throw e :> es, Applicative (Eff ff es), Free c ff)+ => Eff ff es a -- ^ Scope in which to detect exceptions- -> f ()+ -> Eff ff es () -- ^ Action to execute in case of an exception- -> f a+ -> Eff ff es a onExcept thing after = thing `withExcept` \(_ :: e) -> after {-# INLINE onExcept #-}++-- | Interpret the t'Throw' effect based on an IO-fused semantics using IO-level exceptions.+runThrowIO+ :: forall e es ff a c+ . (Emb IO :> es, Exception e, Monad (Eff ff es), Free c ff)+ => Eff ff (Throw e ': es) a+ -> Eff ff es a+runThrowIO = interpret \(Throw e) -> throwIO e+{-# INLINE runThrowIO #-}++-- | Interpret the t'Catch' effect based on an IO-fused semantics using IO-level exceptions.+runCatchIO+ :: forall e es ff a c+ . (UnliftIO :> es, Emb IO :> es, Exception e, Monad (Eff ff es), Free c ff)+ => Eff ff (Catch e ': es) a+ -> Eff ff es a+runCatchIO = interpret \(Catch action hdl) -> IO.catch action hdl+{-# INLINE runCatchIO #-}
src/Data/Effect/Fail.hs view
@@ -1,12 +1,29 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 -module Data.Effect.Fail where+{- |+Copyright : (c) 2025 Sayo contributors+License : MPL-2.0 (see the file LICENSE)+Maintainer : ymdfield@outlook.jp+-}+module Data.Effect.Fail (+ module Data.Effect.Fail,+ Fail (..),+)+where -data Fail (a :: Type) where- Fail :: String -> Fail a+import Control.Monad.IO.Class (liftIO)+import Data.Effect (Emb, Fail (Fail))+import Prelude hiding (fail)+import Prelude qualified as IO -makeEffectF [''Fail]+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Fail++runFailIO+ :: forall es a ff c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (Fail ': es) a+ -> Eff ff es a+runFailIO = interpret \(Fail s) -> liftIO $ IO.fail s+{-# INLINE runFailIO #-}
src/Data/Effect/Fix.hs view
@@ -1,12 +1,18 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 -module Data.Effect.Fix where+{- |+Copyright : (c) 2025 Sayo contributors+License : MPL-2.0 (see the file LICENSE)+Maintainer : ymdfield@outlook.jp+-}+module Data.Effect.Fix (+ module Data.Effect.Fix,+ Fix (..),+)+where -data Fix f a where- Mfix :: (a -> f a) -> Fix f a+import Data.Effect (Fix (Efix)) -makeEffectH [''Fix]+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''Fix
src/Data/Effect/Fresh.hs view
@@ -1,19 +1,15 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2024-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp-Stability : experimental-Portability : portable -} module Data.Effect.Fresh where -data Fresh i (a :: Type) where- Fresh :: Fresh i i+data Fresh i :: Effect where+ Fresh :: Fresh i f i -makeEffectF [''Fresh]+makeEffectF ''Fresh
src/Data/Effect/Input.hs view
@@ -1,11 +1,9 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -18,12 +16,37 @@ module Data.Effect.Input where -- | A general effect representing input of values from the external world.-data Input i (a :: Type) where+data Input i :: Effect where -- | Retrieve a value input from the external world.- Input :: Input i i+ Input :: Input i f i -makeEffectF [''Input]+makeEffectF ''Input -- | Returns the value obtained by transforming the input value using the given function.-inputs :: (Input i <: f, Functor f) => (i -> a) -> f a+inputs+ :: forall i es ff a c+ . (Input i :> es, Functor (Eff ff es), Free c ff)+ => (i -> a)+ -> Eff ff es a inputs f = f <$> input+{-# INLINE inputs #-}++-- | Interprets the t'Input' effect by executing the given input handler each time an input is required.+runInputEff+ :: forall i es ff a c+ . (Free c ff)+ => Eff ff es i+ -> Eff ff (Input i ': es) a+ -> Eff ff es a+runInputEff a = interpret \Input -> a+{-# INLINE runInputEff #-}++-- | Interprets the t'Input' effect by providing the given constant as input.+runInputConst+ :: forall i es ff a c+ . (Applicative (Eff ff es), Free c ff)+ => i+ -> Eff ff (Input i ': es) a+ -> Eff ff es a+runInputConst i = interpret \Input -> pure i+{-# INLINE runInputConst #-}
src/Data/Effect/KVStore.hs view
@@ -1,15 +1,13 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE UndecidableInstances #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2024 Sayo Koyoneda+Copyright : (c) 2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp-Stability : experimental-Portability : portable This module provides the t`KVStore` effect, comes from [@Polysemy.KVStore@](https://hackage.haskell.org/package/polysemy-kvstore-0.1.3.0/docs/Polysemy-KVStore.html)@@ -17,32 +15,73 @@ -} module Data.Effect.KVStore where +import Control.Arrow ((>>>))+import Control.Effect.Transform (raiseUnder)+import Data.Effect (Emb) import Data.Effect.Except (Throw, throw)+import Data.Effect.State (State, get, modify, runStateIORef)+import Data.Functor ((<&>))+import Data.Map (Map)+import Data.Map qualified as Map import Data.Maybe (isJust) -data KVStore k v a where- LookupKV :: k -> KVStore k v (Maybe v)- UpdateKV :: k -> Maybe v -> KVStore k v ()+data KVStore k v :: Effect where+ LookupKV :: k -> KVStore k v f (Maybe v)+ UpdateKV :: k -> Maybe v -> KVStore k v f () -makeEffectF [''KVStore]+makeEffectF ''KVStore -lookupOrThrowKV :: (KVStore k v <: m, Throw e <: m, Monad m) => (k -> e) -> k -> m v+lookupOrThrowKV+ :: forall k v e es ff c+ . (KVStore k v :> es, Throw e :> es, Monad (Eff ff es), Free c ff)+ => (k -> e)+ -> k+ -> Eff ff es v lookupOrThrowKV err k = lookupKV k >>= maybe (throw $ err k) pure+{-# INLINE lookupOrThrowKV #-} -existsKV :: forall v k f. (KVStore k v <: f, Functor f) => k -> f Bool+existsKV :: forall v k es ff c. (KVStore k v :> es, Functor (Eff ff es), Free c ff) => k -> Eff ff es Bool existsKV = fmap isJust . lookupKV @k @v {-# INLINE existsKV #-} -writeKV :: KVStore k v <: f => k -> v -> f ()+writeKV :: forall k v es ff c. (KVStore k v :> es, Free c ff) => k -> v -> Eff ff es () writeKV k v = updateKV k (Just v) {-# INLINE writeKV #-} -deleteKV :: forall v k f. KVStore k v <: f => k -> f ()+deleteKV :: forall v k es ff c. (KVStore k v :> es, Free c ff) => k -> Eff ff es () deleteKV k = updateKV @k @v k Nothing {-# INLINE deleteKV #-} -modifyKV :: (KVStore k v <: m, Monad m) => v -> (v -> v) -> k -> m ()+modifyKV+ :: forall k v es ff c+ . (KVStore k v :> es, Monad (Eff ff es), Free c ff)+ => v+ -> (v -> v)+ -> k+ -> Eff ff es () modifyKV vDefault f k = do v <- lookupKV k updateKV k (Just $ maybe vDefault f v)+{-# INLINE modifyKV #-}++runKVStoreIORef+ :: forall k v a es ff c+ . (Ord k, Emb IO :> es, forall es'. Monad (Eff ff es'), Free c ff)+ => Map k v+ -> Eff ff (KVStore k v ': es) a+ -> Eff ff es (Map k v, a)+runKVStoreIORef initial =+ raiseUnder+ >>> runKVStoreAsState+ >>> runStateIORef initial+{-# INLINE runKVStoreIORef #-}++runKVStoreAsState+ :: forall k v es ff c+ . (Ord k, State (Map k v) :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (KVStore k v ': es) ~> Eff ff es+runKVStoreAsState = interpret \case+ LookupKV k -> get <&> Map.lookup k+ UpdateKV k v -> modify $ Map.update (const v) k+{-# INLINE runKVStoreAsState #-}
src/Data/Effect/Log.hs view
@@ -2,8 +2,39 @@ -- SPDX-License-Identifier: MPL-2.0 +{- |+Copyright : (c) 2024-2025 Sayo contributors+License : MPL-2.0 (see the LICENSE file)+Maintainer : ymdfield@outlook.jp++Interpreters for the [@co-log@](https://hackage.haskell.org/package/co-log) ecosystem.++The interface is similar to [@co-log-polysemy@](https://hackage.haskell.org/package/co-log-polysemy).+-} module Data.Effect.Log where -data Log msg a where- Log :: msg -> Log msg ()-makeEffectF [''Log]+import Colog.Core (LogAction (LogAction))+import Control.Effect (emb)+import Data.Effect (Emb)+import Data.Effect.Output (Output (Output), output)+import Prelude hiding (log)++data Log msg :: Effect where+ Log :: msg -> Log msg f ()+makeEffectF ''Log++runLogAsOutput :: forall msg a es ff c. (Output msg :> es, Free c ff) => Eff ff (Log msg ': es) a -> Eff ff es a+runLogAsOutput = interpret \(Log msg) -> output msg+{-# INLINE runLogAsOutput #-}++runOutputAsLog :: forall msg a es ff c. (Log msg :> es, Free c ff) => Eff ff (Output msg ': es) a -> Eff ff es a+runOutputAsLog = interpret \(Output msg) -> log msg+{-# INLINE runOutputAsLog #-}++runLogAction :: forall msg a es ff c. (Free c ff) => LogAction (Eff ff es) msg -> Eff ff (Log msg ': es) a -> Eff ff es a+runLogAction (LogAction f) = interpret \(Log msg) -> f msg+{-# INLINE runLogAction #-}++runLogActionEmbed :: forall msg f a es ff c. (Emb f :> es, Free c ff) => LogAction f msg -> Eff ff (Log msg ': es) a -> Eff ff es a+runLogActionEmbed (LogAction f) = interpret \(Log msg) -> emb $ f msg+{-# INLINE runLogActionEmbed #-}
src/Data/Effect/NonDet.hs view
@@ -1,40 +1,120 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE UndecidableInstances #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2024 Sayo Koyoneda+Copyright : (c) 2024-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp Effects that realize non-deterministic computations. -}-module Data.Effect.NonDet where+module Data.Effect.NonDet (+ module Data.Effect.NonDet,+ Empty (..),+ Choose (..),+ ChooseH (..),+)+where --- | An effect that eliminates a branch by causing the current branch context of a non-deterministic computation to fail.-data Empty (a :: Type) where- -- | Eliminates a branch by causing the current branch context of a non-deterministic computation to fail.- Empty :: Empty a+#if ( __GLASGOW_HASKELL__ < 906 )+import Control.Applicative (liftA2)+#endif+import Control.Applicative ((<|>))+import Control.Effect.Interpret (interprets)+import Control.Exception (Exception, SomeException)+import Data.Bool (bool)+import Data.Effect (Choose (Choose), ChooseH (ChooseH), Emb, Empty (Empty), Shift, UnliftIO)+import Data.Effect.OpenUnion (nil, (!:))+import Data.Effect.Shift (abort, shift)+import UnliftIO (throwIO, try) -makeEffectF [''Empty]+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Empty+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Choose+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''ChooseH --- | An effect that splits the computation into two branches.-data Choose (a :: Type) where- -- | Splits the computation into two branches.- -- As a result of executing @choose@, the world branches into one where `False` is returned and one where `True` is returned.- Choose :: Choose Bool+{- | t'ChooseH' effect elaborator. -makeEffectF [''Choose]+ Convert a higher-order effect of the form + @chooseH :: m a -> m a -> m a@++ into a first-order effect of the form:++ @choose :: m Bool@+-}+runChooseH+ :: forall es a ff c+ . (Choose :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (ChooseH ': es) a+ -> Eff ff es a+runChooseH = interpret \(ChooseH a b) -> branch a b+{-# INLINE runChooseH #-}++-- | Faster than `<|>`.+branch :: forall es a ff c. (Choose :> es, Monad (Eff ff es), Free c ff) => Eff ff es a -> Eff ff es a -> Eff ff es a+branch a b = do+ world <- choose+ bool a b world+{-# INLINE branch #-}++infixl 3 `branch`++-- | Selects one element from the list nondeterministically, branching the control as many times as the number of elements.+choice :: forall es a ff c. (Choose :> es, Empty :> es, Monad (Eff ff es), Free c ff) => [a] -> Eff ff es a+choice = \case+ [] -> empty+ x : xs -> pure x `branch` choice xs+{-# INLINE choice #-}++-- | Selects one element from the list nondeterministically, branching the control as many times as the number of elements. Uses t'ChooseH'.+choiceH :: forall es a ff c. (ChooseH :> es, Empty :> es, Monad (Eff ff es), Free c ff) => [a] -> Eff ff es a+choiceH = \case+ [] -> empty+ x : xs -> pure x <|> choiceH xs+{-# INLINE choiceH #-}++runNonDetShift+ :: forall ans a es ref ff c+ . (Monoid ans, Shift ans ref :> es, forall f. Monad (ff f), Free c ff)+ => Eff ff (Choose ': Empty ': es) a+ -> Eff ff es a+runNonDetShift =+ interprets $+ (\Choose -> shift \k' -> liftA2 (<>) (k' True) (k' False))+ !: (\Empty -> abort mempty)+ !: nil+{-# INLINE runNonDetShift #-}+ {- |-An effect that executes two branches as scopes.-A higher-order version of the t`Choose` effect.+Interprets the [NonDet]("Data.Effect.NonDet") effects using IO-level exceptions.++When 'empty' occurs, an v'EmptyException' is thrown, and unless all branches from+ 'chooseH' fail due to IO-level exceptions, only the leftmost result is returned+ as the final result. -}-data ChooseH f (a :: Type) where- -- | Executes the given two scopes as branches.- -- Even if one fails due to the `empty` operation, the whole does not fail as long as the other does not fail.- ChooseH :: f a -> f a -> ChooseH f a+runNonDetIO+ :: forall es a ff c+ . (UnliftIO :> es, Emb IO :> es, forall f. Monad (Eff ff f), Free c ff)+ => Eff ff (ChooseH ': Empty ': es) a+ -> Eff ff es (Either SomeException a)+runNonDetIO m = try do+ let hdl =+ ( \(ChooseH a b) ->+ try a >>= \case+ Right x -> pure x+ Left (_ :: SomeException) -> b+ )+ !: (\Empty -> throwIO EmptyException)+ !: nil+ in interprets hdl m+{-# INLINE runNonDetIO #-} -makeEffectH [''ChooseH]+-- | Exception thrown when 'empty' occurs in 'runNonDetIO'.+data EmptyException = EmptyException+ deriving stock (Show)+ deriving anyclass (Exception)
src/Data/Effect/Output.hs view
@@ -1,11 +1,9 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -18,8 +16,27 @@ module Data.Effect.Output where -- | A general effect representing output of values to the external world.-data Output o a where+data Output o :: Effect where -- | Output a value to the external world.- Output :: o -> Output o ()+ Output :: o -> Output o f () -makeEffectF [''Output]+makeEffectF ''Output++-- | Interprets the t'Output' effect using the given output handler.+runOutputEff+ :: forall o es ff a c+ . (Free c ff)+ => (o -> Eff ff es ())+ -> Eff ff (Output o ': es) a+ -> Eff ff es a+runOutputEff f = interpret \(Output o) -> f o+{-# INLINE runOutputEff #-}++-- | Interprets the t'Output' effect by ignoring the outputs.+ignoreOutput+ :: forall o es ff a c+ . (Applicative (Eff ff es), Free c ff)+ => Eff ff (Output o ': es) a+ -> Eff ff es a+ignoreOutput = runOutputEff $ const $ pure ()+{-# INLINE ignoreOutput #-}
src/Data/Effect/Provider.hs view
@@ -1,11 +1,11 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE UndecidableInstances #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023-2024 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -14,71 +14,165 @@ -} module Data.Effect.Provider where -import Data.Effect.HFunctor (HFunctor, hfmap)-import Data.Effect.Key (type (##>))+import Control.Effect.Transform (raise, raisePrefix, raisePrefix1)+import Data.Effect.OpenUnion (Each, KnownLength, type (++)) import Data.Functor.Const (Const (Const))-import Data.Functor.Identity (Identity, runIdentity)+import Data.Functor.Identity (Identity (Identity), runIdentity) --- | An effect to introduce a new local scope that provides effect context @b@.-data Provider' ctx i b (f :: Type -> Type) (a :: Type) where- -- | Introduces a new local scope that provides an effect context @b p@ parameterized by type @i p@ and with results wrapped in @ctx p@.- Provide- :: i p- -> ((forall x. f x -> b p x) -> b p a)- -> Provider' ctx i b f (ctx p a)+-- | An effect to introduce a new local scope that provides effect context @b s@.+data Scope t i b :: Effect where+ -- | Introduces a new local scope that provides an effect context @b s@ parameterized by type @i s@ and with results wrapped in @t s@.+ Scope+ :: forall s t i a f b+ . i s+ -> ((forall x. f x -> b s x) -> b s a)+ -> Scope t i b f (t s a) -makeEffectH [''Provider']+makeEffectH' (def & noGenerateLabel) ''Scope --- | A type-level key to uniquely resolve the effect context carrier @b@ from @ctx@ and @i@.-data ProviderKey ctx i+-- | A type-level label to uniquely resolve the effect context carrier @b@ from @t@ and @i@.+data ScopeLabel (t :: k -> Type -> Type) (i :: k -> Type) --- | An effect to introduce a new local scope that provides effect context @b@.-type Provider ctx i b = ProviderKey ctx i ##> Provider' ctx i b+type instance LabelOf (Scope t i b) = ScopeLabel t i -{- |-An effect to introduce a new local scope that provides effect context @b@.-A version of `Provider` where the result is not wrapped in a specific container.--}-type Provider_ i b = Provider (Const1 Identity) (Const i :: () -> Type) (Const1 b)+newtype Const1 f x (a :: Type) = Const1 {getConst1 :: f a} -newtype Const1 f x a = Const1 {getConst1 :: f a}+-- | An effect to introduce a new local scope that provides the scope-parametrized effect @e@.+type Scoped ff t i es r = Scope t i (ScopeC ff t i es r) -newtype Const2 ff x f a = Const2 {getConst2 :: ff f a}-instance (HFunctor ff) => HFunctor (Const2 ff x) where- hfmap phi (Const2 ff) = Const2 $ hfmap phi ff- {-# INLINE hfmap #-}+newtype ScopeC ff t i fs r s a+ = ScopeC {unScopeC :: Eff ff (Each fs s ++ Scoped ff t i fs r ': r) a} -infix 2 .!+-- | An effect to introduce a new local scope that provides the effect @e@.+type Scoped_ ff t i es r = Scope t i (Const1 (ScopeC_ ff t i es r)) -{- | A operator to introduce a new local scope that provides effect context @b@.-A version of `..!` where the result is not wrapped in a specific container.--}-(.!)- :: forall i f a b- . ( SendHOEBy- (ProviderKey (Const1 Identity :: () -> Type -> Type) (Const i :: () -> Type))- (Provider' (Const1 Identity) (Const i) (Const1 b))- f- , Functor f+newtype ScopeC_ ff t i es r a+ = ScopeC_ {unScopeC_ :: Eff ff (es ++ Scoped_ ff t i es r ': r) a}++type Provider ff t i e es = Scoped_ ff (Const1 t) (Const i :: () -> Type) e es++runScoped+ :: forall t i a es r ff c+ . (KnownLength es, Free c ff)+ => ( forall s x+ . i s+ -> Eff ff (Each es s ++ Scoped ff t i es r ': r) x+ -> Eff ff (Scoped ff t i es r ': r) (t s x) )+ -> Eff ff (Scoped ff t i es r ': r) a+ -> Eff ff r a+runScoped run = loop+ where+ loop :: Eff ff (Scoped ff t i es r ': r) ~> Eff ff r+ loop = interpret \(Scope (i :: i s) f) ->+ loop $ run i (unScopeC $ f $ ScopeC . raisePrefix1 @es @s . raise @(Scoped ff t i es r))+{-# INLINE runScoped #-}++scoped+ :: forall t i s a es' es r ff c+ . (Scoped ff t i es r :> es', Free c ff)+ => i s+ -> ( Eff ff es' ~> Eff ff (Each es s ++ Scoped ff t i es r ': r)+ -> Eff ff (Each es s ++ Scoped ff t i es r ': r) a+ )+ -> Eff ff es' (t s a)+scoped i f = scope i \detach -> ScopeC $ f $ unScopeC . detach+{-# INLINE scoped #-}++runScoped_+ :: forall t i a es r ff c+ . (KnownLength es, Free c ff)+ => ( forall p x+ . i p+ -> Eff ff (es ++ Scoped_ ff t i es r ': r) x+ -> Eff ff (Scoped_ ff t i es r ': r) (t p x)+ )+ -> Eff ff (Scoped_ ff t i es r ': r) a+ -> Eff ff r a+runScoped_ run = loop+ where+ loop :: Eff ff (Scoped_ ff t i es r ': r) ~> Eff ff r+ loop = interpret \(Scope i f) ->+ loop $ run i (unScopeC_ . getConst1 $ f $ Const1 . ScopeC_ . raisePrefix @es . raise @(Scoped_ ff t i es r))+{-# INLINE runScoped_ #-}++scoped_+ :: forall t i s a es' es r ff c+ . (Scoped_ ff t i es r :> es', Free c ff)+ => i s+ -> ( Eff ff es' ~> Eff ff (es ++ Scoped_ ff t i es r ': r)+ -> Eff ff (es ++ Scoped_ ff t i es r ': r) a+ )+ -> Eff ff es' (t s a)+scoped_ i f = scope i \pop -> Const1 $ ScopeC_ $ f $ unScopeC_ . getConst1 . pop+{-# INLINE scoped_ #-}++runProvider+ :: forall t i a es r ff c+ . (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff)+ => ( forall x+ . i+ -> Eff ff (es ++ Provider ff t i es r ': r) x+ -> Eff ff (Provider ff t i es r ': r) (t x)+ )+ -> Eff ff (Provider ff t i es r ': r) a+ -> Eff ff r a+runProvider run = runScoped_ \(Const i) a -> Const1 <$> run i a+{-# INLINE runProvider #-}++provide+ :: forall t i a es' es r ff c+ . (Provider ff t i es r :> es', forall es''. Functor (Eff ff es''), Free c ff) => i- -> ((f ~> b) -> b a)- -> f a-i .! f =- runIdentity . getConst1- <$> provide'' @(ProviderKey (Const1 Identity :: () -> _ -> _) (Const i :: () -> _))- (Const i)- \run -> Const1 $ f $ getConst1 . run-{-# INLINE (.!) #-}+ -> ( Eff ff es' ~> Eff ff (es ++ Provider ff t i es r ': r)+ -> Eff ff (es ++ Provider ff t i es r ': r) a+ )+ -> Eff ff es' (t a)+provide i f = getConst1 <$> scoped_ @_ @_ @'() (Const i) f+{-# INLINE provide #-} -infix 2 ..!+runProvider_+ :: forall i a es r ff c+ . (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff)+ => ( forall x+ . i+ -> Eff ff (es ++ Provider ff Identity i es r ': r) x+ -> Eff ff (Provider ff Identity i es r ': r) x+ )+ -> Eff ff (Provider ff Identity i es r ': r) a+ -> Eff ff r a+runProvider_ run = runProvider \i a -> Identity <$> run i a+{-# INLINE runProvider_ #-} --- | A operator to introduce a new local scope that provides effect context @b p@.-(..!)- :: forall ctx i p f a b- . (SendHOEBy (ProviderKey ctx i) (Provider' ctx i b) f)- => i p- -> ((f ~> b p) -> b p a)- -> f (ctx p a)-i ..! f = provide'' @(ProviderKey ctx i) i f-{-# INLINE (..!) #-}+provide_+ :: forall i a es' es r ff c+ . (Provider ff Identity i es r :> es', forall es''. Functor (Eff ff es''), Free c ff)+ => i+ -> ( Eff ff es' ~> Eff ff (es ++ Provider ff Identity i es r ': r)+ -> Eff ff (es ++ Provider ff Identity i es r ': r) a+ )+ -> Eff ff es' a+provide_ i f = runIdentity <$> provide i f+{-# INLINE provide_ #-}++runProvider__+ :: forall a es r ff c+ . (forall es'. Functor (Eff ff es'), KnownLength es, Free c ff)+ => ( forall x+ . Eff ff (es ++ Provider ff Identity () es r ': r) x+ -> Eff ff (Provider ff Identity () es r ': r) x+ )+ -> Eff ff (Provider ff Identity () es r ': r) a+ -> Eff ff r a+runProvider__ run = runProvider_ \() -> run+{-# INLINE runProvider__ #-}++provide__+ :: forall a es' es r ff c+ . (Provider ff Identity () es r :> es', forall es''. Functor (Eff ff es''), Free c ff)+ => ( Eff ff es' ~> Eff ff (es ++ Provider ff Identity () es r ': r)+ -> Eff ff (es ++ Provider ff Identity () es r ': r) a+ )+ -> Eff ff es' a+provide__ = provide_ ()+{-# INLINE provide__ #-}
src/Data/Effect/Reader.hs view
@@ -1,11 +1,11 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE QuantifiedConstraints #-}+{-# LANGUAGE UndecidableInstances #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp @@ -13,25 +13,72 @@ Environmental values are immutable and do not change across procedures, but you can modify the value within a local scope using the `local` operation. -}-module Data.Effect.Reader where---- | An effect that holds a value of type @r@ in the context (environment).-data Ask r (a :: Type) where- -- | Obtain a value from the environment.- Ask :: Ask r r+module Data.Effect.Reader (+ module Data.Effect.Reader,+ Ask (..),+ Local (..),+)+where --- | An effect that locally modifies the value held in the environment.-data Local r f (a :: Type) where- -- | Locally modifies the value held in the environment.- Local- :: (r -> r)- -- ^ A function that transforms the original value to the modified value.- -> f a- -- ^ The local scope where the modification is applied.- -> Local r f a+import Control.Effect (sendFor)+import Control.Effect.Interpret (interposeFor)+import Data.Effect (Ask (Ask), Local (Local))+import Data.Effect.OpenUnion (IdentityResolver, Membership, membership) -makeEffect [''Ask] [''Local]+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Ask+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''Local -- | Obtains a value from the environment and returns it transformed by the given function.-asks :: (Ask r <: f, Functor f) => (r -> a) -> f a+asks+ :: forall r es ff a c+ . (Ask r :> es, Functor (Eff ff es), Free c ff)+ => (r -> a)+ -> Eff ff es a asks f = f <$> ask+{-# INLINE asks #-}++-- | Interpret the t'Ask'/t'Local' effects.+runReader+ :: forall r es ff a c+ . (forall es'. Applicative (Eff ff es'), Free c ff)+ => r+ -> Eff ff (Local r ': Ask r ': es) a+ -> Eff ff es a+runReader r = runAsk r . runLocal+{-# INLINE runReader #-}++-- | Interpret the t'Ask' effect.+runAsk+ :: forall r es ff a c+ . (Applicative (Eff ff es), Free c ff)+ => r+ -> Eff ff (Ask r ': es) a+ -> Eff ff es a+runAsk r = interpret \Ask -> pure r+{-# INLINE runAsk #-}++-- | Interpret the t'Local' effect.+runLocal+ :: forall r es ff a c+ . (Applicative (Eff ff es), Ask r `In` es, Free c ff)+ => Eff ff (Local r ': es) a+ -> Eff ff es a+runLocal = interpret handleLocal+{-# INLINE runLocal #-}++-- | A handler for the t'Local' effect.+handleLocal+ :: forall r es ff c+ . (Applicative (Eff ff es), Ask r `In` es, Free c ff)+ => Local r ~~> Eff ff es+handleLocal = handleLocalFor $ membership @IdentityResolver+{-# INLINE handleLocal #-}++-- | A handler for the t'Local' effect.+handleLocalFor+ :: forall r es ff c+ . (Applicative (Eff ff es), Free c ff)+ => Membership (Ask r) es+ -> Local r ~~> Eff ff es+handleLocalFor pr (Local f a) = a & interposeFor pr \Ask -> f <$> sendFor pr Ask+{-# INLINE handleLocalFor #-}
− src/Data/Effect/Resource.hs
@@ -1,56 +0,0 @@-{-# LANGUAGE AllowAmbiguousTypes #-}---- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.---- The code and documentation before modification is BSD3 licensed,--- (c) 2019-2023 The Polysemy Lounge: [Polysemy.Resource]--- (https://hackage.haskell.org/package/polysemy-1.9.1.2/docs/Polysemy-Resource.html).--{- |-Copyright : (c) 2019-2023 The Polysemy Lounge- (c) 2023 Sayo Koyoneda-License : MPL-2.0 (see the file LICENSE)-Maintainer : ymdfield@outlook.jp-Stability : experimental-Portability : portable--An effect capable of providing [bracket]-(https://hackage.haskell.org/package/base-4.16.4.0/docs/Control-Exception.html#v:bracket) semantics.--}-module Data.Effect.Resource where--import Data.Functor (void)--{- |-An effect capable of providing [bracket]-(https://hackage.haskell.org/package/base-4.16.4.0/docs/Control-Exception.html#v:bracket) semantics.--}-data Resource f a where- -- | Allocate a resource, use it, and clean it up afterwards.- Bracket :: f a -> (a -> f ()) -> (a -> f b) -> Resource f b- -- | Allocate a resource, use it, and clean it up afterwards if an error occurred.- BracketOnExcept :: f a -> (a -> f ()) -> (a -> f b) -> Resource f b--makeEffectH [''Resource]--bracket_ :: (Resource <<: f, Functor f) => f a -> f b -> f c -> f c-bracket_ acquire release thing =- bracket acquire (const $ void release) (const thing)--bracketOnExcept_ :: (Resource <<: f, Functor f) => f a -> f b -> f c -> f c-bracketOnExcept_ acquire onExc thing =- bracketOnExcept acquire (const $ void onExc) (const thing)--finally :: (Resource <<: f, Applicative f) => f a -> f () -> f a-finally thing release = bracket (pure ()) (const release) (const thing)--finally_ :: (Resource <<: f, Applicative f) => f a -> f b -> f a-finally_ thing release = finally thing (void release)--onException :: (Resource <<: f, Applicative f) => f a -> f () -> f a-onException thing onExc = bracketOnExcept (pure ()) (const onExc) (const thing)--onException_ :: (Resource <<: f, Applicative f) => f a -> f b -> f a-onException_ thing onExc = onException thing (void onExc)
src/Data/Effect/Select.hs view
@@ -1,12 +1,10 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 module Data.Effect.Select where -data Select r a where- Select :: ((a -> r) -> a) -> Select r a+data Select r :: Effect where+ Select :: ((a -> r) -> a) -> Select r f a -makeEffectF [''Select]+makeEffectF ''Select
+ src/Data/Effect/Shift.hs view
@@ -0,0 +1,61 @@+{-# LANGUAGE AllowAmbiguousTypes #-}++-- SPDX-License-Identifier: MPL-2.0++{- |+Copyright : (c) 2025 Sayo contributors+License : MPL-2.0 (see the LICENSE file)+Maintainer : ymdfield@outlook.jp+-}+module Data.Effect.Shift where++import Control.Monad ((<=<))+import Data.Effect (CC (Jump, SubFork), Shift)+import Data.Function (fix)+import Data.Functor.Contravariant (Op (Op))++makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Shift++subShift+ :: forall a b es ans ref ff c+ . (Shift ans ref :> es, Monad (Eff ff es), Free c ff)+ => (ref a -> Eff ff es b)+ -> (a -> Eff ff es b)+ -> Eff ff es b+subShift p q = subShiftFork >>= either p q+{-# INLINE subShift #-}++shift+ :: forall a es ans ref ff c+ . (Shift ans ref :> es, Monad (Eff ff es), Free c ff)+ => ((a -> Eff ff es ans) -> Eff ff es ans)+ -> Eff ff es a+shift f = subShift (abort <=< f . call) pure+{-# INLINE shift #-}++getShiftCC+ :: forall es ans ref ff c+ . (Shift ans ref :> es, Monad (Eff ff es), Free c ff)+ => Eff ff es (Eff ff es ans)+getShiftCC = shift fix+{-# INLINE getShiftCC #-}++runCCAsShift+ :: forall a es ans ref ff c+ . (Shift ans ref :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (CC ref ': es) a+ -> Eff ff es a+runCCAsShift = interpret \case+ SubFork -> subShiftFork+ Jump ref x -> call ref x >>= abort+{-# INLINE runCCAsShift #-}++runCCOnShift+ :: forall a es ans ref ff c+ . (Shift ans ref :> es, Monad (Eff ff es), Free c ff)+ => Eff ff (CC (Op (Eff ff es ans)) ': es) a+ -> Eff ff es a+runCCOnShift = interpret \case+ SubFork -> shift \exit -> exit . Left . Op $ exit . Right+ Jump (Op exit) x -> exit x >>= abort+{-# INLINE runCCOnShift #-}
− src/Data/Effect/ShiftReset.hs
@@ -1,72 +0,0 @@-{-# LANGUAGE AllowAmbiguousTypes #-}---- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.--module Data.Effect.ShiftReset where--import Control.Monad ((>=>))-import Data.Effect.Key (KeyH (KeyH))-import Data.Functor (void)--data Shift' (ans :: Type) n m a where- Shift- :: forall ans n m a- . ((a -> n ans) -> (forall x. m x -> n x) -> n ans)- -> Shift' ans n m a-makeKeyedEffect [] [''Shift']--callCC- :: forall a m ans n- . (SendHOEBy ShiftKey (Shift' ans n) m, Monad m, Monad n)- => ((a -> n ans) -> m a)- -> m a-callCC f = shift \k run -> run (f $ k >=> run . exit) >>= k--exit- :: forall a m ans n- . (SendHOEBy ShiftKey (Shift' ans n) m, Applicative n)- => ans- -> m a-exit ans = shift \_ _ -> pure ans-{-# INLINE exit #-}--getCC- :: forall m ans n- . (SendHOEBy ShiftKey (Shift' ans n) m, Monad m, Monad n)- => m (n ans)-getCC = callCC \exit' -> let a = exit' a in pure a--embed :: forall m ans n. (SendHOEBy ShiftKey (Shift' ans n) m, Monad n) => n ~> m-embed m = shift \k _ -> m >>= k-{-# INLINE embed #-}--data Shift_' n m a where- Shift_'- :: (forall (ans :: Type). (a -> n ans) -> (forall x. m x -> n x) -> n ans)- -> Shift_' n m a-makeKeyedEffect [] [''Shift_']--getCC_ :: forall m n. (SendHOEBy Shift_Key (Shift_' n) m, Functor n) => m (n ())-getCC_ = shift_' \k _ -> let k' = k $ void k' in k'--data Reset m (a :: Type) where- Reset :: m a -> Reset m a-makeEffectH [''Reset]--data ShiftF ans a where- ShiftF :: forall ans a. ((a -> ans) -> ans) -> ShiftF ans a-makeEffectF [''ShiftF]--fromShiftF :: ShiftF (n ans) ~> Shift ans n m-fromShiftF (ShiftF f) = KeyH $ Shift \k _ -> f k-{-# INLINE fromShiftF #-}--exitF :: forall ans m a. (ShiftF ans <: m) => ans -> m a-exitF ans = shiftF @ans $ const ans-{-# INLINE exitF #-}--embedF :: forall ans n m. (ShiftF (n ans) <: m, Monad n) => n ~> m-embedF m = shiftF @(n ans) (m >>=)-{-# INLINE embedF #-}
src/Data/Effect/State.hs view
@@ -1,31 +1,95 @@+-- SPDX-License-Identifier: MPL-2.0 {-# LANGUAGE AllowAmbiguousTypes #-}---- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+{-# LANGUAGE QuantifiedConstraints #-}+{-# HLINT ignore "Avoid lambda" #-}+{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp Effects for holding mutable state values in the context. -}-module Data.Effect.State where+module Data.Effect.State (+ module Data.Effect.State,+ State (..),+) where --- | An effect for holding mutable state values in the context.-data State s a where- -- | Retrieves the current state value from the context.- Get :: State s s- -- | Overwrites the state value in the context.- Put :: s -> State s ()+import Data.Effect (Ask (Ask), Emb, Local (Local), State (Get, Put))+import Data.Functor ((<&>))+import UnliftIO (newIORef, readIORef, writeIORef) -makeEffectF [''State]+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''State -- | Retrieves the current state value from the context and returns the value transformed based on the given function.-gets :: (State s <: f, Functor f) => (s -> a) -> f a+gets :: forall s es a ff c. (State s :> es, Functor (Eff ff es), Free c ff) => (s -> a) -> Eff ff es a gets f = f <$> get+{-# INLINE gets #-} -- | Modifies the current state value in the context based on the given function.-modify :: (State s <: m, Monad m) => (s -> s) -> m ()+modify :: forall s es ff c. (State s :> es, Monad (Eff ff es), Free c ff) => (s -> s) -> Eff ff es () modify f = put . f =<< get+{-# INLINE modify #-}++-- | Interpret the 'State' effect based on an IO-fused semantics using t'Data.IORef.IORef'.+runStateIORef+ :: forall s es ff a c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => s+ -> Eff ff (State s ': es) a+ -> Eff ff es (s, a)+runStateIORef s0 m = do+ ref <- newIORef s0+ a <-+ m & interpret \case+ Get -> readIORef ref+ Put s -> writeIORef ref s+ readIORef ref <&> (,a)+{-# INLINE runStateIORef #-}++{- |+Interpret the 'State' effect based on an IO-fused semantics using t'Data.IORef.IORef'.+Do not include the final state in the return value.+-}+evalStateIORef+ :: forall s es ff a c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => s+ -> Eff ff (State s ': es) a+ -> Eff ff es a+evalStateIORef s0 m = do+ ref <- newIORef s0+ m & interpret \case+ Get -> readIORef ref+ Put s -> writeIORef ref s+{-# INLINE evalStateIORef #-}++execStateIORef+ :: forall s es ff a c+ . (Emb IO :> es, Monad (Eff ff es), Free c ff)+ => s+ -> Eff ff (State s ': es) a+ -> Eff ff es s+execStateIORef s0 = fmap fst . runStateIORef s0+{-# INLINE execStateIORef #-}++localToState+ :: forall r es ff a c+ . (State r `In` es, Monad (Eff ff es), Free c ff)+ => Eff ff (Local r ': es) a+ -> Eff ff es a+localToState =+ interpret \(Local f a) -> do+ save <- get'_ @r+ put'_ $ f save+ a <* put'_ save+{-# INLINE localToState #-}++askToGet+ :: forall r es ff a c+ . (State r `In` es, Free c ff)+ => Eff ff (Ask r ': es) a+ -> Eff ff es a+askToGet = interpret \Ask -> get'_+{-# INLINE askToGet #-}
src/Data/Effect/Unlift.hs view
@@ -1,39 +1,49 @@ {-# LANGUAGE AllowAmbiguousTypes #-}+{-# LANGUAGE UndecidableInstances #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023-2024 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp Realizes [@unliftio@](https://hackage.haskell.org/package/unliftio) in the form of higher-order effects. -}-module Data.Effect.Unlift where--import Data.Effect.Tag (type (##))--data UnliftBase b f (a :: Type) where- WithRunInBase :: ((forall x. f x -> b x) -> b a) -> UnliftBase b f a+module Data.Effect.Unlift (+ module Data.Effect.Unlift,+ UnliftBase (..),+ UnliftIO,+)+where -makeEffectH [''UnliftBase]+import Control.Effect (sendAt)+import Control.Effect.Interpret (runEff)+import Data.Effect (Emb (Emb), UnliftBase (WithRunInBase), UnliftIO)+import UnliftIO qualified as IO -type UnliftIO = UnliftBase IO+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''UnliftBase pattern WithRunInIO :: (f ~> IO -> IO a) -> UnliftIO f a pattern WithRunInIO f = WithRunInBase f {-# COMPLETE WithRunInIO #-} -withRunInIO :: (UnliftIO <<: f) => (f ~> IO -> IO a) -> f a+withRunInIO+ :: forall es ff a c+ . (UnliftIO :> es, Free c ff)+ => (Eff ff es ~> IO -> IO a)+ -> Eff ff es a withRunInIO = withRunInBase {-# INLINE withRunInIO #-} -withRunInIO' :: forall tag f a. (UnliftIO ## tag <<: f) => (f ~> IO -> IO a) -> f a-withRunInIO' = withRunInBase' @tag-{-# INLINE withRunInIO' #-}+runUnliftBase :: forall b ff a c. (c b, Free c ff) => Eff ff '[UnliftBase b, Emb b] a -> b a+runUnliftBase =+ runEff . interpret \(WithRunInBase f) ->+ sendAt @0 $ Emb $ f runEff+{-# INLINE runUnliftBase #-} -withRunInIO'' :: forall key f a. (SendHOEBy key UnliftIO f) => (f ~> IO -> IO a) -> f a-withRunInIO'' = withRunInBase'' @key-{-# INLINE withRunInIO'' #-}+runUnliftIO :: (IO.MonadUnliftIO m, Free c ff, c m) => Eff ff '[UnliftIO, Emb m] a -> m a+runUnliftIO =+ runEff . interpret \(WithRunInBase f) ->+ sendAt @0 $ Emb $ IO.withRunInIO \run -> f $ run . runEff+{-# INLINE runUnliftIO #-}
src/Data/Effect/Writer.hs view
@@ -1,54 +1,34 @@ {-# LANGUAGE AllowAmbiguousTypes #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 {- |-Copyright : (c) 2023 Sayo Koyoneda+Copyright : (c) 2023-2025 Sayo contributors License : MPL-2.0 (see the file LICENSE) Maintainer : ymdfield@outlook.jp Effects that can accumulate values monoidally in a context. -}-module Data.Effect.Writer where---- | An effect that can accumulate values monoidally in a context.-data Tell w a where- -- | Accumulates new values to the cumulative value held in the context.- Tell :: w -> Tell w ()---- | An effect that performs local operations on accumulations in the context on a per-scope basis.-data WriterH w f a where- -- | Obtains the accumulated value in the scope and returns it together as a pair.- Listen- :: f a- -- ^ The scope from which to obtain the accumulation.- -> WriterH w f (w, a)- -- | Modifies the accumulation in the scope based on the given function.- Censor- :: (w -> w)- -- ^ A function for modifying the accumulated value.- -> f a- -- ^ The scope where the modification is applied.- -> WriterH w f a+module Data.Effect.Writer (+ module Data.Effect.Writer,+ Tell (..),+ WriterH (..),+ pass,+)+where -makeEffect [''Tell] [''WriterH]+import Control.Effect (pass)+import Data.Effect (Tell (Tell), WriterH (Censor, Listen)) -{- |-For a given scope, uses the function (the first component of the pair returned-by that scope) to modify the accumulated value of that scope, and then-accumulates the result into the current outer scope.+makeEffectF_' (def & noGenerateLabel & noGenerateOrderInstance) ''Tell+makeEffectH_' (def & noGenerateLabel & noGenerateOrderInstance) ''WriterH -@-pass m = do- (w, (f, a)) <- listen m- tell $ f w- pure a-@--}-pass :: (Tell w <: m, WriterH w <<: m, Monad m) => m (w -> w, a) -> m a-pass m = do- (w, (f, a)) <- listen m- tell $ f w- pure a+-- | 'censor' with pre-applying semantics.+censorPre+ :: forall w es ff a c+ . (Tell w `In` es, Free c ff)+ => (w -> w)+ -> Eff ff es a+ -> Eff ff es a+censorPre f = interposeIn @(Tell w) \(Tell w) -> tell'_ $ f w+{-# INLINE censorPre #-}
src/Prelude.hs view
@@ -1,24 +1,24 @@ {-# LANGUAGE PackageImports #-} --- This Source Code Form is subject to the terms of the Mozilla Public--- License, v. 2.0. If a copy of the MPL was not distributed with this--- file, You can obtain one at https://mozilla.org/MPL/2.0/.+-- SPDX-License-Identifier: MPL-2.0 module Prelude ( module Prelude, module Control.Effect,- module Control.Effect.Key,+ module Control.Effect.Interpret,+ module Data.Effect.OpenUnion,+ module Data.Effect, module Data.Effect.TH, module Data.Effect.HFunctor.TH,- module Data.Effect.Key.TH, Type, Infinite ((:<)), ) where -import Control.Effect (type (<:), type (<<:), type (~>))-import Control.Effect.Key (SendFOEBy, SendHOEBy)+import Control.Effect (Eff, Free, type (~>), type (~~>))+import Control.Effect.Interpret (interposeIn, interpret)+import Data.Effect (Effect, LabelOf) import Data.Effect.HFunctor.TH-import Data.Effect.Key.TH (makeKeyedEffect, makeKeyedEffect_)+import Data.Effect.OpenUnion (Has, In, type (:>)) import Data.Effect.TH import Data.Kind (Type) import Data.List.Infinite (Infinite ((:<)))