Skip to content

Commit d487134

Browse files
committed
point deprecated functions to Stdlib alternatives
1 parent 84d5a11 commit d487134

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

runtime/Pervasives.res

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ external \"||": (bool, bool) => bool = "%sequor"
8181
external succ: int => int = "%succint"
8282
external pred: int => int = "%predint"
8383

84-
@deprecated("Use Core instead. This will be removed in v13")
84+
@deprecated("Use `Math.abs` instead. This will be removed in v13")
8585
let abs = x =>
8686
if x >= 0 {
8787
x
@@ -99,10 +99,10 @@ external lsl: (int, int) => int = "%lslint"
9999
external lsr: (int, int) => int = "%lsrint"
100100
external asr: (int, int) => int = "%asrint"
101101

102-
@deprecated("Use Core instead. This will be removed in v13")
102+
@deprecated("Use `Int.Constants.maxValue` instead. This will be removed in v13")
103103
let max_int = lsr(-1, 1)
104104

105-
@deprecated("Use Core instead. This will be removed in v13")
105+
@deprecated("Use `Int.Constants.minValue` instead. This will be removed in v13")
106106
let min_int =
107107
max_int + 1
108108

@@ -115,91 +115,91 @@ external \"-.": (float, float) => float = "%subfloat"
115115
external \"*.": (float, float) => float = "%mulfloat"
116116
external \"/.": (float, float) => float = "%divfloat"
117117

118-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
118+
@deprecated("Use `Math.exp` instead. This will be removed in v13") @val @scope("Math")
119119
external exp: float => float = "exp"
120120

121-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
121+
@deprecated("Use `Math.acos` instead. This will be removed in v13") @val @scope("Math")
122122
external acos: float => float = "acos"
123123

124-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
124+
@deprecated("Use `Math.asin` instead. This will be removed in v13") @val @scope("Math")
125125
external asin: float => float = "asin"
126126

127-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
127+
@deprecated("Use `Math.atan` instead. This will be removed in v13") @val @scope("Math")
128128
external atan: float => float = "atan"
129129

130-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
130+
@deprecated("Use `Math.atan2` instead. This will be removed in v13") @val @scope("Math")
131131
external atan2: (float, float) => float = "atan2"
132132

133-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
133+
@deprecated("Use `Math.cos` instead. This will be removed in v13") @val @scope("Math")
134134
external cos: float => float = "cos"
135135

136-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
136+
@deprecated("Use `Math.cosh` instead. This will be removed in v13") @val @scope("Math")
137137
external cosh: float => float = "cosh"
138138

139-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
139+
@deprecated("Use `Math.log` instead. This will be removed in v13") @val @scope("Math")
140140
external log: float => float = "log"
141141

142-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
142+
@deprecated("Use `Math.log10` instead. This will be removed in v13") @val @scope("Math")
143143
external log10: float => float = "log10"
144144

145-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
145+
@deprecated("Use `Math.log1p` instead. This will be removed in v13") @val @scope("Math")
146146
external log1p: float => float = "log1p"
147147

148-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
148+
@deprecated("Use `Math.sin` instead. This will be removed in v13") @val @scope("Math")
149149
external sin: float => float = "sin"
150150

151-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
151+
@deprecated("Use `Math.sinh` instead. This will be removed in v13") @val @scope("Math")
152152
external sinh: float => float = "sinh"
153153

154-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
154+
@deprecated("Use `Math.sqrt` instead. This will be removed in v13") @val @scope("Math")
155155
external sqrt: float => float = "sqrt"
156156

157-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
157+
@deprecated("Use `Math.tan` instead. This will be removed in v13") @val @scope("Math")
158158
external tan: float => float = "tan"
159159

160-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
160+
@deprecated("Use `Math.tanh` instead. This will be removed in v13") @val @scope("Math")
161161
external tanh: float => float = "tanh"
162162

163-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
163+
@deprecated("Use `Math.ceil` instead. This will be removed in v13") @val @scope("Math")
164164
external ceil: float => float = "ceil"
165165

166-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
166+
@deprecated("Use `Math.floor` instead. This will be removed in v13") @val @scope("Math")
167167
external floor: float => float = "floor"
168168

169-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Math")
169+
@deprecated("Use `Math.abs` instead. This will be removed in v13") @val @scope("Math")
170170
external abs_float: float => float = "abs"
171171

172-
@deprecated("Use Core instead. This will be removed in v13")
172+
@deprecated("Use `%` instead. This will be removed in v13")
173173
external mod_float: (float, float) => float = "%modfloat"
174174

175-
@deprecated("Use Core instead. This will be removed in v13")
175+
@deprecated("Use `Int.toFloat` instead. This will be removed in v13")
176176
external float: int => float = "%floatofint"
177177

178-
@deprecated("Use Core instead. This will be removed in v13")
178+
@deprecated("Use `Int.toFloat` instead. This will be removed in v13")
179179
external float_of_int: int => float = "%floatofint"
180180

181-
@deprecated("Use Core instead. This will be removed in v13")
181+
@deprecated("Use `Float.toInt` instead. This will be removed in v13")
182182
external truncate: float => int = "%intoffloat"
183183

184-
@deprecated("Use Core instead. This will be removed in v13")
184+
@deprecated("Use `Float.toInt` instead. This will be removed in v13")
185185
external int_of_float: float => int = "%intoffloat"
186186

187-
@deprecated("Use Core instead. This will be removed in v13")
187+
@deprecated("Use `Float.positiveInfinity` instead. This will be removed in v13")
188188
let infinity = 0x1p2047
189189

190-
@deprecated("Use Core instead. This will be removed in v13")
190+
@deprecated("Use `Float.negativeInfinity` instead. This will be removed in v13")
191191
let neg_infinity = -0x1p2047
192192

193-
@deprecated("Use Core instead. This will be removed in v13") @val @scope("Number")
193+
@deprecated("Use `Float.nan` instead. This will be removed in v13") @val @scope("Number")
194194
external nan: float = "NaN"
195195

196-
@deprecated("Use Core instead. This will be removed in v13")
196+
@deprecated("Use `Float.Constants.maxValue` instead. This will be removed in v13")
197197
let max_float = 1.79769313486231571e+308 /* 0x1.ffff_ffff_ffff_fp+1023 */
198198

199-
@deprecated("Use Core instead. This will be removed in v13")
199+
@deprecated("Use `Float.Constants.minValue` instead. This will be removed in v13")
200200
let min_float = 2.22507385850720138e-308 /* 0x1p-1022 */
201201

202-
@deprecated("Use Core instead. This will be removed in v13")
202+
@deprecated("Use `Float.Constants.epsilon` instead. This will be removed in v13")
203203
let epsilon_float = 2.22044604925031308e-16 /* 0x1p-52 */
204204

205205
@deprecated("Do not use. This will be removed in v13")
@@ -232,13 +232,13 @@ external \"++": (string, string) => string = "%string_concat"
232232

233233
/* Character operations -- more in module Char */
234234

235-
@deprecated("Use Core instead. This will be removed in v13")
235+
@deprecated("Use `Char.code` instead. This will be removed in v13")
236236
external int_of_char: char => int = "%identity"
237237

238-
@deprecated("Use Core instead. This will be removed in v13")
238+
@deprecated("Use `Char.fromIntUnsafe` instead. This will be removed in v13")
239239
external unsafe_char_of_int: int => char = "%identity"
240240

241-
@deprecated("Use Core instead. This will be removed in v13")
241+
@deprecated("Use `Char.fromIntExn` instead. This will be removed in v13")
242242
let char_of_int = n =>
243243
if n < 0 || n > 255 {
244244
invalid_arg("char_of_int")
@@ -266,34 +266,34 @@ external decr: ref<int> => unit = "%decr"
266266

267267
/* String conversion functions */
268268

269-
@deprecated("Use Core instead. This will be removed in v13")
269+
@deprecated("Use `Bool.toString` instead. This will be removed in v13")
270270
let string_of_bool = b =>
271271
if b {
272272
"true"
273273
} else {
274274
"false"
275275
}
276276

277-
@deprecated("Use Core instead. This will be removed in v13")
277+
@deprecated("Use `Bool.fromString` instead. This will be removed in v13")
278278
let bool_of_string = param =>
279279
switch param {
280280
| "true" => true
281281
| "false" => false
282282
| _ => invalid_arg("bool_of_string")
283283
}
284284

285-
@deprecated("Use Core instead. This will be removed in v13")
285+
@deprecated("Use `Bool.fromString` instead. This will be removed in v13")
286286
let bool_of_string_opt = param =>
287287
switch param {
288288
| "true" => Some(true)
289289
| "false" => Some(false)
290290
| _ => None
291291
}
292292

293-
@deprecated("Use Core instead. This will be removed in v13")
293+
@deprecated("Use `Int.toString` instead. This will be removed in v13")
294294
external string_of_int: int => string = "String"
295295

296-
@deprecated("Use Core instead. This will be removed in v13") @scope("Number")
296+
@deprecated("Use `Int.fromString` instead. This will be removed in v13") @scope("Number")
297297
external int_of_string: string => int = "parseInt"
298298

299299
let int_of_string_opt = s =>
@@ -302,12 +302,12 @@ let int_of_string_opt = s =>
302302
| n => Some(n)
303303
}
304304

305-
@deprecated("Use Core instead. This will be removed in v13")
305+
@deprecated("Use `String.get` instead. This will be removed in v13")
306306
external string_get: (string, int) => char = "%string_safe_get"
307307

308308
/* List operations -- more in module List */
309309

310-
@deprecated("Use Core instead. This will be removed in v13")
310+
@deprecated("Use `List.concat` instead. This will be removed in v13")
311311
let rec \"@" = (l1, l2) =>
312312
switch l1 {
313313
| list{} => l2

0 commit comments

Comments
 (0)