Debian Codegraph @

tools/coqdoc/index.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 Common
12
13 type loc = int
14
15 type entry_type =
16 | Library
17 | Module
18 | Definition
19 | Inductive
20 | Constructor
21 | Lemma
22 | Record
23 | Projection
24 | Instance
25 | Class
26 | Method
27 | Variable
28 | Axiom
29 | TacticDefinition
30 | Abbreviation
31 | Notation
32 | Section
33 | Binder
34
35 val type_name : entry_type -> string
36
37 type index_entry =
38 | Def of (string * entry_type) list
39 | Ref of coq_module * string * entry_type
40
41 (* Find what symbol coqtop said is located at loc in the source file *)
42 val find : coq_module -> loc -> index_entry
43
44 (* Find what data is referred to by some string in some rocq module *)
45 val find_string : string -> index_entry
46
47 (** [add_ref cur_mod loc lib_dp sp id entry_type] *)
48 val add_ref : string -> int -> coq_module -> coq_module -> string -> entry_type -> unit
49
50 (** [add_def loc1 loc2 entry_type sp id] *)
51 val add_def : int -> int -> entry_type -> coq_module -> string -> unit
52
53 (* Add a Rocq module *)
54 val add_module : coq_module -> unit
55
56 type module_kind = Local | External of coq_module | Unknown
57
58 val find_module : coq_module -> module_kind
59
60 val init_coqlib_library : unit -> unit
61
62 val add_external_library : string -> coq_module -> unit
63
64 (*s Indexes *)
65
66 type 'a index = {
67 idx_name : string;
68 idx_entries : (char * (string * 'a) list) list;
69 idx_size : int }
70
71 val current_library : string ref
72
73 val display_letter : char -> string
74
75 val prepare_entry : string -> entry_type -> string
76
77 val all_entries : unit ->
78 (coq_module * entry_type) index *
79 (entry_type * coq_module index) list
80
81 val map : (string -> 'a -> 'b) -> 'a index -> 'b index
82