-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathitem.mli
67 lines (53 loc) · 1.56 KB
/
item.mli
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
open Spotlib.Spot
open Asttypes
(* open Conv *)
type 'typ kind =
| Class
| ClassType
| ClassField of virtual_flag * 'typ
| Constr of 'typ
| Exception of 'typ
| Field of 'typ
| Method of private_flag * virtual_flag * 'typ
| ModType
| Module
| Type of 'typ list (** type params *) * 'typ option * [ `Abstract | `Record | `Variant ]
| Value of 'typ
| Package of OCamlFind.Package.t * string list (** top modules, ex. "Dbm" *)
val kindkey_of_kind : 'a kind -> Kindkey.extracted
val name_of_kind : 'a kind -> string
val types_of_kind : 'a kind -> 'a list
(* with conv(json) *)
type ('packs, 'path, 'loc, 'doc, 'typ) record = {
packs : 'packs;
path : 'path;
loc : 'loc;
doc : 'doc;
kind : 'typ kind;
}
type t = (OCamlFind.Packages.t,
Spath.t,
Loc.t option,
(OCamlDoc.t option, unit) Result.t,
Stype.t) record
with conv(ocaml)
type pooled_type =
| Not_pooled of Stype.t
| Pooled of int
type pooled = (OCamlFind.Packages.t,
Spath.t,
Loc.t option,
(OCamlDoc.t option, unit) Result.t,
pooled_type) record
with conv(ocaml)
val rec_hcons : t -> t
val format : Format.t -> t -> unit
val format_gen : ?dont_omit_opened: bool -> Format.t -> t -> unit
val arity_of_item : t -> int
(** -1 for items with no type. *)
val sort_items_by_arity : t array -> t array
(** Sort them from no type, arity 0 .. .
Believed to help the efficiency of the type match algorithm.
*)
val type_of_item : (_, _, _, _, 'a) record -> 'a option
val pack_types : t array -> unit