btree-0.4.0: B-Tree on Unmanaged Heap

Safe HaskellNone
LanguageHaskell2010

BTree

Synopsis

Documentation

data BTree s k v Source #

newtype Context s Source #

Constructors

Context (Context s) 

lookup :: forall s k v. (Ord k, Prim k, Prim v) => BTree s k v -> k -> ST s (Maybe v) Source #

insert :: (Ord k, Prim k, Prim v) => BTree s k v -> k -> v -> ST s () Source #

modifyWithM :: forall s k v. (Ord k, Prim k, Prim v) => BTree s k v -> k -> (Maybe v -> ST s v) -> ST s v Source #

new Source #

Arguments

:: (Prim k, Prim v) 
=> Context s

Max number of children per node

-> ST s (BTree s k v) 

foldrWithKey :: forall s k v b. (Ord k, Prim k, Prim v) => (k -> v -> b -> ST s b) -> b -> BTree s k v -> ST s b Source #

toAscList :: forall s k v. (Ord k, Prim k, Prim v) => BTree s k v -> ST s [(k, v)] Source #

This is provided for completeness but is not something typically useful in producetion code.

fromList :: (Ord k, Prim k, Prim v) => Context s -> [(k, v)] -> ST s (BTree s k v) Source #

debugMap :: forall s k v. (Prim k, Prim v, Show k, Show v) => BTree s k v -> ST s String Source #