aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine/evd.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2017-04-05 23:17:56 +0200
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2018-06-15 11:58:56 +0200
commit8ab4f8f76958d2603858ad3e4073be61ad38d113 (patch)
tree562f52d70b92717acaf0916fd9c0f91cb4ac0d61 /engine/evd.ml
parent31e13998542941040343cb81787a1d7c865d5b65 (diff)
evd: restrict_evar with candidates, can raise NoCandidatesLeft
When restricting an evar with candidates, raise an exception if this restriction would leave the evar without candidates, i.e. unsolvable. - evarutil: mark restricted evars as "cleared" They would otherwise escape being catched by the [advance] function of clenv, and result in dangling evars not being registered to the shelf. - engine: restrict_evar marks it cleared, update the future goals We make the new evar a future goal and remove the old one. If we did nothing, [unshelve tac] would work correctly as it uses [Proofview.advance] to find the shelved goals, going through the cleared evar. But [Unshelve] would fail as it expects only undefined evars on the shelf and throws away the defined ones.
Diffstat (limited to 'engine/evd.ml')
-rw-r--r--engine/evd.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/evd.ml b/engine/evd.ml
index 0c9c3a29b..7e0c397b2 100644
--- a/engine/evd.ml
+++ b/engine/evd.ml
@@ -171,6 +171,8 @@ let evar_context evi = named_context_of_val evi.evar_hyps
let evar_filtered_context evi =
Filter.filter_list (evar_filter evi) (evar_context evi)
+let evar_candidates evi = evi.evar_candidates
+
let evar_hyps evi = evi.evar_hyps
let evar_filtered_hyps evi = match Filter.repr (evar_filter evi) with
@@ -620,6 +622,7 @@ let merge_universe_context evd uctx' =
let set_universe_context evd uctx' =
{ evd with universes = uctx' }
+(* TODO: make unique *)
let add_conv_pb ?(tail=false) pb d =
(** MS: we have duplicates here, why? *)
if tail then {d with conv_pbs = d.conv_pbs @ [pb]}