Map-0.1.3.2: Class of key-value maps

Data.Map.Class

Description

Class of key-value maps

See StaticMap and Map.

Synopsis

Documentation

class Traversable map => StaticMap map where Source #

Class of key-value maps

Laws:

• adjustA pure _ = pure
• adjustA Const k <=< traverseWithKey f = fmap Const . f k <=< getConst . adjustA Const k

Associated Types

type Key map Source #

Methods

adjustA :: Applicative p => (a -> p a) -> Key map -> map a -> p (map a) Source #

Modify the value of the key in the map. If the key is absent, the map is returned unmodified.

traverseWithKey :: Applicative p => (Key map -> a -> p b) -> map a -> p (map b) Source #

Traverse a function over each value in the map.

Instances

Instances details
 Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key Maybe Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key Maybe -> Maybe a -> p (Maybe a) Source #traverseWithKey :: Applicative p => (Key Maybe -> a -> p b) -> Maybe a -> p (Maybe b) Source # Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key IntMap Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key IntMap -> IntMap a -> p (IntMap a) Source #traverseWithKey :: Applicative p => (Key IntMap -> a -> p b) -> IntMap a -> p (IntMap b) Source # Ord key => StaticMap (Map key) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Map key) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Map key) -> Map key a -> p (Map key a) Source #traverseWithKey :: Applicative p => (Key (Map key) -> a -> p b) -> Map key a -> p (Map key b) Source # StaticMap map => StaticMap (SymmetricDifference map) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (SymmetricDifference map) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (SymmetricDifference map) -> SymmetricDifference map a -> p (SymmetricDifference map a) Source #traverseWithKey :: Applicative p => (Key (SymmetricDifference map) -> a -> p b) -> SymmetricDifference map a -> p (SymmetricDifference map b) Source # StaticMap map => StaticMap (Intersection map) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Intersection map) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Intersection map) -> Intersection map a -> p (Intersection map a) Source #traverseWithKey :: Applicative p => (Key (Intersection map) -> a -> p b) -> Intersection map a -> p (Intersection map b) Source # StaticMap map => StaticMap (Union map) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Union map) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Union map) -> Union map a -> p (Union map a) Source #traverseWithKey :: Applicative p => (Key (Union map) -> a -> p b) -> Union map a -> p (Union map b) Source # (StaticMap m, StaticMap n) => StaticMap (Product m n) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Product m n) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Product m n) -> Product m n a -> p (Product m n a) Source #traverseWithKey :: Applicative p => (Key (Product m n) -> a -> p b) -> Product m n a -> p (Product m n b) Source # (StaticMap m, StaticMap n) => StaticMap (Compose m n) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Compose m n) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Compose m n) -> Compose m n a -> p (Compose m n a) Source #traverseWithKey :: Applicative p => (Key (Compose m n) -> a -> p b) -> Compose m n a -> p (Compose m n b) Source #

class (Filtrable map, StaticMap map) => Map map where Source #

Class of key-value maps with variable structure

Minimal complete definition

Methods

empty :: map a Source #

The empty map

alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key map -> map a -> f (map a) Source #

Modify the value of the key in the map, or insert the key and its value into the map, or delete the key and its value from the map, functorially.

fmap (!? k) . alterF f k = f . (!? k)

This is the most general operation on a given key in the map.

