aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/vernac_classifier.mli
diff options
context:
space:
mode:
authorGravatar gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-08-08 18:52:29 +0000
committerGravatar gareuselesinge <gareuselesinge@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-08-08 18:52:29 +0000
commitab85be0ab41251ece3b583c3ff38f08f546f6414 (patch)
tree90f90a92f23c84485b943b20fb73937fe95f33c5 /toplevel/vernac_classifier.mli
parent262fa2306196fb279a9b473c0f89fd061458cb0c (diff)
Vernac classification streamlined (handles VERNAC EXTEND)
The warning output by vernacextend when the classifier is missing is the documentation of this commit: Warning: Vernac entry "Foo" misses a classifier. A classifier is a function that returns an expression of type vernac_classification (see Vernacexpr). You can: - Use '... EXTEND Foo CLASSIFIED AS QUERY ...' if the new vernacular command does not alter the system state; - Use '... EXTEND Foo CLASSIFIED AS SIDEFF ...' if the new vernacular command alters the system state but not the parser nor it starts a proof or ends one; - Use '... EXTEND Foo CLASSIFIED BY f ...' to specify a global function f. The function f will be called passing "Foo" as the only argument; - Add a specific classifier in each clause using the syntax: '[...] => [ f ] -> [...]'. Specific classifiers have precedence over global classifiers. Only one classifier is called. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16680 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/vernac_classifier.mli')
-rw-r--r--toplevel/vernac_classifier.mli14
1 files changed, 11 insertions, 3 deletions
diff --git a/toplevel/vernac_classifier.mli b/toplevel/vernac_classifier.mli
index 06535d512..d6bc8b886 100644
--- a/toplevel/vernac_classifier.mli
+++ b/toplevel/vernac_classifier.mli
@@ -8,13 +8,21 @@
open Stateid
open Vernacexpr
+open Genarg
val string_of_vernac_classification : vernac_classification -> string
(** What does a vernacular do *)
val classify_vernac : vernac_expr -> vernac_classification
-(** Install an additional vernacular classifier (that has precedence over
- all classifiers already installed) *)
+(** Install a vernacular classifier for VernacExtend *)
val declare_vernac_classifier :
- string -> (vernac_expr -> vernac_classification) -> unit
+ string -> (raw_generic_argument list -> unit -> vernac_classification) -> unit
+
+(** Set by Stm *)
+val set_undo_classifier : (vernac_expr -> vernac_classification) -> unit
+
+(** Standard constant classifiers *)
+val classify_as_query : vernac_classification
+val classify_as_sideeff : vernac_classification
+