package coq-core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type coercion_class =
  1. | FunClass
  2. | SortClass
  3. | RefClass of Libnames.qualid Constrexpr.or_by_notation

Vernac expressions, produced by the parser

type goal_identifier = string
type scope_name = string
type scope_delimiter = Constrexpr.delimiter_depth * scope_name
type goal_reference =
  1. | OpenSubgoals
  2. | NthGoal of int
  3. | GoalId of Names.Id.t
type printable =
  1. | PrintTypingFlags
  2. | PrintTables
  3. | PrintFullContext
  4. | PrintSectionContext of Libnames.qualid
  5. | PrintInspect of int
  6. | PrintGrammar of string list
  7. | PrintCustomGrammar of string
  8. | PrintKeywords
  9. | PrintLoadPath of Names.DirPath.t option
  10. | PrintLibraries
  11. | PrintModule of Libnames.qualid
  12. | PrintModuleType of Libnames.qualid
  13. | PrintNamespace of Names.DirPath.t
  14. | PrintMLLoadPath
  15. | PrintMLModules
  16. | PrintDebugGC
  17. | PrintName of Libnames.qualid Constrexpr.or_by_notation * UnivNames.full_name_list option
  18. | PrintGraph
  19. | PrintClasses
  20. | PrintTypeclasses
  21. | PrintInstances of Libnames.qualid Constrexpr.or_by_notation
  22. | PrintCoercions
  23. | PrintCoercionPaths of coercion_class * coercion_class
  24. | PrintCanonicalConversions of Libnames.qualid Constrexpr.or_by_notation list
  25. | PrintUniverses of bool * Libnames.qualid list option * string option
  26. | PrintHint of Libnames.qualid Constrexpr.or_by_notation
  27. | PrintHintGoal
  28. | PrintHintDbName of string
  29. | PrintHintDb
  30. | PrintScopes
  31. | PrintScope of string
  32. | PrintVisibility of string option
  33. | PrintAbout of Libnames.qualid Constrexpr.or_by_notation * UnivNames.full_name_list option * Goal_select.t option
  34. | PrintImplicit of Libnames.qualid Constrexpr.or_by_notation
  35. | PrintAssumptions of bool * bool * Libnames.qualid Constrexpr.or_by_notation
  36. | PrintStrategy of Libnames.qualid Constrexpr.or_by_notation option
  37. | PrintRegistered
  38. | PrintNotation of Constrexpr.notation_entry * string
type glob_search_where =
  1. | InHyp
  2. | InConcl
  3. | Anywhere
type search_item =
  1. | SearchSubPattern of glob_search_where * bool * Constrexpr.constr_pattern_expr
  2. | SearchString of glob_search_where * bool * string * scope_delimiter option
  3. | SearchKind of Decls.logical_kind
type search_request =
  1. | SearchLiteral of search_item
  2. | SearchDisjConj of (bool * search_request) list list
type searchable =
  1. | SearchPattern of Constrexpr.constr_pattern_expr
  2. | SearchRewrite of Constrexpr.constr_pattern_expr
  3. | Search of (bool * search_request) list
type locatable =
  1. | LocateAny of Libnames.qualid Constrexpr.or_by_notation
  2. | LocateTerm of Libnames.qualid Constrexpr.or_by_notation
  3. | LocateLibrary of Libnames.qualid
  4. | LocateModule of Libnames.qualid
  5. | LocateOther of string * Libnames.qualid
  6. | LocateFile of string
type showable =
  1. | ShowGoal of goal_reference
  2. | ShowProof
  3. | ShowExistentials
  4. | ShowUniverses
  5. | ShowProofNames
  6. | ShowIntros of bool
  7. | ShowMatch of Libnames.qualid
type comment =
  1. | CommentConstr of Constrexpr.constr_expr
  2. | CommentString of string
  3. | CommentInt of int
type 'a search_restriction =
  1. | SearchInside of 'a
  2. | SearchOutside of 'a
