Skip to content

Commit 818fd84

Browse files
committed
avoid @@ for simplicity
1 parent 2789454 commit 818fd84

File tree

11 files changed

+58
-58
lines changed

11 files changed

+58
-58
lines changed

jscomp/others/belt_HashMap.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ let rec getAux ~eq key buckets =
156156
let get h key =
157157
let h_buckets = h.C.buckets in
158158
let nid = (Belt_Id.getHashInternal h.C.hash) key [@bs] land (A.length h_buckets - 1) in
159-
match C.toOpt @@ A.getUnsafe h_buckets nid with
159+
match C.toOpt (A.getUnsafe h_buckets nid) with
160160
| None -> None
161161
| Some (cell1 : _ N.bucket) ->
162162
let eq = Belt_Id.getEqInternal h.C.eq in

jscomp/others/belt_HashMapInt.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ let rec getAux (key : key) buckets =
138138
let get h (key : key) =
139139
let h_buckets = h.C.buckets in
140140
let nid = hash key land (A.length h_buckets - 1) in
141-
match C.toOpt @@ A.getUnsafe h_buckets nid with
141+
match C.toOpt (A.getUnsafe h_buckets nid) with
142142
| None -> None
143143
| Some cell1 ->
144144
if key = cell1.N.key then Some cell1.N.value else

jscomp/others/belt_HashMapString.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ let rec getAux (key : key) buckets =
138138
let get h (key : key) =
139139
let h_buckets = h.C.buckets in
140140
let nid = hash key land (A.length h_buckets - 1) in
141-
match C.toOpt @@ A.getUnsafe h_buckets nid with
141+
match C.toOpt (A.getUnsafe h_buckets nid) with
142142
| None -> None
143143
| Some cell1 ->
144144
if key = cell1.N.key then Some cell1.N.value else

jscomp/others/belt_MutableSet.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ let intersect a b : _ t =
295295
N.lengthNode dataa0, N.lengthNode datab0 in
296296
let totalSize = sizea + sizeb in
297297
let tmp = A.makeUninitializedUnsafe totalSize in
298-
ignore @@ N.fillArray dataa0 0 tmp ;
299-
ignore @@ N.fillArray datab0 sizea tmp;
298+
ignore (N.fillArray dataa0 0 tmp) ;
299+
ignore (N.fillArray datab0 sizea tmp);
300300
let p = Belt_Id.getCmpInternal cmp in
301301
if (p (A.getUnsafe tmp (sizea - 1))
302302
(A.getUnsafe tmp sizea) [@bs] < 0)
@@ -324,8 +324,8 @@ let diff a b : _ t =
324324
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
325325
let totalSize = sizea + sizeb in
326326
let tmp = A.makeUninitializedUnsafe totalSize in
327-
ignore @@ N.fillArray dataa0 0 tmp ;
328-
ignore @@ N.fillArray datab0 sizea tmp;
327+
ignore ( N.fillArray dataa0 0 tmp) ;
328+
ignore (N.fillArray datab0 sizea tmp);
329329
let p = Belt_Id.getCmpInternal cmp in
330330
if (p (A.getUnsafe tmp (sizea - 1))
331331
(A.getUnsafe tmp sizea) [@bs] < 0)
@@ -351,8 +351,8 @@ let union a b =
351351
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
352352
let totalSize = sizea + sizeb in
353353
let tmp = A.makeUninitializedUnsafe totalSize in
354-
ignore @@ N.fillArray dataa0 0 tmp ;
355-
ignore @@ N.fillArray datab0 sizea tmp ;
354+
ignore (N.fillArray dataa0 0 tmp );
355+
ignore (N.fillArray datab0 sizea tmp);
356356
let p = (Belt_Id.getCmpInternal cmp) in
357357
if p
358358
(A.getUnsafe tmp (sizea - 1))

jscomp/others/belt_MutableSetInt.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ let intersect dataa datab =
279279
N.lengthNode dataa0, N.lengthNode datab0 in
280280
let totalSize = sizea + sizeb in
281281
let tmp = A.makeUninitializedUnsafe totalSize in
282-
ignore @@ N.fillArray dataa0 0 tmp ;
283-
ignore @@ N.fillArray datab0 sizea tmp;
282+
ignore (N.fillArray dataa0 0 tmp) ;
283+
ignore (N.fillArray datab0 sizea tmp);
284284
if ((A.getUnsafe tmp (sizea - 1) <
285285
A.getUnsafe tmp sizea))
286286
||
@@ -303,8 +303,8 @@ let diff dataa datab : t =
303303
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
304304
let totalSize = sizea + sizeb in
305305
let tmp = A.makeUninitializedUnsafe totalSize in
306-
ignore @@ N.fillArray dataa0 0 tmp ;
307-
ignore @@ N.fillArray datab0 sizea tmp;
306+
ignore (N.fillArray dataa0 0 tmp);
307+
ignore (N.fillArray datab0 sizea tmp);
308308
if ( (A.getUnsafe tmp (sizea - 1)) <
309309
(A.getUnsafe tmp sizea))
310310
||
@@ -326,8 +326,8 @@ let union (dataa : t) (datab : t) : t =
326326
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
327327
let totalSize = sizea + sizeb in
328328
let tmp = A.makeUninitializedUnsafe totalSize in
329-
ignore @@ N.fillArray dataa0 0 tmp ;
330-
ignore @@ N.fillArray datab0 sizea tmp ;
329+
ignore (N.fillArray dataa0 0 tmp);
330+
ignore (N.fillArray datab0 sizea tmp);
331331
if
332332
(A.getUnsafe tmp (sizea - 1) <
333333
A.getUnsafe tmp sizea) then

jscomp/others/belt_MutableSetString.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ let intersect dataa datab =
279279
N.lengthNode dataa0, N.lengthNode datab0 in
280280
let totalSize = sizea + sizeb in
281281
let tmp = A.makeUninitializedUnsafe totalSize in
282-
ignore @@ N.fillArray dataa0 0 tmp ;
283-
ignore @@ N.fillArray datab0 sizea tmp;
282+
ignore (N.fillArray dataa0 0 tmp) ;
283+
ignore (N.fillArray datab0 sizea tmp);
284284
if ((A.getUnsafe tmp (sizea - 1) <
285285
A.getUnsafe tmp sizea))
286286
||
@@ -303,8 +303,8 @@ let diff dataa datab : t =
303303
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
304304
let totalSize = sizea + sizeb in
305305
let tmp = A.makeUninitializedUnsafe totalSize in
306-
ignore @@ N.fillArray dataa0 0 tmp ;
307-
ignore @@ N.fillArray datab0 sizea tmp;
306+
ignore (N.fillArray dataa0 0 tmp);
307+
ignore (N.fillArray datab0 sizea tmp);
308308
if ( (A.getUnsafe tmp (sizea - 1)) <
309309
(A.getUnsafe tmp sizea))
310310
||
@@ -326,8 +326,8 @@ let union (dataa : t) (datab : t) : t =
326326
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
327327
let totalSize = sizea + sizeb in
328328
let tmp = A.makeUninitializedUnsafe totalSize in
329-
ignore @@ N.fillArray dataa0 0 tmp ;
330-
ignore @@ N.fillArray datab0 sizea tmp ;
329+
ignore (N.fillArray dataa0 0 tmp);
330+
ignore (N.fillArray datab0 sizea tmp);
331331
if
332332
(A.getUnsafe tmp (sizea - 1) <
333333
A.getUnsafe tmp sizea) then

jscomp/others/hashmap.cppo.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ let rec getAux (key : key) buckets =
146146
let get h (key : key) =
147147
let h_buckets = h.C.buckets in
148148
let nid = hash key land (A.length h_buckets - 1) in
149-
match C.toOpt @@ A.getUnsafe h_buckets nid with
149+
match C.toOpt (A.getUnsafe h_buckets nid) with
150150
| None -> None
151151
| Some cell1 ->
152152
if key = cell1.N.key then Some cell1.N.value else

jscomp/others/js_float.ml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ external isFinite : float -> bool = "isFinite" [@@bs.val] [@@bs.scope "Number"]
7575
7676
```
7777
(* prints "7.71234e+1" *)
78-
let _ = Js.log @@ Js.Float.toExponential 77.1234
78+
let _ = Js.log (Js.Float.toExponential 77.1234)
7979
8080
(* prints "7.7e+1" *)
81-
let _ = Js.log @@ Js.Float.toExponential 77.
81+
let _ = Js.log (Js.Float.toExponential 77.)
8282
```
8383
8484
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)
@@ -99,7 +99,7 @@ external toExponential : float -> string = "toExponential" [@@bs.send]
9999
100100
```
101101
(* prints "7.71e+1" *)
102-
let _ = Js.log @@ Js.Float.toExponentialWithPrecision 77.1234 ~digits:2
102+
let _ = Js.log (Js.Float.toExponentialWithPrecision 77.1234 ~digits:2)
103103
```
104104
105105
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)
@@ -115,10 +115,10 @@ external toExponentialWithPrecision : float -> digits:int -> string = "toExponen
115115
116116
```
117117
(* prints "12346" (note the rounding) *)
118-
let _ = Js.log @@ Js.Float.toFixed 12345.6789
118+
let _ = Js.log (Js.Float.toFixed 12345.6789)
119119
120120
(* print "1.2e+21" *)
121-
let _ = Js.log @@ Js.Float.toFixed 1.2e21
121+
let _ = Js.log (Js.Float.toFixed 1.2e21)
122122
```
123123
124124
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)
@@ -139,10 +139,10 @@ external toFixed : float -> string = "toFixed" [@@bs.send]
139139
140140
```
141141
(* prints "12345.7" (note the rounding) *)
142-
let _ = Js.log @@ Js.Float.toFixedWithPrecision 12345.6789 ~digits:1
142+
let _ = Js.log (Js.Float.toFixedWithPrecision 12345.6789 ~digits:1)
143143
144144
(* prints "0.00" (note the added zeroes) *)
145-
let _ = Js.log @@ Js.Float.toFixedWithPrecision 0. ~digits:2
145+
let _ = Js.log (Js.Float.toFixedWithPrecision 0. ~digits:2)
146146
```
147147
148148
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)
@@ -162,10 +162,10 @@ external toFixedWithPrecision : float -> digits:int -> string = "toFixed" [@@bs.
162162
163163
```
164164
(* prints "12345.6789" *)
165-
let _ = Js.log @@ Js.Float.toPrecision 12345.6789
165+
let _ = Js.log (Js.Float.toPrecision 12345.6789)
166166
167167
(* print "1.2e+21" *)
168-
let _ = Js.log @@ Js.Float.toPrecision 1.2e21
168+
let _ = Js.log (Js.Float.toPrecision 1.2e21)
169169
```
170170
171171
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)
@@ -193,10 +193,10 @@ external toPrecision : float -> string = "toPrecision" [@@bs.send] (* equivalent
193193
194194
```
195195
(* prints "1e+4" *)
196-
let _ = Js.log @@ Js.Float.toPrecisionWithPrecision 12345.6789 ~digits:1
196+
let _ = Js.log (Js.Float.toPrecisionWithPrecision 12345.6789 ~digits:1)
197197
198198
(* prints "0.0" *)
199-
let _ = Js.log @@ Js.Float.toPrecisionWithPrecision 0. ~digits:2
199+
let _ = Js.log (Js.Float.toPrecisionWithPrecision 0. ~digits:2)
200200
```
201201
202202
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)
@@ -211,7 +211,7 @@ external toPrecisionWithPrecision : float -> digits:int -> string = "toPrecision
211211
212212
```
213213
(* prints "12345.6789" *)
214-
let _ = Js.log @@ Js.Float.toString 12345.6789
214+
let _ = Js.log (Js.Float.toString 12345.6789)
215215
```
216216
217217
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)
@@ -230,16 +230,16 @@ external toString : float -> string = "toString" [@@bs.send]
230230
231231
```
232232
(* prints "110" *)
233-
let _ = Js.log @@ Js.Float.toStringWithRadix 6. ~radix:2
233+
let _ = Js.log (Js.Float.toStringWithRadix 6. ~radix:2)
234234
235235
(* prints "11.001000111101011100001010001111010111000010100011111" *)
236-
let _ = Js.log @@ Js.Float.toStringWithRadix 3.14 ~radix:2
236+
let _ = Js.log (Js.Float.toStringWithRadix 3.14 ~radix:2)
237237
238238
(* prints "deadbeef" *)
239-
let _ = Js.log @@ Js.Float.toStringWithRadix 3735928559. ~radix:16
239+
let _ = Js.log (Js.Float.toStringWithRadix 3735928559. ~radix:16)
240240
241241
(* prints "3f.gez4w97ry0a18ymf6qadcxr" *)
242-
let _ = Js.log @@ Js.Float.toStringWithRadix 123.456 ~radix:36
242+
let _ = Js.log (Js.Float.toStringWithRadix 123.456 ~radix:36)
243243
```
244244
245245
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)

