Types
type Blob = Prim.Types.Blob
type Bool = Prim.Types.Bool
type Char = Prim.Types.Char
type Error = Prim.Types.Error
type ErrorCode = Prim.ErrorCode
type Float = Prim.Types.Float
type Int = Prim.Types.Int
type Int8 = Prim.Types.Int8
type Int16 = Prim.Types.Int16
type Int32 = Prim.Types.Int32
type Int64 = Prim.Types.Int64
type Nat = Prim.Types.Nat
type Nat8 = Prim.Types.Nat8
type Nat16 = Prim.Types.Nat16
type Nat32 = Prim.Types.Nat32
type Nat64 = Prim.Types.Nat64
type Principal = Prim.Types.Principal
type Region = Prim.Types.Region
type Text = Prim.Types.Text
type Iter<T> = { next : () -> ?T }
type Order = {#less; #equal; #greater}
type Result<T, E> = {#ok : T; #err : E}
type Duration = {#days : Nat; #hours : Nat; #minutes : Nat; #seconds : Nat; #milliseconds : Nat; #nanoseconds : Nat}
type List<T> = { var blocks : [var [var ?T]]; var blockIndex : Nat; var elementIndex : Nat }
module Queue
type Queue<T> = { var front : ?Node<T>; var back : ?Node<T>; var size : Nat }
type Node<T> = { value : T; var next : ?Node<T>; var previous : ?Node<T> }
type Queue<T> = Queue.Queue<T>
module Set
type Node<T> = {#leaf : Leaf<T>; #internal : Internal<T>}
type Data<T> = { elements : [var ?T]; var count : Nat }
type Internal<T> = { data : Data<T>; children : [var ?Node<T>] }
type Leaf<T> = { data : Data<T> }
type Set<T> = { var root : Node<T>; var size : Nat }
module Map
type Node<K, V> = {#leaf : Leaf<K, V>; #internal : Internal<K, V>}
type Data<K, V> = { kvs : [var ?(K, V)]; var count : Nat }
type Internal<K, V> = { data : Data<K, V>; children : [var ?Node<K, V>] }
type Leaf<K, V> = { data : Data<K, V> }
type Map<K, V> = { var root : Node<K, V>; var size : Nat }
type Map<K, V> = Map.Map<K, V>
module Stack
type Stack<T> = { var top : Pure.List<T>; var size : Nat }
type Stack<T> = Stack.Stack<T>
module Pure
type List<T> = ?(T, List<T>)
module Map
type Map<K, V> = { size : Nat; root : Tree<K, V> }
type Tree<K, V> = {#red : (Tree<K, V>, K, V, Tree<K, V>); #black : (Tree<K, V>, K, V, Tree<K, V>); #leaf}
type Map<K, V> = Map.Map<K, V>
module Set
type Tree<T> = {#red : (Tree<T>, T, Tree<T>); #black : (Tree<T>, T, Tree<T>); #leaf}
type Set<T> = { size : Nat; root : Tree<T> }