StmHamt.Hamt

stm-hamt-1.2.1: STM-specialised Hash Array Mapped Trie

Safe Haskell | None
Language | Haskell2010

StmHamt.Hamt

Synopsis

- data Hamt element
- new :: STM (Hamt a)
- newIO :: IO (Hamt a)
- null :: Hamt a -> STM Bool
- focus :: Hashable key => Focus element STM result -> (element -> key) -> key -> Hamt element -> STM result
- focusExplicitly :: Focus a STM b -> Int -> (a -> Bool) -> Hamt a -> STM b
- insert :: Hashable key => (element -> key) -> element -> Hamt element -> STM Bool
- insertExplicitly :: Int -> (a -> Bool) -> a -> Hamt a -> STM Bool
- lookup :: Hashable key => (element -> key) -> key -> Hamt element -> STM (Maybe element)
- lookupExplicitly :: Int -> (a -> Bool) -> Hamt a -> STM (Maybe a)
- reset :: Hamt a -> STM ()
- unfoldlM :: Hamt a -> UnfoldlM STM a
- listT :: Hamt a -> ListT STM a
- listTNonAtomic :: Hamt a -> ListT IO a

# Documentation

data Hamt element #

STM-specialized Hash Array Mapped Trie.

new :: STM (Hamt a) #

newIO :: IO (Hamt a) #

null :: Hamt a -> STM Bool #

focus :: Hashable key => Focus element STM result -> (element -> key) -> key -> Hamt element -> STM result #

focusExplicitly :: Focus a STM b -> Int -> (a -> Bool) -> Hamt a -> STM b #

insert :: Hashable key => (element -> key) -> element -> Hamt element -> STM Bool #

Returns a flag, specifying, whether the size has been affected.

insertExplicitly :: Int -> (a -> Bool) -> a -> Hamt a -> STM Bool #

Returns a flag, specifying, whether the size has been affected.

lookup :: Hashable key => (element -> key) -> key -> Hamt element -> STM (Maybe element) #

Returns a flag, specifying, whether the size has been affected.

lookupExplicitly :: Int -> (a -> Bool) -> Hamt a -> STM (Maybe a) #

reset :: Hamt a -> STM () #

unfoldlM :: Hamt a -> UnfoldlM STM a #

listT :: Hamt a -> ListT STM a #

listTNonAtomic :: Hamt a -> ListT IO a #