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

Safe HaskellNone
LanguageHaskell2010

Reflex.Switching

Synopsis

Documentation

class Reflex t => Switching t r where Source

Methods

switching :: MonadHold t m => r -> Event t r -> m r Source

Generalization of switchable reactive types (e.g. Event, Behavior)

Instances

Reflex t => Switching t () Source 
(Switching t a, Monoid a, Reflex t) => Switching t [a] Source 
(Semigroup a, Reflex t) => Switching t (Event t a) Source 
(Monoid a, Reflex t) => Switching t (Behavior t a) Source 
(Switching t a, Switching t b) => Switching t (a, b) Source 

class (Switching t r, Monoid r) => SwitchMerge t r where Source

Methods

switchMerge :: (MonadFix m, MonadHold t m, Ord k) => Map k r -> Event t (Map k (Maybe r)) -> m r Source

Switching for a changing collections of reactive types

Instances

switching' :: (Reflex t, Switching t r, MonadFix m, MonadHold t m) => Updated t r -> m r Source

Helper which takes an Updated as one argument (instead of initial value, update event separately)

switchMerge' :: (Reflex t, SwitchMerge t r, MonadFix m, MonadHold t m, Ord k) => UpdatedMap t k r -> m r Source

Helper which takes an UpdatedMap as one argument (instead of initial value, update event separately)