1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Pierre Chambart, OCamlPro *)
6 (* Mark Shinwell and Leo White, Jane Street Europe *)
7 (* *)
8 (* Copyright 2013--2016 OCamlPro SAS *)
9 (* Copyright 2014--2016 Jane Street Group LLC *)
10 (* *)
11 (* All rights reserved. This file is distributed under the terms of *)
12 (* the GNU Lesser General Public License version 2.1, with the *)
13 (* special exception on linking described in the file LICENSE. *)
14 (* *)
15 (**************************************************************************)
16
17 [@@@ocaml.warning "+a-4-9-30-40-41-42"]
18
19 (** A symbol identifies a constant provided by either:
20 - another compilation unit; or
21 - a top-level module.
22
23 * [sym_unit] is the compilation unit containing the value.
24 * [sym_label] is the linkage name of the variable.
25
26 The label must be globally unique: two compilation units linked in the
27 same program must not share labels. *)
28
29 include Identifiable.S
30
31 val of_variable : Variable.t -> t
32
33 (* Create the symbol without prefixing with the compilation unit.
34 Used for global symbols like predefined exceptions *)
35 val of_global_linkage : Compilation_unit.t -> Linkage_name.t -> t
36
37 val import_for_pack : pack:Compilation_unit.t -> t -> t
38
39 val compilation_unit : t -> Compilation_unit.t
40 val label : t -> Linkage_name.t
41
42 val print_opt : Format.formatter -> t option -> unit
43
44 val compare_lists : t list -> t list -> int
45