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

tactics: ctrl_rewrite: perform rewrite under arrows #3103

Closed
wants to merge 1 commit into from

Conversation

amosr
Copy link
Contributor

@amosr amosr commented Nov 18, 2023

I wanted to perform rewrites on the environment, but when I reverted the environment it wouldn't rewrite. It looks like ctrl_rewrite was missing part of the implementation.

I implemented rewrite for Total and GTotal computations, but it wasn't clear to me what to do for effectful computations. (I assume that they won't occur in reverts, anyway.) How often does this case occur - should it perhaps print a warning?

@amosr
Copy link
Contributor Author

amosr commented Nov 18, 2023

no good...

let id (a: Type) (x: a) = x

let test = assert (let id (a: Type) (x: a) = x in id Type0 True)
      by (pointwise (fun () -> dump "outer"; trefl ()))
  - Tactic failed
  - "uncaught exception: Failure("Impossible")"
  - See also FStar.Tactics.V2.Derived.fst(239,2-239,24)

@amosr amosr closed this Nov 18, 2023
@amosr
Copy link
Contributor Author

amosr commented Nov 18, 2023

Hmm, actually I think the above "Impossible" error is a pre-existing bug. I can reproduce it on master, and on a six-month-old master gives a different, perhaps more helpful error message:

tests/tactics/RewriteInArrow.fst(12,13-12,19): (Error 228) user tactic failed: `Violation of locally nameless convention: a` (see also FStar.Tactics.Derived.fst(228,2-228,24))
1 error was reported (see above)

@amosr
Copy link
Contributor Author

amosr commented Nov 18, 2023

Superseded by #3104

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

Successfully merging this pull request may close these issues.

1 participant