Hello,
I am trying to add session types to the OCaml language. We have an inference algorithm for a type and effect system which I am currently trying to implement by modifying the typechecker. For now I am only targeting the core of the language (no objects, GADTs) and I mostly need to be able to prevent generalization of some type variables.
The issue I am running into is that documentation about this part of the compiler seems to be very sparse, I have found some documentation about ML type inference in general [1], generalization [2] and the value restriction [3] but I was wondering if there was more information available about the actual implementation of the inference algorithm.