aboutsummaryrefslogtreecommitdiffhomepage
path: root/stm
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2018-05-11 10:19:35 +0200
committerGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-05-17 10:36:33 +0200
commit17a2ba8d59c9b459bb67a09cb0374ca9a1eea634 (patch)
treeb07d91cb09db1e0b4ca9cb9f1898c4b5262d9525 /stm
parent1ffa181c8015584fe1762a5ab8f6a664725767fa (diff)
[STM] Nested Proofs Allowed has to be executed immediately
since it affects scheduling (actually the error the option lets one silence)
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml2
-rw-r--r--stm/vernac_classifier.ml9
-rw-r--r--stm/vernac_classifier.mli1
3 files changed, 10 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 9192c1410..20409c25e 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -2768,7 +2768,7 @@ let allow_nested_proofs = ref false
let _ = Goptions.declare_bool_option
{ Goptions.optdepr = false;
Goptions.optname = "Nested Proofs Allowed";
- Goptions.optkey = ["Nested";"Proofs";"Allowed"];
+ Goptions.optkey = Vernac_classifier.stm_allow_nested_proofs_option_name;
Goptions.optread = (fun () -> !allow_nested_proofs);
Goptions.optwrite = (fun b -> allow_nested_proofs := b) }
diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml
index c08cc6e36..e01dcbcb6 100644
--- a/stm/vernac_classifier.ml
+++ b/stm/vernac_classifier.ml
@@ -54,13 +54,20 @@ let idents_of_name : Names.Name.t -> Names.Id.t list =
| Names.Anonymous -> []
| Names.Name n -> [n]
+let stm_allow_nested_proofs_option_name = ["Nested";"Proofs";"Allowed"]
+
+let options_affecting_stm_scheduling =
+ [ Vernacentries.universe_polymorphism_option_name;
+ stm_allow_nested_proofs_option_name ]
+
let classify_vernac e =
let static_classifier ~poly e = match e with
(* Univ poly compatibility: we run it now, so that we can just
* look at Flags in stm.ml. Would be nicer to have the stm
* look at the entire dag to detect this option. *)
| ( VernacSetOption (_, l,_) | VernacUnsetOption (_, l))
- when CList.equal String.equal l Vernacentries.universe_polymorphism_option_name ->
+ when CList.exists (CList.equal String.equal l)
+ options_affecting_stm_scheduling ->
VtSideff [], VtNow
(* Qed *)
| VernacAbort _ -> VtQed VtDrop, VtLater
diff --git a/stm/vernac_classifier.mli b/stm/vernac_classifier.mli
index abbc04e89..45fbfb42a 100644
--- a/stm/vernac_classifier.mli
+++ b/stm/vernac_classifier.mli
@@ -25,3 +25,4 @@ val classify_as_query : vernac_classification
val classify_as_sideeff : vernac_classification
val classify_as_proofstep : vernac_classification
+val stm_allow_nested_proofs_option_name : string list