1 (** A module collecting all predefined OCaml types, exceptions and
2 modules operating on them, so that ppx_deriving plugins operate
3 in a well-defined environment. *)
5 (** {2 Predefined types} *)
7 (** The {!Predef} module is necessary in absence of a [type nonrec]
14 type _bool
= bool (* = false | true *) (* see PR5936, GPR76, GPR234 *)
15 type _unit
= unit (* = () *)
17 type 'a _array
= 'a array
18 type 'a _list
= 'a list
(* = [] | 'a :: 'a list *)
19 type 'a _option
= 'a
option = None
| Some
of 'a
20 type _nativeint
= nativeint
23 type 'a _lazy_t
= 'a lazy_t
27 type int = Predef._int
28 type char
= Predef._char
29 type string = Predef._string
30 type float = Predef._float
31 type bool = Predef._bool
32 type unit = Predef._unit
33 type exn
= Predef._exn
34 type 'a array
= 'a
Predef._array
35 type 'a list
= 'a
Predef._list
36 type 'a
option = 'a
Predef._option
= None
| Some
of 'a
37 type nativeint
= Predef._nativeint
38 type int32
= Predef._int32
39 type int64
= Predef._int64
40 type 'a lazy_t
= 'a
Predef._lazy_t
41 type bytes
= Predef._bytes
43 (** {2 Predefined modules}
44 {3 Operations on predefined types} *)
46 module Pervasives
: (module type of Pervasives
with
47 type fpclass
= Pervasives.fpclass
and
48 type in_channel
= Pervasives.in_channel
and
49 type out_channel
= Pervasives.out_channel
and
50 type open_flag
= Pervasives.open_flag
and
51 type 'a
ref = 'a
Pervasives.ref and
52 type ('a
, 'b
, 'c
, 'd
, 'e
, 'f
) format6
= ('a
, 'b
, 'c
, 'd
, 'e
, 'f
) Pervasives.format6
and
53 type ('a
, 'b
, 'c
, 'd
) format4
= ('a
, 'b
, 'c
, 'd
) Pervasives.format4
and
54 type ('a
, 'b
, 'c
) format
= ('a
, 'b
, 'c
) Pervasives.format
)
55 include (module type of Pervasives
with
56 type fpclass
= Pervasives.fpclass
and
57 type in_channel
= Pervasives.in_channel
and
58 type out_channel
= Pervasives.out_channel
and
59 type open_flag
= Pervasives.open_flag
and
60 type 'a
ref = 'a
Pervasives.ref and
61 type ('a
, 'b
, 'c
, 'd
, 'e
, 'f
) format6
= ('a
, 'b
, 'c
, 'd
, 'e
, 'f
) Pervasives.format6
and
62 type ('a
, 'b
, 'c
, 'd
) format4
= ('a
, 'b
, 'c
, 'd
) Pervasives.format4
and
63 type ('a
, 'b
, 'c
) format
= ('a
, 'b
, 'c
) Pervasives.format
)
65 module Char
: (module type of Char
)
66 module String
: (module type of String
)
67 module Printexc
: (module type of Printexc
with
68 type raw_backtrace
:= Printexc.raw_backtrace
and
69 type backtrace_slot
:= Printexc.backtrace_slot
and
70 type location
:= Printexc.location
)
71 module Array
: (module type of Array
)
72 module List
: (module type of List
)
73 module Nativeint
: (module type of Nativeint
)
74 module Int32
: (module type of Int32
)
75 module Int64
: (module type of Int64
)
76 module Lazy
: (module type of Lazy
)
77 module Bytes
: (module type of Bytes
)
79 (** {3 Data structures} *)
81 module Hashtbl
: (module type of Hashtbl
with
82 type ('a
, 'b
) t
:= ('a
, 'b
) Hashtbl.t
and
83 type statistics
:= Hashtbl.statistics
)
84 module Queue
: (module type of Queue
with
85 type 'a t
:= 'a
Queue.t
)
86 module Stack
: (module type of Stack
with
87 type 'a t
:= 'a
Stack.t
)
88 module Set
: (module type of Set
)
89 module Map
: (module type of Map
)
90 module Weak
: (module type of Weak
with
91 type 'a t
:= 'a
Weak.t
)
92 module Buffer
: (module type of Buffer
with
95 type ('a
, 'b
) result
= ('a
, 'b
) Pervasives.result
=
100 (** {3 Formatting} *)
102 module Printf
: (module type of Printf
)
103 module Format
: (module type of Format
with
104 type formatter_out_functions
:= Format.formatter_out_functions
and
105 type formatter_tag_functions
:= Format.formatter_tag_functions
and
106 type formatter
:= Format.formatter
)