jscomp/others/js_int.ml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
4242
```
4343
(* prints "7.7e+1" *)
44-
let _ = Js.log @@ Js.Int.toExponential 77
44+
let _ = Js.log (Js.Int.toExponential 77)
4545
```
4646
4747
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)
@@ -62,10 +62,10 @@ external toExponential : int -> string = "toExponential" [@@bs.send]
6262
6363
```
6464
(* prints "7.70e+1" *)
65-
let _ = Js.log @@ Js.Int.toExponentialWithPrecision 77 ~digits:2
65+
let _ = Js.log (Js.Int.toExponentialWithPrecision 77 ~digits:2)
6666
6767
(* prints "5.68e+3" *)
68-
let _ = Js.log @@ Js.Int.toExponentialWithPrecision 5678 ~digits:2
68+
let _ = Js.log (Js.Int.toExponentialWithPrecision 5678 ~digits:2)
6969
```
7070
7171
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)
@@ -85,7 +85,7 @@ external toExponentialWithPrecision : int -> digits:int -> string = "toExponenti
8585
8686
```
8787
(* prints "123456789" *)
88-
let _ = Js.log @@ Js.Int.toPrecision 123456789
88+
let _ = Js.log (Js.Int.toPrecision 123456789)
8989
```
9090
9191
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)
@@ -113,10 +113,10 @@ external toPrecision : int -> string = "toPrecision" [@@bs.send] (* equivalent t
113113
114114
```
115115
(* prints "1.2e+8" *)
116-
let _ = Js.log @@ Js.Int.toPrecisionWithPrecision 123456789 ~digits:2
116+
let _ = Js.log (Js.Int.toPrecisionWithPrecision 123456789 ~digits:2)
117117
118118
(* prints "0.0" *)
119-
let _ = Js.log @@ Js.Int.toPrecisionWithPrecision 0 ~digits:2
119+
let _ = Js.log (Js.Int.toPrecisionWithPrecision 0 ~digits:2)
120120
```
121121
122122
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)
@@ -131,7 +131,7 @@ external toPrecisionWithPrecision : int -> digits:int -> string = "toPrecision"
131131
132132
```
133133
(* prints "123456789" *)
134-
let _ = Js.log @@ Js.Int.toString 123456789
134+
let _ = Js.log (Js.Int.toString 123456789)
135135
```
136136
137137
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)
@@ -150,13 +150,13 @@ external toString : int -> string = "toString" [@@bs.send]
150150
151151
```
152152
(* prints "110" *)
153-
let _ = Js.log @@ Js.Int.toStringWithRadix 6 ~radix:2
153+
let _ = Js.log (Js.Int.toStringWithRadix 6 ~radix:2)
154154
155155
(* prints "deadbeef" *)
156-
let _ = Js.log @@ Js.Int.toStringWithRadix 3735928559 ~radix:16
156+
let _ = Js.log (Js.Int.toStringWithRadix 3735928559 ~radix:16)
157157
158158
(* prints "2n9c" *)
159-
let _ = Js.log @@ Js.Int.toStringWithRadix 123456 ~radix:36
159+
let _ = Js.log (Js.Int.toStringWithRadix 123456 ~radix:36)
160160
```
161161
162162
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)

jscomp/others/js_json.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ external parseExn : string -> t = "parse" [@@bs.val] [@@bs.scope "JSON"]
178178
179179
(* prints `1, 2, 3` *)
180180
let _ =
181-
Js.log @@ getIds {| { "ids" : [1, 2, 3] } |}
181+
Js.log (getIds {| { "ids" : [1, 2, 3] } |})
182182
```
183183
184184
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)
@@ -200,7 +200,7 @@ external stringify: t -> string = "stringify"
200200
Js.Dict.set dict "likes"
201201
(Js.Json.stringArray [|"bucklescript";"ocaml";"js"|]);
202202
203-
Js.log @@ Js.Json.stringify (Js.Json.object_ dict)
203+
Js.log (Js.Json.stringify (Js.Json.object_ dict))
204204
```
205205
206206
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)
@@ -222,7 +222,7 @@ external stringifyWithSpace: t -> (_ [@bs.as {json|null|json}]) -> int -> string
222222
Js.Dict.set dict "likes"
223223
(Js.Json.stringArray [|"bucklescript";"ocaml";"js"|]);
224224
225-
Js.log @@ Js.Json.stringifyWithSpace (Js.Json.object_ dict) 2
225+
Js.log (Js.Json.stringifyWithSpace (Js.Json.object_ dict) 2)
226226
```
227227
228228
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)
@@ -236,7 +236,7 @@ external stringifyAny : 'a -> string option = "stringify"
236236
237237
```
238238
(* prints ``"foo", "bar"`` *)
239-
Js.log @@ Js.Json.stringifyAny [| "foo"; "bar" |]
239+
Js.log (Js.Json.stringifyAny [| "foo"; "bar" |])
240240
```
241241
242242
**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)

0 commit comments

Comments
 (0)