Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class MonadReflex t m => MonadSwitch t m | m -> t where
- switchM :: Updated t (m a) -> m (Updated t a)
- switchMapM :: Ord k => UpdatedMap t k (m a) -> m (UpdatedMap t k a)
- type MonadReflex t m = (Reflex t, MonadHold t m, MonadFix m)
- module Reflex
- module Reflex.Switching
- module Reflex.Updated
- module Control.Monad.Writer.Class
Documentation
class MonadReflex t m => MonadSwitch t m | m -> t where Source
switchM :: Updated t (m a) -> m (Updated t a) Source
Map the result of an initial monadic action and updates and swap it out with a new one whenever the event provided fires. returns an Updated giving the initial value plus updates
switchMapM :: Ord k => UpdatedMap t k (m a) -> m (UpdatedMap t k a) Source
Similar to holdM but operating on a collection of widgets
provided as an UpdatedMap
.
switchM/switchM' can be implemented in terms of switchMapM
therefore switchMapM is a minimal implementation.
Reflex t => MonadSwitch t (ReflexM t) Source | |
(MonadSwitch t m, SwitchMerge t w) => MonadSwitch t (WriterT w m) Source | |
MonadSwitch t m => MonadSwitch t (ReaderT e m) Source | |
(MonadSwitch t m, Splitable s i) => MonadSwitch t (SupplyT s m) Source | |
(MonadSwitch t m, SwitchMerge t w) => MonadSwitch t (ReaderWriterT r w m) Source |
type MonadReflex t m = (Reflex t, MonadHold t m, MonadFix m) Source
Constraint type to capture common usage together
module Reflex
module Reflex.Switching
module Reflex.Updated
module Control.Monad.Writer.Class