aboutsummaryrefslogtreecommitdiffhomepage
path: root/stm/stm.ml
diff options
context:
space:
mode:
authorGravatar Tej Chajed <tchajed@mit.edu>2017-03-23 15:11:46 -0400
committerGravatar Tej Chajed <tchajed@mit.edu>2017-03-23 15:15:43 -0400
commit209ff6ae4367b8c96b59bc318f4791dcb2251c14 (patch)
tree4b3bfb5c0b8664ffe056c3a3af3117e1c5a1a785 /stm/stm.ml
parent9dc839ee08d4aef904d95bd358d5486b4964ef4e (diff)
Correctly identify [Time Defined.] as a defined
Need to check inside control expressions. Also fixes handling of [Redirect "file" Defined.] and [Timeout n Defined.]. Fixes Coq bug 5411 (https://coq.inria.fr/bugs/show_bug.cgi?id=5411): coqc -quick hangs on [Time Defined.]
Diffstat (limited to 'stm/stm.ml')
-rw-r--r--stm/stm.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index f577994ff..71ec8acc6 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -1912,10 +1912,14 @@ let collect_proof keep cur hd brkind id =
| [] -> no_name
| id :: _ -> Id.to_string id in
let loc = (snd cur).loc in
- let is_defined = function
- | _, { expr = VernacEndProof (Proved ((Transparent|Opaque (Some _)),_)) } ->
- true
+ let rec is_defined_expr = function
+ | VernacEndProof (Proved ((Transparent|Opaque (Some _)),_)) -> true
+ | VernacTime (_, e) -> is_defined_expr e
+ | VernacRedirect (_, (_, e)) -> is_defined_expr e
+ | VernacTimeout (_, e) -> is_defined_expr e
| _ -> false in
+ let is_defined = function
+ | _, { expr = e } -> is_defined_expr e in
let proof_using_ast = function
| Some (_, ({ expr = VernacProof(_,Some _) } as v)) -> Some v
| _ -> None in