Safe Haskell | None |
---|---|
Language | Haskell98 |
Data.Increments.Containers
Description
Incremental
instances for containers, and useful functions for defining
new instances.
- type MapLikeIncrement k a = ([AddItem k a], [RemItem k], [ModItem k a])
- type SetLikeIncrement a = ([AddItem () a], [RemItem a])
- changesSetLike :: (c -> [a]) -> (c -> c -> c) -> c -> c -> SetLikeIncrement a
- applySetLike :: (a -> c -> c) -> (a -> c -> c) -> c -> SetLikeIncrement a -> c
- changesMapLike :: (Ord k, IncrementalCnstr a) => (c -> [(k, a)]) -> c -> c -> MapLikeIncrement k a
- applyMapLike :: Incremental a => (k -> a -> c -> c) -> (k -> c -> c) -> (k -> Increment a -> c -> c) -> c -> MapLikeIncrement k a -> c
Documentation
type MapLikeIncrement k a = ([AddItem k a], [RemItem k], [ModItem k a]) Source
The Increment
of a map-like (key-value) container.
type SetLikeIncrement a = ([AddItem () a], [RemItem a]) Source
The Increment
of a set.
changesSetLike :: (c -> [a]) -> (c -> c -> c) -> c -> c -> SetLikeIncrement a Source
a generic changes
function, useful for defining instances for sets.
applySetLike :: (a -> c -> c) -> (a -> c -> c) -> c -> SetLikeIncrement a -> c Source
a generic applyChanges
function, useful for defining instances for sets.
changesMapLike :: (Ord k, IncrementalCnstr a) => (c -> [(k, a)]) -> c -> c -> MapLikeIncrement k a Source
a generic changes
function, useful for defining instances for maps.
applyMapLike :: Incremental a => (k -> a -> c -> c) -> (k -> c -> c) -> (k -> Increment a -> c -> c) -> c -> MapLikeIncrement k a -> c Source
a generic applyChanges
function, useful for defining instances for maps.