diff options
-rw-r--r-- | ltac/g_ltac.ml4 | 2 | ||||
-rw-r--r-- | stm/proofBlockDelimiter.ml | 22 | ||||
-rw-r--r-- | stm/proofBlockDelimiter.mli | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/ltac/g_ltac.ml4 b/ltac/g_ltac.ml4 index c8287a2c8..7c161e5cd 100644 --- a/ltac/g_ltac.ml4 +++ b/ltac/g_ltac.ml4 @@ -366,7 +366,7 @@ VERNAC tactic_mode EXTEND VernacSolve vernac_solve g n t def ] | [ - "par" ":" ltac_info_opt(n) tactic(t) ltac_use_default(def) ] => - [ VtProofStep{ parallel = true; proof_block_detection = None }, + [ VtProofStep{ parallel = true; proof_block_detection = Some "par" }, VtLater ] -> [ vernac_solve SelectAll n t def ] diff --git a/stm/proofBlockDelimiter.ml b/stm/proofBlockDelimiter.ml index 1e37209ed..8c50ad969 100644 --- a/stm/proofBlockDelimiter.ml +++ b/stm/proofBlockDelimiter.ml @@ -125,3 +125,25 @@ let dynamic_curly_brace { dynamic_switch = id } = let () = register_proof_block_delimiter "proof-block" static_curly_brace dynamic_curly_brace + +(* ***************** par: ************************************************* *) + +let static_par { entry_point; prev_node } = + match prev_node entry_point with + | None -> None + | Some { id = pid } -> + Some { stop = entry_point.id; start = pid; + dynamic_switch = pid; carry_on_data = unit_val } + +let dynamic_par { dynamic_switch = id } = + match is_focused_goal_simple id with + | `Simple focused -> + `ValidBlock { + base_state = id; + goals_to_admit = focused; + recovery_command = None; + } + | `Not -> `Leaks + +let () = register_proof_block_delimiter "par" static_par dynamic_par + diff --git a/stm/proofBlockDelimiter.mli b/stm/proofBlockDelimiter.mli index 8455c1848..a55032a47 100644 --- a/stm/proofBlockDelimiter.mli +++ b/stm/proofBlockDelimiter.mli @@ -9,6 +9,7 @@ (* This file implements proof block detection for: - blocks delimited by { and } - bullets with indentation + - par: terminator It exports utility functions to ease the development of other proof block detection code. @@ -37,3 +38,4 @@ val unit_val : Stm.DynBlockData.t (* Bullets *) val of_bullet_val : Vernacexpr.bullet -> Stm.DynBlockData.t val to_bullet_val : Stm.DynBlockData.t -> Vernacexpr.bullet + |