Skip to content

Commit 626f1ba

Browse files
committed
Fix Char.chr appearing in JS output
1 parent b1bda7a commit 626f1ba

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

lib/es6/char.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11

22

33

4-
function chr(prim) {
5-
return prim;
6-
}
7-
84
function escaped(param) {
95
let exit = 0;
106
if (param >= 40) {
@@ -83,7 +79,6 @@ function equal(c1, c2) {
8379
}
8480

8581
export {
86-
chr,
8782
escaped,
8883
lowercase_ascii,
8984
uppercase_ascii,

lib/js/char.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
'use strict';
22

33

4-
function chr(prim) {
5-
return prim;
6-
}
7-
84
function escaped(param) {
95
let exit = 0;
106
if (param >= 40) {
@@ -82,7 +78,6 @@ function equal(c1, c2) {
8278
return (c1 - c2 | 0) === 0;
8379
}
8480

85-
exports.chr = chr;
8681
exports.escaped = escaped;
8782
exports.lowercase_ascii = lowercase_ascii;
8883
exports.uppercase_ascii = uppercase_ascii;

runtime/char.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ external code: t => int = "%identity"
1010

1111
external unsafe_chr: int => t = "%identity"
1212

13-
let chr = unsafe_chr
13+
external chr: int => t = "%identity"
1414

1515
external bytes_create: int => array<char> = "Array"
1616

runtime/char.resi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ external code: char => int = "%identity"
1010
Raise [Invalid_argument "Char.chr"] if the argument is
1111
outside the range 0--255. */
1212
@deprecated("Use Core instead. This will be removed in v13")
13-
let chr: int => char
13+
external chr: int => char = "%identity"
1414

1515
/** Return a string representing the given character,
1616
with special characters escaped following the lexical conventions

0 commit comments

Comments
 (0)