Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides PerformEventT
, the standard implementation of
PerformEvent
.
Synopsis
- newtype PerformEventT t m a = PerformEventT {
- unPerformEventT :: RequesterT t (HostFrame t) Identity (HostFrame t) a
- newtype FireCommand t m = FireCommand {
- runFireCommand :: forall a. [DSum (EventTrigger t) Identity] -> ReadPhase m a -> m [a]
- hostPerformEventT :: forall t m a. (Monad m, MonadSubscribeEvent t m, MonadReflexHost t m, MonadRef m, Ref m ~ Ref IO) => PerformEventT t m a -> m (a, FireCommand t m)
Documentation
newtype PerformEventT t m a Source #
Provides a basic implementation of PerformEvent
. Note that, despite the
name, PerformEventT
is not an instance of MonadTrans
.
PerformEventT | |
|
Instances
newtype FireCommand t m Source #
A function that fires events for the given EventTrigger
s and then runs
any followup actions provided via PerformEvent
. The given ReadPhase
action will be run once for the initial trigger execution as well as once for
each followup.
FireCommand | |
|
hostPerformEventT :: forall t m a. (Monad m, MonadSubscribeEvent t m, MonadReflexHost t m, MonadRef m, Ref m ~ Ref IO) => PerformEventT t m a -> m (a, FireCommand t m) Source #
Run a PerformEventT
action, returning a FireCommand
that allows the
caller to trigger Event
s while ensuring that performEvent
actions are run
at the appropriate time.