Copyright | (c) 2011-2013 Michal Terepeta |
---|---|
License | BSD3 |
Maintainer | michal.terepeta@gmail.com |
Stability | alpha |
Portability | uses DeriveDataTypeable and GeneralizedNewtypeDeriving |
Safe Haskell | None |
Language | Haskell98 |
- 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
- 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
- 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
- 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
Wrapping/unwrapping
intMapToEnumMap :: IntMap a -> EnumMap k a Source
Wrap IntMap
.
enumMapToIntMap :: EnumMap k a -> IntMap a Source
Unwrap IntMap
.
Operators
Query
findWithDefault :: Enum k => a -> k -> EnumMap k a -> a Source
Construction
Insertion
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
adjustWithKey :: Enum k => (k -> a -> 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
Combine
Union
unionsWith :: (a -> a -> a) -> [EnumMap k a] -> EnumMap k a Source
Difference
difference :: 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
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
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
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
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
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
Lists
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
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
mapEitherWithKey :: Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source
Submap
Min/Max
deleteFindMin :: Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source
deleteFindMax :: Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source