valbar:unit ->St (unit ->St nat)letbar()=letr= alloc 2inletf:(unit -> St nat) =fun()->!r in
On debugging, I found that the problem is because F* encodes the arrow type unit -> St nat (at least) twice, and is not able to reason that it's the same type.
So, I tried the following version, and it works:
typefn=unit-> St nat
valbar:unit ->St fnletbar()=letr= alloc 2inletf:fn =((fun()->!r)<: fn)in
Perhaps the annotations cause unit -> St nat to be encoded just once.
We don't encode any HasType axiom for impure arrows, and so this problem comes (I suspect that for pure arrows the HasType enables some reasoning of two encodings of the same type). Can we make hashconsing smarter so that it does not encode same impure arrow twice (or perhaps it already is?).
The text was updated successfully, but these errors were encountered: