reflex-transformers-0.2.1: Collections and switchable Monad transformers for Reflex

Safe HaskellNone
LanguageHaskell2010

Reflex.Monad.Class

Synopsis

Documentation

class MonadReflex t m => MonadSwitch t m | m -> t where Source

Minimal complete definition

switchMapM

Methods

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.

type MonadReflex t m = (Reflex t, MonadHold t m, MonadFix m) Source

Constraint type to capture common usage together

module Reflex