| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Reflex.PerformEvent.Base
Description
This module provides PerformEventT, the standard implementation of
PerformEvent.
Synopsis
- newtype PerformEventT t (m :: k) a = PerformEventT {
- unPerformEventT :: RequesterT t (HostFrame t) Identity (HostFrame t) a
- newtype FireCommand t (m :: Type -> Type) = 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 :: k) a Source #
Provides a basic implementation of PerformEvent. Note that, despite the
name, PerformEventT is not an instance of MonadTrans.
Constructors
| PerformEventT | |
Fields
| |
Instances
newtype FireCommand t (m :: Type -> Type) Source #
A function that fires events for the given EventTriggers 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.
Constructors
| FireCommand | |
Fields
| |
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 Events while ensuring that performEvent actions are run
at the appropriate time.