Module Lattice


module Lattice: sig .. end
Mutable type lattice Data structure, like a hashtable, that can lookup data associated with a type. Can also find the most specific entries which cover a type.

type 'a lattice 
A mutable type lattice containing data of type 'a.
val __dynamic_type_lattice : Type.type_meta -> Type.type_meta
val empty : unit -> 'a lattice
Create an empty lattice.
val replace : 'a lattice -> Type.type_meta -> 'a -> unit
Replace data in the lattice at the given type.
val add : 'a lattice -> Type.type_meta -> 'a -> unit
Replace data in the lattice at the given type.
val find : 'a lattice -> Type.type_meta -> 'a
Find most recently added data associated with the given type.
val find_all : 'a lattice -> Type.type_meta -> 'a list
Find all data associated with the given type.
val find_most_specific : 'a lattice -> Type.type_meta -> 'a list
Find the most recently added data associated with the most specific keys which cover the given type.
val find_all_most_specific : 'a lattice -> Type.type_meta -> 'a list list
Find the all data associated with the most specific keys which cover the given type.
val find_most_specific_keys : 'a lattice -> Type.type_meta -> Type.type_meta list
Find the most specific keys which cover the given type.