diff options
author | 2017-12-29 13:41:29 +0100 | |
---|---|---|
committer | 2017-12-29 13:41:29 +0100 | |
commit | c0e5746e6b273eb4592d24867da55dde40b656c9 (patch) | |
tree | f19c8de545f461a7cf8abfbbd7747e8020a9b8a0 /stm/stm.ml | |
parent | 7e319ad03aba413f3165b848eaf821b364f9291b (diff) | |
parent | ed09ae7a473a99c914f2af64d3387d9190e85849 (diff) |
Merge PR #6433: [flags] Move global time flag into an attribute.
Diffstat (limited to 'stm/stm.ml')
-rw-r--r-- | stm/stm.ml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/stm/stm.ml b/stm/stm.ml index afb6fabcb..7045df0ed 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -1935,15 +1935,16 @@ end = struct (* {{{ *) let vernac_interp ~solve ~abstract ~cancel_switch nworkers safe_id id { indentation; verbose; loc; expr = e; strlen } = - let e, time, fail = - let rec find ~time ~fail = function - | VernacTime (_,e) -> find ~time:true ~fail e - | VernacRedirect (_,(_,e)) -> find ~time ~fail e - | VernacFail e -> find ~time ~fail:true e - | e -> e, time, fail in find ~time:false ~fail:false e in + let e, time, batch, fail = + let rec find ~time ~batch ~fail = function + | VernacTime (batch,(_,e)) -> find ~time:true ~batch ~fail e + | VernacRedirect (_,(_,e)) -> find ~time ~batch ~fail e + | VernacFail e -> find ~time ~batch ~fail:true e + | e -> e, time, batch, fail in + find ~time:false ~batch:false ~fail:false e in let st = Vernacstate.freeze_interp_state `No in Vernacentries.with_fail st fail (fun () -> - (if time then System.with_time !Flags.time else (fun x -> x)) (fun () -> + (if time then System.with_time ~batch else (fun x -> x)) (fun () -> ignore(TaskQueue.with_n_workers nworkers (fun queue -> Proof_global.with_current_proof (fun _ p -> let goals, _, _, _, _ = Proof.proof p in |