Sub and Poly, two new additions to the PL Zoo
- 14 September 2008
- Programming languages, Software
I have added two new languages to the Programming Languages Zoo which demonstrate polymorphic type inference and type checking with subtypes.
The first one is poly, which is an extension of MiniHaskell with parametric polymorphism and type inference. In fact, evaluation is exactly the same as in MiniHaskell, the only difference is omission of type information in the source code and type inference rather than type checking. Have a look at the implementation of type inferrence if you would like to see a very simple algorithm for inferring polymorphic types.
The second language is sub, which is an extension of MiniML with records and subypes. Have a look at the implementation of type checking if you would like to see a very simple algorithm for type checking in the presence of subtyping.
[...] have another hosting service at the moment). It’s a modification of the toy language Poly from Andrej Bauer’s Programming Language Zoo. You’ll need OCaml to compile it. Please [...]