|
22 | 22 | * along with this program; if not, write to the Free Software
|
23 | 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
24 | 24 |
|
25 |
| -[@@@bs.config { flags = [| "-unboxed-types"; "-w"; "-49" |] }] |
| 25 | +[@@@bs.config {flags = [|"-unboxed-types"; "-w"; "-49"|]}] |
26 | 26 | (* DESIGN:
|
27 | 27 | - It does not have any code, all its code will be inlined so that
|
28 | 28 | there will never be
|
@@ -82,29 +82,23 @@ module Internal = struct
|
82 | 82 | external opaqueFullApply : 'a -> 'a = "%uncurried_apply"
|
83 | 83 |
|
84 | 84 | (* Use opaque instead of [._n] to prevent some optimizations happening *)
|
85 |
| - external run : (unit -> 'a [@bs]) -> 'a = "#run" |
| 85 | + external run : ((unit -> 'a)[@bs]) -> 'a = "#run" |
86 | 86 | external opaque : 'a -> 'a = "%opaque"
|
87 | 87 | end
|
88 | 88 |
|
89 | 89 | (**/**)
|
90 | 90 |
|
91 |
| -type +'a null = |
92 |
| - | Value of 'a |
93 |
| - | Null [@as null] |
94 |
| -[@@unboxed] |
95 | 91 | (**
|
96 | 92 | Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t.
|
97 | 93 | *)
|
| 94 | +type +'a null = Value of 'a | Null [@as null] [@@unboxed] |
98 | 95 |
|
99 | 96 | type +'a undefined
|
100 | 97 | (**
|
101 | 98 | A value of this type can be either undefined or 'a. This type is equivalent to Js.Undefined.t.
|
102 | 99 | *)
|
103 | 100 |
|
104 |
| -type +'a nullable = |
105 |
| - | Value of 'a |
106 |
| - | Null [@as null] |
107 |
| - | Undefined [@as undefined] |
| 101 | +type +'a nullable = Value of 'a | Null [@as null] | Undefined [@as undefined] |
108 | 102 | [@@unboxed]
|
109 | 103 |
|
110 | 104 | (**
|
@@ -144,17 +138,17 @@ external typeof : 'a -> string = "#typeof"
|
144 | 138 | *)
|
145 | 139 |
|
146 | 140 | external log : 'a -> unit = "log"
|
147 |
| - [@@val] [@@scope "console"] |
| 141 | +[@@val] [@@scope "console"] |
148 | 142 | (** Equivalent to console.log any value. *)
|
149 | 143 |
|
150 | 144 | external log2 : 'a -> 'b -> unit = "log" [@@bs.val] [@@bs.scope "console"]
|
151 | 145 | external log3 : 'a -> 'b -> 'c -> unit = "log" [@@bs.val] [@@bs.scope "console"]
|
152 | 146 |
|
153 | 147 | external log4 : 'a -> 'b -> 'c -> 'd -> unit = "log"
|
154 |
| - [@@bs.val] [@@bs.scope "console"] |
| 148 | +[@@bs.val] [@@bs.scope "console"] |
155 | 149 |
|
156 | 150 | external logMany : 'a array -> unit = "log"
|
157 |
| - [@@bs.val] [@@bs.scope "console"] [@@bs.splice] |
| 151 | +[@@bs.val] [@@bs.scope "console"] [@@bs.splice] |
158 | 152 | (** A convenience function to console.log more than 4 arguments *)
|
159 | 153 |
|
160 | 154 | external eqNull : 'a -> 'a null -> bool = "%bs_equal_null"
|
@@ -199,8 +193,9 @@ module Undefined = Js_undefined
|
199 | 193 | module Nullable = Js_null_undefined
|
200 | 194 | (** Provide utilities for `Js.null_undefined` *)
|
201 | 195 |
|
202 |
| -module Null_undefined = Js_null_undefined |
203 |
| -[@deprecated "Please use `Js.Nullable`"] |
| 196 | +module Null_undefined = |
| 197 | + Js_null_undefined |
| 198 | + [@deprecated "Please use `Js.Nullable`"] |
204 | 199 |
|
205 | 200 | module Exn = Js_exn
|
206 | 201 | (** Provide utilities for dealing with Js exceptions *)
|
@@ -244,21 +239,12 @@ module Math = Js_math
|
244 | 239 | module Obj = Js_obj
|
245 | 240 | (** Provide utilities for `Js.t` *)
|
246 | 241 |
|
247 |
| -module ArrayBuffer = Js_array_buffer |
248 |
| -(** Provide utilities for `ArrayBuffer` object *) |
249 |
| - |
250 |
| -module SharedArrayBuffer = Js_shared_array_buffer |
251 |
| -(** Provide utilities for `SharedArrayBuffer` object *) |
252 |
| - |
253 | 242 | module Typed_array = Js_typed_array
|
254 | 243 | (** Provide bindings for JS typed array *)
|
255 | 244 |
|
256 | 245 | module TypedArray2 = Js_typed_array2
|
257 | 246 | (** Provide bindings for JS typed array *)
|
258 | 247 |
|
259 |
| -module Atomics = Js_atomics |
260 |
| -(** Provide bindings for JS `Atomics` utilities *) |
261 |
| - |
262 | 248 | module Types = Js_types
|
263 | 249 | (** Provide utilities for manipulating JS types *)
|
264 | 250 |
|
|
0 commit comments