johnyob/dromedary

Dromedary is an experimental subset of OCaml, using constraint-based type inference!

OCaml

50

266 commits

updated Sep 23, 2025

See the code

README

🐪 Dromedary

An experimental subset of OCaml, using constraint-based type inference!

Coverage Status

What is Dromedary?

Dromedary is a work-in-progress implementation of a constraint-based type checker for a large subset of OCaml. It is largely based on the work of François Pottier's Hindley-Milner elaboration in an applicative style and the constraint language presented in The Essence of ML Type Inference.

Features

Dromedary implements significantly more features than the language presented in Pottier's paper, including:

  • Algebraic data types and pattern matching
  • Mutually recursive let bindings
  • Side-effecting primitives and the value restriction
  • GADTs
  • Polymorphic variants
  • Semi-explicit first-class polymorphism (record fields only)
  • Type abbreviations
  • Structures

For a description of the thoery of these extensions in a constraint-based setting, see the accompanying dissertation.

Contributors

johnyob

264 commits

andreypopp

1 commits

rr0gi

1 commits

johnyob/dromedary

Dromedary is an experimental subset of OCaml, using constraint-based type inference!

OCaml

50

266 commits

updated Sep 23, 2025

See the code

README

🐪 Dromedary

An experimental subset of OCaml, using constraint-based type inference!

Coverage Status

What is Dromedary?

Dromedary is a work-in-progress implementation of a constraint-based type checker for a large subset of OCaml. It is largely based on the work of François Pottier's Hindley-Milner elaboration in an applicative style and the constraint language presented in The Essence of ML Type Inference.

Features

Dromedary implements significantly more features than the language presented in Pottier's paper, including:

  • Algebraic data types and pattern matching
  • Mutually recursive let bindings
  • Side-effecting primitives and the value restriction
  • GADTs
  • Polymorphic variants
  • Semi-explicit first-class polymorphism (record fields only)
  • Type abbreviations
  • Structures

For a description of the thoery of these extensions in a constraint-based setting, see the accompanying dissertation.

Contributors

johnyob

264 commits

andreypopp

1 commits

rr0gi

1 commits

Languages

OCaml

99.9%