mergeA :: Applicative p => (Key map -> Either' a b -> p (Maybe c)) -> map a -> map b -> p (map c) Source #

Combine two maps with the given function, which is called once for each key present in either map, inclusive.

mapMaybeWithKeyA :: Applicative p => (Key map -> a -> p (Maybe b)) -> map a -> p (map b) Source #

Traverse a function over each value in the map, gathering the Just values and forgetting the Nothing.

mapEitherWithKeyA :: Applicative p => (Key map -> a -> p (Either b c)) -> map a -> p (map b, map c) Source #

Traverse a function over each value in the map, gathering the Left and Right values separately.

Instances

Instances details
 Source # Instance detailsDefined in Data.Map.Class MethodsalterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key Maybe -> Maybe a -> f (Maybe a) Source #mergeA :: Applicative p => (Key Maybe -> Either' a b -> p (Maybe c)) -> Maybe a -> Maybe b -> p (Maybe c) Source #mapMaybeWithKeyA :: Applicative p => (Key Maybe -> a -> p (Maybe b)) -> Maybe a -> p (Maybe b) Source #mapEitherWithKeyA :: Applicative p => (Key Maybe -> a -> p (Either b c)) -> Maybe a -> p (Maybe b, Maybe c) Source # Source # Instance detailsDefined in Data.Map.Class MethodsalterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key IntMap -> IntMap a -> f (IntMap a) Source #mergeA :: Applicative p => (Key IntMap -> Either' a b -> p (Maybe c)) -> IntMap a -> IntMap b -> p (IntMap c) Source #mapMaybeWithKeyA :: Applicative p => (Key IntMap -> a -> p (Maybe b)) -> IntMap a -> p (IntMap b) Source #mapEitherWithKeyA :: Applicative p => (Key IntMap -> a -> p (Either b c)) -> IntMap a -> p (IntMap b, IntMap c) Source # Ord key => Map (Map key) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Map key a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Map key) -> Map key a -> f (Map key a) Source #mergeA :: Applicative p => (Key (Map key) -> Either' a b -> p (Maybe c)) -> Map key a -> Map key b -> p (Map key c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Map key) -> a -> p (Maybe b)) -> Map key a -> p (Map key b) Source #mapEitherWithKeyA :: Applicative p => (Key (Map key) -> a -> p (Either b c)) -> Map key a -> p (Map key b, Map key c) Source # Map map => Map (SymmetricDifference map) Source # Instance detailsDefined in Data.Map.Class MethodsalterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (SymmetricDifference map) -> SymmetricDifference map a -> f (SymmetricDifference map a) Source #mergeA :: Applicative p => (Key (SymmetricDifference map) -> Either' a b -> p (Maybe c)) -> SymmetricDifference map a -> SymmetricDifference map b -> p (SymmetricDifference map c) Source #mapMaybeWithKeyA :: Applicative p => (Key (SymmetricDifference map) -> a -> p (Maybe b)) -> SymmetricDifference map a -> p (SymmetricDifference map b) Source #mapEitherWithKeyA :: Applicative p => (Key (SymmetricDifference map) -> a -> p (Either b c)) -> SymmetricDifference map a -> p (SymmetricDifference map b, SymmetricDifference map c) Source # Map map => Map (Intersection map) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Intersection map a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Intersection map) -> Intersection map a -> f (Intersection map a) Source #mergeA :: Applicative p => (Key (Intersection map) -> Either' a b -> p (Maybe c)) -> Intersection map a -> Intersection map b -> p (Intersection map c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Intersection map) -> a -> p (Maybe b)) -> Intersection map a -> p (Intersection map b) Source #mapEitherWithKeyA :: Applicative p => (Key (Intersection map) -> a -> p (Either b c)) -> Intersection map a -> p (Intersection map b, Intersection map c) Source # Map map => Map (Union map) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Union map a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Union map) -> Union map a -> f (Union map a) Source #mergeA :: Applicative p => (Key (Union map) -> Either' a b -> p (Maybe c)) -> Union map a -> Union map b -> p (Union map c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Union map) -> a -> p (Maybe b)) -> Union map a -> p (Union map b) Source #mapEitherWithKeyA :: Applicative p => (Key (Union map) -> a -> p (Either b c)) -> Union map a -> p (Union map b, Union map c) Source # (Map m, Map n) => Map (Product m n) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Product m n a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Product m n) -> Product m n a -> f (Product m n a) Source #mergeA :: Applicative p => (Key (Product m n) -> Either' a b -> p (Maybe c)) -> Product m n a -> Product m n b -> p (Product m n c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Product m n) -> a -> p (Maybe b)) -> Product m n a -> p (Product m n b) Source #mapEitherWithKeyA :: Applicative p => (Key (Product m n) -> a -> p (Either b c)) -> Product m n a -> p (Product m n b, Product m n c) Source # (Map m, Map n) => Map (Compose m n) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Compose m n a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Compose m n) -> Compose m n a -> f (Compose m n a) Source #mergeA :: Applicative p => (Key (Compose m n) -> Either' a b -> p (Maybe c)) -> Compose m n a -> Compose m n b -> p (Compose m n c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Compose m n) -> a -> p (Maybe b)) -> Compose m n a -> p (Compose m n b) Source #mapEitherWithKeyA :: Applicative p => (Key (Compose m n) -> a -> p (Either b c)) -> Compose m n a -> p (Compose m n b, Compose m n c) Source #

defaultAdjustA :: (Map map, Applicative p) => (a -> p a) -> Key map -> map a -> p (map a) Source #

Default implementation of adjustA in terms of Map methods

defaultTraverseWithKey :: (Map map, Applicative p) => (Key map -> a -> p b) -> map a -> p (map b) Source #

Default implementation of traverseWithKey in terms of Map methods

(!?) :: StaticMap map => map a -> Key map -> Maybe a infix 9 Source #

Look up the key in the map.

insert :: Map map => Key map -> a -> map a -> map a Source #

Insert a key and new value into the map, the new value clobbering the old if the key is already present. insert = insertWith pure

insertWith :: Map map => (a -> a -> a) -> Key map -> a -> map a -> map a Source #

Insert a key and new value into the map, combining the old and new values with the given function if the key is already present.

insertLookup :: Map map => Key map -> a -> map a -> (Maybe a, map a) Source #

Insert a key and new value into the map, looking up the old value if the key is already present.

insertLookupWith :: Map map => (a -> a -> a) -> Key map -> a -> map a -> (Maybe a, map a) Source #

Insert a key and new value into the map, looking up the old value and combining the old and new values with the given function if the key is already present.

delete :: Map map => Key map -> map a -> map a Source #

Delete a key and its value from the map. If the key is absent, the map is returned unmodified.

adjust :: StaticMap map => (a -> a) -> Key map -> map a -> map a Source #

Modify the value of the key in the map. If the key is absent, the map is returned unmodified.

update :: Map map => (a -> Maybe a) -> Key map -> map a -> map a Source #

Modify the value of the key in the map, or delete the key and its value from the map, if the given function returns Just or Nothing, in turn. If the key is absent, the map is returned unmodified.

updateLookup :: Map map => (a -> Maybe a) -> Key map -> map a -> (Maybe a, map a) Source #

Modify the value of the key in the map, or delete the key and its value from the map, if the given function returns Just or Nothing, in turn, looking up the old value if the key is already present. If the key is absent, the map is returned unmodified.

alter :: Map map => (Maybe a -> Maybe a) -> Key map -> map a -> map a Source #

Modify the value of the key in the map, or insert the key and its value into the map, or delete the key and its value from the map.

alterLookup :: Map map => (Maybe a -> Maybe a) -> Key map -> map a -> (Maybe a, map a) Source #

Modify the value of the key in the map, or insert the key and its value into the map, or delete the key and its value from the map, looking up the old value if the key is already present.

alterLookupF :: (Map map, Functor f) => (Maybe a -> f (Maybe a)) -> Key map -> map a -> f (Maybe a, map a) Source #

Modify the value of the key in the map, or insert the key and its value into the map, or delete the key and its value from the map, looking up the old value if the key is already present, functorially.

This is no more general than alterF, but is defined for convenience.

mapWithKey :: StaticMap map => (Key map -> a -> b) -> map a -> map b Source #

Map a function over each value in the map.

mapMaybeWithKey :: Map map => (Key map -> a -> Maybe b) -> map a -> map b Source #

Map a function over each value in the map, gathering the Just values and forgetting the Nothing.

mapEitherWithKey :: Map map => (Key map -> a -> Either b c) -> map a -> (map b, map c) Source #

Map a function over each value in the map, gathering the Left and Right separately.

foldMapWithKeyA :: (StaticMap map, Applicative p, Monoid b) => (Key map -> a -> p b) -> map a -> p b Source #

foldrWithKeyM :: (StaticMap map, Monad m) => (Key map -> a -> b -> m b) -> b -> map a -> m b Source #

foldlWithKeyM :: (StaticMap map, Monad m) => (b -> Key map -> a -> m b) -> b -> map a -> m b Source #

foldMapWithKey :: (StaticMap map, Monoid b) => (Key map -> a -> b) -> map a -> b Source #

foldrWithKey :: StaticMap map => (Key map -> a -> b -> b) -> b -> map a -> b Source #

foldlWithKey :: StaticMap map => (b -> Key map -> a -> b) -> b -> map a -> b Source #

fromList :: Map map => [(Key map, a)] -> map a Source #

fromListWith :: Map map => (a -> a -> a) -> [(Key map, a)] -> map a Source #

fromListWithKey :: Map map => (Key map -> a -> a -> a) -> [(Key map, a)] -> map a Source #

fromListWithM :: (Map map, Monad m) => (a -> a -> m a) -> [(Key map, a)] -> m (map a) Source #

fromListWithKeyM :: (Map map, Monad m) => (Key map -> a -> a -> m a) -> [(Key map, a)] -> m (map a) Source #

adjustLookupA :: (StaticMap map, Applicative p) => (a -> p a) -> Key map -> map a -> p (Maybe a, map a) Source #

Modify the value of the key in the map, looking up the old value if the key is already present. If the key is absent, the map is returned unmodified.

singleton :: Map map => Key map -> a -> map a Source #

Map with a single element

unionWith :: Map map => (Key map -> a -> a -> a) -> map a -> map a -> map a Source #

Union of two maps, combining values of the same key with the given function

intersectionWith :: Map map => (Key map -> a -> b -> c) -> map a -> map b -> map c Source #

Intersection of two maps, combining values of the same key with the given function

merge :: Map map => (Key map -> Either' a b -> Maybe c) -> map a -> map b -> map c Source #

Combine two maps with the given function, which is called once for each key present in either map, inclusive.

unionWithA :: (Map map, Applicative p) => (Key map -> a -> a -> p a) -> map a -> map a -> p (map a) Source #

Union of two maps, combining values of the same key with the given function

intersectionWithA :: (Map map, Applicative p) => (Key map -> a -> b -> p c) -> map a -> map b -> p (map c) Source #

Intersection of two maps, combining values of the same key with the given function

difference :: Map map => map a -> map b -> map a Source #

Difference of two maps, which contains exactly the keys present in the first map but absent in the second

symmetricDifference :: Map map => map a -> map a -> map a Source #

Symmetric difference of two maps, which contains exactly the keys present in the either map but absent in the other

mapKeys :: (StaticMap m, Map n) => (Key m -> Key n) -> m a -> n a Source #

Map a function over each key in the map.

mapKeysWith :: (StaticMap m, Map n) => (a -> a -> a) -> (Key m -> Key n) -> m a -> n a Source #

Map a function over each key in the map, combining values of keys which collide with the given function.

traverseKeys :: (StaticMap m, Map n, Applicative p) => (Key m -> p (Key n)) -> m a -> p (n a) Source #

Traverse a function over each key in the map.

traverseKeysWith :: (StaticMap m, Map n, Applicative p) => (a -> a -> a) -> (Key m -> p (Key n)) -> m a -> p (n a) Source #

Traverse a function over each key in the map, combining values of keys which collide with the given function.

mapKeysMaybe :: (StaticMap m, Map n) => (Key m -> Maybe (Key n)) -> m a -> n a Source #

Map a function over each key in the map, gathering the Just values and forgetting the Nothing.

mapKeysMaybeWith :: (StaticMap m, Map n) => (a -> a -> a) -> (Key m -> Maybe (Key n)) -> m a -> n a Source #

Map a function over each key in the map, gathering the Just values and forgetting the Nothing, combining values of keys which collide with the given function.

traverseKeysMaybe :: (StaticMap m, Map n, Applicative p) => (Key m -> p (Maybe (Key n))) -> m a -> p (n a) Source #

Traverse a function over each key in the map, gathering the Just values and forgetting the Nothing.

traverseKeysMaybeWith :: (StaticMap m, Map n, Applicative p) => (a -> a -> a) -> (Key m -> p (Maybe (Key n))) -> m a -> p (n a) Source #

Traverse a function over each key in the map, gathering the Just values and forgetting the Nothing, combining values of keys which collide with the given function.

keys :: StaticMap map => map a -> map (Key map) Source #

Keys of the map

keys as !? k = k <$ (as !? k) newtype Union map a Source # Wrapper of a Map whose semigroup operation is the union, combining values elementwise, and ergo whose monoidal unit is empty Constructors  Union FieldsunUnion :: map a Instances Instances details  Functor map => Functor (Union map) Source # Instance detailsDefined in Data.Map.Class Methodsfmap :: (a -> b) -> Union map a -> Union map b #(<$) :: a -> Union map b -> Union map a # Foldable map => Foldable (Union map) Source # Instance detailsDefined in Data.Map.Class Methodsfold :: Monoid m => Union map m -> m #foldMap :: Monoid m => (a -> m) -> Union map a -> m #foldMap' :: Monoid m => (a -> m) -> Union map a -> m #foldr :: (a -> b -> b) -> b -> Union map a -> b #foldr' :: (a -> b -> b) -> b -> Union map a -> b #foldl :: (b -> a -> b) -> b -> Union map a -> b #foldl' :: (b -> a -> b) -> b -> Union map a -> b #foldr1 :: (a -> a -> a) -> Union map a -> a #foldl1 :: (a -> a -> a) -> Union map a -> a #toList :: Union map a -> [a] #null :: Union map a -> Bool #length :: Union map a -> Int #elem :: Eq a => a -> Union map a -> Bool #maximum :: Ord a => Union map a -> a #minimum :: Ord a => Union map a -> a #sum :: Num a => Union map a -> a #product :: Num a => Union map a -> a # Traversable map => Traversable (Union map) Source # Instance detailsDefined in Data.Map.Class Methodstraverse :: Applicative f => (a -> f b) -> Union map a -> f (Union map b) #sequenceA :: Applicative f => Union map (f a) -> f (Union map a) #mapM :: Monad m => (a -> m b) -> Union map a -> m (Union map b) #sequence :: Monad m => Union map (m a) -> m (Union map a) # Eq1 map => Eq1 (Union map) Source # Instance detailsDefined in Data.Map.Class MethodsliftEq :: (a -> b -> Bool) -> Union map a -> Union map b -> Bool # Ord1 map => Ord1 (Union map) Source # Instance detailsDefined in Data.Map.Class MethodsliftCompare :: (a -> b -> Ordering) -> Union map a -> Union map b -> Ordering # Read1 map => Read1 (Union map) Source # Instance detailsDefined in Data.Map.Class MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Union map a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Union map a] #liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Union map a) #liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Union map a] # Show1 map => Show1 (Union map) Source # Instance detailsDefined in Data.Map.Class MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Union map a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Union map a] -> ShowS # Filtrable map => Filtrable (Union map) Source # Instance detailsDefined in Data.Map.Class MethodsmapMaybe :: (a -> Maybe b) -> Union map a -> Union map b #catMaybes :: Union map (Maybe a) -> Union map a #filter :: (a -> Bool) -> Union map a -> Union map a #mapMaybeA :: (Traversable (Union map), Applicative p) => (a -> p (Maybe b)) -> Union map a -> p (Union map b) #filterA :: (Traversable (Union map), Applicative p) => (a -> p Bool) -> Union map a -> p (Union map a) #mapEither :: (a -> Either b c) -> Union map a -> (Union map b, Union map c) #mapEitherA :: (Traversable (Union map), Applicative p) => (a -> p (Either b c)) -> Union map a -> p (Union map b, Union map c) #partitionEithers :: Union map (Either a b) -> (Union map a, Union map b) # Map map => Map (Union map) Source # Instance detailsDefined in Data.Map.Class Methodsempty :: Union map a Source #alterF :: Functor f => (Maybe a -> f (Maybe a)) -> Key (Union map) -> Union map a -> f (Union map a) Source #mergeA :: Applicative p => (Key (Union map) -> Either' a b -> p (Maybe c)) -> Union map a -> Union map b -> p (Union map c) Source #mapMaybeWithKeyA :: Applicative p => (Key (Union map) -> a -> p (Maybe b)) -> Union map a -> p (Union map b) Source #mapEitherWithKeyA :: Applicative p => (Key (Union map) -> a -> p (Either b c)) -> Union map a -> p (Union map b, Union map c) Source # StaticMap map => StaticMap (Union map) Source # Instance detailsDefined in Data.Map.Class Associated Typestype Key (Union map) Source # MethodsadjustA :: Applicative p => (a -> p a) -> Key (Union map) -> Union map a -> p (Union map a) Source #traverseWithKey :: Applicative p => (Key (Union map) -> a -> p b) -> Union map a -> p (Union map b) Source # Eq (map a) => Eq (Union map a) Source # Instance detailsDefined in Data.Map.Class Methods(==) :: Union map a -> Union map a -> Bool #(/=) :: Union map a -> Union map a -> Bool # Ord (map a) => Ord (Union map a) Source # Instance detailsDefined in Data.Map.Class Methodscompare :: Union map a -> Union map a -> Ordering #(<) :: Union map a -> Union map a -> Bool #(<=) :: Union map a -> Union map a -> Bool #(>) :: Union map a -> Union map a -> Bool #(>=) :: Union map a -> Union map a -> Bool #max :: Union map a -> Union map a -> Union map a #min :: Union map a -> Union map a -> Union map a # Read (map a) => Read (Union map a) Source # Instance detailsDefined in Data.Map.Class MethodsreadsPrec :: Int -> ReadS (Union map a) #readList :: ReadS [Union map a] #readPrec :: ReadPrec (Union map a) #readListPrec :: ReadPrec [Union map a] # Show (map a) => Show (Union map a) Source # Instance detailsDefined in Data.Map.Class MethodsshowsPrec :: Int -> Union map a -> ShowS #show :: Union map a -> String #showList :: [Union map a] -> ShowS # (Map map, Semigroup a) => Semigroup (Union map a) Source # Instance detailsDefined in Data.Map.Class Methods(<>) :: Union map a -> Union map a -> Union map a #sconcat :: NonEmpty (Union map a) -> Union map a #stimes :: Integral b => b -> Union map a -> Union map a # (Map map, Semigroup a) => Monoid (Union map a) Source # Instance detailsDefined in Data.Map.Class Methodsmempty :: Union map a #mappend :: Union map a -> Union map a -> Union map a #mconcat :: [Union map a] -> Union map a # type Key (Union map) Source # Instance detailsDefined in Data.Map.Class type Key (Union map) = Key map

newtype Intersection map a Source #

Wrapper of a Map whose semigroup operation is the intersection, combining values elementwise

Constructors

 Intersection FieldsunIntersection :: map a

Instances

Instances details

Orphan instances

 Source # Instance details MethodsmapMaybe :: (a -> Maybe b) -> IntMap a -> IntMap b #catMaybes :: IntMap (Maybe a) -> IntMap a #filter :: (a -> Bool) -> IntMap a -> IntMap a #mapMaybeA :: (Traversable IntMap, Applicative p) => (a -> p (Maybe b)) -> IntMap a -> p (IntMap b) #filterA :: (Traversable IntMap, Applicative p) => (a -> p Bool) -> IntMap a -> p (IntMap a) #mapEither :: (a -> Either b c) -> IntMap a -> (IntMap b, IntMap c) #mapEitherA :: (Traversable IntMap, Applicative p) => (a -> p (Either b c)) -> IntMap a -> p (IntMap b, IntMap c) #partitionEithers :: IntMap (Either a b) -> (IntMap a, IntMap b) # Filtrable (Map key) Source # Instance details MethodsmapMaybe :: (a -> Maybe b) -> Map key a -> Map key b #catMaybes :: Map key (Maybe a) -> Map key a #filter :: (a -> Bool) -> Map key a -> Map key a #mapMaybeA :: (Traversable (Map key), Applicative p) => (a -> p (Maybe b)) -> Map key a -> p (Map key b) #filterA :: (Traversable (Map key), Applicative p) => (a -> p Bool) -> Map key a -> p (Map key a) #mapEither :: (a -> Either b c) -> Map key a -> (Map key b, Map key c) #mapEitherA :: (Traversable (Map key), Applicative p) => (a -> p (Either b c)) -> Map key a -> p (Map key b, Map key c) #partitionEithers :: Map key (Either a b) -> (Map key a, Map key b) #