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
# 1 "src/loader/uid.ml"
type id = string
let anchor_of_id id = "def-" ^ id
# 7 "src/loader/uid.ml"
open Types
type uid = Shape.Uid.t
let unpack_uid uid =
match uid with
| Shape.Uid.Compilation_unit s -> Some (s, None)
| Item { comp_unit; id } -> Some (comp_unit, Some (string_of_int id))
| Predef _ -> None
| Internal -> None
let of_value_description vd = Some vd.val_uid
let of_type_declaration decl = Some decl.type_uid
let of_extension_constructor ext = Some ext.ext_uid
let of_class_type_declaration cltd = Some cltd.clty_uid
let of_class_declaration cld = Some cld.cty_uid
let of_module_type_declaration mtd = Some mtd.mtd_uid
let of_shape_uid uid = uid