Debian Codegraph @

kernel/declareops.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Declarations
12 open Mod_subst
13 open UVars
14
15 (** Operations concerning types in [Declarations] :
16 [constant_body], [mutual_inductive_body], [module_body] ... *)
17
18 val universes_context : universes -> AbstractContext.t
19
20 val abstract_universes : Entries.universes_entry -> UVars.sort_level_subst * universes
21
22 (** {6 Constants} *)
23
24 val subst_const_body : substitution -> constant_body -> constant_body
25
26 (** Is there a actual body in const_body ? *)
27
28 val constant_has_body : ('a, 'b) pconstant_body -> bool
29
30 val constant_polymorphic_context : ('a, 'b) pconstant_body -> AbstractContext.t
31
32 (** Is the constant polymorphic? *)
33 val constant_is_polymorphic : ('a, 'b) pconstant_body -> bool
34
35 (** Return the universe context, in case the definition is polymorphic, otherwise
36 the context is empty. *)
37
38 val is_opaque : ('a, 'b) pconstant_body -> bool
39
40 (** {6 Inductive types} *)
41
42 val eq_recarg : recarg -> recarg -> bool
43
44 val pr_recarg : recarg -> Pp.t
45 val pr_wf_paths : wf_paths -> Pp.t
46
47 val subst_recarg : substitution -> recarg -> recarg
48
49 val mk_norec : wf_paths
50 val mk_paths : recarg -> wf_paths list array -> wf_paths
51 val dest_recarg : wf_paths -> recarg
52 val dest_subterms : wf_paths -> wf_paths list array
53 val recarg_length : wf_paths -> int -> int
54
55 val subst_wf_paths : substitution -> wf_paths -> wf_paths
56
57 val subst_mind_body : substitution -> mutual_inductive_body -> mutual_inductive_body
58
59 val subst_rewrite_rules : substitution -> rewrite_rules_body -> rewrite_rules_body
60
61 val mind_ntypes : mutual_inductive_body -> int
62
63 val inductive_polymorphic_context : mutual_inductive_body -> AbstractContext.t
64
65 (** Is the inductive polymorphic? *)
66 val inductive_is_polymorphic : mutual_inductive_body -> bool
67 (** Is the inductive cumulative? *)
68 val inductive_is_cumulative : mutual_inductive_body -> bool
69
70 (** Anomaly when not a primitive record or invalid proj_arg *)
71 val inductive_make_projection : Names.inductive -> mutual_inductive_body -> proj_arg:int ->
72 Names.Projection.Repr.t * Sorts.relevance
73
74 val inductive_make_projections : Names.inductive -> mutual_inductive_body ->
75 ((Names.Projection.Repr.t * Sorts.relevance) array * has_eta) option
76
77 (** {6 Kernel flags} *)
78
79 (** A default, safe set of flags for kernel type-checking *)
80 val safe_flags : Conv_oracle.oracle -> typing_flags
81
82 (** {6 Hash-consing} *)
83
84 (** Here, strictly speaking, we don't perform true hash-consing
85 of the structure, but simply hash-cons all inner constr
86 and other known elements *)
87
88 val hcons_const_body : ?hbody:(Constr.t -> Constr.t) ->
89 ('a, 'b) pconstant_body -> ('a, 'b) pconstant_body
90 val hcons_mind : mutual_inductive_body -> mutual_inductive_body