← All repos

type-systems

Implementations of various type systems in OCaml.

Browse cluster: Cosmos blockchain and smart contract languages
68commits
3contributors
2languages

Tech stack & purpose

The type-systems repository contains implementations of various type systems in OCaml. It includes Algorithm W, an implementation of the Damas-Hindley-Milner type inference system with optimizations using updatable references and ranked type variables; extensible record systems based on work by Daan Leijen that support polymorphic and safe record types with scoped labels; and a first-class polymorphism system based on HMF (Haskell-style impredicative polymorphism) that extends Hindley-Milner to support polymorphic function parameters and higher-rank types. The implementations are built in OCaml using ocamllex for lexical analysis and ocamlyacc for parsing, and demonstrate both foundational type inference algorithms and extensions to them for practical language features.

Community & reference links

Languages

OCaml
99.8%
Shell
0.2%

Contributors