rio-0.1.22.0: A standard library for Haskell

Safe Haskell | Safe-Inferred
Language | Haskell2010

RIO.Map

Contents

- Map type
- Operators
- Query
- Construction
  - Insertion
  - Delete/Update
- Combine
  - Union
  - Difference
  - Intersection
  - General combining functions
  - Deprecated general combining function
- Traversal
  - Map
- Folds
  - Strict folds
- Conversion
  - Lists
  - Ordered lists
- Filter
- Submap
- Indexed
- Min/Max
- Debugging

Description

Strict `Map`. Import as:

    import qualified RIO.Map as Map

This module does not export any partial or unchecked functions. For those, see RIO.Map.Partial and RIO.Map.Unchecked

Synopsis

- data Map k a
- (!?) :: Ord k => Map k a -> k -> Maybe a
- (\\) :: Ord k => Map k a -> Map k b -> Map k a
- null :: Map k a -> Bool
- size :: Map k a -> Int
- member :: Ord k => k -> Map k a -> Bool
- notMember :: Ord k => k -> Map k a -> Bool
- lookup :: Ord k => k -> Map k a -> Maybe a
- findWithDefault :: Ord k => a -> k -> Map k a -> a
- lookupLT :: Ord k => k -> Map k v -> Maybe (k, v)
- lookupGT :: Ord k => k -> Map k v -> Maybe (k, v)
- lookupLE :: Ord k => k -> Map k v -> Maybe (k, v)
- lookupGE :: Ord k => k -> Map k v -> Maybe (k, v)
- empty :: Map k a
- singleton :: k -> a -> Map k a
- insert :: Ord k => k -> a -> Map k a -> Map k a
- insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k a
- insertWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> Map k a
- insertLookupWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> (Maybe a, Map k a)
- delete :: Ord k => k -> Map k a -> Map k a
- adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a
- adjustWithKey :: Ord k => (k -> a -> a) -> k -> Map k a -> Map k a
- update :: Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a
- updateWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
- updateLookupWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a)
- alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a
- alterF :: (Functor f, Ord k) => (Maybe a -> f (Maybe a)) -> k -> Map k a -> f (Map k a)
- union :: Ord k => Map k a -> Map k a -> Map k a
- unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
- unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
- unions :: (Foldable f, Ord k) => f (Map k a) -> Map k a
- unionsWith :: (Foldable f, Ord k) => (a -> a -> a) -> f (Map k a) -> Map k a
- difference :: Ord k => Map k a -> Map k b -> Map k a
- differenceWith :: Ord k => (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
- differenceWithKey :: Ord k => (k -> a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
- intersection :: Ord k => Map k a -> Map k b -> Map k a
- intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
- intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c
- mergeWithKey :: Ord k => (k -> a -> b -> Maybe c) -> (Map k a -> Map k c) -> (Map k b -> Map k c) -> Map k a -> Map k b -> Map k c
- map :: (a -> b) -> Map k a -> Map k b
- mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
- traverseWithKey :: Applicative t => (k -> a -> t b) -> Map k a -> t (Map k b)
- traverseMaybeWithKey :: Applicative f => (k -> a -> f (Maybe b)) -> Map k a -> f (Map k b)
- mapAccum :: (a -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
- mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
- mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
- mapKeys :: Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a
- mapKeysWith :: Ord k2 => (a -> a -> a) -> (k1 -> k2) -> Map k1 a -> Map k2 a
- foldr :: (a -> b -> b) -> b -> Map k a -> b
- foldl :: (a -> b -> a) -> a -> Map k b -> a
- foldrWithKey :: (k -> a -> b -> b) -> b -> Map k a -> b
- foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> a
- foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> m
- foldr' :: (a -> b -> b) -> b -> Map k a -> b
- foldl' :: (a -> b -> a) -> a -> Map k b -> a
- foldrWithKey' :: (k -> a -> b -> b) -> b -> Map k a -> b
- foldlWithKey' :: (a -> k -> b -> a) -> a -> Map k b -> a
- elems :: Map k a -> [a]
- keys :: Map k a -> [k]
- assocs :: Map k a -> [(k, a)]
- keysSet :: Map k a -> Set k
- fromSet :: (k -> a) -> Set k -> Map k a
- toList :: Map k a -> [(k, a)]
- fromList :: Ord k => [(k, a)] -> Map k a
- fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a
- fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
- toAscList :: Map k a -> [(k, a)]
- toDescList :: Map k a -> [(k, a)]
- filter :: (a -> Bool) -> Map k a -> Map k a
- filterWithKey :: (k -> a -> Bool) -> Map k a -> Map k a
- restrictKeys :: Ord k => Map k a -> Set k -> Map k a
- withoutKeys :: Ord k => Map k a -> Set k -> Map k a
- partition :: (a -> Bool) -> Map k a -> (Map k a, Map k a)
- partitionWithKey :: (k -> a -> Bool) -> Map k a -> (Map k a, Map k a)
- takeWhileAntitone :: (k -> Bool) -> Map k a -> Map k a
- dropWhileAntitone :: (k -> Bool) -> Map k a -> Map k a
- spanAntitone :: (k -> Bool) -> Map k a -> (Map k a, Map k a)
- mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b
- mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b
- mapEither :: (a -> Either b c) -> Map k a -> (Map k b, Map k c)
- mapEitherWithKey :: (k -> a -> Either b c) -> Map k a -> (Map k b, Map k c)
- split :: Ord k => k -> Map k a -> (Map k a, Map k a)
- splitLookup :: Ord k => k -> Map k a -> (Map k a, Maybe a, Map k a)
- splitRoot :: Map k b -> [Map k b]
- isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
- isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
- isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
- isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
- lookupIndex :: Ord k => k -> Map k a -> Maybe Int
- elemAt :: Int -> Map k a -> (k, a)
- deleteAt :: Int -> Map k a -> Map k a
- take :: Int -> Map k a -> Map k a
- drop :: Int -> Map k a -> Map k a
- splitAt :: Int -> Map k a -> (Map k a, Map k a)
- lookupMin :: Map k a -> Maybe (k, a)
- lookupMax :: Map k a -> Maybe (k, a)
- deleteMin :: Map k a -> Map k a
- deleteMax :: Map k a -> Map k a
- updateMin :: (a -> Maybe a) -> Map k a -> Map k a
- updateMax :: (a -> Maybe a) -> Map k a -> Map k a
- updateMinWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
- updateMaxWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
- minView :: Map k a -> Maybe (a, Map k a)
- maxView :: Map k a -> Maybe (a, Map k a)
- minViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
- maxViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
- showTree :: Whoops "showTree has moved to Data.Map.Internal.Debug.showTree." => Map k a -> String
- showTreeWith :: Whoops "showTreeWith has moved to Data.Map.Internal.Debug.showTreeWith." => (k -> a -> String) -> Bool -> Bool -> Map k a -> String
- valid :: Ord k => Map k a -> Bool

# Map type

data Map k a #

#### Instances

Instances details

Bifoldable Map |
Instance details Defined in Data.Map.Internal Methods bifold :: Monoid m => Map m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c #
Eq2 Map |
Instance details Defined in Data.Map.Internal Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Map a c -> Map b d -> Bool
Ord2 Map |
Instance details Defined in Data.Map.Internal Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Map a c -> Map b d -> Ordering
Show2 Map |
Instance details Defined in Data.Map.Internal Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Map a b -> ShowS liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS
Hashable2 Map | Since: hashable-1.3.4.0
Instance details Defined in Data.Hashable.Class Methods liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Map a b -> Int #
(Lift k, Lift a) => Lift (Map k a :: Type) |
Instance details Defined in Data.Map.Internal Methods lift :: Quote m => Map k a -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => Map k a -> Code m (Map k a)
Foldable (Map k) |

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

Eq k => Eq1 (Map k) |
Instance details Defined in Data.Map.Internal Methods liftEq :: (a -> b -> Bool) -> Map k a -> Map k b -> Bool
Ord k => Ord1 (Map k) |
Instance details Defined in Data.Map.Internal Methods liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering
(Ord k, Read k) => Read1 (Map k) |
Instance details Defined in Data.Map.Internal Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a]
Show k => Show1 (Map k) |
Instance details Defined in Data.Map.Internal Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS
Traversable (Map k) |
Instance details Defined in Data.Map.Internal Methods traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) # sequenceA :: Applicative f => Map k (f a) -> f (Map k a) # mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) # sequence :: Monad m => Map k (m a) -> m (Map k a) #
Functor (Map k) |
Instance details Defined in Data.Map.Internal Methods fmap :: (a -> b) -> Map k a -> Map k b # (<$) :: a -> Map k b -> Map k a #
Hashable k => Hashable1 (Map k) | Since: hashable-1.3.4.0
Instance details Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> Map k a -> Int #
(Data k, Data a, Ord k) => Data (Map k a) |

Instance details

Defined in Data.Map.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) #

