Copyright | (c) Andrey Mulik 2020 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- module SDP.Hashable
- module SDP.Linear
- module SDP.Map
- data HashMap k v
- type LHashMap = HashMap
Exports
module SDP.Hashable
module SDP.Linear
module SDP.Map
Hash map
A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
Instances
Bifoldable HashMap | Since: unordered-containers-0.2.11 |
Eq2 HashMap | |
Ord2 HashMap | |
Defined in Data.HashMap.Internal | |
Show2 HashMap | |
Hashable2 HashMap | |
Defined in Data.HashMap.Internal | |
Functor (HashMap k) | |
Foldable (HashMap k) | |
Defined in Data.HashMap.Internal fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # | |
Traversable (HashMap k) | |
Eq k => Eq1 (HashMap k) | |
Ord k => Ord1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k, Read k) => Read1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
Show k => Show1 (HashMap k) | |
Hashable k => Hashable1 (HashMap k) | |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k) => IsList (HashMap k v) | |
(Eq k, Eq v) => Eq (HashMap k v) | Note that, in the presence of hash collisions, equal
In general, the lack of substitutivity can be observed with any function that depends on the key ordering, such as folds and traversals. |
(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) | |
Defined in Data.HashMap.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) # toConstr :: HashMap k v -> Constr # dataTypeOf :: HashMap k v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) # gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # | |
(Ord k, Ord v) => Ord (HashMap k v) | The ordering is total and consistent with the |
Defined in Data.HashMap.Internal | |
(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
(Show k, Show v) => Show (HashMap k v) | |
(Eq k, Hashable k) => Semigroup (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
(Eq k, Hashable k) => Monoid (HashMap k v) | If a key occurs in both maps, the mapping from the first will be the mapping in the result. Examples
|
(NFData k, NFData v) => NFData (HashMap k v) | |
Defined in Data.HashMap.Internal | |
(Hashable k, Hashable v) => Hashable (HashMap k v) | |
Defined in Data.HashMap.Internal | |
Nullable (HashMap k e) Source # | |
Nullable (HashMap k e) Source # | |
Index k => Estimate (HashMap k e) Source # | |
Defined in SDP.HashMap.Lazy (<.=>) :: HashMap k e -> Int -> Ordering # (<==>) :: Compare (HashMap k e) # (.==) :: HashMap k e -> Int -> Bool # (./=) :: HashMap k e -> Int -> Bool # (.<=) :: HashMap k e -> Int -> Bool # (.>=) :: HashMap k e -> Int -> Bool # (.<) :: HashMap k e -> Int -> Bool # (.>) :: HashMap k e -> Int -> Bool # (.<.) :: HashMap k e -> HashMap k e -> Bool # (.>.) :: HashMap k e -> HashMap k e -> Bool # (.<=.) :: HashMap k e -> HashMap k e -> Bool # (.>=.) :: HashMap k e -> HashMap k e -> Bool # | |
Index k => Estimate (HashMap k e) Source # | |
Defined in SDP.HashMap.Strict (<.=>) :: HashMap k e -> Int -> Ordering # (<==>) :: Compare (HashMap k e) # (.==) :: HashMap k e -> Int -> Bool # (./=) :: HashMap k e -> Int -> Bool # (.<=) :: HashMap k e -> Int -> Bool # (.>=) :: HashMap k e -> Int -> Bool # (.<) :: HashMap k e -> Int -> Bool # (.>) :: HashMap k e -> Int -> Bool # (.<.) :: HashMap k e -> HashMap k e -> Bool # (.>.) :: HashMap k e -> HashMap k e -> Bool # (.<=.) :: HashMap k e -> HashMap k e -> Bool # (.>=.) :: HashMap k e -> HashMap k e -> Bool # | |
(Eq k, Hashable k) => Map (HashMap k e) k e Source # | |
Defined in SDP.HashMap.Lazy assocs :: HashMap k e -> [(k, e)] # toMap :: [(k, e)] -> HashMap k e # toMap' :: e -> [(k, e)] -> HashMap k e # insert' :: k -> e -> HashMap k e -> HashMap k e # delete' :: k -> HashMap k e -> HashMap k e # member' :: k -> HashMap k e -> Bool # (//) :: HashMap k e -> [(k, e)] -> HashMap k e # (.!) :: HashMap k e -> k -> e # (!) :: HashMap k e -> k -> e # (!?) :: HashMap k e -> k -> Maybe e # filter' :: (k -> e -> Bool) -> HashMap k e -> HashMap k e # union' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # difference' :: (e -> e -> Maybe e) -> HashMap k e -> HashMap k e -> HashMap k e # intersection' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # update :: HashMap k e -> (k -> e -> e) -> HashMap k e # lookupLT' :: k -> HashMap k e -> Maybe (k, e) # lookupGT' :: k -> HashMap k e -> Maybe (k, e) # lookupLE' :: k -> HashMap k e -> Maybe (k, e) # lookupGE' :: k -> HashMap k e -> Maybe (k, e) # (.$) :: (e -> Bool) -> HashMap k e -> Maybe k # (*$) :: (e -> Bool) -> HashMap k e -> [k] # kfoldr :: (k -> e -> b -> b) -> b -> HashMap k e -> b # kfoldl :: (k -> b -> e -> b) -> b -> HashMap k e -> b # | |
(Eq k, Hashable k) => Map (HashMap k e) k e Source # | |
Defined in SDP.HashMap.Strict assocs :: HashMap k e -> [(k, e)] # toMap :: [(k, e)] -> HashMap k e # toMap' :: e -> [(k, e)] -> HashMap k e # insert' :: k -> e -> HashMap k e -> HashMap k e # delete' :: k -> HashMap k e -> HashMap k e # member' :: k -> HashMap k e -> Bool # (//) :: HashMap k e -> [(k, e)] -> HashMap k e # (.!) :: HashMap k e -> k -> e # (!) :: HashMap k e -> k -> e # (!?) :: HashMap k e -> k -> Maybe e # filter' :: (k -> e -> Bool) -> HashMap k e -> HashMap k e # union' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # difference' :: (e -> e -> Maybe e) -> HashMap k e -> HashMap k e -> HashMap k e # intersection' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # update :: HashMap k e -> (k -> e -> e) -> HashMap k e # lookupLT' :: k -> HashMap k e -> Maybe (k, e) # lookupGT' :: k -> HashMap k e -> Maybe (k, e) # lookupLE' :: k -> HashMap k e -> Maybe (k, e) # lookupGE' :: k -> HashMap k e -> Maybe (k, e) # (.$) :: (e -> Bool) -> HashMap k e -> Maybe k # (*$) :: (e -> Bool) -> HashMap k e -> [k] # kfoldr :: (k -> e -> b -> b) -> b -> HashMap k e -> b # kfoldl :: (k -> b -> e -> b) -> b -> HashMap k e -> b # | |
type Item (HashMap k v) | |
Defined in Data.HashMap.Internal |
Orphan instances
Nullable (HashMap k e) Source # | |
Index k => Estimate (HashMap k e) Source # | |
(<.=>) :: HashMap k e -> Int -> Ordering # (<==>) :: Compare (HashMap k e) # (.==) :: HashMap k e -> Int -> Bool # (./=) :: HashMap k e -> Int -> Bool # (.<=) :: HashMap k e -> Int -> Bool # (.>=) :: HashMap k e -> Int -> Bool # (.<) :: HashMap k e -> Int -> Bool # (.>) :: HashMap k e -> Int -> Bool # (.<.) :: HashMap k e -> HashMap k e -> Bool # (.>.) :: HashMap k e -> HashMap k e -> Bool # (.<=.) :: HashMap k e -> HashMap k e -> Bool # (.>=.) :: HashMap k e -> HashMap k e -> Bool # | |
(Eq k, Hashable k) => Map (HashMap k e) k e Source # | |
assocs :: HashMap k e -> [(k, e)] # toMap :: [(k, e)] -> HashMap k e # toMap' :: e -> [(k, e)] -> HashMap k e # insert' :: k -> e -> HashMap k e -> HashMap k e # delete' :: k -> HashMap k e -> HashMap k e # member' :: k -> HashMap k e -> Bool # (//) :: HashMap k e -> [(k, e)] -> HashMap k e # (.!) :: HashMap k e -> k -> e # (!) :: HashMap k e -> k -> e # (!?) :: HashMap k e -> k -> Maybe e # filter' :: (k -> e -> Bool) -> HashMap k e -> HashMap k e # union' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # difference' :: (e -> e -> Maybe e) -> HashMap k e -> HashMap k e -> HashMap k e # intersection' :: (e -> e -> e) -> HashMap k e -> HashMap k e -> HashMap k e # update :: HashMap k e -> (k -> e -> e) -> HashMap k e # lookupLT' :: k -> HashMap k e -> Maybe (k, e) # lookupGT' :: k -> HashMap k e -> Maybe (k, e) # lookupLE' :: k -> HashMap k e -> Maybe (k, e) # lookupGE' :: k -> HashMap k e -> Maybe (k, e) # (.$) :: (e -> Bool) -> HashMap k e -> Maybe k # (*$) :: (e -> Bool) -> HashMap k e -> [k] # kfoldr :: (k -> e -> b -> b) -> b -> HashMap k e -> b # kfoldl :: (k -> b -> e -> b) -> b -> HashMap k e -> b # |