Safe Haskell | None |
---|---|

Language | Haskell2010 |

- data UpdatedMap t k a = UpdatedMap (Map k a) (Event t (Map k (Maybe a)))
- data Updated t a = Updated a (Event t a)
- split :: Functor f => f (a, b) -> (f a, f b)
- holdDyn' :: (Reflex t, MonadHold t m, MonadFix m) => Updated t a -> m (Dynamic t a)
- hold' :: (Reflex t, MonadHold t m, MonadFix m) => Updated t a -> m (Behavior t a)
- holdMapDyn :: (Reflex t, MonadHold t m, MonadFix m, Ord k) => UpdatedMap t k a -> m (Dynamic t (Map k a))
- holdMap :: (Reflex t, MonadHold t m, MonadFix m, Ord k) => UpdatedMap t k a -> m (Behavior t (Map k a))
- shallowDiff :: (Reflex t, Ord k) => Behavior t (Map k a) -> Event t (Map k b) -> Event t (Map k (Maybe b))
- shallowDiff' :: Ord k => Map k a -> Map k b -> Map k (Maybe b)

# Documentation

data UpdatedMap t k a Source

Data type for a collection (a map) which is updated by providing differences

UpdatedMap (Map k a) (Event t (Map k (Maybe a))) |

Reflex t => FunctorWithIndex k (UpdatedMap t k) Source | |

Reflex t => Functor (UpdatedMap t k) Source |

Data type for an initial value which is updated, mainly useful for it's Functor instance

split :: Functor f => f (a, b) -> (f a, f b) Source

Generalized unzip - probably not the best place for this!

holdDyn' :: (Reflex t, MonadHold t m, MonadFix m) => Updated t a -> m (Dynamic t a) Source

Hold an `Updated`

as a Dynamic by replacing the initial value with updates

hold' :: (Reflex t, MonadHold t m, MonadFix m) => Updated t a -> m (Behavior t a) Source

Hold an `Updated`

as a Behavior by replacing the initial value with updates

holdMapDyn :: (Reflex t, MonadHold t m, MonadFix m, Ord k) => UpdatedMap t k a -> m (Dynamic t (Map k a)) Source

Turn an UpdatedMap into a Dynamic by applying the differences to the initial value

holdMap :: (Reflex t, MonadHold t m, MonadFix m, Ord k) => UpdatedMap t k a -> m (Behavior t (Map k a)) Source

Hold an UpdatedMap as a behavior by applying differences to the initial value