package coq-core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type kill_reason =
  1. | Ktype
  2. | Kprop
  3. | Kimplicit of Names.GlobRef.t * int
type sign =
  1. | Keep
  2. | Kill of kill_reason
type signature = sign list
type ml_type =
  1. | Tarr of ml_type * ml_type
  2. | Tglob of Names.GlobRef.t * ml_type list
  3. | Tvar of int
  4. | Tvar' of int
  5. | Tmeta of ml_meta
  6. | Tdummy of kill_reason
  7. | Tunknown
  8. | Taxiom
and ml_meta = {
  1. id : int;
  2. mutable contents : ml_type option;
}
type ml_schema = int * ml_type
type inductive_kind =
  1. | Singleton
  2. | Coinductive
  3. | Standard
  4. | Record of Names.GlobRef.t option list
type ml_ind_packet = {
  1. ip_typename : Names.Id.t;
  2. ip_consnames : Names.Id.t array;
  3. ip_logical : bool;
  4. ip_sign : signature;
  5. ip_vars : Names.Id.t list;
  6. ip_types : ml_type list array;
}
type equiv =
  1. | NoEquiv
  2. | Equiv of Names.KerName.t
  3. | RenEquiv of string
type ml_ind = {
  1. ind_kind : inductive_kind;
  2. ind_nparams : int;
  3. ind_packets : ml_ind_packet array;
  4. ind_equiv : equiv;
}
type ml_ident =
  1. | Dummy
  2. | Id of Names.Id.t
  3. | Tmp of Names.Id.t

We now store some typing information on constructors and cases to avoid type-unsafe optimisations. This will be either the type of the applied constructor or the type of the head of the match.

Nota : the constructor MLtuple and the extension of MLcase to general patterns have been proposed by P.N. Tollitte for his Relation Extraction plugin. MLtuple is currently not used by the main extraction, as well as deep patterns.

type ml_branch = ml_ident list * ml_pattern * ml_ast
and ml_ast =
  1. | MLrel of int
  2. | MLapp of ml_ast * ml_ast list
  3. | MLlam of ml_ident * ml_ast
  4. | MLletin of ml_ident * ml_ast * ml_ast
  5. | MLglob of Names.GlobRef.t
  6. | MLcons of ml_type * Names.GlobRef.t * ml_ast list
  7. | MLtuple of ml_ast list
  8. | MLcase of ml_type * ml_ast * ml_branch array
  9. | MLfix of int * Names.Id.t array * ml_ast array
  10. | MLexn of string
  11. | MLdummy of kill_reason
  12. | MLaxiom
  13. | MLmagic of ml_ast
  14. | MLuint of Uint63.t
  15. | MLfloat of Float64.t
  16. | MLparray of ml_ast array * ml_ast
and ml_pattern =
  1. | Pcons of Names.GlobRef.t * ml_pattern list
  2. | Ptuple of ml_pattern list
  3. | Prel of int
    (*

    Cf. the idents in the branch. Prel 1 is the last one.

    *)
  4. | Pwild
  5. | Pusual of Names.GlobRef.t
    (*

    Shortcut for Pcons (r,Prel n;...;Prel 1) *

    *)
type ml_decl =
  1. | Dind of Names.MutInd.t * ml_ind
  2. | Dtype of Names.GlobRef.t * Names.Id.t list * ml_type
  3. | Dterm of Names.GlobRef.t * ml_ast * ml_type
  4. | Dfix of Names.GlobRef.t array * ml_ast array * ml_type array
type ml_spec =
  1. | Sind of Names.MutInd.t * ml_ind
  2. | Stype of Names.GlobRef.t * Names.Id.t list * ml_type option
  3. | Sval of Names.GlobRef.t * ml_type
type ml_specif =
  1. | Spec of ml_spec
  2. | Smodule of ml_module_type
  3. | Smodtype of ml_module_type
and ml_module_type =
  1. | MTident of Names.ModPath.t
  2. | MTfunsig of Names.MBId.t * ml_module_type * ml_module_type
  3. | MTsig of Names.ModPath.t * ml_module_sig
  4. | MTwith of ml_module_type * ml_with_declaration
and ml_with_declaration =
  1. | ML_With_type of Names.Id.t list * Names.Id.t list * ml_type
  2. | ML_With_module of Names.Id.t list * Names.ModPath.t
and ml_module_sig = (Names.Label.t * ml_specif) list
type ml_structure_elem =
  1. | SEdecl of ml_decl
  2. | SEmodule of ml_module
  3. | SEmodtype of ml_module_type
and ml_module_expr =
  1. | MEident of Names.ModPath.t
  2. | MEfunctor of Names.MBId.t * ml_module_type * ml_module_expr
  3. | MEstruct of Names.ModPath.t * ml_module_structure
  4. | MEapply of ml_module_expr * ml_module_expr
and ml_module_structure = (Names.Label.t * ml_structure_elem) list
and ml_module = {
  1. ml_mod_expr : ml_module_expr;
  2. ml_mod_type : ml_module_type;
}
type ml_structure = (Names.ModPath.t * ml_module_structure) list
type ml_signature = (Names.ModPath.t * ml_module_sig) list
type unsafe_needs = {
  1. mldummy : bool;
  2. tdummy : bool;
  3. tunknown : bool;
  4. magic : bool;
}
type language_descr = {
  1. keywords : Names.Id.Set.t;
  2. file_suffix : string;
  3. file_naming : Names.ModPath.t -> string;
  4. preamble : Names.Id.t -> Pp.t option -> Names.ModPath.t list -> unsafe_needs -> Pp.t;
  5. pp_struct : ml_structure -> Pp.t;
  6. sig_suffix : string option;
  7. sig_preamble : Names.Id.t -> Pp.t option -> Names.ModPath.t list -> unsafe_needs -> Pp.t;
  8. pp_sig : ml_signature -> Pp.t;
  9. pp_decl : ml_decl -> Pp.t;
}
OCaml

Innovation. Community. Security.