diff options
| author | Pierre-Marie Pédrot | 2019-11-16 15:09:17 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-11-16 15:09:17 +0100 |
| commit | 64265294b519d7cd9f982edf24991c7f210933a9 (patch) | |
| tree | aa058ca9c2ecc32162ec0f0d4cf721f19ae95cf8 /stm | |
| parent | 6045fcf7398c4098566f7da5c4cba808c7416788 (diff) | |
| parent | 95c47ad501bdfb996858c64eee1b4545ef3f5acb (diff) | |
Merge PR #10996: Refine Instance returns
Reviewed-by: Zimmi48
Reviewed-by: ejgallego
Reviewed-by: ppedrot
Diffstat (limited to 'stm')
| -rw-r--r-- | stm/vernac_classifier.ml | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml index 24976d8c1f..ff0bf0ac2a 100644 --- a/stm/vernac_classifier.ml +++ b/stm/vernac_classifier.ml @@ -183,12 +183,16 @@ let classify_vernac e = | VernacDeclareMLModule _ | VernacContext _ (* TASSI: unsure *) -> VtSideff ([], VtNow) | VernacProofMode pm -> VtProofMode pm - | VernacInstance ((name,_),_,_,None,_) when not (Attributes.parse_drop_extra Attributes.program atts) -> - let polymorphic = Attributes.(parse_drop_extra polymorphic atts) in - let guarantee = if polymorphic then Doesn'tGuaranteeOpacity else GuaranteesOpacity in - VtStartProof (guarantee, idents_of_name name.CAst.v) - | VernacInstance ((name,_),_,_,_,_) -> - VtSideff (idents_of_name name.CAst.v, VtLater) + | VernacInstance ((name,_),_,_,props,_) -> + let program, refine = + Attributes.(parse_drop_extra Notations.(program ++ Classes.refine_att) atts) + in + if program || (props <> None && not refine) then + VtSideff (idents_of_name name.CAst.v, VtLater) + else + let polymorphic = Attributes.(parse_drop_extra polymorphic atts) in + let guarantee = if polymorphic then Doesn'tGuaranteeOpacity else GuaranteesOpacity in + VtStartProof (guarantee, idents_of_name name.CAst.v) (* Stm will install a new classifier to handle these *) | VernacBack _ | VernacAbortAll | VernacUndoTo _ | VernacUndo _ |
