Safe Haskell | Safe |
---|
Implementation of fixed-size hash tables, with a type class for constructing hash values for structured types.
The HashTable
type
A hash table with keys of type key
and values of type val
.
The type key
should be an instance of Eq
.
Operations on HashTable
s
new :: (Eq key, Hash key) => Int -> IO (HashTable key val) #
Builds a new hash table with a given size
lookup :: Hash key => key -> IO (Maybe val) #
Looks up a key in the hash table, returns
if the key
was found, or Just
valNothing
otherwise.