Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Refer to the documentation for Data.IntMap.Strict.
Synopsis
- newtype EnumMap k v = EnumMap {}
- (!) :: forall k (a :: Type). Enum k => EnumMap k a -> k -> a
- (\\) :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a
- null :: forall k (a :: Type). EnumMap k a -> Bool
- size :: forall k (a :: Type). EnumMap k a -> Int
- member :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Bool
- notMember :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Bool
- lookup :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe a
- findWithDefault :: forall k (a :: Type). Enum k => a -> k -> EnumMap k a -> a
- lookupLT :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupGT :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupLE :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a)
- lookupGE :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a)
- empty :: forall k (a :: Type). EnumMap k a
- singleton :: forall k (a :: Type). Enum k => k -> a -> EnumMap k a
- insert :: forall k (a :: Type). Enum k => k -> a -> EnumMap k a -> EnumMap k a
- insertWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
- insertWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a
- insertLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a)
- delete :: forall k (a :: Type). Enum k => k -> EnumMap k a -> EnumMap k a
- adjust :: forall k (a :: Type). Enum k => (a -> a) -> k -> EnumMap k a -> EnumMap k a
- adjustWithKey :: forall k (a :: Type). Enum k => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a
- update :: forall k (a :: Type). Enum k => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- updateWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- updateLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a)
- alter :: forall k (a :: Type). Enum k => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a
- union :: forall k (a :: Type). EnumMap k a -> EnumMap k a -> EnumMap k a
- unionWith :: forall k (a :: Type). (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
- unionWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a
- unions :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => f (EnumMap k a) -> EnumMap k a
- unionsWith :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => (a -> a -> a) -> f (EnumMap k a) -> EnumMap k a
- difference :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a
- differenceWith :: forall k (a :: Type) (b :: Type). (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
- differenceWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a
- intersection :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a
- intersectionWith :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
- intersectionWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c
- mergeWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). 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 :: forall k (a :: Type) (b :: Type). (a -> b) -> EnumMap k a -> EnumMap k b
- mapWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b
- traverseWithKey :: forall k (t :: Type -> Type) (a :: Type) (b :: Type). (Enum k, Functor t, Applicative t) => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b)
- mapAccum :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapAccumWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapAccumRWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c)
- mapKeys :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a
- mapKeysWith :: forall k k' (a :: Type). (Enum k, Enum k') => (a -> a -> a) -> (k -> k') -> EnumMap k a -> EnumMap k' a
- mapKeysMonotonic :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a
- foldr :: forall k (a :: Type) (b :: Type). (a -> b -> b) -> b -> EnumMap k a -> b
- foldl :: forall k (a :: Type) (b :: Type). (a -> b -> a) -> a -> EnumMap k b -> a
- foldrWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
- foldlWithKey :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
- foldMapWithKey :: forall k (m :: Type) (a :: Type). (Enum k, Monoid m) => (k -> a -> m) -> EnumMap k a -> m
- foldr' :: forall k (a :: Type) (b :: Type). (a -> b -> b) -> b -> EnumMap k a -> b
- foldl' :: forall k (a :: Type) (b :: Type). (a -> b -> a) -> a -> EnumMap k b -> a
- foldrWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b
- foldlWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a
- elems :: forall k (a :: Type). EnumMap k a -> [a]
- keys :: forall k (a :: Type). Enum k => EnumMap k a -> [k]
- assocs :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)]
- keysSet :: forall k (a :: Type). EnumMap k a -> EnumSet k
- fromSet :: forall k (a :: Type). Enum k => (k -> a) -> EnumSet k -> EnumMap k a
- toList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)]
- fromList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a
- fromListWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
- toAscList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)]
- toDescList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)]
- fromAscList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a
- fromAscListWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromAscListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a
- fromDistinctAscList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a
- filter :: forall k (a :: Type). (a -> Bool) -> EnumMap k a -> EnumMap k a
- filterWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a
- partition :: forall k (a :: Type). (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- partitionWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- mapMaybe :: forall k (a :: Type) (b :: Type). (a -> Maybe b) -> EnumMap k a -> EnumMap k b
- mapMaybeWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b
- mapEither :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
- mapEitherWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c)
- split :: forall k (a :: Type). Enum k => k -> EnumMap k a -> (EnumMap k a, EnumMap k a)
- splitLookup :: forall k (a :: Type). Enum k => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a)
- isSubmapOf :: forall k (a :: Type). Eq a => EnumMap k a -> EnumMap k a -> Bool
- isSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
- isProperSubmapOf :: forall k (a :: Type). Eq a => EnumMap k a -> EnumMap k a -> Bool
- isProperSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool
- findMin :: forall k (a :: Type). Enum k => EnumMap k a -> (k, a)
- findMax :: forall k (a :: Type). Enum k => EnumMap k a -> (k, a)
- deleteMin :: forall k (a :: Type). EnumMap k a -> EnumMap k a
- deleteMax :: forall k (a :: Type). EnumMap k a -> EnumMap k a
- deleteFindMin :: forall k (a :: Type). Enum k => EnumMap k a -> ((k, a), EnumMap k a)
- deleteFindMax :: forall k (a :: Type). Enum k => EnumMap k a -> ((k, a), EnumMap k a)
- updateMin :: forall k (a :: Type). (a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMax :: forall k (a :: Type). (a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMinWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
- updateMaxWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a
- minView :: forall k (a :: Type). EnumMap k a -> Maybe (a, EnumMap k a)
- maxView :: forall k (a :: Type). EnumMap k a -> Maybe (a, EnumMap k a)
- minViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)
- maxViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a)
- showTree :: forall k (a :: Type). Show a => EnumMap k a -> String
- showTreeWith :: forall k (a :: Type). Show a => Bool -> Bool -> EnumMap k a -> String
Documentation
newtype EnumMap k v infixr 1 Source #
Instances
Functor (EnumMap k) Source # | |
Foldable (EnumMap k) Source # | |
Defined in Data.EnumMap.Strict fold :: Monoid m => EnumMap k m -> m # foldMap :: Monoid m => (a -> m) -> EnumMap k a -> m # foldr :: (a -> b -> b) -> b -> EnumMap k a -> b # foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b # foldl :: (b -> a -> b) -> b -> EnumMap k a -> b # foldl' :: (b -> a -> b) -> b -> EnumMap k a -> b # foldr1 :: (a -> a -> a) -> EnumMap k a -> a # foldl1 :: (a -> a -> a) -> EnumMap k a -> a # toList :: EnumMap k a -> [a] # length :: EnumMap k a -> Int # elem :: Eq a => a -> EnumMap k a -> Bool # maximum :: Ord a => EnumMap k a -> a # minimum :: Ord a => EnumMap k a -> a # | |
Traversable (EnumMap k) Source # | |
Eq v => Eq (EnumMap k v) Source # | |
(Data k, Data v) => Data (EnumMap k v) Source # | |
Defined in Data.EnumMap.Strict gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EnumMap k v -> c (EnumMap k v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (EnumMap k v) # toConstr :: EnumMap k v -> Constr # dataTypeOf :: EnumMap k v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (EnumMap k v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (EnumMap k v)) # gmapT :: (forall b. Data b => b -> b) -> EnumMap k v -> EnumMap k v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EnumMap k v -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EnumMap k v -> r # gmapQ :: (forall d. Data d => d -> u) -> EnumMap k v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EnumMap k v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EnumMap k v -> m (EnumMap k v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumMap k v -> m (EnumMap k v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumMap k v -> m (EnumMap k v) # | |
Ord v => Ord (EnumMap k v) Source # | |
Defined in Data.EnumMap.Strict | |
(Enum k, Read k, Read a) => Read (EnumMap k a) Source # | |
(Enum k, Show k, Show a) => Show (EnumMap k a) Source # | |
Semigroup (EnumMap k v) Source # | |
Monoid (EnumMap k v) Source # | |
NFData v => NFData (EnumMap k v) Source # | |
Defined in Data.EnumMap.Strict |
Operators
Query
Construction
Insertion
insertWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #
insertWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #
insertLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a) Source #
Delete/Update
adjustWithKey :: forall k (a :: Type). Enum k => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a Source #
update :: forall k (a :: Type). Enum k => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #
updateWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #
updateLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a) Source #
alter :: forall k (a :: Type). Enum k => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #
Combine: Union
unionWith :: forall k (a :: Type). (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #
unionWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #
unions :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => f (EnumMap k a) -> EnumMap k a Source #
unionsWith :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => (a -> a -> a) -> f (EnumMap k a) -> EnumMap k a Source #
Combine: Difference
differenceWith :: forall k (a :: Type) (b :: Type). (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #
differenceWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #
Combine: Intersection
intersection :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a Source #
intersectionWith :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #
intersectionWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #
Combine: Universal combining function
mergeWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). 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 :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b Source #
traverseWithKey :: forall k (t :: Type -> Type) (a :: Type) (b :: Type). (Enum k, Functor t, Applicative t) => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b) Source #
mapAccum :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #
mapAccumWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #
mapAccumRWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #
mapKeys :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a Source #
mapKeysWith :: forall k k' (a :: Type). (Enum k, Enum k') => (a -> a -> a) -> (k -> k') -> EnumMap k a -> EnumMap k' a Source #
mapKeysMonotonic :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a Source #
Traversal: Folds
foldrWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #
foldlWithKey :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #
foldMapWithKey :: forall k (m :: Type) (a :: Type). (Enum k, Monoid m) => (k -> a -> m) -> EnumMap k a -> m Source #
Traversal: Strict folds
foldrWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #
foldlWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #
Conversion
Conversion: Lists
fromListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #
Conversion: Ordered lists
fromAscListWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a Source #
fromAscListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #
Filter
filterWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a Source #
partition :: forall k (a :: Type). (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #
partitionWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #
mapMaybeWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b Source #
mapEither :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source #
mapEitherWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source #
splitLookup :: forall k (a :: Type). Enum k => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a) Source #
Submap
isSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #
isProperSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #
Min/Max
updateMinWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #
updateMaxWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #
minViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #
maxViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #