123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)openNamesopenGlob_term(** [notation_constr] *)(** [notation_constr] is the subtype of [glob_constr] allowed in syntactic
extensions (i.e. notations).
No location since intended to be substituted at any place of a text.
Complex expressions such as fixpoints and cofixpoints are excluded,
as well as non global expressions such as existential variables. *)typenotation_constr=(* Part common to [glob_constr] and [cases_pattern] *)|NRefofGlobRef.t*glob_levellistoption|NVarofId.t|NAppofnotation_constr*notation_constrlist|NHoleofEvar_kinds.t*Namegen.intro_pattern_naming_expr*Genarg.glob_generic_argumentoption|NListofId.t*Id.t*notation_constr*notation_constr*(* associativity: *)bool(* Part only in [glob_constr] *)|NLambdaofName.t*notation_constroption*notation_constr|NProdofName.t*notation_constroption*notation_constr|NBinderListofId.t*Id.t*notation_constr*notation_constr*(* associativity: *)bool|NLetInofName.t*notation_constr*notation_constroption*notation_constr|NCasesofConstr.case_style*notation_constroption*(notation_constr*(Name.t*(inductive*Name.tlist)option))list*(cases_patternlist*notation_constr)list|NLetTupleofName.tlist*(Name.t*notation_constroption)*notation_constr*notation_constr|NIfofnotation_constr*(Name.t*notation_constroption)*notation_constr*notation_constr|NRecofglob_fix_kind*Id.tarray*(Name.t*notation_constroption*notation_constr)listarray*notation_constrarray*notation_constrarray|NSortofglob_sort|NCastofnotation_constr*notation_constrcast_type|NIntofUint63.t|NFloatofFloat64.t|NArrayofnotation_constrarray*notation_constr*notation_constr(** Note concerning NList: first constr is iterator, second is terminator;
first id is where each argument of the list has to be substituted
in iterator and snd id is alternative name just for printing;
boolean is associativity *)(** Types concerning notations *)typescope_name=stringtypetmp_scope_name=scope_nametypesubscopes=tmp_scope_nameoption*scope_namelisttypeextended_subscopes=Constrexpr.notation_entry_level*subscopes(** Type of the meta-variables of an notation_constr: in a recursive pattern x..y,
x carries the sequence of objects bound to the list x..y *)typeconstr_as_binder_kind=|AsIdent|AsName|AsNameOrPattern|AsStrictPatterntypenotation_binder_source=(* This accepts only pattern *)(* NtnParsedAsPattern true means only strict pattern (no single variable) at printing *)|NtnParsedAsPatternofbool(* This accepts only ident *)|NtnParsedAsIdent(* This accepts only name *)|NtnParsedAsName(* This accepts ident, or pattern, or both *)|NtnBinderParsedAsConstrofconstr_as_binder_kind(* This accepts ident, _, and quoted pattern *)|NtnParsedAsBindertypenotation_var_instance_type=|NtnTypeConstr|NtnTypeBinderofnotation_binder_source|NtnTypeConstrList|NtnTypeBinderList(** Type of variables when interpreting a constr_expr as a notation_constr:
in a recursive pattern x..y, both x and y carry the individual type
of each element of the list x..y *)typenotation_var_internalization_type=|NtnInternTypeAnyofscope_nameoption|NtnInternTypeOnlyBinder(** This characterizes to what a notation is interpreted to *)typeinterpretation=(Id.t*(extended_subscopes*notation_var_instance_type))list*notation_constrtypereversibility_status=APrioriReversible|HasLtac|NonInjectiveofId.tlisttypenotation_interp_env={ninterp_var_type:notation_var_internalization_typeId.Map.t;ninterp_rec_vars:Id.tId.Map.t;}