File: odoc_env.mli

package info (click to toggle)
ocaml 4.05.0-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 27,060 kB
  • sloc: ml: 199,255; ansic: 44,187; sh: 5,611; makefile: 4,958; lisp: 4,223; asm: 4,220; awk: 306; perl: 87; fortran: 21; cs: 9; sed: 9
file content (78 lines) | stat: -rw-r--r-- 3,445 bytes parent folder | download | duplicates (3)
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
(**************************************************************************)
(*                                                                        *)
(*                                 OCaml                                  *)
(*                                                                        *)
(*             Maxence Guesdon, projet Cristal, INRIA Rocquencourt        *)
(*                                                                        *)
(*   Copyright 2001 Institut National de Recherche en Informatique et     *)
(*     en Automatique.                                                    *)
(*                                                                        *)
(*   All rights reserved.  This file is distributed under the terms of    *)
(*   the GNU Lesser General Public License version 2.1, with the          *)
(*   special exception on linking described in the file LICENSE.          *)
(*                                                                        *)
(**************************************************************************)

(** Environment for finding complete names from relative names. *)

(** An environment of known names,
   from simple name to complete name. *)
type env

(** The empty environment. *)
val empty : env

(** Extending an environment *)

val add_signature : env -> string -> ?rel:string -> Types.signature -> env
val add_extension : env -> Odoc_name.t -> env
val add_type : env -> Odoc_name.t -> env
val add_value : env -> Odoc_name.t -> env
val add_module : env -> Odoc_name.t -> env
val add_module_type : env -> Odoc_name.t -> env
val add_class : env -> Odoc_name.t -> env
val add_class_type : env -> Odoc_name.t -> env

(** Retrieving fully qualified names from an environment *)

(** Get the fully qualified module name from a name.*)
val full_module_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified module type name from a name.*)
val full_module_type_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified module or module type name from a name.
   We look for a module type if we don't find a module.*)
val full_module_or_module_type_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified type name from a name.*)
val full_type_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified value name from a name.*)
val full_value_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified extension name from a name.*)
val full_extension_constructor_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified class name from a name.*)
val full_class_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified class type name from a name.*)
val full_class_type_name : env -> Odoc_name.t -> Odoc_name.t

(** Get the fully qualified class or class type name from a name.*)
val full_class_or_class_type_name : env -> Odoc_name.t -> Odoc_name.t

(** Substitutions *)

(** Replace the [Path.t] by a complete [Path.t] in a [Types.type_expr].*)
val subst_type : env -> Types.type_expr -> Types.type_expr

(** Replace the [Path.t] by a complete [Path.t] in a [Types.module_type].*)
val subst_module_type : env -> Types.module_type -> Types.module_type

(** Replace the [Path.t] by a complete [Path.t] in a [Types.class_type].
   Also empty the structures to get only [object end] when the type
   is printed.
*)
val subst_class_type : env -> Types.class_type -> Types.class_type