toConstr :: Map k a -> Constr #

dataTypeOf :: Map k a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

Ord k => Monoid (Map k v) |
Instance details Defined in Data.Map.Internal Methods mempty :: Map k v # mappend :: Map k v -> Map k v -> Map k v # mconcat :: [Map k v] -> Map k v #
Ord k => Semigroup (Map k v) |
Instance details Defined in Data.Map.Internal Methods (<>) :: Map k v -> Map k v -> Map k v # sconcat :: NonEmpty (Map k v) -> Map k v stimes :: Integral b => b -> Map k v -> Map k v
Ord k => IsList (Map k v) |
Instance details Defined in Data.Map.Internal Associated Types type Item (Map k v) Methods fromList :: [Item (Map k v)] -> Map k v fromListN :: Int -> [Item (Map k v)] -> Map k v toList :: Map k v -> [Item (Map k v)]
(Ord k, Read k, Read e) => Read (Map k e) |
Instance details Defined in Data.Map.Internal Methods readsPrec :: Int -> ReadS (Map k e) readList :: ReadS [Map k e] readPrec :: ReadPrec (Map k e) readListPrec :: ReadPrec [Map k e]
(Show k, Show a) => Show (Map k a) |
Instance details Defined in Data.Map.Internal Methods showsPrec :: Int -> Map k a -> ShowS show :: Map k a -> String # showList :: [Map k a] -> ShowS
(NFData k, NFData a) => NFData (Map k a) |
Instance details Defined in Data.Map.Internal Methods rnf :: Map k a -> () #
(Eq k, Eq a) => Eq (Map k a) |
Instance details Defined in Data.Map.Internal Methods (==) :: Map k a -> Map k a -> Bool # (/=) :: Map k a -> Map k a -> Bool #
(Ord k, Ord v) => Ord (Map k v) |
Instance details Defined in Data.Map.Internal Methods compare :: Map k v -> Map k v -> Ordering # (<) :: Map k v -> Map k v -> Bool # (<=) :: Map k v -> Map k v -> Bool # (>) :: Map k v -> Map k v -> Bool # (>=) :: Map k v -> Map k v -> Bool # max :: Map k v -> Map k v -> Map k v # min :: Map k v -> Map k v -> Map k v #
(Hashable k, Hashable v) => Hashable (Map k v) | Since: hashable-1.3.4.0
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Map k v -> Int # hash :: Map k v -> Int #
type Item (Map k v) |
Instance details Defined in Data.Map.Internal type Item (Map k v) = (k, v)

# Operators

(!?) :: Ord k => Map k a -> k -> Maybe a #

(\\) :: Ord k => Map k a -> Map k b -> Map k a #

# Query

null :: Map k a -> Bool #

size :: Map k a -> Int #

member :: Ord k => k -> Map k a -> Bool #

notMember :: Ord k => k -> Map k a -> Bool #

lookup :: Ord k => k -> Map k a -> Maybe a #

findWithDefault :: Ord k => a -> k -> Map k a -> a #

lookupLT :: Ord k => k -> Map k v -> Maybe (k, v) #

lookupGT :: Ord k => k -> Map k v -> Maybe (k, v) #

lookupLE :: Ord k => k -> Map k v -> Maybe (k, v) #

lookupGE :: Ord k => k -> Map k v -> Maybe (k, v) #

# Construction

empty :: Map k a #

singleton :: k -> a -> Map k a #

## Insertion

insert :: Ord k => k -> a -> Map k a -> Map k a #

insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k a #

insertWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> Map k a #

insertLookupWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> (Maybe a, Map k a) #

## Delete/Update

delete :: Ord k => k -> Map k a -> Map k a #

adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a #

adjustWithKey :: Ord k => (k -> a -> a) -> k -> Map k a -> Map k a #

update :: Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a #

updateWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a #

updateLookupWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a) #

alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a #

alterF :: (Functor f, Ord k) => (Maybe a -> f (Maybe a)) -> k -> Map k a -> f (Map k a) #

# Combine

## Union

union :: Ord k => Map k a -> Map k a -> Map k a #

unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a #

unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a #

unions :: (Foldable f, Ord k) => f (Map k a) -> Map k a #

unionsWith :: (Foldable f, Ord k) => (a -> a -> a) -> f (Map k a) -> Map k a #

## Difference

difference :: Ord k => Map k a -> Map k b -> Map k a #

