Copyright | (c) Nicolás Rodríguez 2021 |
---|---|
License | GPL-3 |
Maintainer | Nicolás Rodríguez |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Interface for the main functions over type safe BST trees
implemented with the internalist approach. This module reexports
the functions defined over ITree
trees from the modules
Data.Tree.BST.Extern.Constructors, Data.Tree.BST.Extern.Delete,
Data.Tree.BST.Extern.Insert and Data.Tree.BST.Extern.Lookup.
Synopsis
- data BST :: Tree -> Type where
- mkBST :: IsBSTC t => ITree t -> BST t
- data ITree :: Tree -> Type where
- EmptyITree :: ITree 'EmptyTree
- insert :: Insertable x a t => Node x a -> ITree t -> ITree (Insert x a t)
- lookup :: (Lookupable x a t, t ~ 'ForkTree l (Node n a1) r, Member x t t ~ 'True) => Proxy x -> ITree t -> a
- delete :: Deletable x t => Proxy x -> ITree t -> ITree (Delete x t)
Documentation
data ITree :: Tree -> Type where Source #
Value level trees indexed by trees of kind `Tree
.
The tree structure from the value level is replicated at the type level.
EmptyITree :: ITree 'EmptyTree |
insert :: Insertable x a t => Node x a -> ITree t -> ITree (Insert x a t) Source #
Insert a new node. If the key is already present in the tree, update the value.