This breaks mixed_prefix_2 example by allowing a negative-rank variable into the pool. Rewriting that example without a signature on z works correctly (mixed_prefix_2_no_sig). This is a bug with fresh variable generation when converting a type annotation to internal representation.
Consider these two definitions:
z
andz'
have the same type but internally their representation is different. Concretely, rank ofInt
type is set incorrectly to-1
inz
:This breaks
mixed_prefix_2
example by allowing a negative-rank variable into the pool. Rewriting that example without a signature onz
works correctly (mixed_prefix_2_no_sig
). This is a bug with fresh variable generation when converting a type annotation to internal representation.