Safe Haskell | None |
---|---|
Language | GHC2021 |
Polysemy.Conc.Effect.Events
Description
Synopsis
- data Events e (a :: Type -> Type) b where
- publish :: forall e (r :: EffectRow). Member (Events e) r => e -> Sem r ()
- data Consume e (a :: Type -> Type) b where
- consume :: forall e (r :: EffectRow). Member (Consume e) r => Sem r e
- subscribe :: forall e (r :: EffectRow). Member (Scoped_ (Consume e)) r => InterpreterFor (Consume e) r
Documentation
data Events e (a :: Type -> Type) b where Source #
An event publisher that can be consumed from multiple threads.
publish :: forall e (r :: EffectRow). Member (Events e) r => e -> Sem r () Source #
Publish one event.