aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-06-29 15:00:28 +0200
committerEmilio Jesus Gallego Arias2020-07-08 15:12:46 +0200
commita164eaafad33ccbc2b0bdbb75147a54ebe3a9848 (patch)
tree1c400f9ee578e30571f0dd38b3d62370c1bf35a4
parent1954fb6cb6f854c59d7905163ae9b84901edd863 (diff)
[obligations] Allow to simultaneously open a proof and add obligations
-rw-r--r--coqpp/coqpp_main.ml1
-rw-r--r--vernac/vernacextend.ml1
-rw-r--r--vernac/vernacextend.mli1
-rw-r--r--vernac/vernacinterp.ml3
4 files changed, 6 insertions, 0 deletions
diff --git a/coqpp/coqpp_main.ml b/coqpp/coqpp_main.ml
index ffde49f2ac..2735c5b5eb 100644
--- a/coqpp/coqpp_main.ml
+++ b/coqpp/coqpp_main.ml
@@ -342,6 +342,7 @@ let understand_state = function
| "read_program" -> "VtReadProgram", false
| "program" -> "VtModifyProgram", false
| "declare_program" -> "VtDeclareProgram", false
+ | "program_interactive" -> "VtOpenProofProgram", false
| s -> fatal ("unsupported state specifier: " ^ s)
let print_body_state state fmt r =
diff --git a/vernac/vernacextend.ml b/vernac/vernacextend.ml
index 7317818730..496b1a43d1 100644
--- a/vernac/vernacextend.ml
+++ b/vernac/vernacextend.ml
@@ -63,6 +63,7 @@ type typed_vernac =
| VtReadProgram of (pm:Declare.OblState.t -> unit)
| VtModifyProgram of (pm:Declare.OblState.t -> Declare.OblState.t)
| VtDeclareProgram of (pm:Declare.OblState.t -> Declare.Proof.t)
+ | VtOpenProofProgram of (pm:Declare.OblState.t -> Declare.OblState.t * Declare.Proof.t)
type vernac_command = atts:Attributes.vernac_flags -> typed_vernac
diff --git a/vernac/vernacextend.mli b/vernac/vernacextend.mli
index a24bb9b302..5ef137cfc0 100644
--- a/vernac/vernacextend.mli
+++ b/vernac/vernacextend.mli
@@ -81,6 +81,7 @@ type typed_vernac =
| VtReadProgram of (pm:Declare.OblState.t -> unit)
| VtModifyProgram of (pm:Declare.OblState.t -> Declare.OblState.t)
| VtDeclareProgram of (pm:Declare.OblState.t -> Declare.Proof.t)
+ | VtOpenProofProgram of (pm:Declare.OblState.t -> Declare.OblState.t * Declare.Proof.t)
type vernac_command = atts:Attributes.vernac_flags -> typed_vernac
diff --git a/vernac/vernacinterp.ml b/vernac/vernacinterp.ml
index 898506fdbc..6be2fb0d43 100644
--- a/vernac/vernacinterp.ml
+++ b/vernac/vernacinterp.ml
@@ -54,6 +54,9 @@ let interp_typed_vernac c ~pm ~stack =
| VtDeclareProgram f ->
let lemma = f ~pm in
Some (Vernacstate.LemmaStack.push stack lemma), pm
+ | VtOpenProofProgram f ->
+ let pm, lemma = f ~pm in
+ Some (Vernacstate.LemmaStack.push stack lemma), pm
(* Default proof mode, to be set at the beginning of proofs for
programs that cannot be statically classified. *)