aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
Diffstat (limited to 'proofs')
-rw-r--r--proofs/goal.ml12
-rw-r--r--proofs/goal.mli2
2 files changed, 10 insertions, 4 deletions
diff --git a/proofs/goal.ml b/proofs/goal.ml
index df3f6e0dbd..1a7e9a9830 100644
--- a/proofs/goal.ml
+++ b/proofs/goal.ml
@@ -554,10 +554,16 @@ module V82 = struct
with a good implementation of them.
*)
- (* Used for congruence closure *)
- let new_goal_with sigma gl new_hyps =
+ (* Used for congruence closure and change *)
+ let new_goal_with sigma gl extra_hyps =
let evi = content sigma gl in
- let new_evi = { evi with Evd.evar_hyps = new_hyps } in
+ let hyps = evi.Evd.evar_hyps in
+ let new_hyps =
+ List.fold_right Environ.push_named_context_val extra_hyps hyps in
+ let extra_filter = List.map (fun _ -> true) extra_hyps in
+ let new_filter = extra_filter @ evi.Evd.evar_filter in
+ let new_evi =
+ { evi with Evd.evar_hyps = new_hyps; Evd.evar_filter = new_filter } in
let new_evi = Typeclasses.mark_unresolvable new_evi in
let evk = Evarutil.new_untyped_evar () in
let new_sigma = Evd.add Evd.empty evk new_evi in
diff --git a/proofs/goal.mli b/proofs/goal.mli
index 1146d95f61..72f1b16a46 100644
--- a/proofs/goal.mli
+++ b/proofs/goal.mli
@@ -232,7 +232,7 @@ module V82 : sig
val same_goal : Evd.evar_map -> goal -> Evd.evar_map -> goal -> bool
(* Used for congruence closure *)
- val new_goal_with : Evd.evar_map -> goal -> Environ.named_context_val -> goal Evd.sigma
+ val new_goal_with : Evd.evar_map -> goal -> Sign.named_context -> goal Evd.sigma
(* Used by the compatibility layer and typeclasses *)
val nf_evar : Evd.evar_map -> goal -> goal * Evd.evar_map