aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorMaxime Dénès2018-12-21 19:49:17 +0100
committerMaxime Dénès2019-01-22 11:17:55 +0100
commite195c1dd97116961e34f3fad41a697a01d505ebf (patch)
tree5f185774341540578dddb1ad3b83f62da3f2740f /stm
parent3600f2cd55716550c4d9f78f05d43b6f33fd402e (diff)
Distinguish ASTs for Instance and Declare Instance
This makes code paths clearer (we still factorize a lot of the treatment), and we seize the opportunity to forbid anonymous `Declare Instance` which is not a documented construction, and seems to make little sense in practice.
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml2
-rw-r--r--stm/vernac_classifier.ml3
2 files changed, 3 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 169d608d2d..1641adbb70 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -3006,7 +3006,7 @@ let process_transaction ~doc ?(newtip=Stateid.fresh ())
let bname = VCS.mk_branch_name x in
let opacity_of_produced_term = function
(* This AST is ambiguous, hence we check it dynamically *)
- | VernacInstance (false, _,_ , None, _) -> GuaranteesOpacity
+ | VernacInstance (_,_ , None, _) -> GuaranteesOpacity
| _ -> Doesn'tGuaranteeOpacity in
VCS.commit id (Fork (x,bname,opacity_of_produced_term (Vernacprop.under_control x.expr),[]));
let proof_mode = default_proof_mode () in
diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml
index bc5c14c9b1..09f531ce13 100644
--- a/stm/vernac_classifier.ml
+++ b/stm/vernac_classifier.ml
@@ -164,7 +164,8 @@ let classify_vernac e =
| VernacRegister _
| VernacNameSectionHypSet _
| VernacDeclareCustomEntry _
- | VernacComments _ -> VtSideff [], VtLater
+ | VernacComments _
+ | VernacDeclareInstance _ -> VtSideff [], VtLater
(* Who knows *)
| VernacLoad _ -> VtSideff [], VtNow
(* (Local) Notations have to disappear *)