Converting typing information from one OCaml version to a later one?

For me reading the cmi is enough, so I implemented it on ocaml-migrate-types, it can do 411 → 412 types, will implement 410 → 411, which is probably painful because of the Uid

https://migrate_411_412.ml

edit:

410 → 411 was also implemented, a bit concerned with the type_separability thing
https://migrate_410_411.ml

edit2:

408 → 412 ready

edit3:

This can probably be used on the CMT, by doing Untypeast → Type(using latest). I wonder if that would allow merlin to support older versions.

edit4:

Was able to run the OCaml typechecker for 4.12 on 4.08, and convert the CMIs with success to type code. More testing is needed, but hopefully the transformations are correct and we can then use it to load CMT.

3 Likes