Portabilitynon-portable (requires STM)
MaintainerEdward Kmett <>

Data.THash Internals. Unless you really want to do the plumbing yourself you probably want to use that instead.

There is a nearby point in the design space that generates a traditional sorted linear hash table which will output keys and values in the same order as long as both hashes have the same set of keys, regardless of insertion order. To get there we would need to maintain the linked lists in sorted order.

data THT k v
new :: (k -> Int) -> STM (THT k v)
fromList :: Eq k => (k -> Int) -> [(k, v)] -> STM (THT k v)
insert :: Eq k => THT k v -> k -> v -> STM (THT k v, Bool)
update :: Eq k => THT k v -> k -> v -> STM (THT k v)
modify :: Eq k => THT k v -> k -> (Maybe v -> v) -> STM (THT k v)
delete :: Eq k => THT k v -> k -> STM (THT k v, Bool)
lookup :: Eq k => THT k v -> k -> STM (Maybe v)
mapH :: ((k, v) -> r) -> THT k v -> STM [r]
each :: THT k v -> STM [(k, v)]
keys :: THT k v -> STM [k]
values :: THT k v -> STM [v]
Produced by Haddock version 0.7