Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Map k v
- empty :: Map k v
- null :: Map k v -> Bool
- singleton :: Universally k Prim => k a -> v a -> Map k v
- lookup :: (Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k) => k a -> Map k v -> Maybe (v a)
- foldrWithKey :: Universally k Prim => (forall a. k a -> v a -> b -> b) -> b -> Map k v -> b
- foldlWithKeyM' :: (Universally k Prim, Monad m) => (forall a. b -> k a -> v a -> m b) -> b -> Map k v -> m b
- foldMapWithKey :: (Universally k Prim, Monoid m) => (forall a. k a -> v a -> m) -> Map k v -> m
- traverseWithKey_ :: (Universally k Prim, Applicative m) => (forall a. k a -> v a -> m b) -> Map k v -> m ()
- toList :: Universally k Prim => Map k v -> [DependentPair k v]
- fromList :: (Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k) => [DependentPair k v] -> Map k v
- map :: Universally k Prim => (forall a. v a -> w a) -> Map k v -> Map k w
- mapWithKey :: Universally k Prim => (forall a. k a -> v a -> w a) -> Map k v -> Map k w
- mapMaybe :: Universally k Prim => (forall a. v a -> Maybe (w a)) -> Map k v -> Map k w
- mapMaybeWithKey :: Universally k Prim => (forall a. k a -> v a -> Maybe (w a)) -> Map k v -> Map k w
- size :: Map k v -> Int
- unsafeFreezeZip :: (Universally k Prim, OrdForallPoly k) => MutablePrimArray s (k Any) -> MutableArray s (v Any) -> ST s (Map k v)
- unsafeCoerceKeys :: Proxy k' -> Map k v -> Set k'
Documentation
Instances
lookup :: (Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k) => k a -> Map k v -> Maybe (v a) Source #
foldrWithKey :: Universally k Prim => (forall a. k a -> v a -> b -> b) -> b -> Map k v -> b Source #
foldlWithKeyM' :: (Universally k Prim, Monad m) => (forall a. b -> k a -> v a -> m b) -> b -> Map k v -> m b Source #
foldMapWithKey :: (Universally k Prim, Monoid m) => (forall a. k a -> v a -> m) -> Map k v -> m Source #
traverseWithKey_ :: (Universally k Prim, Applicative m) => (forall a. k a -> v a -> m b) -> Map k v -> m () Source #
toList :: Universally k Prim => Map k v -> [DependentPair k v] Source #
fromList :: (Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k) => [DependentPair k v] -> Map k v Source #
mapWithKey :: Universally k Prim => (forall a. k a -> v a -> w a) -> Map k v -> Map k w Source #
mapMaybeWithKey :: Universally k Prim => (forall a. k a -> v a -> Maybe (w a)) -> Map k v -> Map k w Source #
Unsafe Functions
unsafeFreezeZip :: (Universally k Prim, OrdForallPoly k) => MutablePrimArray s (k Any) -> MutableArray s (v Any) -> ST s (Map k v) Source #
This function is even more unsafe than the unsafeFreezeZip
provided by
Data.Map.Unboxed.Lifted
. The user needs to use unsafeCoerce
to even use this
function.