Commit 892ae0d7 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

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.
parent 2a289e1c
Pipeline #191 passed with stages
in 4 minutes and 24 seconds