diff options
| author | Enrico Tassi | 2014-07-11 10:34:55 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2014-07-11 10:35:16 +0200 |
| commit | 58270be4668ab87e5f2d0d06c820bd457ae1aa01 (patch) | |
| tree | 42d4e399ef829f45f02d0c496c955d380acb4ab0 | |
| parent | d15b6418d6f7071b6d85b286d60e645dcd0123b5 (diff) | |
STM: flag to turn off branch reopening
This is useful if a UI does not support that
| -rw-r--r-- | lib/flags.ml | 1 | ||||
| -rw-r--r-- | lib/flags.mli | 1 | ||||
| -rw-r--r-- | stm/stm.ml | 4 | ||||
| -rw-r--r-- | toplevel/coqtop.ml | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/lib/flags.ml b/lib/flags.ml index 9dd65db6dc..5d94270f47 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -53,6 +53,7 @@ let async_proofs_mode = ref APoff let async_proofs_n_workers = ref 1 let async_proofs_worker_flags = ref None let async_proofs_always_delegate = ref false +let async_proofs_never_reopen_branch = ref false let async_proofs_is_worker () = match !async_proofs_mode with diff --git a/lib/flags.mli b/lib/flags.mli index a0ff0f55ea..53284c6992 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -22,6 +22,7 @@ val async_proofs_worker_flags : string option ref val async_proofs_is_worker : unit -> bool val async_proofs_always_delegate : bool ref +val async_proofs_never_reopen_branch : bool ref val debug : bool ref diff --git a/stm/stm.ml b/stm/stm.ml index 8b44e3dbf8..659cfe3c8d 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -1232,7 +1232,7 @@ let collect_proof cur hd brkind id = if is_defined cur then `Sync (no_name,`Transparent) else let rc = collect (Some cur) [] id in - if not (State.is_cached id) then rc + if not (State.is_cached id) || !Flags.async_proofs_always_delegate then rc else (* we already have the proof, no gain in delaying *) match rc with | `Sync(name,_) -> `Sync (name,`AlreadyEvaluated) @@ -1920,7 +1920,7 @@ let edit_at id = | _, Some _, None -> assert false | false, Some qed_id, Some mode -> let tip = VCS.cur_tip () in - if has_failed qed_id then reopen_branch id mode qed_id tip + if has_failed qed_id && not !Flags.async_proofs_never_reopen_branch then reopen_branch id mode qed_id tip else backto id | true, Some qed_id, Some mode -> if on_cur_branch id then begin diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index be63db391d..73e1fb9d15 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -382,6 +382,8 @@ let parse_args arglist = (* Options with zero arg *) |"-async-proofs-always-delegate" -> Flags.async_proofs_always_delegate := true; + |"-async-proofs-never-reopen-branch" -> + Flags.async_proofs_never_reopen_branch := true; |"-batch" -> set_batch_mode () |"-beautify" -> make_beautify true |"-boot" -> boot := true; no_load_rc () |
