Skip to content

Commit 1602b17

Browse files
committed
One more typo.
1 parent ec3cf2d commit 1602b17

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

compiler/ml/translcore.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ let primitives_table =
392392
("#undefined", Pundefined);
393393
("#typeof", Ptypeof);
394394
("#is_nullable", Pisnullable);
395-
("#null_to_opt", Pnullable_to_opt);
395+
("#null_to_opt", Pnull_to_opt);
396396
("#nullable_to_opt", Pnullable_to_opt);
397397
("#undefined_to_opt", Pundefined_to_opt);
398398
("#makemutablelist", Pmakelist Mutable);

lib/es6/Null.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ function fromOption(option) {
1212
}
1313

1414
function equal(a, b, eq) {
15-
return Option.equal((a == null) ? undefined : Primitive_option.some(a), (b == null) ? undefined : Primitive_option.some(b), eq);
15+
return Option.equal(a === null ? undefined : Primitive_option.some(a), b === null ? undefined : Primitive_option.some(b), eq);
1616
}
1717

1818
function compare(a, b, cmp) {
19-
return Option.compare((a == null) ? undefined : Primitive_option.some(a), (b == null) ? undefined : Primitive_option.some(b), cmp);
19+
return Option.compare(a === null ? undefined : Primitive_option.some(a), b === null ? undefined : Primitive_option.some(b), cmp);
2020
}
2121

2222
function getOr(value, $$default) {
23-
if (value == null) {
24-
return $$default;
25-
} else {
23+
if (value !== null) {
2624
return value;
25+
} else {
26+
return $$default;
2727
}
2828
}
2929

3030
function getExn(value) {
31-
if (!(value == null)) {
31+
if (value !== null) {
3232
return value;
3333
}
3434
throw {
@@ -39,33 +39,33 @@ function getExn(value) {
3939
}
4040

4141
function forEach(value, f) {
42-
if (!(value == null)) {
42+
if (value !== null) {
4343
return f(value);
4444
}
4545

4646
}
4747

4848
function map(value, f) {
49-
if (value == null) {
50-
return null;
51-
} else {
49+
if (value !== null) {
5250
return f(value);
51+
} else {
52+
return null;
5353
}
5454
}
5555

5656
function mapOr(value, $$default, f) {
57-
if (value == null) {
58-
return $$default;
59-
} else {
57+
if (value !== null) {
6058
return f(value);
59+
} else {
60+
return $$default;
6161
}
6262
}
6363

6464
function flatMap(value, f) {
65-
if (value == null) {
66-
return null;
67-
} else {
65+
if (value !== null) {
6866
return f(value);
67+
} else {
68+
return null;
6969
}
7070
}
7171

lib/js/Null.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ function fromOption(option) {
1212
}
1313

1414
function equal(a, b, eq) {
15-
return Option.equal((a == null) ? undefined : Primitive_option.some(a), (b == null) ? undefined : Primitive_option.some(b), eq);
15+
return Option.equal(a === null ? undefined : Primitive_option.some(a), b === null ? undefined : Primitive_option.some(b), eq);
1616
}
1717

1818
function compare(a, b, cmp) {
19-
return Option.compare((a == null) ? undefined : Primitive_option.some(a), (b == null) ? undefined : Primitive_option.some(b), cmp);
19+
return Option.compare(a === null ? undefined : Primitive_option.some(a), b === null ? undefined : Primitive_option.some(b), cmp);
2020
}
2121

2222
function getOr(value, $$default) {
23-
if (value == null) {
24-
return $$default;
25-
} else {
23+
if (value !== null) {
2624
return value;
25+
} else {
26+
return $$default;
2727
}
2828
}
2929

3030
function getExn(value) {
31-
if (!(value == null)) {
31+
if (value !== null) {
3232
return value;
3333
}
3434
throw {
@@ -39,33 +39,33 @@ function getExn(value) {
3939
}
4040

4141
function forEach(value, f) {
42-
if (!(value == null)) {
42+
if (value !== null) {
4343
return f(value);
4444
}
4545

4646
}
4747

4848
function map(value, f) {
49-
if (value == null) {
50-
return null;
51-
} else {
49+
if (value !== null) {
5250
return f(value);
51+
} else {
52+
return null;
5353
}
5454
}
5555

5656
function mapOr(value, $$default, f) {
57-
if (value == null) {
58-
return $$default;
59-
} else {
57+
if (value !== null) {
6058
return f(value);
59+
} else {
60+
return $$default;
6161
}
6262
}
6363

6464
function flatMap(value, f) {
65-
if (value == null) {
66-
return null;
67-
} else {
65+
if (value !== null) {
6866
return f(value);
67+
} else {
68+
return null;
6969
}
7070
}
7171

0 commit comments

Comments
 (0)