From 5e4101a2813f1b98478d52d2cbb763db5d8c76c7 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sun, 22 Mar 2015 12:40:28 +0100 Subject: STM: if Set Universe Polymorphism then synchronous (#4119) It was detecting only the per-lemma Polymorphic flag, but not the global one. --- stm/stm.ml | 7 ++++--- stm/vernac_classifier.ml | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'stm') diff --git a/stm/stm.ml b/stm/stm.ml index aaf3b3c1a..d9ecc8bcc 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -1602,10 +1602,11 @@ let pstate = summary_pstate let async_policy () = let open Flags in - if interactive () = `Yes then - (async_proofs_is_master () || !async_proofs_mode = Flags.APonLazy) + if is_universe_polymorphism () then false + else if interactive () = `Yes then + (async_proofs_is_master () || !async_proofs_mode = APonLazy) else - (!compilation_mode = Flags.BuildVio || !async_proofs_mode <> Flags.APoff) + (!compilation_mode = BuildVio || !async_proofs_mode <> APoff) let delegate name = let time = get_hint_bp_time name in diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml index 81fad1379..783ff2e11 100644 --- a/stm/vernac_classifier.ml +++ b/stm/vernac_classifier.ml @@ -65,6 +65,11 @@ let rec classify_vernac e = | VernacUnsetOption (["Silent"]|["Undo"]|["Printing";"Depth"]) | VernacSetOption ((["Silent"]|["Undo"]|["Printing";"Depth"]),_) when !Flags.print_emacs -> VtStm(VtPG,false), VtNow + (* 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 (["Universe"; "Polymorphism"],_) + | VernacUnsetOption (["Universe"; "Polymorphism"]) -> VtSideff [], VtNow (* Stm *) | VernacStm Finish -> VtStm (VtFinish, true), VtNow | VernacStm Wait -> VtStm (VtWait, true), VtNow -- cgit v1.2.3