123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181(************************************************************************)(* * 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) *)(************************************************************************)openNamesopenLibnames(** {6 Concrete syntax for terms } *)(** Universes *)typesort_name_expr=|CSProp|CProp|CSet|CTypeofqualid|CRawTypeofUniv.Level.t(** Universes like "foo.1" have no qualid form *)typeuniv_level_expr=sort_name_exprGlob_term.glob_sort_gentypesort_expr=(sort_name_expr*int)listGlob_term.glob_sort_gentypeinstance_expr=univ_level_exprlist(** Constraints don't have anonymous universes *)typeuniv_constraint_expr=sort_name_expr*Univ.constraint_type*sort_name_exprtypeuniverse_decl_expr=(lidentlist,univ_constraint_exprlist)UState.gen_universe_decltypecumul_univ_decl_expr=((lident*Univ.Variance.toption)list,univ_constraint_exprlist)UState.gen_universe_decltypeident_decl=lident*universe_decl_exproptiontypecumul_ident_decl=lident*cumul_univ_decl_exproptiontypename_decl=lname*universe_decl_exproptiontypenotation_with_optional_scope=LastLonelyNotation|NotationInScopeofstringtypeentry_level=inttypeentry_relative_level=LevelLtofentry_level|LevelLeofentry_level|LevelSometypenotation_entry=InConstrEntry|InCustomEntryofstringtypenotation_entry_level=InConstrEntrySomeLevel|InCustomEntryLevelofstring*entry_leveltypenotation_key=string(* A notation associated to a given parsing rule *)typenotation=notation_entry*notation_key(* A notation associated to a given interpretation *)typespecific_notation=notation_with_optional_scope*(notation_entry*notation_key)type'aor_by_notation_r=|ANof'a|ByNotationof(string*stringoption)type'aor_by_notation='aor_by_notation_rCAst.t(* NB: the last string in [ByNotation] is actually a [Notation.delimiters],
but this formulation avoids a useless dependency. *)typeexplicitation=|ExplByNameofId.t|ExplByPosofint(* a reference to the n-th non-dependent implicit starting from left *)typebinder_kind=|DefaultofGlob_term.binding_kind|GeneralizedofGlob_term.binding_kind*bool(** (Inner binding always Implicit) Outer bindings, typeclass-specific flag
for implicit generalization of superclasses *)typeexplicit_flag=bool(** true = with "@" *)typeprim_token=|NumberofNumTok.Signed.t|Stringofstring(** [constr_expr] is the abstract syntax tree produced by the parser *)typecases_pattern_expr_r=|CPatAliasofcases_pattern_expr*lname|CPatCstrofqualid*cases_pattern_exprlistoption*cases_pattern_exprlist(** [CPatCstr (_, c, Some l1, l2)] represents [(@ c l1) l2] *)|CPatAtomofqualidoption|CPatOrofcases_pattern_exprlist|CPatNotationofnotation_with_optional_scopeoption*notation*cases_pattern_notation_substitution*cases_pattern_exprlist(** CPatNotation (_, n, l1 ,l2) represents
(notation n applied with substitution l1)
applied to arguments l2 *)|CPatPrimofprim_token|CPatRecordof(qualid*cases_pattern_expr)list|CPatDelimitersofstring*cases_pattern_expr|CPatCastofcases_pattern_expr*constr_exprandcases_pattern_expr=cases_pattern_expr_rCAst.tandkinded_cases_pattern_expr=cases_pattern_expr*Glob_term.binding_kindandcases_pattern_notation_substitution=cases_pattern_exprlist*(* for constr subterms *)cases_pattern_exprlistlist(* for recursive notations *)andconstr_expr_r=|CRefofqualid*instance_exproption|CFixoflident*fix_exprlist|CCoFixoflident*cofix_exprlist|CProdNoflocal_binder_exprlist*constr_expr|CLambdaNoflocal_binder_exprlist*constr_expr|CLetInoflname*constr_expr*constr_exproption*constr_expr|CAppExplof(qualid*instance_exproption)*constr_exprlist|CAppofconstr_expr*(constr_expr*explicitationCAst.toption)list|CProjofexplicit_flag*(qualid*instance_exproption)*(constr_expr*explicitationCAst.toption)list*constr_expr|CRecordof(qualid*constr_expr)list(* representation of the "let" and "match" constructs *)|CCasesofConstr.case_style(* determines whether this value represents "let" or "match" construct *)*constr_exproption(* return-clause *)*case_exprlist*branch_exprlist(* branches *)|CLetTupleoflnamelist*(lnameoption*constr_exproption)*constr_expr*constr_expr|CIfofconstr_expr*(lnameoption*constr_exproption)*constr_expr*constr_expr|CHoleofEvar_kinds.toption*Namegen.intro_pattern_naming_expr*Genarg.raw_generic_argumentoption|CPatVarofPattern.patvar|CEvarofGlob_term.existential_nameCAst.t*(lident*constr_expr)list|CSortofsort_expr|CCastofconstr_expr*Constr.cast_kind*constr_expr|CNotationofnotation_with_optional_scopeoption*notation*constr_notation_substitution|CGeneralizationofGlob_term.binding_kind*constr_expr|CPrimofprim_token|CDelimitersofstring*constr_expr|CArrayofinstance_exproption*constr_exprarray*constr_expr*constr_exprandconstr_expr=constr_expr_rCAst.tandcase_expr=constr_expr(* expression that is being matched *)*lnameoption(* as-clause *)*cases_pattern_exproption(* in-clause *)andbranch_expr=(cases_pattern_exprlistlist*constr_expr)CAst.tandfix_expr=lident*recursion_order_exproption*local_binder_exprlist*constr_expr*constr_exprandcofix_expr=lident*local_binder_exprlist*constr_expr*constr_exprandrecursion_order_expr_r=|CStructRecoflident|CWfRecoflident*constr_expr|CMeasureRecoflidentoption*constr_expr*constr_exproption(** argument, measure, relation *)andrecursion_order_expr=recursion_order_expr_rCAst.t(* Anonymous defs allowed ?? *)andlocal_binder_expr=|CLocalAssumoflnamelist*binder_kind*constr_expr|CLocalDefoflname*constr_expr*constr_exproption|CLocalPatternofcases_pattern_exprandconstr_notation_substitution=constr_exprlist*(* for constr subterms *)constr_exprlistlist*(* for recursive notations *)kinded_cases_pattern_exprlist*(* for binders *)local_binder_exprlistlist(* for binder lists (recursive notations) *)typeconstr_pattern_expr=constr_expr(** Concrete syntax for modules and module types *)typewith_declaration_ast=|CWith_ModuleofId.tlistCAst.t*qualid|CWith_DefinitionofId.tlistCAst.t*universe_decl_exproption*constr_exprtypemodule_ast_r=|CMidentofqualid|CMapplyofmodule_ast*qualid|CMwithofmodule_ast*with_declaration_astandmodule_ast=module_ast_rCAst.t