diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-12-15 04:15:55 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-12-23 19:30:17 +0100 |
commit | ed09ae7a473a99c914f2af64d3387d9190e85849 (patch) | |
tree | e5b51993dc0602eb1fa985d293d82c03d286ec86 /stm/stm.ml | |
parent | dea75d74c222c25f6aa6c38506ac7a51b339e9c6 (diff) |
[flags] Move global time flag into an attribute.
One less global flag.
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 |