Implement weak polymorphic variables. These variables are displayed as _weak0 (as in OCaml).
They cannot be generalized. These are juste variables "waiting to be instantiated". When such an instantiation occurs, the typing environment is patched to substitute all occurrences of the variables with their instance. As with OCaml, one can observe weak polymorphic variables in the toplevel e.g. by creating mutable references or performing partial applications of polymorphic functions. When compiling a file, an error is raised when toplevel identifiers whose type contains polymorphic variables remain.
Showing with 155 additions and 39 deletions