suber icon indicating copy to clipboard operation
suber copied to clipboard

Algebraic Subtyping typechecking algorithms implemented in Erlang

suber

Basic Erlang implementation of the Simple-sub typechecking algorithm for Algebraic Subtyping described by Lionel Parreaux in his ICFP Pearl paper, and the basis of the accompanying programming language (no codegen yet). The original, more complete Scala implementation is available on GitHub

To compile and run the type checker on an example test_file.suber, run

escript -c suber.erl

Modify the test_file.suber to make a typo in a record field name, re-run and you should get an error!

See also the cubiml branch for a different Algebraic Subtyping algorithm.