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 externalist approach.
Synopsis
- emptyBST :: BST 'EmptyTree
- insertBST :: (Insertable x a t, ProofIsBSTInsert x a t) => Proxy x -> a -> BST t -> BST (Insert x a t)
- lookupBST :: (t ~ 'ForkTree l (Node n a1) r, Member x t t ~ 'True, Lookupable x a t) => Proxy x -> BST t -> a
- deleteBST :: (Deletable x t, ProofIsBSTDelete x t) => Proxy x -> BST t -> BST (Delete x t)
Documentation
insertBST :: (Insertable x a t, ProofIsBSTInsert x a t) => Proxy x -> a -> BST t -> BST (Insert x a t) Source #
Interface for the insertion algorithm in the externalist implementation.
It calls insert
over ITree
and proofIsBSTInsert
for constructing the evidence
that the new tree remains BST
.