Module Recordops
Operations concerning records and canonical structures
Records
type proj_kind={pk_name : Names.Name.t;pk_true_proj : bool;pk_canonical : bool;}type struc_typ={s_CONST : Names.constructor;s_EXPECTEDPARAM : int;s_PROJKIND : proj_kind list;s_PROJ : Names.Constant.t option list;}type struc_tuple= Names.constructor * proj_kind list * Names.Constant.t option list
val register_structure : Environ.env -> struc_tuple -> unitval subst_structure : Mod_subst.substitution -> struc_tuple -> struc_tupleval lookup_structure : Names.inductive -> struc_typlookup_structure ispreturns the struc_typ associated to the inductive pathispif it corresponds to a structure, otherwise it fails withNot_found
val lookup_projections : Names.inductive -> Names.Constant.t option listlookup_projections ispreturns the projections associated to the inductive pathispif it corresponds to a structure, otherwise it fails withNot_found
val find_projection_nparams : Names.GlobRef.t -> intraise
Not_foundif not a projection
val find_projection : Names.GlobRef.t -> struc_typraise
Not_foundif not a projection
val is_projection : Names.Constant.t -> boolval register_primitive_projection : Names.Projection.Repr.t -> Names.Constant.t -> unitSets up the mapping from constants to primitive projections
val is_primitive_projection : Names.Constant.t -> boolval find_primitive_projection : Names.Constant.t -> Names.Projection.Repr.t option
Canonical structures
type cs_pattern=|Const_cs of Names.GlobRef.t|Prod_cs|Sort_cs of Sorts.family|Default_csA cs_pattern characterizes the form of a component of canonical structure
type obj_typ={o_DEF : Constr.constr;o_CTX : Univ.AUContext.t;o_INJ : int option;position of trivial argument
o_TABS : Constr.constr list;ordered
o_TPARAMS : Constr.constr list;ordered
o_NPARAMS : int;o_TCOMPS : Constr.constr list;}ordered
val cs_pattern_of_constr : Environ.env -> Constr.constr -> cs_pattern * int option * Constr.constr listReturn the form of the component of a canonical structure
val pr_cs_pattern : cs_pattern -> Pp.tval lookup_canonical_conversion : (Names.GlobRef.t * cs_pattern) -> Constr.constr * obj_typval register_canonical_structure : warn:bool -> Environ.env -> Evd.evar_map -> (Names.Constant.t * Names.inductive) -> unitval subst_canonical_structure : Mod_subst.substitution -> (Names.Constant.t * Names.inductive) -> Names.Constant.t * Names.inductiveval is_open_canonical_projection : Environ.env -> Evd.evar_map -> Reductionops.state -> boolval canonical_projections : unit -> ((Names.GlobRef.t * cs_pattern) * obj_typ) listval check_and_decompose_canonical_structure : Environ.env -> Evd.evar_map -> Names.GlobRef.t -> Names.Constant.t * Names.inductive