Our implementation takes advantage of OCaml's functor system, and
Base type system module with typical types
and typing rules, and hooks for an
Extension module to
Base with new types and typing rules.
The TeJaS system is summarized in our paper at DLS
We've used TeJaS to implement a type system for
jQuery, which augments the
Base system with new
kinds for describing the sizes of jQuery collection objects.
TeJaS is open-source and available on Github.