-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unary transform" raises some typechecker problems #121
Comments
Ah! It's not F*, this works fine" module X
open FStar.Tactics.V2
let _ = assert True by begin
let t = `([12345] <: list nat) in
let res = instantiate_implicits (cur_env()) t in
match res with
| Some (t, ty), _ -> print (term_to_string t)
| _ -> fail "None?"
end
It's the steel/lib/steel/pulse/Pulse.Checker.Pure.fst Lines 59 to 65 in 0dae0f0
|
Another symptom (lucky coincidence to find it just after this) This open Pulse.Lib.Pervasives
module GR = Pulse.Lib.GhostReference
noeq
type finv (p:vprop) = {
r : GR.ref bool;
i : inv emp;
}
```pulse
fn crash (p:vprop)
requires emp
ensures emp
{
let r = GR.alloc false;
let i = new_invariant' emp;
let fi : finv p = { r=r; i=i } <: finv p;
admit()
}
`` Fails with
But works fine if the pass is removed. |
Also, this is the code in F* that solves the constraints eagerly. |
The trouble with record literal syntax and unary transform is addressed here: |
The following fails to check, since a call to
instantiate_implicits
onCons 12345 Nil <: list nat
elaborates it toCons #int 12345 (Nil #int) <: list nat
, instantiating the implicit withint
instead ofnat
, even with the ascriptions. I think F* is to blameThe text was updated successfully, but these errors were encountered: