~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to kernel/entries.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
(************************************************************************)
 
8
 
 
9
(*i $Id: entries.ml 10664 2008-03-14 11:27:37Z soubiran $ i*)
 
10
 
 
11
(*i*)
 
12
open Names
 
13
open Univ
 
14
open Term
 
15
open Sign
 
16
(*i*)
 
17
 
 
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
 
21
   types *)
 
22
 
 
23
 
 
24
(*s Local entries *)
 
25
 
 
26
type local_entry =
 
27
  | LocalDef of constr
 
28
  | LocalAssum of constr
 
29
 
 
30
 
 
31
(*s Declaration of inductive types. *)
 
32
 
 
33
(* Assume the following definition in concrete syntax:
 
34
\begin{verbatim}
 
35
Inductive I1 (x1:X1) ... (xn:Xn) : A1 := c11 : T11 | ... | c1n1 : T1n1
 
36
...
 
37
with      Ip (x1:X1) ... (xn:Xn) : Ap := cp1 : Tp1 | ... | cpnp : Tpnp.
 
38
\end{verbatim}
 
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]].
 
42
*)
 
43
 
 
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 }
 
49
 
 
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 }
 
55
 
 
56
 
 
57
(*s Constants (Definition/Axiom) *)
 
58
 
 
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}
 
64
 
 
65
type parameter_entry = types*bool
 
66
 
 
67
type constant_entry = 
 
68
  | DefinitionEntry of definition_entry
 
69
  | ParameterEntry of parameter_entry
 
70
 
 
71
(*s Modules *)
 
72
 
 
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
 
79
 
 
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
 
85
 
 
86
and with_declaration = 
 
87
    With_Module of identifier list * module_path
 
88
  | With_Definition of identifier list * constr
 
89
 
 
90
and module_structure = (label * specification_entry) list
 
91
 
 
92
and module_entry = 
 
93
    { mod_entry_type : module_struct_entry option;
 
94
      mod_entry_expr : module_struct_entry option}
 
95
 
 
96