| Copyright | (c) Nicolás Rodríguez 2021 |
|---|---|
| License | GPL-3 |
| Maintainer | Nicolás Rodríguez |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Tree.BST.Extern.Constructors
Description
Implementation of the constructor of type safe externalist BST
trees and instance definition for the Show type class.
Documentation
data IsBSTT :: Tree -> Type where Source #
Proof term which shows that t is a BST.
The restrictions on the constructor ForkIsBSTT
are verified at compile time.
Given two proofs of BST and an arbitrary node, it tests wether the key
of the node verifies the LtN and GtN invariants.
Notice that this is all that's needed to assert that the new tree is a BST,
since, both left and right proofs are evidence of the key ordering in both
left and right sub trees.