Skip to content
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

Crash with tactics, variable not found #2981

Closed
mtzguido opened this issue Jun 27, 2023 · 2 comments
Closed

Crash with tactics, variable not found #2981

mtzguido opened this issue Jun 27, 2023 · 2 comments

Comments

@mtzguido
Copy link
Member

module Bug

open FStar.Tactics.V2

assume val token (g:env) : Type0
assume val check (g:env) : Tac (option (token g))

let test1 () : Tac unit =
  let r = check (cur_env()) in
  ()
Bug.fst(6,46-6,47): (Error 230) Variable "g#418" not found (see also Bug.fst(6,18-6,19)) 

Using a separate letbinding for the cur_env call works.

@aseemr
Copy link
Collaborator

aseemr commented Jul 11, 2023

This seems like a reasonable error (perhaps not so much for the error message) ... what's the type of r in this code. With an explicit binding, we can write the type, but with the code as written I don't think we can.

@mtzguido
Copy link
Member Author

We now get a good message after #3105 (though the wrapping is unfortunate)

* Error 56 at Bug2981.fst(9,10-9,27):
  - Bound variable
    'g#73'
    escapes because of impure applications in the type of
    'check'
  - Add explicit let-bindings to avoid this

1 error was reported (see above)

mtzguido added a commit to mtzguido/FStar that referenced this issue Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants