enummapset-0.7.3.0: IntMap and IntSet with Enum keys/elements.

Copyright | (c) 2011-2019 Michal Terepeta (c) 2019-2022 Mikolaj Konarski and others (see git history)
License | BSD3
Maintainer | mikolaj.konarski@funktory.com
Stability | alpha
Portability | uses DeriveDataTypeable and GeneralizedNewtypeDeriving
Safe Haskell | None
Language | Haskell2010

Data.EnumMap.Lazy

Contents

- Wrapping/unwrapping
- Operators
- Query
- Construction
  - Insertion
  - Delete/Update
- Combine
  - Union
  - Difference
  - Intersection
  - Universal combining function
- Traversal
  - Map
- Folds
  - Strict folds
- Conversion
  - Lists
  - Ordered lists
- Filter
- Submap
- Min/Max

Description

Synopsis

- data EnumMap k a
- intMapToEnumMap :: IntMap a -> EnumMap k a
- enumMapToIntMap :: EnumMap k a -> IntMap a
- (!) :: Enum k => EnumMap k a -> k -> a
- (\\) :: EnumMap k a -> EnumMap k b -> EnumMap k a
- null :: EnumMap k a -> Bool
- size :: EnumMap k a -> Int
- member :: Enum k => k -> EnumMap k a -> Bool
- notMember :: Enum k => k -> EnumMap k a -> Bool
- lookup :: Enum k => k -> EnumMap k a -> Maybe a
- findWithDefault :: Enum k => a -> k -> EnumMap k a -> a
- lookupLT :: Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupGT :: Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupLE :: Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupGE :: Enum k => k -> EnumMap k a -> Maybe (k, a)
- empty :: EnumMap k a
- singleton :: Enum k => k -> a -> EnumMap k a
- insert :: Enum k => k -> a -> EnumMap k a -> EnumMap k a
- insertWith :: Enum k => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
- insertWithKey :: Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
- insertLookupWithKey :: Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a)
- delete :: Enum k => k -> EnumMap k a -> EnumMap k a
- adjust :: Enum k => (a -> a) -> k -> EnumMap k a -> EnumMap k a
- adjustWithKey :: Enum k => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a
- update :: Enum k => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- updateWithKey :: Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- updateLookupWithKey :: Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a)
- alter :: Enum k => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- alterF :: (Enum k, Functor f) => (Maybe a -> f (Maybe a)) -> k -> EnumMap k a -> f (EnumMap k a)
- union :: EnumMap k a -> EnumMap k a -> EnumMap k a
- unionWith :: (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
- unionWithKey :: Enum k => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
- unions :: [EnumMap k a] -> EnumMap k a
- unionsWith :: (a -> a -> a) -> [EnumMap k a] -> EnumMap k a
- difference :: EnumMap k a -> EnumMap k b -> EnumMap k a
- differenceWith :: (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
- differenceWithKey :: Enum k => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
- intersection :: EnumMap k a -> EnumMap k b -> EnumMap k a
- intersectionWith :: (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
- intersectionWithKey :: Enum k => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
- mergeWithKey :: Enum k => (k -> a -> b -> Maybe c) -> (EnumMap k a -> EnumMap k c) -> (EnumMap k b -> EnumMap k c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
- map :: (a -> b) -> EnumMap k a -> EnumMap k b
- mapWithKey :: Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b
- traverseWithKey :: (Applicative t, Enum k) => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b)
- mapAccum :: (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapAccumWithKey :: Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapAccumRWithKey :: Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapKeys :: Enum k => (k -> k) -> EnumMap k a -> EnumMap k a
- mapKeysWith :: Enum k => (a -> a -> a) -> (k -> k) -> EnumMap k a -> EnumMap k a
- mapKeysMonotonic :: Enum k => (k -> k) -> EnumMap k a -> EnumMap k a
- foldr :: (a -> b -> b) -> b -> EnumMap k a -> b
- foldl :: (a -> b -> a) -> a -> EnumMap k b -> a
- foldrWithKey :: Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
- foldlWithKey :: Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
- foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b
- foldl' :: (a -> b -> a) -> a -> EnumMap k b -> a
- foldrWithKey' :: Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
- foldlWithKey' :: Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
- elems :: EnumMap k a -> [a]
- keys :: Enum k => EnumMap k a -> [k]
- assocs :: Enum k => EnumMap k a -> [(k, a)]
- keysSet :: Enum k => EnumMap k a -> EnumSet k
- fromSet :: Enum k => (k -> a) -> EnumSet k -> EnumMap k a
- toList :: Enum k => EnumMap k a -> [(k, a)]
- fromList :: Enum k => [(k, a)] -> EnumMap k a
- fromListWith :: Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromListWithKey :: Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
- toAscList :: Enum k => EnumMap k a -> [(k, a)]
- toDescList :: Enum k => EnumMap k a -> [(k, a)]
- fromAscList :: Enum k => [(k, a)] -> EnumMap k a
- fromAscListWith :: Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromAscListWithKey :: Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromDistinctAscList :: Enum k => [(k, a)] -> EnumMap k a
- filter :: (a -> Bool) -> EnumMap k a -> EnumMap k a
- filterWithKey :: Enum k => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a
- restrictKeys :: Enum k => EnumMap k a -> EnumSet k -> EnumMap k a
- withoutKeys :: Enum k => EnumMap k a -> EnumSet k -> EnumMap k a
- partition :: (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- partitionWithKey :: Enum k => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- mapMaybe :: (a -> Maybe b) -> EnumMap k a -> EnumMap k b
- mapMaybeWithKey :: Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b
- mapEither :: (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
- mapEitherWithKey :: Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
- split :: Enum k => k -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- splitLookup :: Enum k => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a)
- isSubmapOf :: Eq a => EnumMap k a -> EnumMap k a -> Bool
- isSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
- isProperSubmapOf :: Eq a => EnumMap k a -> EnumMap k a -> Bool
- isProperSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
- lookupMin :: Enum k => EnumMap k a -> Maybe (k, a)
- lookupMax :: Enum k => EnumMap k a -> Maybe (k, a)
- findMin :: Enum k => EnumMap k a -> (k, a)
- findMax :: Enum k => EnumMap k a -> (k, a)
- deleteMin :: EnumMap k a -> EnumMap k a
- deleteMax :: EnumMap k a -> EnumMap k a
- deleteFindMin :: Enum k => EnumMap k a -> ((k, a), EnumMap k a)
- deleteFindMax :: Enum k => EnumMap k a -> ((k, a), EnumMap k a)
- updateMin :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMax :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMinWithKey :: Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMaxWithKey :: Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
- minView :: EnumMap k a -> Maybe (a, EnumMap k a)
- maxView :: EnumMap k a -> Maybe (a, EnumMap k a)
- minViewWithKey :: Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)
- maxViewWithKey :: Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)

# Documentation

data EnumMap k a Source #

Wrapper for `IntMap` with `Enum` keys.

#### Instances

Instances details

Functor (EnumMap k) Source # |
Instance details Defined in Data.EnumMap.Base Methods fmap :: (a -> b) -> EnumMap k a -> EnumMap k b Source # (<$) :: a -> EnumMap k b -> EnumMap k a Source #
Foldable (EnumMap k) Source # |

Instance details

Defined in Data.EnumMap.Base

Methods

fold :: Monoid m => EnumMap k m -> m Source #

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

foldMap' :: Monoid m => (a -> m) -> EnumMap k a -> m Source #

foldr :: (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldl :: (b -> a -> b) -> b -> EnumMap k a -> b Source #

foldl' :: (b -> a -> b) -> b -> EnumMap k a -> b Source #

foldr1 :: (a -> a -> a) -> EnumMap k a -> a Source #

foldl1 :: (a -> a -> a) -> EnumMap k a -> a Source #

toList :: EnumMap k a -> [a] Source #

null :: EnumMap k a -> Bool Source #

length :: EnumMap k a -> Int Source #

elem :: Eq a => a -> EnumMap k a -> Bool Source #

maximum :: Ord a => EnumMap k a -> a Source #

minimum :: Ord a => EnumMap k a -> a Source #

sum :: Num a => EnumMap k a -> a Source #

product :: Num a => EnumMap k a -> a Source #

Traversable (EnumMap k) Source # |
Instance details Defined in Data.EnumMap.Base Methods traverse :: Applicative f => (a -> f b) -> EnumMap k a -> f (EnumMap k b) Source # sequenceA :: Applicative f => EnumMap k (f a) -> f (EnumMap k a) Source # mapM :: Monad m => (a -> m b) -> EnumMap k a -> m (EnumMap k b) Source # sequence :: Monad m => EnumMap k (m a) -> m (EnumMap k a) Source #
FromJSON a => FromJSON (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods parseJSON :: Value -> Parser (EnumMap k a) Source # parseJSONList :: Value -> Parser [EnumMap k a] Source # omittedField :: Maybe (EnumMap k a) Source #
ToJSON a => ToJSON (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods toJSON :: EnumMap k a -> Value Source # toEncoding :: EnumMap k a -> Encoding Source # toJSONList :: [EnumMap k a] -> Value Source # toEncodingList :: [EnumMap k a] -> Encoding Source # omitField :: EnumMap k a -> Bool Source #
NFData a => NFData (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods rnf :: EnumMap k a -> () Source #
Monoid (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods mempty :: EnumMap k a Source # mappend :: EnumMap k a -> EnumMap k a -> EnumMap k a Source # mconcat :: [EnumMap k a] -> EnumMap k a Source #
Semigroup (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods (<>) :: EnumMap k a -> EnumMap k a -> EnumMap k a Source # sconcat :: NonEmpty (EnumMap k a) -> EnumMap k a Source # stimes :: Integral b => b -> EnumMap k a -> EnumMap k a Source #
Enum k => IsList (EnumMap k a) Source # |

Instance details

Defined in Data.EnumMap.Base

Associated Types

type Item (EnumMap k a) |
Instance details Defined in Data.EnumMap.Base type Item (EnumMap k a) = (k, a)

Methods

fromList :: [Item (EnumMap k a)] -> EnumMap k a Source #

fromListN :: Int -> [Item (EnumMap k a)] -> EnumMap k a Source #

toList :: EnumMap k a -> [Item (EnumMap k a)] Source #

(Enum k, Read k, Read a) => Read (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods readsPrec :: Int -> ReadS (EnumMap k a) Source # readList :: ReadS [EnumMap k a] Source # readPrec :: ReadPrec (EnumMap k a) Source # readListPrec :: ReadPrec [EnumMap k a] Source #
(Enum k, Show k, Show a) => Show (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods showsPrec :: Int -> EnumMap k a -> ShowS Source # show :: EnumMap k a -> String Source # showList :: [EnumMap k a] -> ShowS Source #
Eq a => Eq (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base Methods (==) :: EnumMap k a -> EnumMap k a -> Bool Source # (/=) :: EnumMap k a -> EnumMap k a -> Bool Source #
Ord a => Ord (EnumMap k a) Source # |

Instance details

Defined in Data.EnumMap.Base

Methods

compare :: EnumMap k a -> EnumMap k a -> Ordering Source #

(<) :: EnumMap k a -> EnumMap k a -> Bool Source #

(<=) :: EnumMap k a -> EnumMap k a -> Bool Source #

(>) :: EnumMap k a -> EnumMap k a -> Bool Source #

(>=) :: EnumMap k a -> EnumMap k a -> Bool Source #

max :: EnumMap k a -> EnumMap k a -> EnumMap k a Source #

min :: EnumMap k a -> EnumMap k a -> EnumMap k a Source #

type Item (EnumMap k a) Source # |
Instance details Defined in Data.EnumMap.Base type Item (EnumMap k a) = (k, a)

# Wrapping/unwrapping

intMapToEnumMap :: IntMap a -> EnumMap k a Source #

Wrap `IntMap`.

enumMapToIntMap :: EnumMap k a -> IntMap a Source #

Unwrap `IntMap`.

# Operators

(!) :: Enum k => EnumMap k a -> k -> a Source #

(\\) :: EnumMap k a -> EnumMap k b -> EnumMap k a Source #

# Query

null :: EnumMap k a -> Bool Source #

size :: EnumMap k a -> Int Source #

member :: Enum k => k -> EnumMap k a -> Bool Source #

notMember :: Enum k => k -> EnumMap k a -> Bool Source #

lookup :: Enum k => k -> EnumMap k a -> Maybe a Source #

findWithDefault :: Enum k => a -> k -> EnumMap k a -> a Source #

lookupLT :: Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupGT :: Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupLE :: Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupGE :: Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

# Construction

empty :: EnumMap k a Source #

singleton :: Enum k => k -> a -> EnumMap k a Source #

## Insertion

insert :: Enum k => k -> a -> EnumMap k a -> EnumMap k a Source #

insertWith :: Enum k => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #

insertWithKey :: Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #

insertLookupWithKey :: Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a) Source #

## Delete/Update

delete :: Enum k => k -> EnumMap k a -> EnumMap k a Source #

adjust :: Enum k => (a -> a) -> k -> EnumMap k a -> EnumMap k a Source #

adjustWithKey :: Enum k => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a Source #

update :: Enum k => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

updateWithKey :: Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

updateLookupWithKey :: Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a) Source #

alter :: Enum k => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

alterF :: (Enum k, Functor f) => (Maybe a -> f (Maybe a)) -> k -> EnumMap k a -> f (EnumMap k a) Source #

# Combine

## Union

union :: EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unionWith :: (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unionWithKey :: Enum k => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unions :: [EnumMap k a] -> EnumMap k a Source #

unionsWith :: (a -> a -> a) -> [EnumMap k a] -> EnumMap k a Source #

## Difference

difference :: EnumMap k a -> EnumMap k b -> EnumMap k a Source #

differenceWith :: (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #

differenceWithKey :: Enum k => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #

## Intersection

intersection :: EnumMap k a -> EnumMap k b -> EnumMap k a Source #

intersectionWith :: (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

intersectionWithKey :: Enum k => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

## Universal combining function

mergeWithKey :: Enum k => (k -> a -> b -> Maybe c) -> (EnumMap k a -> EnumMap k c) -> (EnumMap k b -> EnumMap k c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

# Traversal

## Map

map :: (a -> b) -> EnumMap k a -> EnumMap k b Source #

mapWithKey :: Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b Source #

traverseWithKey :: (Applicative t, Enum k) => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b) Source #

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

mapAccumWithKey :: Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #

mapAccumRWithKey :: Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #

mapKeys :: Enum k => (k -> k) -> EnumMap k a -> EnumMap k a Source #

mapKeysWith :: Enum k => (a -> a -> a) -> (k -> k) -> EnumMap k a -> EnumMap k a Source #

mapKeysMonotonic :: Enum k => (k -> k) -> EnumMap k a -> EnumMap k a Source #

# Folds

foldr :: (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldl :: (a -> b -> a) -> a -> EnumMap k b -> a Source #

foldrWithKey :: Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #

foldlWithKey :: Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #

## Strict folds

foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldl' :: (a -> b -> a) -> a -> EnumMap k b -> a Source #

foldrWithKey' :: Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #

foldlWithKey' :: Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #

# Conversion

elems :: EnumMap k a -> [a] Source #

keys :: Enum k => EnumMap k a -> [k] Source #

assocs :: Enum k => EnumMap k a -> [(k, a)] Source #

keysSet :: Enum k => EnumMap k a -> EnumSet k Source #

fromSet :: Enum k => (k -> a) -> EnumSet k -> EnumMap k a Source #

## Lists

toList :: Enum k => EnumMap k a -> [(k, a)] Source #

fromList :: Enum k => [(k, a)] -> EnumMap k a Source #

fromListWith :: Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromListWithKey :: Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

## Ordered lists

toAscList :: Enum k => EnumMap k a -> [(k, a)] Source #

toDescList :: Enum k => EnumMap k a -> [(k, a)] Source #

fromAscList :: Enum k => [(k, a)] -> EnumMap k a Source #

fromAscListWith :: Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromAscListWithKey :: Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromDistinctAscList :: Enum k => [(k, a)] -> EnumMap k a Source #

# Filter

filter :: (a -> Bool) -> EnumMap k a -> EnumMap k a Source #

filterWithKey :: Enum k => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a Source #

restrictKeys :: Enum k => EnumMap k a -> EnumSet k -> EnumMap k a Source #

withoutKeys :: Enum k => EnumMap k a -> EnumSet k -> EnumMap k a Source #

partition :: (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

partitionWithKey :: Enum k => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

mapMaybe :: (a -> Maybe b) -> EnumMap k a -> EnumMap k b Source #

mapMaybeWithKey :: Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b Source #

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

mapEitherWithKey :: Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source #

split :: Enum k => k -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

splitLookup :: Enum k => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a) Source #

# Submap

isSubmapOf :: Eq a => EnumMap k a -> EnumMap k a -> Bool Source #

isSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #

isProperSubmapOf :: Eq a => EnumMap k a -> EnumMap k a -> Bool Source #

isProperSubmapOfBy :: (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #

# Min/Max

lookupMin :: Enum k => EnumMap k a -> Maybe (k, a) Source #

lookupMax :: Enum k => EnumMap k a -> Maybe (k, a) Source #

findMin :: Enum k => EnumMap k a -> (k, a) Source #

findMax :: Enum k => EnumMap k a -> (k, a) Source #

deleteMin :: EnumMap k a -> EnumMap k a Source #

deleteMax :: EnumMap k a -> EnumMap k a Source #

deleteFindMin :: Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source #

deleteFindMax :: Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source #

updateMin :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMax :: (a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMinWithKey :: Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMaxWithKey :: Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

minView :: EnumMap k a -> Maybe (a, EnumMap k a) Source #

maxView :: EnumMap k a -> Maybe (a, EnumMap k a) Source #

minViewWithKey :: Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #

maxViewWithKey :: Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #