Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PatchDMap k v = PatchDMap {
- unPatchDMap :: DMap k (ComposeMaybe v)
- mapPatchDMap :: (forall a. v a -> v' a) -> PatchDMap k v -> PatchDMap k v'
- traversePatchDMap :: Applicative f => (forall a. v a -> f (v' a)) -> PatchDMap k v -> f (PatchDMap k v')
- traversePatchDMapWithKey :: Applicative m => (forall a. k a -> v a -> m (v' a)) -> PatchDMap k v -> m (PatchDMap k v')
- weakenPatchDMapWith :: (forall a. v a -> v') -> PatchDMap k v -> PatchMap (Some k) v'
- patchDMapToPatchMapWith :: (v a -> v') -> PatchDMap (Const2 k a) v -> PatchMap k v'
- const2PatchDMapWith :: forall k v v' a. (v -> v' a) -> PatchMap k v -> PatchDMap (Const2 k a) v'
- const2IntPatchDMapWith :: forall v f a. (v -> f a) -> PatchIntMap v -> PatchDMap (Const2 Key a) f
- getDeletions :: GCompare k => PatchDMap k v -> DMap k v' -> DMap k v'
Documentation
newtype PatchDMap k v Source #
A set of changes to a DMap
. Any element may be inserted/updated or deleted.
Insertions are represented as
,
while deletions are represented as ComposeMaybe
(Just value)
.ComposeMaybe
Nothing
PatchDMap | |
|
Instances
GCompare k2 => Semigroup (PatchDMap k2 v) Source # | |
GCompare k2 => Monoid (PatchDMap k2 v) Source # | |
GCompare k2 => DecidablyEmpty (PatchDMap k2 v) Source # | |
GCompare k2 => Patch (PatchDMap k2 v) Source # | Apply the insertions or deletions to a given |
Defined in Data.Patch.DMap type PatchTarget (PatchDMap k2 v) :: Type Source # apply :: PatchDMap k2 v -> PatchTarget (PatchDMap k2 v) -> Maybe (PatchTarget (PatchDMap k2 v)) Source # | |
type PatchTarget (PatchDMap k2 v) Source # | |
Defined in Data.Patch.DMap |
mapPatchDMap :: (forall a. v a -> v' a) -> PatchDMap k v -> PatchDMap k v' Source #
traversePatchDMap :: Applicative f => (forall a. v a -> f (v' a)) -> PatchDMap k v -> f (PatchDMap k v') Source #
traversePatchDMapWithKey :: Applicative m => (forall a. k a -> v a -> m (v' a)) -> PatchDMap k v -> m (PatchDMap k v') Source #
const2PatchDMapWith :: forall k v v' a. (v -> v' a) -> PatchMap k v -> PatchDMap (Const2 k a) v' Source #
const2IntPatchDMapWith :: forall v f a. (v -> f a) -> PatchIntMap v -> PatchDMap (Const2 Key a) f Source #
Convert a
into a PatchIntMap
v
using a function PatchDMap
(Const2
Int a) v'v -> v' a
.