jstolarek / inferno

Mirrored from https://gitlab.inria.fr/fpottier/inferno
MIT License
0 stars 1 forks source link

Implement correct semantics for let_mono constraints #35

Open jstolarek opened 3 years ago

jstolarek commented 3 years ago

At the moment monomorphic constraints perform generalisation and then mark all the quantifiers and free variables as being monomorphic. At first glance I thought this achieves the desired semantics, but it actually doesn't. For example this program should be rejected but isn't:

let f = id id in poly ~f

because f should not have a quantified type, but it does if we don't discard the quantifiers. See also: https://github.com/jstolarek/inferno/pull/33#issuecomment-768596865