aboutsummaryrefslogtreecommitdiff
path: root/stm/proofBlockDelimiter.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-06-10 20:09:21 +0200
committerPierre-Marie Pédrot2019-06-10 20:09:21 +0200
commit45306c6c9c433b86406d041f58aafb7cf3a3ff82 (patch)
treeddb15276f063005dce83e934612fbcf9ed031b22 /stm/proofBlockDelimiter.ml
parent2d96d349a3adba517eae0fadb967d293bb84a9a7 (diff)
parent185997bb2ca59c3929a51540c0a60630ef21a133 (diff)
Merge PR #9566: [proof] Move proofs that have an associated constant to `Lemmas`
Ack-by: SkySkimmer Ack-by: ejgallego Ack-by: gares Reviewed-by: ppedrot
Diffstat (limited to 'stm/proofBlockDelimiter.ml')
-rw-r--r--stm/proofBlockDelimiter.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/stm/proofBlockDelimiter.ml b/stm/proofBlockDelimiter.ml
index dfa681395a..7ff6ed9dfb 100644
--- a/stm/proofBlockDelimiter.ml
+++ b/stm/proofBlockDelimiter.ml
@@ -48,15 +48,14 @@ let simple_goal sigma g gs =
let is_focused_goal_simple ~doc id =
match state_of_id ~doc id with
| `Expired | `Error _ | `Valid None -> `Not
- | `Valid (Some { Vernacstate.proof }) ->
- Option.cata (fun proof ->
- let proof = Proof_global.get_current_pstate proof in
- let proof = Proof_global.give_me_the_proof proof in
+ | `Valid (Some { Vernacstate.lemmas }) ->
+ Option.cata (Lemmas.Stack.with_top_pstate ~f:(fun proof ->
+ let proof = Proof_global.get_proof proof in
let Proof.{ goals=focused; stack=r1; shelf=r2; given_up=r3; sigma } = Proof.data proof in
let rest = List.(flatten (map (fun (x,y) -> x @ y) r1)) @ r2 @ r3 in
if List.for_all (fun x -> simple_goal sigma x rest) focused
then `Simple focused
- else `Not) `Not proof
+ else `Not)) `Not lemmas
type 'a until = [ `Stop | `Found of static_block_declaration | `Cont of 'a ]