1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: entries.ml 10664 2008-03-14 11:27:37Z soubiran $ i*)
18
(* This module defines the entry types for global declarations. This
19
information is entered in the environments. This includes global
20
constants/axioms, mutual inductive definitions, modules and module
28
| LocalAssum of constr
31
(*s Declaration of inductive types. *)
33
(* Assume the following definition in concrete syntax:
35
Inductive I1 (x1:X1) ... (xn:Xn) : A1 := c11 : T11 | ... | c1n1 : T1n1
37
with Ip (x1:X1) ... (xn:Xn) : Ap := cp1 : Tp1 | ... | cpnp : Tpnp.
39
then, in $i^{th}$ block, [mind_entry_params] is [[xn:Xn;...;x1:X1]];
40
[mind_entry_arity] is [Ai], defined in context [[[x1:X1;...;xn:Xn]];
41
[mind_entry_lc] is [Ti1;...;Tini], defined in context [[A'1;...;A'p;x1:X1;...;xn:Xn]] where [A'i] is [Ai] generalized over [[x1:X1;...;xn:Xn]].
44
type one_inductive_entry = {
45
mind_entry_typename : identifier;
46
mind_entry_arity : constr;
47
mind_entry_consnames : identifier list;
48
mind_entry_lc : constr list }
50
type mutual_inductive_entry = {
51
mind_entry_record : bool;
52
mind_entry_finite : bool;
53
mind_entry_params : (identifier * local_entry) list;
54
mind_entry_inds : one_inductive_entry list }
57
(*s Constants (Definition/Axiom) *)
59
type definition_entry = {
60
const_entry_body : constr;
61
const_entry_type : types option;
62
const_entry_opaque : bool;
63
const_entry_boxed : bool}
65
type parameter_entry = types*bool
68
| DefinitionEntry of definition_entry
69
| ParameterEntry of parameter_entry
73
type specification_entry =
74
SPEconst of constant_entry
75
| SPEmind of mutual_inductive_entry
76
| SPEmodule of module_entry
77
| SPEalias of module_path
78
| SPEmodtype of module_struct_entry
80
and module_struct_entry =
81
MSEident of module_path
82
| MSEfunctor of mod_bound_id * module_struct_entry * module_struct_entry
83
| MSEwith of module_struct_entry * with_declaration
84
| MSEapply of module_struct_entry * module_struct_entry
86
and with_declaration =
87
With_Module of identifier list * module_path
88
| With_Definition of identifier list * constr
90
and module_structure = (label * specification_entry) list
93
{ mod_entry_type : module_struct_entry option;
94
mod_entry_expr : module_struct_entry option}