Skip to content

Commit

Permalink
Ltac1 and Ltac2: don't normalize evars for open_constr:()
Browse files Browse the repository at this point in the history
Close? #13977

Unlike #17346 we still expand in `constr:()`, hopefully we trigger
less bugs this way.
  • Loading branch information
SkySkimmer committed Oct 16, 2023
1 parent 49fce3a commit 2207de7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions doc/changelog/04-tactics/17704-open-constr-no-expand.rst
@@ -0,0 +1,6 @@
- **Changed:**
`open_constr` in Ltac1 and Ltac2 does not perform evar normalization.
Normalization may be recovered using `let c := open_constr:(...) in constr:(c)`
if necessary for performance
(`#17704 <https://github.com/coq/coq/pull/17704>`_,
by Gaëtan Gilbert).
4 changes: 2 additions & 2 deletions plugins/ltac/tacinterp.ml
Expand Up @@ -632,7 +632,7 @@ let open_constr_use_classes_flags () = {
use_typeclasses = UseTC;
solve_unification_constraints = true;
fail_evar = false;
expand_evars = true;
expand_evars = false;
program_mode = false;
polymorphic = false;
}
Expand All @@ -642,7 +642,7 @@ let open_constr_no_classes_flags () = {
use_typeclasses = NoUseTC;
solve_unification_constraints = true;
fail_evar = false;
expand_evars = true;
expand_evars = false;
program_mode = false;
polymorphic = false;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/ltac2/tac2core.ml
Expand Up @@ -39,7 +39,7 @@ let open_constr_no_classes_flags =
use_typeclasses = Pretyping.NoUseTC;
solve_unification_constraints = true;
fail_evar = false;
expand_evars = true;
expand_evars = false;
program_mode = false;
polymorphic = false;
}
Expand Down

0 comments on commit 2207de7

Please sign in to comment.