| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Reflex.Patch.IntMap
Description
Module containing PatchIntMap, a Patch for IntMap which allows for insert/update or delete of associations.
Synopsis
- newtype PatchIntMap a = PatchIntMap (IntMap (Maybe a))
- mapIntMapPatchWithKey :: (Int -> a -> b) -> PatchIntMap a -> PatchIntMap b
- traverseIntMapPatchWithKey :: Applicative f => (Int -> a -> f b) -> PatchIntMap a -> f (PatchIntMap b)
- patchIntMapNewElements :: PatchIntMap a -> [a]
- patchIntMapNewElementsMap :: PatchIntMap a -> IntMap a
- getDeletions :: PatchIntMap v -> IntMap v' -> IntMap v'
Documentation
newtype PatchIntMap a Source #
Patch for IntMap which represents insertion or deletion of keys in the mapping. Internally represented by 'IntMap (Maybe a)', where Just means insert/update and Nothing means delete.
Constructors
| PatchIntMap (IntMap (Maybe a)) |
Instances
mapIntMapPatchWithKey :: (Int -> a -> b) -> PatchIntMap a -> PatchIntMap b Source #
Map a function Int -> a -> b over all as in the given (that is, all inserts/updates), producing a PatchIntMap aPatchIntMap b.
traverseIntMapPatchWithKey :: Applicative f => (Int -> a -> f b) -> PatchIntMap a -> f (PatchIntMap b) Source #
Map an effectful function Int -> a -> f b over all as in the given (that is, all inserts/updates), producing a PatchIntMap af (PatchIntMap b).
patchIntMapNewElements :: PatchIntMap a -> [a] Source #
Extract all as inserted/updated by the given .PatchIntMap a
patchIntMapNewElementsMap :: PatchIntMap a -> IntMap a Source #
Convert the given into an PatchIntMap a with all the inserts/updates in the given patch.IntMap a
getDeletions :: PatchIntMap v -> IntMap v' -> IntMap v' Source #
Subset the given to contain only the keys that would be deleted by the given IntMap a.PatchIntMap a