{-# LANGUAGE NoImplicitPrelude, PolymorphicComponents #-}
module ModularPrelude.Module.HashMap
(
HashMapModule (..)
, HashMapImplements (..)
) where
import ModularPrelude hiding (empty)
import qualified Data.HashMap.Strict as HashMap
data HashMapModule = HashMap
{ HashMapModule
-> forall k a b. (a -> b) -> HashMap k a -> HashMap k b
map :: forall k a b. (a -> b) -> HashMap k a -> HashMap k b
, HashMapModule
-> forall k a. (k -> a -> Bool) -> HashMap k a -> HashMap k a
filter :: forall k a. (k -> a -> Bool) -> HashMap k a -> HashMap k a
, HashMapModule -> forall k a. HashMap k a -> Int
length :: forall k a. HashMap k a -> Int
, HashMapModule -> forall k a. Hashable k => k -> a -> HashMap k a
singleton :: forall k a. Hashable k => k -> a -> HashMap k a
, HashMapModule -> forall k a. HashMap k a -> Bool
null :: forall k a. HashMap k a -> Bool
, HashMapModule
-> forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
pack :: forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
, HashMapModule -> forall k a. HashMap k a -> [(k, a)]
unpack :: forall k a. HashMap k a -> [(k, a)]
, HashMapModule
-> forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
fromList :: forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
, HashMapModule -> forall k a. HashMap k a -> [(k, a)]
toList :: forall k a. HashMap k a -> [(k, a)]
, HashMapModule
-> forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Maybe a
lookup :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Maybe a
, HashMapModule -> forall k a. HashMap k a
empty :: forall k a. HashMap k a
, HashMapModule
-> forall k a.
(Eq k, Hashable k) =>
k -> a -> HashMap k a -> HashMap k a
insert :: forall k a. (Eq k, Hashable k) => k -> a -> HashMap k a -> HashMap k a
, HashMapModule
-> forall k a.
(Eq k, Hashable k) =>
k -> HashMap k a -> HashMap k a
delete :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> HashMap k a
, HashMapModule
-> forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Bool
member :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Bool
}
class HashMapImplements interface where
_Data_HashMap_Strict_ :: interface
instance HashMapImplements HashMapModule where
_Data_HashMap_Strict_ :: HashMapModule
_Data_HashMap_Strict_ = HashMap
{ map :: forall k a b. (a -> b) -> HashMap k a -> HashMap k b
map = (a -> b) -> HashMap k a -> HashMap k b
forall v1 v2 k. (v1 -> v2) -> HashMap k v1 -> HashMap k v2
forall k a b. (a -> b) -> HashMap k a -> HashMap k b
HashMap.map
, filter :: forall k a. (k -> a -> Bool) -> HashMap k a -> HashMap k a
filter = (k -> a -> Bool) -> HashMap k a -> HashMap k a
forall k a. (k -> a -> Bool) -> HashMap k a -> HashMap k a
HashMap.filterWithKey
, length :: forall k a. HashMap k a -> Int
length = HashMap k a -> Int
forall k a. HashMap k a -> Int
HashMap.size
, singleton :: forall k a. Hashable k => k -> a -> HashMap k a
singleton = k -> a -> HashMap k a
forall k a. Hashable k => k -> a -> HashMap k a
HashMap.singleton
, null :: forall k a. HashMap k a -> Bool
null = HashMap k a -> Bool
forall k a. HashMap k a -> Bool
HashMap.null
, pack :: forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
pack = [(k, a)] -> HashMap k a
forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
HashMap.fromList
, unpack :: forall k a. HashMap k a -> [(k, a)]
unpack = HashMap k a -> [(k, a)]
forall k a. HashMap k a -> [(k, a)]
HashMap.toList
, fromList :: forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
fromList = [(k, a)] -> HashMap k a
forall k a. (Eq k, Hashable k) => [(k, a)] -> HashMap k a
HashMap.fromList
, toList :: forall k a. HashMap k a -> [(k, a)]
toList = HashMap k a -> [(k, a)]
forall k a. HashMap k a -> [(k, a)]
HashMap.toList
, lookup :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Maybe a
lookup = k -> HashMap k a -> Maybe a
forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Maybe a
HashMap.lookup
, empty :: forall k a. HashMap k a
empty = HashMap k a
forall k a. HashMap k a
HashMap.empty
, insert :: forall k a.
(Eq k, Hashable k) =>
k -> a -> HashMap k a -> HashMap k a
insert = k -> a -> HashMap k a -> HashMap k a
forall k a.
(Eq k, Hashable k) =>
k -> a -> HashMap k a -> HashMap k a
HashMap.insert
, delete :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> HashMap k a
delete = k -> HashMap k a -> HashMap k a
forall k a. (Eq k, Hashable k) => k -> HashMap k a -> HashMap k a
HashMap.delete
, member :: forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Bool
member = k -> HashMap k a -> Bool
forall k a. (Eq k, Hashable k) => k -> HashMap k a -> Bool
HashMap.member
}
instance Default HashMapModule where
def :: HashMapModule
def = HashMapModule
forall interface. HashMapImplements interface => interface
_Data_HashMap_Strict_