type verbose_flag = bool
type coercion_flag =
  1. | AddCoercion
  2. | NoCoercion
type instance_flag =
  1. | BackInstance
  2. | BackInstanceWarning
  3. | NoInstance
type export_flag = Lib.export_flag =
  1. | Export
  2. | Import
type import_categories = {
  1. negative : bool;
  2. import_cats : string CAst.t list;
}
type export_with_cats = export_flag * import_categories option
type infix_flag = bool
type one_import_filter_name = Libnames.qualid * bool
type import_filter_expr =
  1. | ImportAll
  2. | ImportNames of one_import_filter_name list
type locality_flag = bool
type option_setting =
  1. | OptionUnset
  2. | OptionSetTrue
  3. | OptionSetInt of int
  4. | OptionSetString of string

Identifier and optional list of bound universes and constraints.

type notation_format =
  1. | TextFormat of Names.lstring
type syntax_modifier =
  1. | SetItemLevel of string list * Notation_term.notation_binder_kind option * Extend.production_level
  2. | SetItemScope of string list * scope_name
  3. | SetLevel of int
  4. | SetCustomEntry of string * int option
  5. | SetAssoc of Gramlib.Gramext.g_assoc
  6. | SetEntryType of string * Extend.simple_constr_prod_entry_key
  7. | SetOnlyParsing
  8. | SetOnlyPrinting
  9. | SetFormat of notation_format
type notation_enable_modifier =
  1. | EnableNotationEntry of Constrexpr.notation_entry CAst.t
  2. | EnableNotationOnly of Notationextern.notation_use
  3. | EnableNotationAll
type notation_declaration = {
  1. ntn_decl_string : Names.lstring;
  2. ntn_decl_interp : Constrexpr.constr_expr;
  3. ntn_decl_scope : scope_name option;
  4. ntn_decl_modifiers : syntax_modifier CAst.t list;
}
type 'a fix_expr_gen = {
  1. fname : Names.lident;
  2. univs : Constrexpr.universe_decl_expr option;
  3. rec_order : 'a;
  4. binders : Constrexpr.local_binder_expr list;
  5. rtype : Constrexpr.constr_expr;
  6. body_def : Constrexpr.constr_expr option;
  7. notations : notation_declaration list;
}
type fixpoint_expr = Constrexpr.recursion_order_expr option fix_expr_gen
type cofixpoint_expr = unit fix_expr_gen
type inductive_kind =
  1. | Inductive_kw
  2. | CoInductive
  3. | Variant
  4. | Record
  5. | Structure
  6. | Class of bool
type simple_binder = Names.lident list * Constrexpr.constr_expr
type class_binder = Names.lident * Constrexpr.constr_expr list
type 'a with_coercion = coercion_flag * 'a
type 'a with_coercion_instance = (Attributes.vernac_flags * coercion_flag * instance_flag) * 'a
type record_field_attr = {
  1. rf_coercion : coercion_flag;
  2. rf_reversible : bool option;
  3. rf_instance : instance_flag;
  4. rf_priority : int option;
  5. rf_locality : Goptions.option_locality;
  6. rf_notation : notation_declaration list;
  7. rf_canonical : bool;
}
type record_field_attr_unparsed = {
  1. rfu_attrs : Attributes.vernac_flags;
  2. rfu_coercion : coercion_flag;
  3. rfu_instance : instance_flag;
  4. rfu_priority : int option;
  5. rfu_notation : notation_declaration list;
}
type constructor_list_or_record_decl_expr =
  1. | Constructors of constructor_expr list
  2. | RecordDecl of Names.lident option * (local_decl_expr * record_field_attr_unparsed) list * Names.lident option
type inductive_params_expr = Constrexpr.local_binder_expr list * Constrexpr.local_binder_expr list option

If the option is nonempty the "|" marker was used

and typeclass_context = typeclass_constraint list
type opacity_flag =
  1. | Opaque
  2. | Transparent