differenceWith :: Ord k => (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a #

differenceWithKey :: Ord k => (k -> a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a #

## Intersection

intersection :: Ord k => Map k a -> Map k b -> Map k a #

intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c #

intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c #

## General combining functions

See Data.Map.Merge.Strict

## Deprecated general combining function

mergeWithKey :: Ord k => (k -> a -> b -> Maybe c) -> (Map k a -> Map k c) -> (Map k b -> Map k c) -> Map k a -> Map k b -> Map k c #

# Traversal

## Map

map :: (a -> b) -> Map k a -> Map k b #

mapWithKey :: (k -> a -> b) -> Map k a -> Map k b #

traverseWithKey :: Applicative t => (k -> a -> t b) -> Map k a -> t (Map k b) #

traverseMaybeWithKey :: Applicative f => (k -> a -> f (Maybe b)) -> Map k a -> f (Map k b) #

mapAccum :: (a -> b -> (a, c)) -> a -> Map k b -> (a, Map k c) #

mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c) #

mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c) #

mapKeys :: Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a #

mapKeysWith :: Ord k2 => (a -> a -> a) -> (k1 -> k2) -> Map k1 a -> Map k2 a #

# Folds

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (a -> b -> a) -> a -> Map k b -> a #

foldrWithKey :: (k -> a -> b -> b) -> b -> Map k a -> b #

foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> a #

foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> m #

## Strict folds

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl' :: (a -> b -> a) -> a -> Map k b -> a #

foldrWithKey' :: (k -> a -> b -> b) -> b -> Map k a -> b #

foldlWithKey' :: (a -> k -> b -> a) -> a -> Map k b -> a #

# Conversion

elems :: Map k a -> [a] #

keys :: Map k a -> [k] #

assocs :: Map k a -> [(k, a)] #

keysSet :: Map k a -> Set k #

fromSet :: (k -> a) -> Set k -> Map k a #

## Lists

toList :: Map k a -> [(k, a)] #

fromList :: Ord k => [(k, a)] -> Map k a #

fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a #

fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k, a)] -> Map k a #

## Ordered lists

toAscList :: Map k a -> [(k, a)] #

toDescList :: Map k a -> [(k, a)] #

# Filter

filter :: (a -> Bool) -> Map k a -> Map k a #

filterWithKey :: (k -> a -> Bool) -> Map k a -> Map k a #

restrictKeys :: Ord k => Map k a -> Set k -> Map k a #

withoutKeys :: Ord k => Map k a -> Set k -> Map k a #

partition :: (a -> Bool) -> Map k a -> (Map k a, Map k a) #

partitionWithKey :: (k -> a -> Bool) -> Map k a -> (Map k a, Map k a) #

takeWhileAntitone :: (k -> Bool) -> Map k a -> Map k a #

dropWhileAntitone :: (k -> Bool) -> Map k a -> Map k a #

spanAntitone :: (k -> Bool) -> Map k a -> (Map k a, Map k a) #

mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b #

mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b #

mapEither :: (a -> Either b c) -> Map k a -> (Map k b, Map k c) #

mapEitherWithKey :: (k -> a -> Either b c) -> Map k a -> (Map k b, Map k c) #

split :: Ord k => k -> Map k a -> (Map k a, Map k a) #

splitLookup :: Ord k => k -> Map k a -> (Map k a, Maybe a, Map k a) #

splitRoot :: Map k b -> [Map k b] #

# Submap

isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool #

isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool #

isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool #

isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool #

# Indexed

lookupIndex :: Ord k => k -> Map k a -> Maybe Int #

elemAt :: Int -> Map k a -> (k, a) #

deleteAt :: Int -> Map k a -> Map k a #

take :: Int -> Map k a -> Map k a #

drop :: Int -> Map k a -> Map k a #

splitAt :: Int -> Map k a -> (Map k a, Map k a) #

# Min/Max

lookupMin :: Map k a -> Maybe (k, a) #

lookupMax :: Map k a -> Maybe (k, a) #

deleteMin :: Map k a -> Map k a #

deleteMax :: Map k a -> Map k a #

updateMin :: (a -> Maybe a) -> Map k a -> Map k a #

updateMax :: (a -> Maybe a) -> Map k a -> Map k a #

updateMinWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a #

updateMaxWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a #

minView :: Map k a -> Maybe (a, Map k a) #

maxView :: Map k a -> Maybe (a, Map k a) #

minViewWithKey :: Map k a -> Maybe ((k, a), Map k a) #

maxViewWithKey :: Map k a -> Maybe ((k, a), Map k a) #

# Debugging

showTree :: Whoops "showTree has moved to Data.Map.Internal.Debug.showTree." => Map k a -> String #

showTreeWith :: Whoops "showTreeWith has moved to Data.Map.Internal.Debug.showTreeWith." => (k -> a -> String) -> Bool -> Bool -> Map k a -> String #

valid :: Ord k => Map k a -> Bool #