1
1
@deprecated ("Do not use. This will be removed in v13" )
2
- external /* Internal */
3
-
4
- __unsafe_cast : 'a => 'b = "%identity"
2
+ external __unsafe_cast : 'a => 'b = "%identity"
5
3
6
4
/* Exceptions */
7
- @deprecated (
8
- "`raise` has been renamed to `throw` to align with JavaScript vocabulary. Please use `throw` instead"
9
- )
10
- external raise : exn => 'a = "%raise"
11
-
12
- @deprecated ("Use custom exception instead" )
13
- let failwith = s => throw (Failure (s ))
14
-
15
- @deprecated ("Use custom exception instead" )
16
- let invalid_arg = s => throw (Invalid_argument (s ))
17
-
18
- @deprecated ("Use custom exception instead" ) exception Exit
19
5
20
6
/**
21
7
Raises the given exception, terminating execution unless caught by a surrounding try/catch block.
@@ -36,9 +22,25 @@ assertEqual(result, "Caught exception: Out of milk")
36
22
*/
37
23
external throw : exn => 'a = "%raise"
38
24
25
+ @deprecated (
26
+ "`raise` has been renamed to `throw` to align with JavaScript vocabulary. Please use `throw` instead"
27
+ )
28
+ external raise : exn => 'a = "%raise"
29
+
30
+ @deprecated ("Use custom exception instead" )
31
+ let failwith = s => throw (Failure (s ))
32
+
33
+ @deprecated ("Use custom exception instead" )
34
+ let invalid_arg = s => throw (Invalid_argument (s ))
35
+
36
+ @deprecated ("Use custom exception instead" ) exception Exit
37
+
39
38
/* Composition operators */
40
39
40
+ @deprecated ("This will be removed in v13" )
41
41
external \"|>" : ('a , 'a => 'b ) => 'b = "%revapply"
42
+
43
+ @deprecated ("This will be removed in v13" )
42
44
external \"@@" : ('a => 'b , 'a ) => 'b = "%apply"
43
45
44
46
/* Debugging */
@@ -92,7 +94,10 @@ external \"||": (bool, bool) => bool = "%sequor"
92
94
93
95
/* Integer operations */
94
96
97
+ @deprecated ("Use `x => x + 1` instead. This will be removed in v13" )
95
98
external succ : int => int = "%succint"
99
+
100
+ @deprecated ("Use `x => x - 1` instead. This will be removed in v13" )
96
101
external pred : int => int = "%predint"
97
102
98
103
@deprecated ("Use `Math.abs` instead. This will be removed in v13" )
@@ -103,14 +108,25 @@ let abs = x =>
103
108
- x
104
109
}
105
110
111
+ @deprecated ("Use `Int.bitwiseAnd` instead. This will be removed in v13" )
106
112
external land : (int , int ) => int = "%andint"
113
+
114
+ @deprecated ("Use `Int.bitwiseOr` instead. This will be removed in v13" )
107
115
external lor : (int , int ) => int = "%orint"
116
+
117
+ @deprecated ("Use `Int.bitwiseXor` instead. This will be removed in v13" )
108
118
external lxor : (int , int ) => int = "%xorint"
109
119
120
+ @deprecated ("Use `Int.bitwiseNot` instead. This will be removed in v13" )
110
121
let lnot = x => lxor (x , - 1 )
111
122
123
+ @deprecated ("Use `Int.shiftLeft` instead. This will be removed in v13" )
112
124
external lsl : (int , int ) => int = "%lslint"
125
+
126
+ @deprecated ("Use `Int.shiftRightUnsigned` instead. This will be removed in v13" )
113
127
external lsr : (int , int ) => int = "%lsrint"
128
+
129
+ @deprecated ("Use `Int.shiftRight` instead. This will be removed in v13" )
114
130
external asr : (int , int ) => int = "%asrint"
115
131
116
132
@deprecated ("Use `Int.Constants.maxValue` instead. This will be removed in v13" )
@@ -266,16 +282,25 @@ external ignore: 'a => unit = "%ignore"
266
282
267
283
/* Pair operations */
268
284
285
+ @deprecated ("Use `Pair.first` instead. This will be removed in v13" )
269
286
external fst : (('a , 'b )) => 'a = "%field0"
287
+
288
+ @deprecated ("Use `Pair.second` instead. This will be removed in v13" )
270
289
external snd : (('a , 'b )) => 'b = "%field1"
271
290
272
291
/* References */
273
292
274
293
type ref <'a > = {mutable contents : 'a }
275
294
external ref : 'a => ref <'a > = "%makeref"
276
- external \"!" : ref <'a > => 'a = "%refget"
277
295
external \":=" : (ref <'a >, 'a ) => unit = "%refset"
296
+
297
+ @deprecated ("Do not use. This will be removed in v13" )
298
+ external \"!" : ref <'a > => 'a = "%refget"
299
+
300
+ @deprecated ("Use `Int.Ref.increment` instead. This will be removed in v13" )
278
301
external incr : ref <int > => unit = "%incr"
302
+
303
+ @deprecated ("Use `Int.Ref.decrement` instead. This will be removed in v13" )
279
304
external decr : ref <int > => unit = "%decr"
280
305
281
306
/* String conversion functions */
@@ -310,6 +335,7 @@ external string_of_int: int => string = "String"
310
335
@deprecated ("Use `Int.fromString` instead. This will be removed in v13" ) @scope ("Number" )
311
336
external int_of_string : string => int = "parseInt"
312
337
338
+ @deprecated ("Use `Int.fromString` instead. This will be removed in v13" )
313
339
let int_of_string_opt = s =>
314
340
switch int_of_string (s ) {
315
341
| n if n == %raw ("NaN" ) => None
@@ -330,4 +356,5 @@ let rec \"@" = (l1, l2) =>
330
356
331
357
/* Miscellaneous */
332
358
359
+ @deprecated ("This will be removed in v13" )
333
360
type int32 = int
1 commit comments
github-actions[bot] commentedon Apr 1, 2025
Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.05
.Parse RedBlackTree.res - time/run
1.8409753733333332
ms1.3461563799999998
ms1.37
Print RedBlackTree.res - time/run
2.90587894
ms1.8942094533333333
ms1.53
Print RedBlackTreeNoComments.res - time/run
2.6725949
ms1.7506641333333335
ms1.53
Parse Napkinscript.res - time/run
59.68092712666666
ms42.33869618
ms1.41
Print Napkinscript.res - time/run
92.89270593333333
ms57.47105978
ms1.62
Parse HeroGraphic.res - time/run
7.478325379999999
ms5.736426893333333
ms1.30
Print HeroGraphic.res - time/run
12.11635192
ms7.840572506666666
ms1.55
This comment was automatically generated by workflow using github-action-benchmark.