Idea: Standard OCaml runtime type representation

There are also

Incidentally, at LexiFi we have had a fork of OCaml for over 20 years that tightly integrates a runtime representation of types with the typechecker, and the result is a very powerful combo (it is the core technology behind most of our development).

I agree that having a common representation of types upstream would be great. But as already remarked by @dbuenzli, the difficult part is to reach a consensus on the design (especially as some of the questions may not have clear answers). In any case, we already have a module for it: https://github.com/ocaml/ocaml/blob/trunk/stdlib/type.mli :slight_smile:

Anyway, for those that want to learn more about the backgound:

Cheers,
Nicolas

5 Likes