Open jstolarek opened 3 years ago
Fixed. bad3
is now rejected only if we apply the monomorphic instantiation constraint. Without that constraint it is incorrectly accepted.
I am reopening this as a reminder to test freezing of types without quantifiers a bit more once #35 has been properly implemented. We need to make sure that freezing works correctly for unquantified types coming from monomorphising lets.
Following recent discussions about
isMonoInst
predicate I've been investigating examplesbad3
andbad4
. These examples should fail due to monomorphic instantiation constraint on non-GVal let-bound terms. But these examples have been failing even when this constraint was not implemented. It seems like the problem comes from a bug in freezing that leads to inserting bogus forall quantifiers:Freezing
f
results inforall []. {id=4, rank=1}
, which in turn does not unify withforall [{id=18, rank=-1}]. ...
. This is wrong.