aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-12 14:49:26 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-13 15:14:45 +0200
commit71563ebb86a83bc7cdfc17f58493f59428d764b0 (patch)
tree247d33d8021ede65e34ac6d2de3d4224f0c80e90 /tactics
parent1014de55656c2698500089d940a12f7e4b26a0de (diff)
Safer API for constr_of_global, and getting rid of unsafe_constr_of_global.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tactics.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 2e3a4e33b..177c44bcb 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -5004,7 +5004,9 @@ let cache_term_by_tactic_then ~opaque ?(goal_type=None) id gk tac tacK =
in
let cst = Impargs.with_implicit_protection cst () in
(* let evd, lem = Evd.fresh_global (Global.env ()) evd (ConstRef cst) in *)
- let lem, ctx = Universes.unsafe_constr_of_global (ConstRef cst) in
+ let lem, ctx = Global.constr_of_global_in_context (Global.env ()) (ConstRef cst) in
+ let inst = Univ.AUContext.instance ctx in
+ let lem = CVars.subst_instance_constr inst lem in
let lem = EConstr.of_constr lem in
let evd = Evd.set_universe_context evd ectx in
let open Safe_typing in