type proof_end =
  1. | Admitted
  2. | Proved of opacity_flag * Names.lident option
type scheme_type =
  1. | SchemeInduction
  2. | SchemeMinimality
  3. | SchemeElimination
  4. | SchemeCase
type equality_scheme_type =
  1. | SchemeBooleanEquality
  2. | SchemeEquality
type scheme = {
  1. sch_type : scheme_type;
  2. sch_qualid : Libnames.qualid Constrexpr.or_by_notation;
  3. sch_sort : Sorts.family;
}
type section_subset_expr =
  1. | SsEmpty
  2. | SsType
  3. | SsSingl of Names.lident
  4. | SsCompl of section_subset_expr
  5. | SsUnion of section_subset_expr * section_subset_expr
  6. | SsSubstr of section_subset_expr * section_subset_expr
  7. | SsFwdClose of section_subset_expr

Extension identifiers for the VERNAC EXTEND mechanism.

("Extraction", 0 indicates Extraction qualid command.

("Extraction", 1 indicates Recursive Extraction qualid command.

("Extraction", 2) indicates Extraction "filename" qualid1 ... qualidn command.

("ExtractionLibrary", 0) indicates Extraction Library ident command.

("RecursiveExtractionLibrary", 0) indicates Recursive Extraction Library ident command.

("SeparateExtraction", 0) indicates Separate Extraction qualid1 ... qualidn command.

("ExtractionLanguage", 0) indicates Extraction Language Ocaml or Extraction Language Haskell or Extraction Language Scheme or Extraction Language JSON commands.

("ExtractionImplicit", 0) indicates Extraction Implicit qualid [ ident1 ... identn ] command.

("ExtractionConstant", 0) indicates Extract Constant qualid => string command.

("ExtractionInlinedConstant", 0) indicates Extract Inlined Constant qualid => string command.

("ExtractionInductive", 0) indicates Extract Inductive qualid => string {i string} ... {string} optstring command.

("ExtractionBlacklist", 0) indicates Extraction Blacklist ident1 ... identn command.

type register_kind =
  1. | RegisterInline
  2. | RegisterCoqlib of Libnames.qualid
Types concerning the module layer
type module_binder = export_with_cats option * Names.lident list * module_ast_inl
The type of vernacular expressions
type vernac_one_argument_status = {
  1. name : Names.Name.t;
  2. recarg_like : bool;
  3. notation_scope : scope_delimiter CAst.t list;
  4. implicit_status : Glob_term.binding_kind;
}
type vernac_argument_status =
  1. | VolatileArg
  2. | BidiArg
  3. | RealArg of vernac_one_argument_status
type arguments_modifier = [
  1. | `Assert
  2. | `ClearBidiHint
  3. | `ClearImplicits
  4. | `ClearScopes
  5. | `DefaultImplicits
  6. | `ExtraScopes
  7. | `ReductionDontExposeCase
  8. | `ReductionNeverUnfold
  9. | `Rename
]
type extend_name = {
  1. ext_plugin : string;
    (*

    Name of the plugin where the extension is defined as per DECLARE PLUGIN

    *)
  2. ext_entry : string;
    (*

    Name of the vernac entry where the tactic is defined, typically found after the VERNAC EXTEND statement in the source.

    *)
  3. ext_index : int;
}
type discharge =
  1. | DoDischarge
  2. | NoDischarge
type reference_or_constr =
  1. | HintsReference of Libnames.qualid
  2. | HintsConstr of Constrexpr.constr_expr
type hints_expr =
  1. | HintsResolve of (hint_info_expr * bool * reference_or_constr) list
  2. | HintsResolveIFF of bool * Libnames.qualid list * int option
  3. | HintsImmediate of reference_or_constr list
  4. | HintsUnfold of Libnames.qualid list
  5. | HintsTransparency of Libnames.qualid Hints.hints_transparency_target * bool
  6. | HintsMode of Libnames.qualid * Hints.hint_mode list
  7. | HintsConstructors of Libnames.qualid list
  8. | HintsExtern of int * Constrexpr.constr_expr option * Genarg.raw_generic_argument
type synterp_vernac_expr =
  1. | VernacLoad of verbose_flag * string
  2. | VernacReservedNotation of infix_flag * Names.lstring * syntax_modifier CAst.t list
  3. | VernacNotation of infix_flag * notation_declaration
  4. | VernacDeclareCustomEntry of string
  5. | VernacBeginSection of Names.lident
  6. | VernacEndSegment of Names.lident
  7. | VernacRequire of Libnames.qualid option * export_with_cats option * (Libnames.qualid * import_filter_expr) list
  8. | VernacImport of export_with_cats * (Libnames.qualid * import_filter_expr) list
  9. | VernacDeclareModule of export_with_cats option * Names.lident * module_binder list * module_ast_inl
  10. | VernacDefineModule of export_with_cats option * Names.lident * module_binder list * module_ast_inl Declaremods.module_signature * module_ast_inl list
  11. | VernacDeclareModuleType of Names.lident * module_binder list * module_ast_inl list * module_ast_inl list
  12. | VernacInclude of module_ast_inl list
  13. | VernacDeclareMLModule of string list
  14. | VernacChdir of string option
  15. | VernacExtraDependency of Libnames.qualid * string * Names.Id.t option
  16. | VernacSetOption of bool * Goptions.option_name * option_setting
  17. | VernacProofMode of string
  18. | VernacExtend of extend_name * Genarg.raw_generic_argument list

synterp_vernac_expr describes the AST of commands which have effects on parsing or parsing extensions

type nonrec synpure_vernac_expr =
  1. | VernacOpenCloseScope of bool * scope_name
  2. | VernacDeclareScope of scope_name
  3. | VernacDelimiters of scope_name * string option
  4. | VernacBindScope of scope_name * coercion_class list
  5. | VernacEnableNotation of bool * (string, Names.Id.t list * Libnames.qualid) Util.union option * Constrexpr.constr_expr option * notation_enable_modifier list * Constrexpr.notation_with_optional_scope option
  6. | VernacDefinition of discharge * Decls.definition_object_kind * Constrexpr.name_decl * definition_expr
  7. | VernacStartTheoremProof of Decls.theorem_kind * proof_expr list
  8. | VernacEndProof of proof_end
  9. | VernacExactProof of Constrexpr.constr_expr
  10. | VernacAssumption of discharge * Decls.assumption_object_kind * Declaremods.inline * (Constrexpr.ident_decl list * Constrexpr.constr_expr) with_coercion list
  11. | VernacInductive of inductive_kind * (inductive_expr * notation_declaration list) list
  12. | VernacFixpoint of discharge * fixpoint_expr list
  13. | VernacCoFixpoint of discharge * cofixpoint_expr list
  14. | VernacScheme of (Names.lident option * scheme) list
  15. | VernacSchemeEquality of equality_scheme_type * Libnames.qualid Constrexpr.or_by_notation
  16. | VernacCombinedScheme of Names.lident * Names.lident list
  17. | VernacUniverse of Names.lident list
  18. | VernacConstraint of Constrexpr.univ_constraint_expr list
  19. | VernacCanonical of Libnames.qualid Constrexpr.or_by_notation
  20. | VernacCoercion of Libnames.qualid Constrexpr.or_by_notation * (coercion_class * coercion_class) option
  21. | VernacIdentityCoercion of Names.lident * coercion_class * coercion_class
  22. | VernacNameSectionHypSet of Names.lident * section_subset_expr
  23. | VernacInstance of Constrexpr.name_decl * Constrexpr.local_binder_expr list * Constrexpr.constr_expr * (bool * Constrexpr.constr_expr) option * hint_info_expr
  24. | VernacDeclareInstance of Constrexpr.ident_decl * Constrexpr.local_binder_expr list * Constrexpr.constr_expr * hint_info_expr
  25. | VernacContext of Constrexpr.local_binder_expr list
  26. | VernacExistingInstance of (Libnames.qualid * hint_info_expr) list
  27. | VernacExistingClass of Libnames.qualid
  28. | VernacResetName of Names.lident
  29. | VernacResetInitial
  30. | VernacBack of int
  31. | VernacCreateHintDb of string * bool
  32. | VernacRemoveHints of string list * Libnames.qualid list
  33. | VernacHints of string list * hints_expr
  34. | VernacSyntacticDefinition of Names.lident * Names.Id.t list * Constrexpr.constr_expr * syntax_modifier CAst.t list
  35. | VernacArguments of Libnames.qualid Constrexpr.or_by_notation * vernac_argument_status list * (Names.Name.t * Glob_term.binding_kind) list list * arguments_modifier list
  36. | VernacReserve of simple_binder list
  37. | VernacGeneralizable of Names.lident list option
  38. | VernacSetOpacity of Conv_oracle.level * Libnames.qualid Constrexpr.or_by_notation list
  39. | VernacSetStrategy of (Conv_oracle.level * Libnames.qualid Constrexpr.or_by_notation list) list
  40. | VernacMemOption of Goptions.option_name * Goptions.table_value list
  41. | VernacPrintOption of Goptions.option_name
  42. | VernacCheckMayEval of Genredexpr.raw_red_expr option * Goal_select.t option * Constrexpr.constr_expr
  43. | VernacGlobalCheck of Constrexpr.constr_expr
  44. | VernacDeclareReduction of string * Genredexpr.raw_red_expr
  45. | VernacPrint of printable
  46. | VernacSearch of searchable * Goal_select.t option * Libnames.qualid list search_restriction
  47. | VernacLocate of locatable
  48. | VernacRegister of Libnames.qualid * register_kind
  49. | VernacPrimitive of Constrexpr.ident_decl * CPrimitives.op_or_type * Constrexpr.constr_expr option
  50. | VernacComments of comment list
  51. | VernacAttributes of Attributes.vernac_flags
  52. | VernacAbort
  53. | VernacAbortAll
  54. | VernacRestart
  55. | VernacUndo of int
  56. | VernacUndoTo of int
  57. | VernacFocus of int option
  58. | VernacUnfocus
  59. | VernacUnfocused
  60. | VernacBullet of Proof_bullet.t
  61. | VernacSubproof of Goal_select.t option
  62. | VernacEndSubproof
  63. | VernacShow of showable
  64. | VernacCheckGuard
  65. | VernacValidateProof
  66. | VernacProof of Genarg.raw_generic_argument option * section_subset_expr option
  67. | VernacAddOption of Goptions.option_name * Goptions.table_value list
  68. | VernacRemoveOption of Goptions.option_name * Goptions.table_value list

synpure_vernac_expr describes the AST of commands which have no effect on parsing or parsing extensions. On these ASTs, the syntactic interpretation phase is the identity.

type 'a vernac_expr_gen =
  1. | VernacSynterp of 'a
  2. | VernacSynPure of synpure_vernac_expr

We classify vernacular expressions in two categories. VernacSynterp represents commands which have an effect on parsing or on parsing extensions. VernacSynPure represents commands which have no such effects.

type control_flag =
  1. | ControlTime
  2. | ControlInstructions
  3. | ControlRedirect of string
  4. | ControlTimeout of int
  5. | ControlFail
  6. | ControlSucceed
type ('a, 'b) vernac_control_gen_r = {
  1. control : 'a list;
  2. attrs : Attributes.vernac_flags;
  3. expr : 'b vernac_expr_gen;
}
and 'a vernac_control_gen = (control_flag, 'a) vernac_control_gen_r CAst.t
OCaml

Innovation. Community. Security.