Module Vernacextend
Vernacular Extension data
type vernac_keep_as=|VtKeepAxiom|VtKeepDefined|VtKeepOpaquetype vernac_qed_type=|VtKeep of vernac_keep_as|VtDroptype vernac_when=|VtNow|VtLatertype vernac_classification=|VtStartProof of vernac_start|VtSideff of vernac_sideff_type|VtQed of vernac_qed_type|VtProofStep of{proof_block_detection : proof_block_name option;}|VtQuery|VtProofMode of Pvernac.proof_mode|VtMetaand vernac_start= opacity_guarantee * Names.Id.t listand vernac_sideff_type= Names.Id.t list * vernac_whenand opacity_guarantee=|GuaranteesOpacityOnly generates opaque terms at
Qed|Doesn'tGuaranteeOpacityMay generate transparent terms even with
Qed.and solving_tac= boola terminator
type vernac_command= ?loc:Loc.t -> atts:Attributes.vernac_flags -> unit -> Vernactypes.typed_vernactype plugin_args= Genarg.raw_generic_argument list
val type_vernac : Vernacexpr.extend_name -> plugin_args -> vernac_command
VERNAC EXTEND
type classifier= Genarg.raw_generic_argument list -> vernac_classificationtype (_, _) ty_sig=|TyNil : (vernac_command, vernac_classification) ty_sig|TyTerminal : string * ('r, 's) ty_sig -> ('r, 's) ty_sig|TyNonTerminal : ('a, 'b, 'c) Extend.ty_user_symbol * ('r, 's) ty_sig -> ('a -> 'r, 'a -> 's) ty_sigtype ty_ml=|TyML : bool * ('r, 's) ty_sig * 'r * 's option -> ty_ml
val static_vernac_extend : plugin:string option -> command:string -> ?classifier:(string -> vernac_classification) -> ?entry:Vernacexpr.vernac_expr Pcoq.Entry.t -> ty_ml list -> unitStatically extend vernacular commands.
This is used by coqpp VERNAC EXTEND. It should not be used directly, use
declare_dynamic_vernac_extendinstead.Commands added by plugins at Declare ML Module / Require time should provide
plugin.Commands added without providing
plugincannot be removed from the grammar or modified. Not passingpluginis possible for non-plugin coq-core commands and deprecated for all other callers.
val static_linking_done : unit -> unitUsed to tell the system that all future vernac extends are from plugins.
val declare_dynamic_vernac_extend : command:Vernacexpr.extend_name -> ?entry:Vernacexpr.vernac_expr Pcoq.Entry.t -> depr:bool -> 's -> ('r, 's) ty_sig -> 'r -> Vernacexpr.extend_nameDynamically extend vernacular commands (for instance when importing some module).
Reusing a
commandstring will replace previous uses. The result is undefined and probably produces anomalies if the previous grammar rule is still active and was different from the new one.The polymorphic arguments are as in
TyML.The declared grammar extension is disabled, one needs to call
Egramml.extend_vernac_command_grammarin order to enable it. That call should useundoable:trueto make it possible to disable the extension, e.g. by backtracking over the command which enabled it.
VERNAC ARGUMENT EXTEND
type 'a argument_rule=|Arg_alias of 'a Pcoq.Entry.tThis is used because CAMLP5 parser can be dumb about rule factorization, which sometimes requires two entries to be the same.
|Arg_rules of 'a Pcoq.Production.t listThere is a discrepancy here as we use directly extension rules and thus entries instead of ty_user_symbol and thus arguments as roots.
type 'a vernac_argument={arg_printer : Environ.env -> Evd.evar_map -> 'a -> Pp.t;arg_parsing : 'a argument_rule;}
val vernac_argument_extend : plugin:string -> name:string -> 'a vernac_argument -> ('a, unit, unit) Genarg.genarg_type * 'a Pcoq.Entry.tval get_vernac_classifier : Vernacexpr.extend_name -> classifierSTM classifiers
val classify_as_query : vernac_classificationStandard constant classifiers
val classify_as_sideeff : vernac_classificationval classify_as_proofstep : vernac_classification