blob: 3aac8c40bfb1c6db2c78c530127e197be4d49731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
(***********************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
(* \VV/ *************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(***********************************************************************)
(*i $Id$ i*)
(*i*)
open Pp
(*i*)
(*s Identifiers *)
type identifier
type name = Name of identifier | Anonymous
(* Parsing and printing of identifiers *)
val string_of_id : identifier -> string
val id_of_string : string -> identifier
val pr_id : identifier -> std_ppcmds
(* Identifiers sets and maps *)
module Idset : Set.S with type elt = identifier
module Idpred : Predicate.S with type elt = identifier
module Idmap : Map.S with type key = identifier
(*s Directory paths = section names paths *)
type module_ident = identifier
type dir_path
module ModIdmap : Map.S with type key = module_ident
(* Inner modules idents on top of list *)
val make_dirpath : module_ident list -> dir_path
val repr_dirpath : dir_path -> module_ident list
(* Printing of directory paths as ["coq_root.module.submodule"] *)
val string_of_dirpath : dir_path -> string
val pr_dirpath : dir_path -> std_ppcmds
(*s Section paths are {\em absolute} names *)
type section_path
(* Constructors of [section_path] *)
val make_path : dir_path -> identifier -> section_path
(* Destructors of [section_path] *)
val repr_path : section_path -> dir_path * identifier
(* Parsing and printing of section path as ["coq_root.module.id"] *)
val string_of_path : section_path -> string
val pr_sp : section_path -> std_ppcmds
module Spset : Set.S with type elt = section_path
module Sppred : Predicate.S with type elt = section_path
module Spmap : Map.S with type key = section_path
(*s********************************************************************)
(* type of global reference *)
type variable = identifier
type constant = section_path
(* Beware: first inductive has index 0 *)
type inductive = section_path * int
(* Beware: first constructor has index 1 *)
type constructor = inductive * int
type mutual_inductive = section_path
val ith_mutual_inductive : inductive -> int -> inductive
val ith_constructor_of_inductive : inductive -> int -> constructor
val inductive_of_constructor : constructor -> inductive
val index_of_constructor : constructor -> int
(* Hash-consing *)
val hcons_names : unit ->
(section_path -> section_path) * (dir_path -> dir_path) *
(name -> name) * (identifier -> identifier) * (string -> string)
|