haskus-utils-0.8.0.0: Haskus utility modules

Safe HaskellNone
LanguageHaskell2010

Haskus.Utils.STM.TTree

Description

STM mutable tree

Synopsis

Documentation

data TTree k v Source #

A STM mutable tree

Constructors

TTree 

Fields

newtype TTreePath k Source #

Path in the tree

Constructors

TTreePath [k] 

singleton :: k -> v -> STM (TTree k v) Source #

Create a singleton node

addChild :: k -> v -> TTree k v -> STM (TTree k v) Source #

Add a child

detachChild :: TEq k => TTree k v -> STM () Source #

Detach a child

attachChild :: TEq k => TTree k v -> TTree k v -> STM () Source #

Attach a child a node (detaching it from a previous one if necessary)

treeFollowPath :: TEq k => TTree k v -> TTreePath k -> STM (Maybe (TTree k v)) Source #

Follow a path from a parent node