aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-08 13:50:46 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-08 19:23:51 +0200
commitb440899b0f07a23dfce69ae38b0a2b993cc6370c (patch)
treee1751770ae8dcd7c92aef28b2f8ca35edbe3a9c7 /pretyping
parenta6c966a23e24be9543b01b6944826ab5479fd784 (diff)
- Add a primitive tclEVARUNIVERSECONTEXT to reset the universe context of an evar_map
in tactics, avoiding useless and potentially costly merge's of constraints. - Implement revert and generalize using the new tactics (not bound to syntax though, as they are not backwards-compatible yet).
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evd.ml3
-rw-r--r--pretyping/evd.mli1
2 files changed, 4 insertions, 0 deletions
diff --git a/pretyping/evd.ml b/pretyping/evd.ml
index 5a9281c89..1f462197c 100644
--- a/pretyping/evd.ml
+++ b/pretyping/evd.ml
@@ -743,6 +743,9 @@ let evars_reset_evd ?(with_conv_pbs=false) ?(with_univs=true) evd d =
let merge_universe_context evd uctx' =
{ evd with universes = union_evar_universe_context evd.universes uctx' }
+let set_universe_context evd uctx' =
+ { evd with universes = uctx' }
+
let add_conv_pb pb d = {d with conv_pbs = pb::d.conv_pbs}
let evar_source evk d = (find d evk).evar_source
diff --git a/pretyping/evd.mli b/pretyping/evd.mli
index 49a91f524..a360351b7 100644
--- a/pretyping/evd.mli
+++ b/pretyping/evd.mli
@@ -468,6 +468,7 @@ val universes : evar_map -> Univ.universes
val merge_universe_context : evar_map -> evar_universe_context -> evar_map
+val set_universe_context : evar_map -> evar_universe_context -> evar_map
val merge_context_set : rigid -> evar_map -> Univ.universe_context_set -> evar_map
val merge_universe_subst : evar_map -> Universes.universe_opt_subst -> evar_map