btree-0.4.0: B-Tree on Unmanaged Heap

Safe HaskellNone
LanguageHaskell2010

BTree.Linear

Synopsis

Documentation

data BTree s k v Source #

data Context s Source #

Constructors

Context 

Fields

lookup :: forall m k v. (PrimMonad m, Ord k, Prim k, Prim v) => Context (PrimState m) -> BTree (PrimState m) k v -> k -> m (Maybe v) Source #

insert :: (PrimMonad m, Ord k, Prim k, Prim v) => Context (PrimState m) -> BTree (PrimState m) k v -> k -> v -> m (BTree (PrimState m) k v) Source #

modifyWithM :: forall m s k v. (PrimMonad m, Ord k, Prim k, Prim v) => Context s -> BTree (PrimState m) k v -> k -> (Maybe v -> m v) -> m (v, BTree (PrimState m) k v) Source #

new Source #

Arguments

:: (PrimMonad m, Prim k, Prim v) 
=> Context (PrimState m)

Max number of children per node

-> m (BTree (PrimState m) k v) 

foldrWithKey :: forall m k v b. (PrimMonad m, Ord k, Prim k, Prim v) => (k -> v -> b -> m b) -> b -> Context (PrimState m) -> BTree (PrimState m) k v -> m b Source #

toAscList :: forall m k v. (PrimMonad m, Ord k, Prim k, Prim v) => Context (PrimState m) -> BTree (PrimState m) k v -> m [(k, v)] Source #

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

fromList :: (PrimMonad m, Ord k, Prim k, Prim v) => Context (PrimState m) -> [(k, v)] -> m (BTree (PrimState m) k v) Source #

debugMap :: forall m k v. (PrimMonad m, Prim k, Prim v, Show k, Show v) => Context (PrimState m) -> BTree (PrimState m) k v -> m String Source #

Show the internal structure of a Map, useful for debugging, not exported