From 22523f192759cda85a463c37d552450a4c839253 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 26 Feb 2024 16:52:44 +0100 Subject: [PATCH 1/5] attempt at removing trailing undefineds --- jscomp/core/js_dump.ml | 16 ++++- jscomp/test/UncurriedAlways.js | 8 +-- jscomp/test/big_polyvar_test.js | 2 +- jscomp/test/bs_array_test.js | 4 +- jscomp/test/bs_float_test.js | 2 +- jscomp/test/bs_int_test.js | 2 +- jscomp/test/bs_list_test.js | 26 ++++---- jscomp/test/bs_min_max_test.js | 8 +-- jscomp/test/bs_mutable_set_test.js | 2 +- jscomp/test/bs_poly_map_test.js | 6 +- jscomp/test/bs_poly_mutable_set_test.js | 2 +- jscomp/test/bs_poly_set_test.js | 8 +-- jscomp/test/bs_set_int_test.js | 2 +- jscomp/test/bs_unwrap_test.js | 6 +- jscomp/test/build.ninja | 3 +- jscomp/test/caml_compare_test.js | 8 +-- jscomp/test/equal_box_test.js | 12 ++-- jscomp/test/gpr_1409_test.js | 6 +- jscomp/test/gpr_3142_test.js | 2 +- jscomp/test/gpr_3154_test.js | 2 +- jscomp/test/js_json_test.js | 64 ++++++++++---------- jscomp/test/js_null_test.js | 4 +- jscomp/test/js_null_undefined_test.js | 2 +- jscomp/test/js_option_test.js | 12 ++-- jscomp/test/js_undefined_test.js | 2 +- jscomp/test/large_record_duplication_test.js | 2 +- jscomp/test/lazy_test.js | 2 +- jscomp/test/ocaml_re_test.js | 6 +- jscomp/test/omit_trailing_undefined.js | 15 +++++ jscomp/test/omit_trailing_undefined.res | 11 ++++ jscomp/test/option_repr_test.js | 36 +++++------ jscomp/test/record_regression.js | 4 +- jscomp/test/test_zero_nullable.js | 6 +- jscomp/test/uncurried_default.args.js | 8 +-- jscomp/test/unit_undefined_test.js | 14 ++--- lib/es6/belt_MapDict.js | 4 +- lib/es6/belt_MapInt.js | 2 +- lib/es6/belt_MapString.js | 2 +- lib/es6/belt_MutableMap.js | 2 +- lib/es6/belt_MutableMapInt.js | 2 +- lib/es6/belt_MutableMapString.js | 2 +- lib/es6/belt_internalAVLset.js | 2 +- lib/es6/belt_internalSetInt.js | 2 +- lib/es6/belt_internalSetString.js | 2 +- lib/es6/stream.js | 2 +- lib/js/belt_MapDict.js | 4 +- lib/js/belt_MapInt.js | 2 +- lib/js/belt_MapString.js | 2 +- lib/js/belt_MutableMap.js | 2 +- lib/js/belt_MutableMapInt.js | 2 +- lib/js/belt_MutableMapString.js | 2 +- lib/js/belt_internalAVLset.js | 2 +- lib/js/belt_internalSetInt.js | 2 +- lib/js/belt_internalSetString.js | 2 +- lib/js/stream.js | 2 +- 55 files changed, 198 insertions(+), 161 deletions(-) create mode 100644 jscomp/test/omit_trailing_undefined.js create mode 100644 jscomp/test/omit_trailing_undefined.res diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 09514211bc..3a2d1827fc 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -576,9 +576,19 @@ and expression_desc cxt ~(level : int) f x : cxt = | [e] when e.expression_desc = Undefined {isUnit = true} -> (* omit passing undefined when the call is f() *) [] - | _ -> - el in - arguments cxt f el) + | _ -> + let rec keepNonUndefinedArgs argsList = ( + match argsList with + | {J.expression_desc=Undefined {isUnit = false}} :: rest -> keepNonUndefinedArgs rest + | _ -> argsList + + ) in + el + |> List.rev + |> keepNonUndefinedArgs + |> List.rev + in + arguments cxt f el) | _, _ -> let len = List.length el in if 1 <= len && len <= 8 then ( diff --git a/jscomp/test/UncurriedAlways.js b/jscomp/test/UncurriedAlways.js index a70b90bcf1..3a36127000 100644 --- a/jscomp/test/UncurriedAlways.js +++ b/jscomp/test/UncurriedAlways.js @@ -100,7 +100,7 @@ function ptl$2(none, extra, extra$1) { return foo$2(none, "y", extra, extra$1); } -var b1 = ptl$2("x", "z", undefined); +var b1 = ptl$2("x", "z"); console.log("b1:", b1); @@ -138,15 +138,15 @@ function ptl$3(none, none$1, none$2, none$3, none$4, none$5, extra) { return foo$3(none, none$1, none$2, "y", none$3, none$4, none$5, "w", extra); } -var c1 = ptl$3(undefined, "x", undefined, undefined, "z", undefined, undefined); +var c1 = ptl$3(undefined, "x", undefined, undefined, "z"); console.log("c1:", c1); -var c2 = ptl$3("d1<-100", "x", undefined, undefined, "z", undefined, undefined); +var c2 = ptl$3("d1<-100", "x", undefined, undefined, "z"); console.log("c2:", c2); -var c3 = ptl$3(undefined, "x", "d2<-200", undefined, "z", "d4<-400", undefined); +var c3 = ptl$3(undefined, "x", "d2<-200", undefined, "z", "d4<-400"); console.log("c3:", c3); diff --git a/jscomp/test/big_polyvar_test.js b/jscomp/test/big_polyvar_test.js index 0a95c8931e..1504672748 100644 --- a/jscomp/test/big_polyvar_test.js +++ b/jscomp/test/big_polyvar_test.js @@ -7224,7 +7224,7 @@ if (!eq(tFromJs("variant299"), "variant299")) { }; } -if (!eq(tFromJs("xx"), undefined)) { +if (!eq(tFromJs("xx"))) { throw { RE_EXN_ID: "Assert_failure", _1: [ diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index 08205ad63e..fbdbc7b28e 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -1577,7 +1577,7 @@ eq("File \"bs_array_test.res\", line 395, characters 5-12", Belt_Array.getBy([ 3 ], (function (x) { return x > 3; - })), undefined); + }))); eq("File \"bs_array_test.res\", line 399, characters 5-12", Belt_Array.getIndexBy([ 1, @@ -1593,7 +1593,7 @@ eq("File \"bs_array_test.res\", line 400, characters 5-12", Belt_Array.getIndexB 3 ], (function (x) { return x > 3; - })), undefined); + }))); var arr = []; diff --git a/jscomp/test/bs_float_test.js b/jscomp/test/bs_float_test.js index e124c86d48..e1ef5089cb 100644 --- a/jscomp/test/bs_float_test.js +++ b/jscomp/test/bs_float_test.js @@ -69,7 +69,7 @@ eq("File \"bs_float_test.res\", line 36, characters 5-12", Belt_Float.fromString eq("File \"bs_float_test.res\", line 37, characters 5-12", Belt_Float.fromString("-1.7"), -1.7); -eq("File \"bs_float_test.res\", line 38, characters 5-12", Belt_Float.fromString("not a float"), undefined); +eq("File \"bs_float_test.res\", line 38, characters 5-12", Belt_Float.fromString("not a float")); eq("File \"bs_float_test.res\", line 42, characters 5-12", String(1.0), "1"); diff --git a/jscomp/test/bs_int_test.js b/jscomp/test/bs_int_test.js index 3f7a90d22b..aeeed67f9b 100644 --- a/jscomp/test/bs_int_test.js +++ b/jscomp/test/bs_int_test.js @@ -69,7 +69,7 @@ eq("File \"bs_int_test.res\", line 36, characters 5-12", Belt_Int.fromString("-1 eq("File \"bs_int_test.res\", line 37, characters 5-12", Belt_Int.fromString("-1.7"), -1); -eq("File \"bs_int_test.res\", line 38, characters 5-12", Belt_Int.fromString("not an int"), undefined); +eq("File \"bs_int_test.res\", line 38, characters 5-12", Belt_Int.fromString("not an int")); eq("File \"bs_int_test.res\", line 42, characters 5-12", String(1), "1"); diff --git a/jscomp/test/bs_list_test.js b/jscomp/test/bs_list_test.js index 788934f3c5..4224422e29 100644 --- a/jscomp/test/bs_list_test.js +++ b/jscomp/test/bs_list_test.js @@ -108,7 +108,7 @@ eq("File \"bs_list_test.res\", line 33, characters 5-12", Belt_List.getBy({ } }, (function (x) { return x % 5 === 0; - })), undefined); + }))); eq("FLATTEN", Belt_List.flatten({ hd: { @@ -849,7 +849,7 @@ eq("TAKE", Belt_List.take({ } }); -eq("TAKE", Belt_List.take(/* [] */0, 1), undefined); +eq("TAKE", Belt_List.take(/* [] */0, 1)); eq("TAKE", Belt_List.take({ hd: 1, @@ -857,7 +857,7 @@ eq("TAKE", Belt_List.take({ hd: 2, tl: /* [] */0 } - }, 3), undefined); + }, 3)); eq("TAKE", Belt_List.take({ hd: 1, @@ -877,7 +877,7 @@ eq("TAKE", Belt_List.take(length_10_id, 8), length_8_id); eq("TAKE", Belt_List.take(length_10_id, 0), /* [] */0); -eq("TAKE", Belt_List.take(length_8_id, -2), undefined); +eq("TAKE", Belt_List.take(length_8_id, -2)); eq("DROP", Belt_List.drop(length_10_id, 10), /* [] */0); @@ -891,13 +891,13 @@ eq("DROP", Belt_List.drop(length_10_id, 8), { eq("DROP", Belt_List.drop(length_10_id, 0), length_10_id); -eq("DROP", Belt_List.drop(length_8_id, -1), undefined); +eq("DROP", Belt_List.drop(length_8_id, -1)); var a = Belt_List.makeBy(5, id); -eq("SPLIT", Belt_List.splitAt(/* [] */0, 1), undefined); +eq("SPLIT", Belt_List.splitAt(/* [] */0, 1)); -eq("SPLIT", Belt_List.splitAt(a, 6), undefined); +eq("SPLIT", Belt_List.splitAt(a, 6)); eq("SPLIT", Belt_List.splitAt(a, 5), [ a, @@ -989,7 +989,7 @@ eq("SPLIT", Belt_List.splitAt(a, 0), [ a ]); -eq("SPLIT", Belt_List.splitAt(a, -1), undefined); +eq("SPLIT", Belt_List.splitAt(a, -1)); function succx(x) { return x + 1 | 0; @@ -1549,7 +1549,7 @@ eq("File \"bs_list_test.res\", line 248, characters 4-11", [ Belt_List.drop(length_10_id, 1) ]); -eq("File \"bs_list_test.res\", line 255, characters 5-12", Belt_List.head(/* [] */0), undefined); +eq("File \"bs_list_test.res\", line 255, characters 5-12", Belt_List.head(/* [] */0)); $$throw("File \"bs_list_test.res\", line 256, characters 8-15", (function (param) { Belt_List.headExn(/* [] */0); @@ -1615,17 +1615,17 @@ Belt_List.forEachWithIndex(length_10_id, (function (i, x) { eq("File \"bs_list_test.res\", line 263, characters 48-55", Belt_List.get(length_10_id, i), x); })); -eq("File \"bs_list_test.res\", line 264, characters 5-12", Belt_List.tail(/* [] */0), undefined); +eq("File \"bs_list_test.res\", line 264, characters 5-12", Belt_List.tail(/* [] */0)); -eq("File \"bs_list_test.res\", line 265, characters 5-12", Belt_List.drop(/* [] */0, 3), undefined); +eq("File \"bs_list_test.res\", line 265, characters 5-12", Belt_List.drop(/* [] */0, 3)); eq("File \"bs_list_test.res\", line 266, characters 5-12", Belt_List.mapWithIndex(/* [] */0, (function (i, x) { return i + x | 0; })), /* [] */0); -eq("File \"bs_list_test.res\", line 267, characters 5-12", Belt_List.get(length_10_id, -1), undefined); +eq("File \"bs_list_test.res\", line 267, characters 5-12", Belt_List.get(length_10_id, -1)); -eq("File \"bs_list_test.res\", line 268, characters 5-12", Belt_List.get(length_10_id, 12), undefined); +eq("File \"bs_list_test.res\", line 268, characters 5-12", Belt_List.get(length_10_id, 12)); eq("File \"bs_list_test.res\", line 269, characters 5-12", sum(/* [] */0), 0); diff --git a/jscomp/test/bs_min_max_test.js b/jscomp/test/bs_min_max_test.js index 850139a42f..49bebb6262 100644 --- a/jscomp/test/bs_min_max_test.js +++ b/jscomp/test/bs_min_max_test.js @@ -65,15 +65,15 @@ b("File \"bs_min_max_test.res\", line 21, characters 4-11", Caml.i64_eq(Caml.i64 3 ])); -eq("File \"bs_min_max_test.res\", line 22, characters 5-12", Caml_obj.min(undefined, 3), undefined); +eq("File \"bs_min_max_test.res\", line 22, characters 5-12", Caml_obj.min(undefined, 3)); -eq("File \"bs_min_max_test.res\", line 23, characters 5-12", Caml_obj.min(3, undefined), undefined); +eq("File \"bs_min_max_test.res\", line 23, characters 5-12", Caml_obj.min(3)); -eq("File \"bs_min_max_test.res\", line 24, characters 5-12", Caml_obj.max(3, undefined), 3); +eq("File \"bs_min_max_test.res\", line 24, characters 5-12", Caml_obj.max(3), 3); eq("File \"bs_min_max_test.res\", line 25, characters 5-12", Caml_obj.max(undefined, 3), 3); -b("File \"bs_min_max_test.res\", line 26, characters 4-11", Caml_obj.greaterequal(5, undefined)); +b("File \"bs_min_max_test.res\", line 26, characters 4-11", Caml_obj.greaterequal(5)); b("File \"bs_min_max_test.res\", line 27, characters 4-11", Caml_obj.lessequal(undefined, 5)); diff --git a/jscomp/test/bs_mutable_set_test.js b/jscomp/test/bs_mutable_set_test.js index bc6b575833..7109d61dfa 100644 --- a/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/bs_mutable_set_test.js @@ -171,7 +171,7 @@ eq("File \"bs_mutable_set_test.res\", line 91, characters 9-16", Belt_internalAV Belt_internalAVLset.checkInvariantInternal(v.data); -eq("File \"bs_mutable_set_test.res\", line 93, characters 9-16", Belt_internalSetInt.get(v.data, 3), undefined); +eq("File \"bs_mutable_set_test.res\", line 93, characters 9-16", Belt_internalSetInt.get(v.data, 3)); eq("File \"bs_mutable_set_test.res\", line 94, characters 9-16", Belt_internalSetInt.get(v.data, 1200), 1200); diff --git a/jscomp/test/bs_poly_map_test.js b/jscomp/test/bs_poly_map_test.js index 07accf3b4f..eb556958dc 100644 --- a/jscomp/test/bs_poly_map_test.js +++ b/jscomp/test/bs_poly_map_test.js @@ -47,7 +47,7 @@ function emptyMap(param) { function mergeInter(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 !== undefined) { - return Caml_option.some(undefined); + return Caml_option.some(); } })); @@ -57,7 +57,7 @@ function mergeInter(s1, s2) { function mergeUnion(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined || v2 !== undefined) { - return Caml_option.some(undefined); + return Caml_option.some(); } })); @@ -67,7 +67,7 @@ function mergeUnion(s1, s2) { function mergeDiff(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 === undefined) { - return Caml_option.some(undefined); + return Caml_option.some(); } })); diff --git a/jscomp/test/bs_poly_mutable_set_test.js b/jscomp/test/bs_poly_mutable_set_test.js index a2a1a92556..6bc8b136a3 100644 --- a/jscomp/test/bs_poly_mutable_set_test.js +++ b/jscomp/test/bs_poly_mutable_set_test.js @@ -176,7 +176,7 @@ eq("File \"bs_poly_mutable_set_test.res\", line 86, characters 5-12", Belt_inter Belt_internalAVLset.checkInvariantInternal(v.data); -eq("File \"bs_poly_mutable_set_test.res\", line 88, characters 5-12", Belt_MutableSet.get(v, 3), undefined); +eq("File \"bs_poly_mutable_set_test.res\", line 88, characters 5-12", Belt_MutableSet.get(v, 3)); eq("File \"bs_poly_mutable_set_test.res\", line 89, characters 5-12", Belt_MutableSet.get(v, 1200), 1200); diff --git a/jscomp/test/bs_poly_set_test.js b/jscomp/test/bs_poly_set_test.js index d2a95f712b..d390ee6614 100644 --- a/jscomp/test/bs_poly_set_test.js +++ b/jscomp/test/bs_poly_set_test.js @@ -187,13 +187,13 @@ b("File \"bs_poly_set_test.res\", line 85, characters 4-11", undefined === Belt_ eq("File \"bs_poly_set_test.res\", line 87, characters 5-12", Belt_SetDict.size(u25.data), 60); -b("File \"bs_poly_set_test.res\", line 88, characters 4-11", Belt_SetDict.minimum(undefined) === undefined); +b("File \"bs_poly_set_test.res\", line 88, characters 4-11", Belt_SetDict.minimum() === undefined); -b("File \"bs_poly_set_test.res\", line 89, characters 4-11", Belt_SetDict.maximum(undefined) === undefined); +b("File \"bs_poly_set_test.res\", line 89, characters 4-11", Belt_SetDict.maximum() === undefined); -b("File \"bs_poly_set_test.res\", line 90, characters 4-11", Belt_SetDict.minUndefined(undefined) === undefined); +b("File \"bs_poly_set_test.res\", line 90, characters 4-11", Belt_SetDict.minUndefined() === undefined); -b("File \"bs_poly_set_test.res\", line 91, characters 4-11", Belt_SetDict.maxUndefined(undefined) === undefined); +b("File \"bs_poly_set_test.res\", line 91, characters 4-11", Belt_SetDict.maxUndefined() === undefined); function testIterToList(xs) { var v = { diff --git a/jscomp/test/bs_set_int_test.js b/jscomp/test/bs_set_int_test.js index 77c7589ca0..372a3b191d 100644 --- a/jscomp/test/bs_set_int_test.js +++ b/jscomp/test/bs_set_int_test.js @@ -369,7 +369,7 @@ b("File \"bs_set_int_test.res\", line 241, characters 4-11", !Belt_SetInt.subset eq("File \"bs_set_int_test.res\", line 242, characters 5-12", Belt_SetInt.get(v$12, 30), 30); -eq("File \"bs_set_int_test.res\", line 243, characters 5-12", Belt_SetInt.get(v$12, 3000), undefined); +eq("File \"bs_set_int_test.res\", line 243, characters 5-12", Belt_SetInt.get(v$12, 3000)); Mt.from_pair_suites("Bs_set_int_test", suites.contents); diff --git a/jscomp/test/bs_unwrap_test.js b/jscomp/test/bs_unwrap_test.js index b020cf41f4..b029601bf9 100644 --- a/jscomp/test/bs_unwrap_test.js +++ b/jscomp/test/bs_unwrap_test.js @@ -32,13 +32,13 @@ console.log(arg_pair.VAL); console.log(); -console.log(1, undefined); +console.log(1); console.log(2, "hi"); console.log(3, "hi"); -console.log(4, undefined); +console.log(4); var some_arg = { NAME: "Bool", @@ -47,7 +47,7 @@ var some_arg = { console.log(5, Caml_option.option_unwrap(some_arg)); -console.log(6, undefined); +console.log(6); console.log(7, Caml_option.option_unwrap((console.log("trace"), undefined))); diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index b1ce7ef10a..105836c536 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -472,6 +472,7 @@ o test/obj_type_test.cmi test/obj_type_test.cmj : cc test/obj_type_test.res | $b o test/ocaml_re_test.cmi test/ocaml_re_test.cmj : cc test/ocaml_re_test.res | test/mt.cmj $bsc $stdlib runtime o test/of_string_test.cmi test/of_string_test.cmj : cc test/of_string_test.res | test/mt.cmj $bsc $stdlib runtime o test/offset.cmi test/offset.cmj : cc test/offset.res | $bsc $stdlib runtime +o test/omit_trailing_undefined.cmi test/omit_trailing_undefined.cmj : cc test/omit_trailing_undefined.res | $bsc $stdlib runtime o test/option_encoding_test.cmi test/option_encoding_test.cmj : cc test/option_encoding_test.res | $bsc $stdlib runtime o test/option_record_none_test.cmi test/option_record_none_test.cmj : cc test/option_record_none_test.res | $bsc $stdlib runtime o test/option_repr_test.cmi test/option_repr_test.cmj : cc test/option_repr_test.res | test/mt.cmj $bsc $stdlib runtime @@ -713,4 +714,4 @@ o test/update_record_test.cmi test/update_record_test.cmj : cc test/update_recor o test/variant.cmi test/variant.cmj : cc test/variant.res | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.res | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/omit_trailing_undefined.cmi test/omit_trailing_undefined.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/caml_compare_test.js b/jscomp/test/caml_compare_test.js index f39304506a..c824c069f7 100644 --- a/jscomp/test/caml_compare_test.js +++ b/jscomp/test/caml_compare_test.js @@ -238,7 +238,7 @@ var suites = { _1: Caml_obj.greaterthan([ 1, 30 - ], undefined) + ]) }; }) ], @@ -1064,7 +1064,7 @@ var suites = { (function (param) { return { TAG: "Eq", - _0: Caml_obj.compare(0, undefined), + _0: Caml_obj.compare(0), _1: 1 }; }) @@ -1132,7 +1132,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -eq("File \"caml_compare_test.res\", line 88, characters 3-10", true, Caml_obj.greaterthan(1, undefined)); +eq("File \"caml_compare_test.res\", line 88, characters 3-10", true, Caml_obj.greaterthan(1)); eq("File \"caml_compare_test.res\", line 89, characters 3-10", true, Caml_obj.lessthan(/* [] */0, { hd: 1, @@ -1149,7 +1149,7 @@ eq("File \"caml_compare_test.res\", line 91, characters 3-10", false, Caml_obj.g eq("File \"caml_compare_test.res\", line 92, characters 3-10", false, Caml_obj.lessthan([ 1, 30 - ], undefined)); + ])); Mt.from_pair_suites("Caml_compare_test", suites.contents); diff --git a/jscomp/test/equal_box_test.js b/jscomp/test/equal_box_test.js index 12d1d4eaed..6e73911b39 100644 --- a/jscomp/test/equal_box_test.js +++ b/jscomp/test/equal_box_test.js @@ -57,7 +57,7 @@ b("File \"equal_box_test.res\", line 27, characters 4-11", true); b("File \"equal_box_test.res\", line 28, characters 4-11", true); -b("File \"equal_box_test.res\", line 29, characters 4-11", !Caml_obj.equal_null(3, undefined)); +b("File \"equal_box_test.res\", line 29, characters 4-11", !Caml_obj.equal_null(3)); var v = null; @@ -83,7 +83,7 @@ b("File \"equal_box_test.res\", line 43, characters 4-11", true); b("File \"equal_box_test.res\", line 44, characters 4-11", true); -b("File \"equal_box_test.res\", line 45, characters 4-11", !Caml_obj.equal_nullable(3, undefined)); +b("File \"equal_box_test.res\", line 45, characters 4-11", !Caml_obj.equal_nullable(3)); b("File \"equal_box_test.res\", line 51, characters 4-11", 3 !== undefined); @@ -93,21 +93,21 @@ b("File \"equal_box_test.res\", line 53, characters 4-11", "3" !== undefined); b("File \"equal_box_test.res\", line 54, characters 4-11", /* '3' */51 !== undefined); -b("File \"equal_box_test.res\", line 55, characters 4-11", !Caml_int64.equal_undefined(Caml_int64.zero, undefined)); +b("File \"equal_box_test.res\", line 55, characters 4-11", !Caml_int64.equal_undefined(Caml_int64.zero)); b("File \"equal_box_test.res\", line 56, characters 4-11", 0 !== undefined); b("File \"equal_box_test.res\", line 57, characters 4-11", true); -b("File \"equal_box_test.res\", line 58, characters 4-11", Caml_obj.equal_undefined(undefined, undefined)); +b("File \"equal_box_test.res\", line 58, characters 4-11", Caml_obj.equal_undefined()); -b("File \"equal_box_test.res\", line 62, characters 4-11", !Caml_obj.equal_undefined(null, undefined)); +b("File \"equal_box_test.res\", line 62, characters 4-11", !Caml_obj.equal_undefined(null)); b("File \"equal_box_test.res\", line 63, characters 4-11", true); b("File \"equal_box_test.res\", line 64, characters 4-11", true); -b("File \"equal_box_test.res\", line 65, characters 4-11", !Caml_obj.equal_undefined(3, undefined)); +b("File \"equal_box_test.res\", line 65, characters 4-11", !Caml_obj.equal_undefined(3)); Mt.from_pair_suites("File \"equal_box_test.res\", line 68, characters 20-27", suites.contents); diff --git a/jscomp/test/gpr_1409_test.js b/jscomp/test/gpr_1409_test.js index 80826b9193..b1a57c776a 100644 --- a/jscomp/test/gpr_1409_test.js +++ b/jscomp/test/gpr_1409_test.js @@ -58,7 +58,7 @@ function make(foo) { }; } -var a_ = make(undefined)(); +var a_ = make()(); var b_ = make(42)(); @@ -141,7 +141,7 @@ function keys(xs, ys) { eq("File \"gpr_1409_test.res\", line 69, characters 3-10", keys({ hd: "hi", tl: /* [] */0 - }, Object.keys(test3(undefined, undefined))), true); + }, Object.keys(test3())), true); eq("File \"gpr_1409_test.res\", line 71, characters 3-10", keys({ hd: "hi", @@ -149,7 +149,7 @@ eq("File \"gpr_1409_test.res\", line 71, characters 3-10", keys({ hd: "_open", tl: /* [] */0 } - }, Object.keys(test3(2, undefined))), true); + }, Object.keys(test3(2))), true); eq("File \"gpr_1409_test.res\", line 73, characters 3-10", keys({ hd: "hi", diff --git a/jscomp/test/gpr_3142_test.js b/jscomp/test/gpr_3142_test.js index f89745168b..fa4e83acb5 100644 --- a/jscomp/test/gpr_3142_test.js +++ b/jscomp/test/gpr_3142_test.js @@ -43,7 +43,7 @@ eq("File \"gpr_3142_test.res\", line 24, characters 3-10", tFromJs("你"), "b"); eq("File \"gpr_3142_test.res\", line 25, characters 3-10", tFromJs("我"), "c"); -eq("File \"gpr_3142_test.res\", line 26, characters 3-10", tFromJs("xx"), undefined); +eq("File \"gpr_3142_test.res\", line 26, characters 3-10", tFromJs("xx")); Mt.from_pair_suites("Gpr_3142_test", suites.contents); diff --git a/jscomp/test/gpr_3154_test.js b/jscomp/test/gpr_3154_test.js index 640d60dacc..6a8bf062b7 100644 --- a/jscomp/test/gpr_3154_test.js +++ b/jscomp/test/gpr_3154_test.js @@ -37,7 +37,7 @@ var d0 = {}; d0["foo"] = undefined; -eq("File \"gpr_3154_test.res\", line 20, characters 5-12", Js_dict.get(d0, "foo"), Caml_option.some(undefined)); +eq("File \"gpr_3154_test.res\", line 20, characters 5-12", Js_dict.get(d0, "foo"), Caml_option.some()); Mt.from_pair_suites("Gpr_3154_test", suites.contents); diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 8068a48e4c..8043bb2199 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -662,79 +662,79 @@ eq("File \"js_json_test.res\", line 290, characters 2-9", JSON.stringify({ eq("File \"js_json_test.res\", line 295, characters 12-19", JSON.stringify(null), "null"); -eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify(undefined), undefined); +eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify()); eq("File \"js_json_test.res\", line 300, characters 5-12", Js_json.decodeString("test"), "test"); -eq("File \"js_json_test.res\", line 301, characters 5-12", Js_json.decodeString(true), undefined); +eq("File \"js_json_test.res\", line 301, characters 5-12", Js_json.decodeString(true)); -eq("File \"js_json_test.res\", line 302, characters 5-12", Js_json.decodeString([]), undefined); +eq("File \"js_json_test.res\", line 302, characters 5-12", Js_json.decodeString([])); -eq("File \"js_json_test.res\", line 303, characters 5-12", Js_json.decodeString(null), undefined); +eq("File \"js_json_test.res\", line 303, characters 5-12", Js_json.decodeString(null)); -eq("File \"js_json_test.res\", line 304, characters 5-12", Js_json.decodeString({}), undefined); +eq("File \"js_json_test.res\", line 304, characters 5-12", Js_json.decodeString({})); -eq("File \"js_json_test.res\", line 305, characters 5-12", Js_json.decodeString(1.23), undefined); +eq("File \"js_json_test.res\", line 305, characters 5-12", Js_json.decodeString(1.23)); -eq("File \"js_json_test.res\", line 309, characters 5-12", Js_json.decodeNumber("test"), undefined); +eq("File \"js_json_test.res\", line 309, characters 5-12", Js_json.decodeNumber("test")); -eq("File \"js_json_test.res\", line 310, characters 5-12", Js_json.decodeNumber(true), undefined); +eq("File \"js_json_test.res\", line 310, characters 5-12", Js_json.decodeNumber(true)); -eq("File \"js_json_test.res\", line 311, characters 5-12", Js_json.decodeNumber([]), undefined); +eq("File \"js_json_test.res\", line 311, characters 5-12", Js_json.decodeNumber([])); -eq("File \"js_json_test.res\", line 312, characters 5-12", Js_json.decodeNumber(null), undefined); +eq("File \"js_json_test.res\", line 312, characters 5-12", Js_json.decodeNumber(null)); -eq("File \"js_json_test.res\", line 313, characters 5-12", Js_json.decodeNumber({}), undefined); +eq("File \"js_json_test.res\", line 313, characters 5-12", Js_json.decodeNumber({})); eq("File \"js_json_test.res\", line 314, characters 5-12", Js_json.decodeNumber(1.23), 1.23); -eq("File \"js_json_test.res\", line 318, characters 5-12", Js_json.decodeObject("test"), undefined); +eq("File \"js_json_test.res\", line 318, characters 5-12", Js_json.decodeObject("test")); -eq("File \"js_json_test.res\", line 319, characters 5-12", Js_json.decodeObject(true), undefined); +eq("File \"js_json_test.res\", line 319, characters 5-12", Js_json.decodeObject(true)); -eq("File \"js_json_test.res\", line 320, characters 5-12", Js_json.decodeObject([]), undefined); +eq("File \"js_json_test.res\", line 320, characters 5-12", Js_json.decodeObject([])); -eq("File \"js_json_test.res\", line 321, characters 5-12", Js_json.decodeObject(null), undefined); +eq("File \"js_json_test.res\", line 321, characters 5-12", Js_json.decodeObject(null)); eq("File \"js_json_test.res\", line 322, characters 5-12", Js_json.decodeObject({}), {}); -eq("File \"js_json_test.res\", line 323, characters 5-12", Js_json.decodeObject(1.23), undefined); +eq("File \"js_json_test.res\", line 323, characters 5-12", Js_json.decodeObject(1.23)); -eq("File \"js_json_test.res\", line 327, characters 5-12", Js_json.decodeArray("test"), undefined); +eq("File \"js_json_test.res\", line 327, characters 5-12", Js_json.decodeArray("test")); -eq("File \"js_json_test.res\", line 328, characters 5-12", Js_json.decodeArray(true), undefined); +eq("File \"js_json_test.res\", line 328, characters 5-12", Js_json.decodeArray(true)); eq("File \"js_json_test.res\", line 329, characters 5-12", Js_json.decodeArray([]), []); -eq("File \"js_json_test.res\", line 330, characters 5-12", Js_json.decodeArray(null), undefined); +eq("File \"js_json_test.res\", line 330, characters 5-12", Js_json.decodeArray(null)); -eq("File \"js_json_test.res\", line 331, characters 5-12", Js_json.decodeArray({}), undefined); +eq("File \"js_json_test.res\", line 331, characters 5-12", Js_json.decodeArray({})); -eq("File \"js_json_test.res\", line 332, characters 5-12", Js_json.decodeArray(1.23), undefined); +eq("File \"js_json_test.res\", line 332, characters 5-12", Js_json.decodeArray(1.23)); -eq("File \"js_json_test.res\", line 336, characters 5-12", Js_json.decodeBoolean("test"), undefined); +eq("File \"js_json_test.res\", line 336, characters 5-12", Js_json.decodeBoolean("test")); eq("File \"js_json_test.res\", line 337, characters 5-12", Js_json.decodeBoolean(true), true); -eq("File \"js_json_test.res\", line 338, characters 5-12", Js_json.decodeBoolean([]), undefined); +eq("File \"js_json_test.res\", line 338, characters 5-12", Js_json.decodeBoolean([])); -eq("File \"js_json_test.res\", line 339, characters 5-12", Js_json.decodeBoolean(null), undefined); +eq("File \"js_json_test.res\", line 339, characters 5-12", Js_json.decodeBoolean(null)); -eq("File \"js_json_test.res\", line 340, characters 5-12", Js_json.decodeBoolean({}), undefined); +eq("File \"js_json_test.res\", line 340, characters 5-12", Js_json.decodeBoolean({})); -eq("File \"js_json_test.res\", line 341, characters 5-12", Js_json.decodeBoolean(1.23), undefined); +eq("File \"js_json_test.res\", line 341, characters 5-12", Js_json.decodeBoolean(1.23)); -eq("File \"js_json_test.res\", line 345, characters 5-12", Js_json.decodeNull("test"), undefined); +eq("File \"js_json_test.res\", line 345, characters 5-12", Js_json.decodeNull("test")); -eq("File \"js_json_test.res\", line 346, characters 5-12", Js_json.decodeNull(true), undefined); +eq("File \"js_json_test.res\", line 346, characters 5-12", Js_json.decodeNull(true)); -eq("File \"js_json_test.res\", line 347, characters 5-12", Js_json.decodeNull([]), undefined); +eq("File \"js_json_test.res\", line 347, characters 5-12", Js_json.decodeNull([])); eq("File \"js_json_test.res\", line 348, characters 5-12", Js_json.decodeNull(null), null); -eq("File \"js_json_test.res\", line 349, characters 5-12", Js_json.decodeNull({}), undefined); +eq("File \"js_json_test.res\", line 349, characters 5-12", Js_json.decodeNull({})); -eq("File \"js_json_test.res\", line 350, characters 5-12", Js_json.decodeNull(1.23), undefined); +eq("File \"js_json_test.res\", line 350, characters 5-12", Js_json.decodeNull(1.23)); function id(obj) { return Js_json.deserializeUnsafe(Js_json.serializeExn(obj)); @@ -744,7 +744,7 @@ function idtest(obj) { eq("File \"js_json_test.res\", line 355, characters 23-30", obj, Js_json.deserializeUnsafe(Js_json.serializeExn(obj))); } -idtest(undefined); +idtest(); idtest({ hd: [ diff --git a/jscomp/test/js_null_test.js b/jscomp/test/js_null_test.js index 2143ef0a8e..a334b1d07a 100644 --- a/jscomp/test/js_null_test.js +++ b/jscomp/test/js_null_test.js @@ -22,7 +22,7 @@ var suites_1 = { (function (param) { return { TAG: "Eq", - _0: Caml_option.some(undefined), + _0: Caml_option.some(), _1: Caml_option.some() }; }) @@ -127,7 +127,7 @@ var suites_1 = { return { TAG: "Eq", _0: null, - _1: Js_null.fromOption(undefined) + _1: Js_null.fromOption() }; }) ], diff --git a/jscomp/test/js_null_undefined_test.js b/jscomp/test/js_null_undefined_test.js index 6be2c75510..ee2b8fd9e0 100644 --- a/jscomp/test/js_null_undefined_test.js +++ b/jscomp/test/js_null_undefined_test.js @@ -231,7 +231,7 @@ var suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_null_undefined.fromOption(undefined) + _1: Js_null_undefined.fromOption() }; }) ], diff --git a/jscomp/test/js_option_test.js b/jscomp/test/js_option_test.js index a5b1571e01..76ade6dae5 100644 --- a/jscomp/test/js_option_test.js +++ b/jscomp/test/js_option_test.js @@ -81,7 +81,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: false, - _1: Js_option.isSomeValue(simpleEq, 1, undefined) + _1: Js_option.isSomeValue(simpleEq, 1) }; }) ], @@ -125,7 +125,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: false, - _1: Js_option.equal(simpleEq, 1, undefined) + _1: Js_option.equal(simpleEq, 1) }; }) ], @@ -177,7 +177,7 @@ var option_suites_1 = { _0: undefined, _1: Js_option.map((function (a) { return a + 1 | 0; - }), undefined) + })) }; }) ], @@ -199,7 +199,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: 3, - _1: Js_option.getWithDefault(3, undefined) + _1: Js_option.getWithDefault(3) }; }) ], @@ -238,7 +238,7 @@ var option_suites_1 = { _0: undefined, _1: Js_option.filter((function (a) { return a % 3 === 0; - }), undefined) + })) }; }) ], @@ -271,7 +271,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_option.firstSome(undefined, undefined) + _1: Js_option.firstSome() }; }) ], diff --git a/jscomp/test/js_undefined_test.js b/jscomp/test/js_undefined_test.js index 5e86518ff5..68c9a0d66f 100644 --- a/jscomp/test/js_undefined_test.js +++ b/jscomp/test/js_undefined_test.js @@ -127,7 +127,7 @@ var suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_undefined.fromOption(undefined) + _1: Js_undefined.fromOption() }; }) ], diff --git a/jscomp/test/large_record_duplication_test.js b/jscomp/test/large_record_duplication_test.js index f1942416e2..e8895c31c1 100644 --- a/jscomp/test/large_record_duplication_test.js +++ b/jscomp/test/large_record_duplication_test.js @@ -199,7 +199,7 @@ eq("File \"large_record_duplication_test.res\", line 276, characters 3-10", get_ eq("File \"large_record_duplication_test.res\", line 277, characters 3-10", get_x0$2({ RE_EXN_ID: "Not_found" - }), undefined); + })); Mt.from_pair_suites("Large_record_duplication_test", suites.contents); diff --git a/jscomp/test/lazy_test.js b/jscomp/test/lazy_test.js index 59956c4420..8ebe8dbab2 100644 --- a/jscomp/test/lazy_test.js +++ b/jscomp/test/lazy_test.js @@ -76,7 +76,7 @@ var a3 = CamlinternalLazy.from_val(3); var a4 = CamlinternalLazy.from_val(3); -var a5 = CamlinternalLazy.from_val(undefined); +var a5 = CamlinternalLazy.from_val(); var a6 = CamlinternalLazy.from_val(); diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index a93a34a8c1..e3cab7205a 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -3153,7 +3153,7 @@ function compile(r) { hd: { TAG: "Sem", _0: "Shortest", - _1: repn(any, 0, undefined) + _1: repn(any, 0) }, tl: { hd: { @@ -4100,10 +4100,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { var piece = function (param) { var r = atom(); if (accept(/* '*' */42)) { - return greedy_mod(repn(r, 0, undefined)); + return greedy_mod(repn(r, 0)); } if (accept(/* '+' */43)) { - return greedy_mod(repn(r, 1, undefined)); + return greedy_mod(repn(r, 1)); } if (accept(/* '?' */63)) { return greedy_mod(repn(r, 0, 1)); diff --git a/jscomp/test/omit_trailing_undefined.js b/jscomp/test/omit_trailing_undefined.js new file mode 100644 index 0000000000..7a225b6f1d --- /dev/null +++ b/jscomp/test/omit_trailing_undefined.js @@ -0,0 +1,15 @@ +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var SomeModule = require("SomeModule"); + +SomeModule.formatDate(new Date()); + +SomeModule.formatDate(new Date(), { + someOption: true + }); + +var x = SomeModule.formatDate(new Date(), undefined, true); + +exports.x = x; +/* Not a pure module */ diff --git a/jscomp/test/omit_trailing_undefined.res b/jscomp/test/omit_trailing_undefined.res new file mode 100644 index 0000000000..4e4fca946d --- /dev/null +++ b/jscomp/test/omit_trailing_undefined.res @@ -0,0 +1,11 @@ +@@uncurried + +type dateFormatOptions = {someOption?: bool} + +@module("SomeModule") +external formatDate: (Js.Date.t, ~options: dateFormatOptions=?, ~done: bool=?) => string = + "formatDate" + +let x = formatDate(Js.Date.make()) +let x = formatDate(Js.Date.make(), ~options={someOption: true}) +let x = formatDate(Js.Date.make(), ~done=true) diff --git a/jscomp/test/option_repr_test.js b/jscomp/test/option_repr_test.js index a9cf2b9eb8..86fc8bde17 100644 --- a/jscomp/test/option_repr_test.js +++ b/jscomp/test/option_repr_test.js @@ -73,7 +73,7 @@ function f6(a) { return true; } -var f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some(undefined)))); +var f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some()))); var f11 = Caml_option.some(f10); @@ -129,13 +129,13 @@ b("File \"option_repr_test.res\", line 93, characters 4-11", Caml_obj.lessthan(u b("File \"option_repr_test.res\", line 94, characters 4-11", !Caml_obj.greaterthan(undefined, null)); -b("File \"option_repr_test.res\", line 95, characters 4-11", Caml_obj.greaterthan(null, undefined)); +b("File \"option_repr_test.res\", line 95, characters 4-11", Caml_obj.greaterthan(null)); -b("File \"option_repr_test.res\", line 96, characters 4-11", Caml_obj.lessthan(undefined, Caml_option.some(undefined))); +b("File \"option_repr_test.res\", line 96, characters 4-11", Caml_obj.lessthan(undefined, Caml_option.some())); -b("File \"option_repr_test.res\", line 97, characters 4-11", Caml_obj.greaterthan(Caml_option.some(undefined), undefined)); +b("File \"option_repr_test.res\", line 97, characters 4-11", Caml_obj.greaterthan(Caml_option.some())); -console.log(6, undefined); +console.log(6); function ltx(a, b) { if (Caml_obj.lessthan(a, b)) { @@ -175,7 +175,7 @@ function all_true(xs) { })); } -var xs_0 = gtx(Caml_option.some(null), Caml_option.some(undefined)); +var xs_0 = gtx(Caml_option.some(null), Caml_option.some()); var xs = { hd: xs_0, @@ -186,22 +186,22 @@ b("File \"option_repr_test.res\", line 125, characters 8-15", Belt_List.every(xs return x; }))); -var xs_0$1 = ltx(Caml_option.some(undefined), 3); +var xs_0$1 = ltx(Caml_option.some(), 3); var xs_1 = { - hd: ltx(Caml_option.some(undefined), Caml_option.some(Caml_option.some(undefined))), + hd: ltx(Caml_option.some(), Caml_option.some(Caml_option.some())), tl: { - hd: ltx(Caml_option.some(undefined), "3"), + hd: ltx(Caml_option.some(), "3"), tl: { - hd: ltx(Caml_option.some(undefined), true), + hd: ltx(Caml_option.some(), true), tl: { - hd: ltx(Caml_option.some(undefined), false), + hd: ltx(Caml_option.some(), false), tl: { hd: ltx(false, true), tl: { hd: ltx(false, true), tl: { - hd: ltx(undefined, Caml_option.some(undefined)), + hd: ltx(undefined, Caml_option.some()), tl: { hd: ltx(undefined, null), tl: { @@ -231,16 +231,16 @@ b("File \"option_repr_test.res\", line 128, characters 4-11", Belt_List.every(xs return x; }))); -var xs_0$2 = eqx(undefined, undefined); +var xs_0$2 = eqx(); var xs_1$1 = { hd: neqx(undefined, null), tl: { - hd: eqx(Caml_option.some(undefined), Caml_option.some(undefined)), + hd: eqx(Caml_option.some(), Caml_option.some()), tl: { - hd: eqx(Caml_option.some(Caml_option.some(undefined)), Caml_option.some(Caml_option.some(undefined))), + hd: eqx(Caml_option.some(Caml_option.some()), Caml_option.some(Caml_option.some())), tl: { - hd: neqx(Caml_option.some(Caml_option.some(Caml_option.some(undefined))), Caml_option.some(Caml_option.some(undefined))), + hd: neqx(Caml_option.some(Caml_option.some(Caml_option.some())), Caml_option.some(Caml_option.some())), tl: /* [] */0 } } @@ -273,9 +273,9 @@ Mt.from_pair_suites("Option_repr_test", suites.contents); var f7; -var f8 = Caml_option.some(undefined); +var f8 = Caml_option.some(); -var f9 = Caml_option.some(Caml_option.some(undefined)); +var f9 = Caml_option.some(Caml_option.some()); var N; diff --git a/jscomp/test/record_regression.js b/jscomp/test/record_regression.js index a409a3a88d..8008ffd312 100644 --- a/jscomp/test/record_regression.js +++ b/jscomp/test/record_regression.js @@ -15,11 +15,11 @@ newrecord.y = 3; var newrecord$1 = Caml_obj.obj_dup(newrecord); -newrecord$1.yy = Caml_option.some(undefined); +newrecord$1.yy = Caml_option.some(); var theseTwoShouldBeIdentical = [ newrecord$1.yy, - Caml_option.some(undefined) + Caml_option.some() ]; var v = { diff --git a/jscomp/test/test_zero_nullable.js b/jscomp/test/test_zero_nullable.js index 8feee60e84..5991848e0b 100644 --- a/jscomp/test/test_zero_nullable.js +++ b/jscomp/test/test_zero_nullable.js @@ -85,7 +85,7 @@ function f8(x) { } } -var u = f8(undefined); +var u = f8(); function f9(x) { if (x === null) { @@ -170,7 +170,7 @@ function f8$1(x) { } } -var u$1 = f8$1(undefined); +var u$1 = f8$1(); function f9$1(x) { if (x === undefined) { @@ -253,7 +253,7 @@ function f8$2(x) { } } -var u$2 = f8$2(undefined); +var u$2 = f8$2(); function f9$2(x) { if (x == null) { diff --git a/jscomp/test/uncurried_default.args.js b/jscomp/test/uncurried_default.args.js index 1c24e3b6dc..7bae8a7e39 100644 --- a/jscomp/test/uncurried_default.args.js +++ b/jscomp/test/uncurried_default.args.js @@ -36,7 +36,7 @@ function foo2(y, xOpt, zOpt) { return (x + y | 0) + z | 0; } -var r2 = foo2(11, undefined, undefined); +var r2 = foo2(11); function foo3(xOpt, yOpt) { var x = xOpt !== undefined ? xOpt : 3; @@ -44,7 +44,7 @@ function foo3(xOpt, yOpt) { return x + y | 0; } -var r3 = foo3(undefined, undefined); +var r3 = foo3(); var StandardNotation = { withOpt: withOpt, @@ -92,7 +92,7 @@ function foo2$1(y, xOpt, zOpt) { return (x + y | 0) + z | 0; } -var r2$1 = foo2$1(11, undefined, undefined); +var r2$1 = foo2$1(11); function foo3$1(xOpt, yOpt) { var x = xOpt !== undefined ? xOpt : 3; @@ -100,7 +100,7 @@ function foo3$1(xOpt, yOpt) { return x + y | 0; } -var r3$1 = foo3$1(undefined, undefined); +var r3$1 = foo3$1(); function foo(func) { return func() + 1 | 0; diff --git a/jscomp/test/unit_undefined_test.js b/jscomp/test/unit_undefined_test.js index 4a43c971bb..bb3f16dcd6 100644 --- a/jscomp/test/unit_undefined_test.js +++ b/jscomp/test/unit_undefined_test.js @@ -46,23 +46,23 @@ function u0(x) { return Caml_option.some(x); } -var u1 = Caml_option.some(undefined); +var u1 = Caml_option.some(); function u2(x) { return Caml_option.some(x); } -var u3 = Caml_option.some(undefined); +var u3 = Caml_option.some(); -eq("File \"unit_undefined_test.res\", line 41, characters 3-10", Caml_option.some(), Caml_option.some(undefined)); +eq("File \"unit_undefined_test.res\", line 41, characters 3-10", Caml_option.some(), Caml_option.some()); -eq("File \"unit_undefined_test.res\", line 42, characters 3-10", u1, Caml_option.some(undefined)); +eq("File \"unit_undefined_test.res\", line 42, characters 3-10", u1, Caml_option.some()); -eq("File \"unit_undefined_test.res\", line 43, characters 3-10", Caml_option.some(), Caml_option.some(undefined)); +eq("File \"unit_undefined_test.res\", line 43, characters 3-10", Caml_option.some(), Caml_option.some()); -eq("File \"unit_undefined_test.res\", line 44, characters 3-10", u3, Caml_option.some(undefined)); +eq("File \"unit_undefined_test.res\", line 44, characters 3-10", u3, Caml_option.some()); -eq("File \"unit_undefined_test.res\", line 45, characters 3-10", undefined, undefined); +eq("File \"unit_undefined_test.res\", line 45, characters 3-10", undefined); Mt.from_pair_suites("unit_undefined_test.res", suites.contents); diff --git a/lib/es6/belt_MapDict.js b/lib/es6/belt_MapDict.js index 2d93c85ba8..52fd0ba2c6 100644 --- a/lib/es6/belt_MapDict.js +++ b/lib/es6/belt_MapDict.js @@ -67,7 +67,7 @@ function updateU(t, newK, f, cmp) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var newD$1 = f(undefined); + var newD$1 = f(); if (newD$1 !== undefined) { return Belt_internalAVLtree.singleton(newK, Caml_option.valFromOption(newD$1)); } else { @@ -210,7 +210,7 @@ function mergeU(s1, s2, f, cmp) { } if (s2 === undefined) { return Belt_internalAVLtree.keepMapU(s1, (function (k, v) { - return f(k, Caml_option.some(v), undefined); + return f(k, Caml_option.some(v)); })); } if (s1.h >= s2.h) { diff --git a/lib/es6/belt_MapInt.js b/lib/es6/belt_MapInt.js index 97f186d141..0b7db40af0 100644 --- a/lib/es6/belt_MapInt.js +++ b/lib/es6/belt_MapInt.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MapString.js b/lib/es6/belt_MapString.js index b6e5e05671..3eee917c5a 100644 --- a/lib/es6/belt_MapString.js +++ b/lib/es6/belt_MapString.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMap.js b/lib/es6/belt_MutableMap.js index f12cf3fa0d..7169df264a 100644 --- a/lib/es6/belt_MutableMap.js +++ b/lib/es6/belt_MutableMap.js @@ -118,7 +118,7 @@ function updateDone(t, x, f, cmp) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMapInt.js b/lib/es6/belt_MutableMapInt.js index 6dbcb14769..4435378074 100644 --- a/lib/es6/belt_MutableMapInt.js +++ b/lib/es6/belt_MutableMapInt.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMapString.js b/lib/es6/belt_MutableMapString.js index 8d1fe7a578..9741762954 100644 --- a/lib/es6/belt_MutableMapString.js +++ b/lib/es6/belt_MutableMapString.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index fa889cc4be..74c4332d30 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -674,7 +674,7 @@ function subset(_s1, _s2, cmp) { continue ; } if (c < 0) { - if (!subset(create(l1, v1, undefined), l2, cmp)) { + if (!subset(create(l1, v1), l2, cmp)) { return false; } _s1 = r1; diff --git a/lib/es6/belt_internalSetInt.js b/lib/es6/belt_internalSetInt.js index 6a271f0021..133c4bc1be 100644 --- a/lib/es6/belt_internalSetInt.js +++ b/lib/es6/belt_internalSetInt.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { return false; } _s1 = r1; diff --git a/lib/es6/belt_internalSetString.js b/lib/es6/belt_internalSetString.js index bd5096a72d..50f5268581 100644 --- a/lib/es6/belt_internalSetString.js +++ b/lib/es6/belt_internalSetString.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { return false; } _s1 = r1; diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 1e590cefe3..7d50d1cf86 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -91,7 +91,7 @@ function get_data(count, _d) { _1: d }; } else { - g.curr = Caml_option.some(undefined); + g.curr = Caml_option.some(); return "Sempty"; } diff --git a/lib/js/belt_MapDict.js b/lib/js/belt_MapDict.js index ea4e1a614b..2642de5e85 100644 --- a/lib/js/belt_MapDict.js +++ b/lib/js/belt_MapDict.js @@ -67,7 +67,7 @@ function updateU(t, newK, f, cmp) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var newD$1 = f(undefined); + var newD$1 = f(); if (newD$1 !== undefined) { return Belt_internalAVLtree.singleton(newK, Caml_option.valFromOption(newD$1)); } else { @@ -210,7 +210,7 @@ function mergeU(s1, s2, f, cmp) { } if (s2 === undefined) { return Belt_internalAVLtree.keepMapU(s1, (function (k, v) { - return f(k, Caml_option.some(v), undefined); + return f(k, Caml_option.some(v)); })); } if (s1.h >= s2.h) { diff --git a/lib/js/belt_MapInt.js b/lib/js/belt_MapInt.js index 05bcf2fd5e..632c82f3f3 100644 --- a/lib/js/belt_MapInt.js +++ b/lib/js/belt_MapInt.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MapString.js b/lib/js/belt_MapString.js index aac72f8822..b4ebf3d570 100644 --- a/lib/js/belt_MapString.js +++ b/lib/js/belt_MapString.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMap.js b/lib/js/belt_MutableMap.js index fd49cf330d..4ec12d1930 100644 --- a/lib/js/belt_MutableMap.js +++ b/lib/js/belt_MutableMap.js @@ -118,7 +118,7 @@ function updateDone(t, x, f, cmp) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMapInt.js b/lib/js/belt_MutableMapInt.js index b1f05685ee..91ad5ff572 100644 --- a/lib/js/belt_MutableMapInt.js +++ b/lib/js/belt_MutableMapInt.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMapString.js b/lib/js/belt_MutableMapString.js index 372ad59574..d49c7df851 100644 --- a/lib/js/belt_MutableMapString.js +++ b/lib/js/belt_MutableMapString.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(undefined); + var data$1 = f(); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index 8140346f0c..6d9edd0d63 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -674,7 +674,7 @@ function subset(_s1, _s2, cmp) { continue ; } if (c < 0) { - if (!subset(create(l1, v1, undefined), l2, cmp)) { + if (!subset(create(l1, v1), l2, cmp)) { return false; } _s1 = r1; diff --git a/lib/js/belt_internalSetInt.js b/lib/js/belt_internalSetInt.js index 32d5a313de..8368b94980 100644 --- a/lib/js/belt_internalSetInt.js +++ b/lib/js/belt_internalSetInt.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { return false; } _s1 = r1; diff --git a/lib/js/belt_internalSetString.js b/lib/js/belt_internalSetString.js index e29bec2363..c4a017808a 100644 --- a/lib/js/belt_internalSetString.js +++ b/lib/js/belt_internalSetString.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { return false; } _s1 = r1; diff --git a/lib/js/stream.js b/lib/js/stream.js index 324cf40805..79e4409e39 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -91,7 +91,7 @@ function get_data(count, _d) { _1: d }; } else { - g.curr = Caml_option.some(undefined); + g.curr = Caml_option.some(); return "Sempty"; } From dbe0bef5a8dbb2390667ca85e3b67f1de9741dbb Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 26 Feb 2024 18:15:43 +0100 Subject: [PATCH 2/5] move optimization to earlier step, and only apply on external calls --- jscomp/core/js_dump.ml | 11 +--- jscomp/core/lam_compile_external_call.ml | 9 +++ jscomp/test/UncurriedAlways.js | 8 +-- jscomp/test/big_polyvar_test.js | 2 +- jscomp/test/bs_array_test.js | 4 +- jscomp/test/bs_float_test.js | 2 +- jscomp/test/bs_int_test.js | 2 +- jscomp/test/bs_list_test.js | 26 ++++---- jscomp/test/bs_min_max_test.js | 8 +-- jscomp/test/bs_mutable_set_test.js | 2 +- jscomp/test/bs_poly_map_test.js | 6 +- jscomp/test/bs_poly_mutable_set_test.js | 2 +- jscomp/test/bs_poly_set_test.js | 8 +-- jscomp/test/bs_set_int_test.js | 2 +- jscomp/test/caml_compare_test.js | 8 +-- jscomp/test/equal_box_test.js | 12 ++-- jscomp/test/gpr_1409_test.js | 6 +- jscomp/test/gpr_3142_test.js | 2 +- jscomp/test/gpr_3154_test.js | 2 +- jscomp/test/js_json_test.js | 64 ++++++++++---------- jscomp/test/js_null_test.js | 4 +- jscomp/test/js_null_undefined_test.js | 2 +- jscomp/test/js_option_test.js | 12 ++-- jscomp/test/js_undefined_test.js | 2 +- jscomp/test/large_record_duplication_test.js | 2 +- jscomp/test/lazy_test.js | 2 +- jscomp/test/ocaml_re_test.js | 6 +- jscomp/test/option_repr_test.js | 34 +++++------ jscomp/test/record_regression.js | 4 +- jscomp/test/test_zero_nullable.js | 6 +- jscomp/test/uncurried_default.args.js | 8 +-- jscomp/test/unit_undefined_test.js | 14 ++--- lib/es6/belt_MapDict.js | 4 +- lib/es6/belt_MapInt.js | 2 +- lib/es6/belt_MapString.js | 2 +- lib/es6/belt_MutableMap.js | 2 +- lib/es6/belt_MutableMapInt.js | 2 +- lib/es6/belt_MutableMapString.js | 2 +- lib/es6/belt_internalAVLset.js | 2 +- lib/es6/belt_internalSetInt.js | 2 +- lib/es6/belt_internalSetString.js | 2 +- lib/es6/stream.js | 2 +- lib/js/belt_MapDict.js | 4 +- lib/js/belt_MapInt.js | 2 +- lib/js/belt_MapString.js | 2 +- lib/js/belt_MutableMap.js | 2 +- lib/js/belt_MutableMapInt.js | 2 +- lib/js/belt_MutableMapString.js | 2 +- lib/js/belt_internalAVLset.js | 2 +- lib/js/belt_internalSetInt.js | 2 +- lib/js/belt_internalSetString.js | 2 +- lib/js/stream.js | 2 +- 52 files changed, 163 insertions(+), 163 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 3a2d1827fc..4f2bf18f05 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -577,16 +577,7 @@ and expression_desc cxt ~(level : int) f x : cxt = (* omit passing undefined when the call is f() *) [] | _ -> - let rec keepNonUndefinedArgs argsList = ( - match argsList with - | {J.expression_desc=Undefined {isUnit = false}} :: rest -> keepNonUndefinedArgs rest - | _ -> argsList - - ) in - el - |> List.rev - |> keepNonUndefinedArgs - |> List.rev + el in arguments cxt f el) | _, _ -> diff --git a/jscomp/core/lam_compile_external_call.ml b/jscomp/core/lam_compile_external_call.ml index 617996b7e2..245a4fb203 100644 --- a/jscomp/core/lam_compile_external_call.ml +++ b/jscomp/core/lam_compile_external_call.ml @@ -271,6 +271,15 @@ let translate_ffi (cxt : Lam_compile_context.t) arg_types else E.call ~info:{ arity = Full; call_info = Call_na } fn args) else let args, eff = assemble_args_no_splice arg_types args in + let rec keepNonUndefinedArgs argsList = ( + match argsList with + | {J.expression_desc=Undefined {isUnit = false}; _} :: rest -> keepNonUndefinedArgs rest + | _ -> argsList + ) in + let args = args + |> List.rev + |> keepNonUndefinedArgs + |> List.rev in add_eff eff @@ E.call ~info:{ arity = Full; call_info = Call_na } fn args | Js_module_as_fn { external_module_name; splice } -> diff --git a/jscomp/test/UncurriedAlways.js b/jscomp/test/UncurriedAlways.js index 3a36127000..a70b90bcf1 100644 --- a/jscomp/test/UncurriedAlways.js +++ b/jscomp/test/UncurriedAlways.js @@ -100,7 +100,7 @@ function ptl$2(none, extra, extra$1) { return foo$2(none, "y", extra, extra$1); } -var b1 = ptl$2("x", "z"); +var b1 = ptl$2("x", "z", undefined); console.log("b1:", b1); @@ -138,15 +138,15 @@ function ptl$3(none, none$1, none$2, none$3, none$4, none$5, extra) { return foo$3(none, none$1, none$2, "y", none$3, none$4, none$5, "w", extra); } -var c1 = ptl$3(undefined, "x", undefined, undefined, "z"); +var c1 = ptl$3(undefined, "x", undefined, undefined, "z", undefined, undefined); console.log("c1:", c1); -var c2 = ptl$3("d1<-100", "x", undefined, undefined, "z"); +var c2 = ptl$3("d1<-100", "x", undefined, undefined, "z", undefined, undefined); console.log("c2:", c2); -var c3 = ptl$3(undefined, "x", "d2<-200", undefined, "z", "d4<-400"); +var c3 = ptl$3(undefined, "x", "d2<-200", undefined, "z", "d4<-400", undefined); console.log("c3:", c3); diff --git a/jscomp/test/big_polyvar_test.js b/jscomp/test/big_polyvar_test.js index 1504672748..0a95c8931e 100644 --- a/jscomp/test/big_polyvar_test.js +++ b/jscomp/test/big_polyvar_test.js @@ -7224,7 +7224,7 @@ if (!eq(tFromJs("variant299"), "variant299")) { }; } -if (!eq(tFromJs("xx"))) { +if (!eq(tFromJs("xx"), undefined)) { throw { RE_EXN_ID: "Assert_failure", _1: [ diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index fbdbc7b28e..08205ad63e 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -1577,7 +1577,7 @@ eq("File \"bs_array_test.res\", line 395, characters 5-12", Belt_Array.getBy([ 3 ], (function (x) { return x > 3; - }))); + })), undefined); eq("File \"bs_array_test.res\", line 399, characters 5-12", Belt_Array.getIndexBy([ 1, @@ -1593,7 +1593,7 @@ eq("File \"bs_array_test.res\", line 400, characters 5-12", Belt_Array.getIndexB 3 ], (function (x) { return x > 3; - }))); + })), undefined); var arr = []; diff --git a/jscomp/test/bs_float_test.js b/jscomp/test/bs_float_test.js index e1ef5089cb..e124c86d48 100644 --- a/jscomp/test/bs_float_test.js +++ b/jscomp/test/bs_float_test.js @@ -69,7 +69,7 @@ eq("File \"bs_float_test.res\", line 36, characters 5-12", Belt_Float.fromString eq("File \"bs_float_test.res\", line 37, characters 5-12", Belt_Float.fromString("-1.7"), -1.7); -eq("File \"bs_float_test.res\", line 38, characters 5-12", Belt_Float.fromString("not a float")); +eq("File \"bs_float_test.res\", line 38, characters 5-12", Belt_Float.fromString("not a float"), undefined); eq("File \"bs_float_test.res\", line 42, characters 5-12", String(1.0), "1"); diff --git a/jscomp/test/bs_int_test.js b/jscomp/test/bs_int_test.js index aeeed67f9b..3f7a90d22b 100644 --- a/jscomp/test/bs_int_test.js +++ b/jscomp/test/bs_int_test.js @@ -69,7 +69,7 @@ eq("File \"bs_int_test.res\", line 36, characters 5-12", Belt_Int.fromString("-1 eq("File \"bs_int_test.res\", line 37, characters 5-12", Belt_Int.fromString("-1.7"), -1); -eq("File \"bs_int_test.res\", line 38, characters 5-12", Belt_Int.fromString("not an int")); +eq("File \"bs_int_test.res\", line 38, characters 5-12", Belt_Int.fromString("not an int"), undefined); eq("File \"bs_int_test.res\", line 42, characters 5-12", String(1), "1"); diff --git a/jscomp/test/bs_list_test.js b/jscomp/test/bs_list_test.js index 4224422e29..788934f3c5 100644 --- a/jscomp/test/bs_list_test.js +++ b/jscomp/test/bs_list_test.js @@ -108,7 +108,7 @@ eq("File \"bs_list_test.res\", line 33, characters 5-12", Belt_List.getBy({ } }, (function (x) { return x % 5 === 0; - }))); + })), undefined); eq("FLATTEN", Belt_List.flatten({ hd: { @@ -849,7 +849,7 @@ eq("TAKE", Belt_List.take({ } }); -eq("TAKE", Belt_List.take(/* [] */0, 1)); +eq("TAKE", Belt_List.take(/* [] */0, 1), undefined); eq("TAKE", Belt_List.take({ hd: 1, @@ -857,7 +857,7 @@ eq("TAKE", Belt_List.take({ hd: 2, tl: /* [] */0 } - }, 3)); + }, 3), undefined); eq("TAKE", Belt_List.take({ hd: 1, @@ -877,7 +877,7 @@ eq("TAKE", Belt_List.take(length_10_id, 8), length_8_id); eq("TAKE", Belt_List.take(length_10_id, 0), /* [] */0); -eq("TAKE", Belt_List.take(length_8_id, -2)); +eq("TAKE", Belt_List.take(length_8_id, -2), undefined); eq("DROP", Belt_List.drop(length_10_id, 10), /* [] */0); @@ -891,13 +891,13 @@ eq("DROP", Belt_List.drop(length_10_id, 8), { eq("DROP", Belt_List.drop(length_10_id, 0), length_10_id); -eq("DROP", Belt_List.drop(length_8_id, -1)); +eq("DROP", Belt_List.drop(length_8_id, -1), undefined); var a = Belt_List.makeBy(5, id); -eq("SPLIT", Belt_List.splitAt(/* [] */0, 1)); +eq("SPLIT", Belt_List.splitAt(/* [] */0, 1), undefined); -eq("SPLIT", Belt_List.splitAt(a, 6)); +eq("SPLIT", Belt_List.splitAt(a, 6), undefined); eq("SPLIT", Belt_List.splitAt(a, 5), [ a, @@ -989,7 +989,7 @@ eq("SPLIT", Belt_List.splitAt(a, 0), [ a ]); -eq("SPLIT", Belt_List.splitAt(a, -1)); +eq("SPLIT", Belt_List.splitAt(a, -1), undefined); function succx(x) { return x + 1 | 0; @@ -1549,7 +1549,7 @@ eq("File \"bs_list_test.res\", line 248, characters 4-11", [ Belt_List.drop(length_10_id, 1) ]); -eq("File \"bs_list_test.res\", line 255, characters 5-12", Belt_List.head(/* [] */0)); +eq("File \"bs_list_test.res\", line 255, characters 5-12", Belt_List.head(/* [] */0), undefined); $$throw("File \"bs_list_test.res\", line 256, characters 8-15", (function (param) { Belt_List.headExn(/* [] */0); @@ -1615,17 +1615,17 @@ Belt_List.forEachWithIndex(length_10_id, (function (i, x) { eq("File \"bs_list_test.res\", line 263, characters 48-55", Belt_List.get(length_10_id, i), x); })); -eq("File \"bs_list_test.res\", line 264, characters 5-12", Belt_List.tail(/* [] */0)); +eq("File \"bs_list_test.res\", line 264, characters 5-12", Belt_List.tail(/* [] */0), undefined); -eq("File \"bs_list_test.res\", line 265, characters 5-12", Belt_List.drop(/* [] */0, 3)); +eq("File \"bs_list_test.res\", line 265, characters 5-12", Belt_List.drop(/* [] */0, 3), undefined); eq("File \"bs_list_test.res\", line 266, characters 5-12", Belt_List.mapWithIndex(/* [] */0, (function (i, x) { return i + x | 0; })), /* [] */0); -eq("File \"bs_list_test.res\", line 267, characters 5-12", Belt_List.get(length_10_id, -1)); +eq("File \"bs_list_test.res\", line 267, characters 5-12", Belt_List.get(length_10_id, -1), undefined); -eq("File \"bs_list_test.res\", line 268, characters 5-12", Belt_List.get(length_10_id, 12)); +eq("File \"bs_list_test.res\", line 268, characters 5-12", Belt_List.get(length_10_id, 12), undefined); eq("File \"bs_list_test.res\", line 269, characters 5-12", sum(/* [] */0), 0); diff --git a/jscomp/test/bs_min_max_test.js b/jscomp/test/bs_min_max_test.js index 49bebb6262..850139a42f 100644 --- a/jscomp/test/bs_min_max_test.js +++ b/jscomp/test/bs_min_max_test.js @@ -65,15 +65,15 @@ b("File \"bs_min_max_test.res\", line 21, characters 4-11", Caml.i64_eq(Caml.i64 3 ])); -eq("File \"bs_min_max_test.res\", line 22, characters 5-12", Caml_obj.min(undefined, 3)); +eq("File \"bs_min_max_test.res\", line 22, characters 5-12", Caml_obj.min(undefined, 3), undefined); -eq("File \"bs_min_max_test.res\", line 23, characters 5-12", Caml_obj.min(3)); +eq("File \"bs_min_max_test.res\", line 23, characters 5-12", Caml_obj.min(3, undefined), undefined); -eq("File \"bs_min_max_test.res\", line 24, characters 5-12", Caml_obj.max(3), 3); +eq("File \"bs_min_max_test.res\", line 24, characters 5-12", Caml_obj.max(3, undefined), 3); eq("File \"bs_min_max_test.res\", line 25, characters 5-12", Caml_obj.max(undefined, 3), 3); -b("File \"bs_min_max_test.res\", line 26, characters 4-11", Caml_obj.greaterequal(5)); +b("File \"bs_min_max_test.res\", line 26, characters 4-11", Caml_obj.greaterequal(5, undefined)); b("File \"bs_min_max_test.res\", line 27, characters 4-11", Caml_obj.lessequal(undefined, 5)); diff --git a/jscomp/test/bs_mutable_set_test.js b/jscomp/test/bs_mutable_set_test.js index 7109d61dfa..bc6b575833 100644 --- a/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/bs_mutable_set_test.js @@ -171,7 +171,7 @@ eq("File \"bs_mutable_set_test.res\", line 91, characters 9-16", Belt_internalAV Belt_internalAVLset.checkInvariantInternal(v.data); -eq("File \"bs_mutable_set_test.res\", line 93, characters 9-16", Belt_internalSetInt.get(v.data, 3)); +eq("File \"bs_mutable_set_test.res\", line 93, characters 9-16", Belt_internalSetInt.get(v.data, 3), undefined); eq("File \"bs_mutable_set_test.res\", line 94, characters 9-16", Belt_internalSetInt.get(v.data, 1200), 1200); diff --git a/jscomp/test/bs_poly_map_test.js b/jscomp/test/bs_poly_map_test.js index eb556958dc..07accf3b4f 100644 --- a/jscomp/test/bs_poly_map_test.js +++ b/jscomp/test/bs_poly_map_test.js @@ -47,7 +47,7 @@ function emptyMap(param) { function mergeInter(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 !== undefined) { - return Caml_option.some(); + return Caml_option.some(undefined); } })); @@ -57,7 +57,7 @@ function mergeInter(s1, s2) { function mergeUnion(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined || v2 !== undefined) { - return Caml_option.some(); + return Caml_option.some(undefined); } })); @@ -67,7 +67,7 @@ function mergeUnion(s1, s2) { function mergeDiff(s1, s2) { var m = Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 === undefined) { - return Caml_option.some(); + return Caml_option.some(undefined); } })); diff --git a/jscomp/test/bs_poly_mutable_set_test.js b/jscomp/test/bs_poly_mutable_set_test.js index 6bc8b136a3..a2a1a92556 100644 --- a/jscomp/test/bs_poly_mutable_set_test.js +++ b/jscomp/test/bs_poly_mutable_set_test.js @@ -176,7 +176,7 @@ eq("File \"bs_poly_mutable_set_test.res\", line 86, characters 5-12", Belt_inter Belt_internalAVLset.checkInvariantInternal(v.data); -eq("File \"bs_poly_mutable_set_test.res\", line 88, characters 5-12", Belt_MutableSet.get(v, 3)); +eq("File \"bs_poly_mutable_set_test.res\", line 88, characters 5-12", Belt_MutableSet.get(v, 3), undefined); eq("File \"bs_poly_mutable_set_test.res\", line 89, characters 5-12", Belt_MutableSet.get(v, 1200), 1200); diff --git a/jscomp/test/bs_poly_set_test.js b/jscomp/test/bs_poly_set_test.js index d390ee6614..d2a95f712b 100644 --- a/jscomp/test/bs_poly_set_test.js +++ b/jscomp/test/bs_poly_set_test.js @@ -187,13 +187,13 @@ b("File \"bs_poly_set_test.res\", line 85, characters 4-11", undefined === Belt_ eq("File \"bs_poly_set_test.res\", line 87, characters 5-12", Belt_SetDict.size(u25.data), 60); -b("File \"bs_poly_set_test.res\", line 88, characters 4-11", Belt_SetDict.minimum() === undefined); +b("File \"bs_poly_set_test.res\", line 88, characters 4-11", Belt_SetDict.minimum(undefined) === undefined); -b("File \"bs_poly_set_test.res\", line 89, characters 4-11", Belt_SetDict.maximum() === undefined); +b("File \"bs_poly_set_test.res\", line 89, characters 4-11", Belt_SetDict.maximum(undefined) === undefined); -b("File \"bs_poly_set_test.res\", line 90, characters 4-11", Belt_SetDict.minUndefined() === undefined); +b("File \"bs_poly_set_test.res\", line 90, characters 4-11", Belt_SetDict.minUndefined(undefined) === undefined); -b("File \"bs_poly_set_test.res\", line 91, characters 4-11", Belt_SetDict.maxUndefined() === undefined); +b("File \"bs_poly_set_test.res\", line 91, characters 4-11", Belt_SetDict.maxUndefined(undefined) === undefined); function testIterToList(xs) { var v = { diff --git a/jscomp/test/bs_set_int_test.js b/jscomp/test/bs_set_int_test.js index 372a3b191d..77c7589ca0 100644 --- a/jscomp/test/bs_set_int_test.js +++ b/jscomp/test/bs_set_int_test.js @@ -369,7 +369,7 @@ b("File \"bs_set_int_test.res\", line 241, characters 4-11", !Belt_SetInt.subset eq("File \"bs_set_int_test.res\", line 242, characters 5-12", Belt_SetInt.get(v$12, 30), 30); -eq("File \"bs_set_int_test.res\", line 243, characters 5-12", Belt_SetInt.get(v$12, 3000)); +eq("File \"bs_set_int_test.res\", line 243, characters 5-12", Belt_SetInt.get(v$12, 3000), undefined); Mt.from_pair_suites("Bs_set_int_test", suites.contents); diff --git a/jscomp/test/caml_compare_test.js b/jscomp/test/caml_compare_test.js index c824c069f7..f39304506a 100644 --- a/jscomp/test/caml_compare_test.js +++ b/jscomp/test/caml_compare_test.js @@ -238,7 +238,7 @@ var suites = { _1: Caml_obj.greaterthan([ 1, 30 - ]) + ], undefined) }; }) ], @@ -1064,7 +1064,7 @@ var suites = { (function (param) { return { TAG: "Eq", - _0: Caml_obj.compare(0), + _0: Caml_obj.compare(0, undefined), _1: 1 }; }) @@ -1132,7 +1132,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -eq("File \"caml_compare_test.res\", line 88, characters 3-10", true, Caml_obj.greaterthan(1)); +eq("File \"caml_compare_test.res\", line 88, characters 3-10", true, Caml_obj.greaterthan(1, undefined)); eq("File \"caml_compare_test.res\", line 89, characters 3-10", true, Caml_obj.lessthan(/* [] */0, { hd: 1, @@ -1149,7 +1149,7 @@ eq("File \"caml_compare_test.res\", line 91, characters 3-10", false, Caml_obj.g eq("File \"caml_compare_test.res\", line 92, characters 3-10", false, Caml_obj.lessthan([ 1, 30 - ])); + ], undefined)); Mt.from_pair_suites("Caml_compare_test", suites.contents); diff --git a/jscomp/test/equal_box_test.js b/jscomp/test/equal_box_test.js index 6e73911b39..12d1d4eaed 100644 --- a/jscomp/test/equal_box_test.js +++ b/jscomp/test/equal_box_test.js @@ -57,7 +57,7 @@ b("File \"equal_box_test.res\", line 27, characters 4-11", true); b("File \"equal_box_test.res\", line 28, characters 4-11", true); -b("File \"equal_box_test.res\", line 29, characters 4-11", !Caml_obj.equal_null(3)); +b("File \"equal_box_test.res\", line 29, characters 4-11", !Caml_obj.equal_null(3, undefined)); var v = null; @@ -83,7 +83,7 @@ b("File \"equal_box_test.res\", line 43, characters 4-11", true); b("File \"equal_box_test.res\", line 44, characters 4-11", true); -b("File \"equal_box_test.res\", line 45, characters 4-11", !Caml_obj.equal_nullable(3)); +b("File \"equal_box_test.res\", line 45, characters 4-11", !Caml_obj.equal_nullable(3, undefined)); b("File \"equal_box_test.res\", line 51, characters 4-11", 3 !== undefined); @@ -93,21 +93,21 @@ b("File \"equal_box_test.res\", line 53, characters 4-11", "3" !== undefined); b("File \"equal_box_test.res\", line 54, characters 4-11", /* '3' */51 !== undefined); -b("File \"equal_box_test.res\", line 55, characters 4-11", !Caml_int64.equal_undefined(Caml_int64.zero)); +b("File \"equal_box_test.res\", line 55, characters 4-11", !Caml_int64.equal_undefined(Caml_int64.zero, undefined)); b("File \"equal_box_test.res\", line 56, characters 4-11", 0 !== undefined); b("File \"equal_box_test.res\", line 57, characters 4-11", true); -b("File \"equal_box_test.res\", line 58, characters 4-11", Caml_obj.equal_undefined()); +b("File \"equal_box_test.res\", line 58, characters 4-11", Caml_obj.equal_undefined(undefined, undefined)); -b("File \"equal_box_test.res\", line 62, characters 4-11", !Caml_obj.equal_undefined(null)); +b("File \"equal_box_test.res\", line 62, characters 4-11", !Caml_obj.equal_undefined(null, undefined)); b("File \"equal_box_test.res\", line 63, characters 4-11", true); b("File \"equal_box_test.res\", line 64, characters 4-11", true); -b("File \"equal_box_test.res\", line 65, characters 4-11", !Caml_obj.equal_undefined(3)); +b("File \"equal_box_test.res\", line 65, characters 4-11", !Caml_obj.equal_undefined(3, undefined)); Mt.from_pair_suites("File \"equal_box_test.res\", line 68, characters 20-27", suites.contents); diff --git a/jscomp/test/gpr_1409_test.js b/jscomp/test/gpr_1409_test.js index b1a57c776a..80826b9193 100644 --- a/jscomp/test/gpr_1409_test.js +++ b/jscomp/test/gpr_1409_test.js @@ -58,7 +58,7 @@ function make(foo) { }; } -var a_ = make()(); +var a_ = make(undefined)(); var b_ = make(42)(); @@ -141,7 +141,7 @@ function keys(xs, ys) { eq("File \"gpr_1409_test.res\", line 69, characters 3-10", keys({ hd: "hi", tl: /* [] */0 - }, Object.keys(test3())), true); + }, Object.keys(test3(undefined, undefined))), true); eq("File \"gpr_1409_test.res\", line 71, characters 3-10", keys({ hd: "hi", @@ -149,7 +149,7 @@ eq("File \"gpr_1409_test.res\", line 71, characters 3-10", keys({ hd: "_open", tl: /* [] */0 } - }, Object.keys(test3(2))), true); + }, Object.keys(test3(2, undefined))), true); eq("File \"gpr_1409_test.res\", line 73, characters 3-10", keys({ hd: "hi", diff --git a/jscomp/test/gpr_3142_test.js b/jscomp/test/gpr_3142_test.js index fa4e83acb5..f89745168b 100644 --- a/jscomp/test/gpr_3142_test.js +++ b/jscomp/test/gpr_3142_test.js @@ -43,7 +43,7 @@ eq("File \"gpr_3142_test.res\", line 24, characters 3-10", tFromJs("你"), "b"); eq("File \"gpr_3142_test.res\", line 25, characters 3-10", tFromJs("我"), "c"); -eq("File \"gpr_3142_test.res\", line 26, characters 3-10", tFromJs("xx")); +eq("File \"gpr_3142_test.res\", line 26, characters 3-10", tFromJs("xx"), undefined); Mt.from_pair_suites("Gpr_3142_test", suites.contents); diff --git a/jscomp/test/gpr_3154_test.js b/jscomp/test/gpr_3154_test.js index 6a8bf062b7..640d60dacc 100644 --- a/jscomp/test/gpr_3154_test.js +++ b/jscomp/test/gpr_3154_test.js @@ -37,7 +37,7 @@ var d0 = {}; d0["foo"] = undefined; -eq("File \"gpr_3154_test.res\", line 20, characters 5-12", Js_dict.get(d0, "foo"), Caml_option.some()); +eq("File \"gpr_3154_test.res\", line 20, characters 5-12", Js_dict.get(d0, "foo"), Caml_option.some(undefined)); Mt.from_pair_suites("Gpr_3154_test", suites.contents); diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 8043bb2199..3da48724f8 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -662,79 +662,79 @@ eq("File \"js_json_test.res\", line 290, characters 2-9", JSON.stringify({ eq("File \"js_json_test.res\", line 295, characters 12-19", JSON.stringify(null), "null"); -eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify()); +eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify(), undefined); eq("File \"js_json_test.res\", line 300, characters 5-12", Js_json.decodeString("test"), "test"); -eq("File \"js_json_test.res\", line 301, characters 5-12", Js_json.decodeString(true)); +eq("File \"js_json_test.res\", line 301, characters 5-12", Js_json.decodeString(true), undefined); -eq("File \"js_json_test.res\", line 302, characters 5-12", Js_json.decodeString([])); +eq("File \"js_json_test.res\", line 302, characters 5-12", Js_json.decodeString([]), undefined); -eq("File \"js_json_test.res\", line 303, characters 5-12", Js_json.decodeString(null)); +eq("File \"js_json_test.res\", line 303, characters 5-12", Js_json.decodeString(null), undefined); -eq("File \"js_json_test.res\", line 304, characters 5-12", Js_json.decodeString({})); +eq("File \"js_json_test.res\", line 304, characters 5-12", Js_json.decodeString({}), undefined); -eq("File \"js_json_test.res\", line 305, characters 5-12", Js_json.decodeString(1.23)); +eq("File \"js_json_test.res\", line 305, characters 5-12", Js_json.decodeString(1.23), undefined); -eq("File \"js_json_test.res\", line 309, characters 5-12", Js_json.decodeNumber("test")); +eq("File \"js_json_test.res\", line 309, characters 5-12", Js_json.decodeNumber("test"), undefined); -eq("File \"js_json_test.res\", line 310, characters 5-12", Js_json.decodeNumber(true)); +eq("File \"js_json_test.res\", line 310, characters 5-12", Js_json.decodeNumber(true), undefined); -eq("File \"js_json_test.res\", line 311, characters 5-12", Js_json.decodeNumber([])); +eq("File \"js_json_test.res\", line 311, characters 5-12", Js_json.decodeNumber([]), undefined); -eq("File \"js_json_test.res\", line 312, characters 5-12", Js_json.decodeNumber(null)); +eq("File \"js_json_test.res\", line 312, characters 5-12", Js_json.decodeNumber(null), undefined); -eq("File \"js_json_test.res\", line 313, characters 5-12", Js_json.decodeNumber({})); +eq("File \"js_json_test.res\", line 313, characters 5-12", Js_json.decodeNumber({}), undefined); eq("File \"js_json_test.res\", line 314, characters 5-12", Js_json.decodeNumber(1.23), 1.23); -eq("File \"js_json_test.res\", line 318, characters 5-12", Js_json.decodeObject("test")); +eq("File \"js_json_test.res\", line 318, characters 5-12", Js_json.decodeObject("test"), undefined); -eq("File \"js_json_test.res\", line 319, characters 5-12", Js_json.decodeObject(true)); +eq("File \"js_json_test.res\", line 319, characters 5-12", Js_json.decodeObject(true), undefined); -eq("File \"js_json_test.res\", line 320, characters 5-12", Js_json.decodeObject([])); +eq("File \"js_json_test.res\", line 320, characters 5-12", Js_json.decodeObject([]), undefined); -eq("File \"js_json_test.res\", line 321, characters 5-12", Js_json.decodeObject(null)); +eq("File \"js_json_test.res\", line 321, characters 5-12", Js_json.decodeObject(null), undefined); eq("File \"js_json_test.res\", line 322, characters 5-12", Js_json.decodeObject({}), {}); -eq("File \"js_json_test.res\", line 323, characters 5-12", Js_json.decodeObject(1.23)); +eq("File \"js_json_test.res\", line 323, characters 5-12", Js_json.decodeObject(1.23), undefined); -eq("File \"js_json_test.res\", line 327, characters 5-12", Js_json.decodeArray("test")); +eq("File \"js_json_test.res\", line 327, characters 5-12", Js_json.decodeArray("test"), undefined); -eq("File \"js_json_test.res\", line 328, characters 5-12", Js_json.decodeArray(true)); +eq("File \"js_json_test.res\", line 328, characters 5-12", Js_json.decodeArray(true), undefined); eq("File \"js_json_test.res\", line 329, characters 5-12", Js_json.decodeArray([]), []); -eq("File \"js_json_test.res\", line 330, characters 5-12", Js_json.decodeArray(null)); +eq("File \"js_json_test.res\", line 330, characters 5-12", Js_json.decodeArray(null), undefined); -eq("File \"js_json_test.res\", line 331, characters 5-12", Js_json.decodeArray({})); +eq("File \"js_json_test.res\", line 331, characters 5-12", Js_json.decodeArray({}), undefined); -eq("File \"js_json_test.res\", line 332, characters 5-12", Js_json.decodeArray(1.23)); +eq("File \"js_json_test.res\", line 332, characters 5-12", Js_json.decodeArray(1.23), undefined); -eq("File \"js_json_test.res\", line 336, characters 5-12", Js_json.decodeBoolean("test")); +eq("File \"js_json_test.res\", line 336, characters 5-12", Js_json.decodeBoolean("test"), undefined); eq("File \"js_json_test.res\", line 337, characters 5-12", Js_json.decodeBoolean(true), true); -eq("File \"js_json_test.res\", line 338, characters 5-12", Js_json.decodeBoolean([])); +eq("File \"js_json_test.res\", line 338, characters 5-12", Js_json.decodeBoolean([]), undefined); -eq("File \"js_json_test.res\", line 339, characters 5-12", Js_json.decodeBoolean(null)); +eq("File \"js_json_test.res\", line 339, characters 5-12", Js_json.decodeBoolean(null), undefined); -eq("File \"js_json_test.res\", line 340, characters 5-12", Js_json.decodeBoolean({})); +eq("File \"js_json_test.res\", line 340, characters 5-12", Js_json.decodeBoolean({}), undefined); -eq("File \"js_json_test.res\", line 341, characters 5-12", Js_json.decodeBoolean(1.23)); +eq("File \"js_json_test.res\", line 341, characters 5-12", Js_json.decodeBoolean(1.23), undefined); -eq("File \"js_json_test.res\", line 345, characters 5-12", Js_json.decodeNull("test")); +eq("File \"js_json_test.res\", line 345, characters 5-12", Js_json.decodeNull("test"), undefined); -eq("File \"js_json_test.res\", line 346, characters 5-12", Js_json.decodeNull(true)); +eq("File \"js_json_test.res\", line 346, characters 5-12", Js_json.decodeNull(true), undefined); -eq("File \"js_json_test.res\", line 347, characters 5-12", Js_json.decodeNull([])); +eq("File \"js_json_test.res\", line 347, characters 5-12", Js_json.decodeNull([]), undefined); eq("File \"js_json_test.res\", line 348, characters 5-12", Js_json.decodeNull(null), null); -eq("File \"js_json_test.res\", line 349, characters 5-12", Js_json.decodeNull({})); +eq("File \"js_json_test.res\", line 349, characters 5-12", Js_json.decodeNull({}), undefined); -eq("File \"js_json_test.res\", line 350, characters 5-12", Js_json.decodeNull(1.23)); +eq("File \"js_json_test.res\", line 350, characters 5-12", Js_json.decodeNull(1.23), undefined); function id(obj) { return Js_json.deserializeUnsafe(Js_json.serializeExn(obj)); @@ -744,7 +744,7 @@ function idtest(obj) { eq("File \"js_json_test.res\", line 355, characters 23-30", obj, Js_json.deserializeUnsafe(Js_json.serializeExn(obj))); } -idtest(); +idtest(undefined); idtest({ hd: [ diff --git a/jscomp/test/js_null_test.js b/jscomp/test/js_null_test.js index a334b1d07a..2143ef0a8e 100644 --- a/jscomp/test/js_null_test.js +++ b/jscomp/test/js_null_test.js @@ -22,7 +22,7 @@ var suites_1 = { (function (param) { return { TAG: "Eq", - _0: Caml_option.some(), + _0: Caml_option.some(undefined), _1: Caml_option.some() }; }) @@ -127,7 +127,7 @@ var suites_1 = { return { TAG: "Eq", _0: null, - _1: Js_null.fromOption() + _1: Js_null.fromOption(undefined) }; }) ], diff --git a/jscomp/test/js_null_undefined_test.js b/jscomp/test/js_null_undefined_test.js index ee2b8fd9e0..6be2c75510 100644 --- a/jscomp/test/js_null_undefined_test.js +++ b/jscomp/test/js_null_undefined_test.js @@ -231,7 +231,7 @@ var suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_null_undefined.fromOption() + _1: Js_null_undefined.fromOption(undefined) }; }) ], diff --git a/jscomp/test/js_option_test.js b/jscomp/test/js_option_test.js index 76ade6dae5..a5b1571e01 100644 --- a/jscomp/test/js_option_test.js +++ b/jscomp/test/js_option_test.js @@ -81,7 +81,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: false, - _1: Js_option.isSomeValue(simpleEq, 1) + _1: Js_option.isSomeValue(simpleEq, 1, undefined) }; }) ], @@ -125,7 +125,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: false, - _1: Js_option.equal(simpleEq, 1) + _1: Js_option.equal(simpleEq, 1, undefined) }; }) ], @@ -177,7 +177,7 @@ var option_suites_1 = { _0: undefined, _1: Js_option.map((function (a) { return a + 1 | 0; - })) + }), undefined) }; }) ], @@ -199,7 +199,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: 3, - _1: Js_option.getWithDefault(3) + _1: Js_option.getWithDefault(3, undefined) }; }) ], @@ -238,7 +238,7 @@ var option_suites_1 = { _0: undefined, _1: Js_option.filter((function (a) { return a % 3 === 0; - })) + }), undefined) }; }) ], @@ -271,7 +271,7 @@ var option_suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_option.firstSome() + _1: Js_option.firstSome(undefined, undefined) }; }) ], diff --git a/jscomp/test/js_undefined_test.js b/jscomp/test/js_undefined_test.js index 68c9a0d66f..5e86518ff5 100644 --- a/jscomp/test/js_undefined_test.js +++ b/jscomp/test/js_undefined_test.js @@ -127,7 +127,7 @@ var suites_1 = { return { TAG: "Eq", _0: undefined, - _1: Js_undefined.fromOption() + _1: Js_undefined.fromOption(undefined) }; }) ], diff --git a/jscomp/test/large_record_duplication_test.js b/jscomp/test/large_record_duplication_test.js index e8895c31c1..f1942416e2 100644 --- a/jscomp/test/large_record_duplication_test.js +++ b/jscomp/test/large_record_duplication_test.js @@ -199,7 +199,7 @@ eq("File \"large_record_duplication_test.res\", line 276, characters 3-10", get_ eq("File \"large_record_duplication_test.res\", line 277, characters 3-10", get_x0$2({ RE_EXN_ID: "Not_found" - })); + }), undefined); Mt.from_pair_suites("Large_record_duplication_test", suites.contents); diff --git a/jscomp/test/lazy_test.js b/jscomp/test/lazy_test.js index 8ebe8dbab2..59956c4420 100644 --- a/jscomp/test/lazy_test.js +++ b/jscomp/test/lazy_test.js @@ -76,7 +76,7 @@ var a3 = CamlinternalLazy.from_val(3); var a4 = CamlinternalLazy.from_val(3); -var a5 = CamlinternalLazy.from_val(); +var a5 = CamlinternalLazy.from_val(undefined); var a6 = CamlinternalLazy.from_val(); diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index e3cab7205a..a93a34a8c1 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -3153,7 +3153,7 @@ function compile(r) { hd: { TAG: "Sem", _0: "Shortest", - _1: repn(any, 0) + _1: repn(any, 0, undefined) }, tl: { hd: { @@ -4100,10 +4100,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { var piece = function (param) { var r = atom(); if (accept(/* '*' */42)) { - return greedy_mod(repn(r, 0)); + return greedy_mod(repn(r, 0, undefined)); } if (accept(/* '+' */43)) { - return greedy_mod(repn(r, 1)); + return greedy_mod(repn(r, 1, undefined)); } if (accept(/* '?' */63)) { return greedy_mod(repn(r, 0, 1)); diff --git a/jscomp/test/option_repr_test.js b/jscomp/test/option_repr_test.js index 86fc8bde17..960648b34a 100644 --- a/jscomp/test/option_repr_test.js +++ b/jscomp/test/option_repr_test.js @@ -73,7 +73,7 @@ function f6(a) { return true; } -var f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some()))); +var f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some(undefined)))); var f11 = Caml_option.some(f10); @@ -129,11 +129,11 @@ b("File \"option_repr_test.res\", line 93, characters 4-11", Caml_obj.lessthan(u b("File \"option_repr_test.res\", line 94, characters 4-11", !Caml_obj.greaterthan(undefined, null)); -b("File \"option_repr_test.res\", line 95, characters 4-11", Caml_obj.greaterthan(null)); +b("File \"option_repr_test.res\", line 95, characters 4-11", Caml_obj.greaterthan(null, undefined)); -b("File \"option_repr_test.res\", line 96, characters 4-11", Caml_obj.lessthan(undefined, Caml_option.some())); +b("File \"option_repr_test.res\", line 96, characters 4-11", Caml_obj.lessthan(undefined, Caml_option.some(undefined))); -b("File \"option_repr_test.res\", line 97, characters 4-11", Caml_obj.greaterthan(Caml_option.some())); +b("File \"option_repr_test.res\", line 97, characters 4-11", Caml_obj.greaterthan(Caml_option.some(undefined), undefined)); console.log(6); @@ -175,7 +175,7 @@ function all_true(xs) { })); } -var xs_0 = gtx(Caml_option.some(null), Caml_option.some()); +var xs_0 = gtx(Caml_option.some(null), Caml_option.some(undefined)); var xs = { hd: xs_0, @@ -186,22 +186,22 @@ b("File \"option_repr_test.res\", line 125, characters 8-15", Belt_List.every(xs return x; }))); -var xs_0$1 = ltx(Caml_option.some(), 3); +var xs_0$1 = ltx(Caml_option.some(undefined), 3); var xs_1 = { - hd: ltx(Caml_option.some(), Caml_option.some(Caml_option.some())), + hd: ltx(Caml_option.some(undefined), Caml_option.some(Caml_option.some(undefined))), tl: { - hd: ltx(Caml_option.some(), "3"), + hd: ltx(Caml_option.some(undefined), "3"), tl: { - hd: ltx(Caml_option.some(), true), + hd: ltx(Caml_option.some(undefined), true), tl: { - hd: ltx(Caml_option.some(), false), + hd: ltx(Caml_option.some(undefined), false), tl: { hd: ltx(false, true), tl: { hd: ltx(false, true), tl: { - hd: ltx(undefined, Caml_option.some()), + hd: ltx(undefined, Caml_option.some(undefined)), tl: { hd: ltx(undefined, null), tl: { @@ -231,16 +231,16 @@ b("File \"option_repr_test.res\", line 128, characters 4-11", Belt_List.every(xs return x; }))); -var xs_0$2 = eqx(); +var xs_0$2 = eqx(undefined, undefined); var xs_1$1 = { hd: neqx(undefined, null), tl: { - hd: eqx(Caml_option.some(), Caml_option.some()), + hd: eqx(Caml_option.some(undefined), Caml_option.some(undefined)), tl: { - hd: eqx(Caml_option.some(Caml_option.some()), Caml_option.some(Caml_option.some())), + hd: eqx(Caml_option.some(Caml_option.some(undefined)), Caml_option.some(Caml_option.some(undefined))), tl: { - hd: neqx(Caml_option.some(Caml_option.some(Caml_option.some())), Caml_option.some(Caml_option.some())), + hd: neqx(Caml_option.some(Caml_option.some(Caml_option.some(undefined))), Caml_option.some(Caml_option.some(undefined))), tl: /* [] */0 } } @@ -273,9 +273,9 @@ Mt.from_pair_suites("Option_repr_test", suites.contents); var f7; -var f8 = Caml_option.some(); +var f8 = Caml_option.some(undefined); -var f9 = Caml_option.some(Caml_option.some()); +var f9 = Caml_option.some(Caml_option.some(undefined)); var N; diff --git a/jscomp/test/record_regression.js b/jscomp/test/record_regression.js index 8008ffd312..a409a3a88d 100644 --- a/jscomp/test/record_regression.js +++ b/jscomp/test/record_regression.js @@ -15,11 +15,11 @@ newrecord.y = 3; var newrecord$1 = Caml_obj.obj_dup(newrecord); -newrecord$1.yy = Caml_option.some(); +newrecord$1.yy = Caml_option.some(undefined); var theseTwoShouldBeIdentical = [ newrecord$1.yy, - Caml_option.some() + Caml_option.some(undefined) ]; var v = { diff --git a/jscomp/test/test_zero_nullable.js b/jscomp/test/test_zero_nullable.js index 5991848e0b..8feee60e84 100644 --- a/jscomp/test/test_zero_nullable.js +++ b/jscomp/test/test_zero_nullable.js @@ -85,7 +85,7 @@ function f8(x) { } } -var u = f8(); +var u = f8(undefined); function f9(x) { if (x === null) { @@ -170,7 +170,7 @@ function f8$1(x) { } } -var u$1 = f8$1(); +var u$1 = f8$1(undefined); function f9$1(x) { if (x === undefined) { @@ -253,7 +253,7 @@ function f8$2(x) { } } -var u$2 = f8$2(); +var u$2 = f8$2(undefined); function f9$2(x) { if (x == null) { diff --git a/jscomp/test/uncurried_default.args.js b/jscomp/test/uncurried_default.args.js index 7bae8a7e39..1c24e3b6dc 100644 --- a/jscomp/test/uncurried_default.args.js +++ b/jscomp/test/uncurried_default.args.js @@ -36,7 +36,7 @@ function foo2(y, xOpt, zOpt) { return (x + y | 0) + z | 0; } -var r2 = foo2(11); +var r2 = foo2(11, undefined, undefined); function foo3(xOpt, yOpt) { var x = xOpt !== undefined ? xOpt : 3; @@ -44,7 +44,7 @@ function foo3(xOpt, yOpt) { return x + y | 0; } -var r3 = foo3(); +var r3 = foo3(undefined, undefined); var StandardNotation = { withOpt: withOpt, @@ -92,7 +92,7 @@ function foo2$1(y, xOpt, zOpt) { return (x + y | 0) + z | 0; } -var r2$1 = foo2$1(11); +var r2$1 = foo2$1(11, undefined, undefined); function foo3$1(xOpt, yOpt) { var x = xOpt !== undefined ? xOpt : 3; @@ -100,7 +100,7 @@ function foo3$1(xOpt, yOpt) { return x + y | 0; } -var r3$1 = foo3$1(); +var r3$1 = foo3$1(undefined, undefined); function foo(func) { return func() + 1 | 0; diff --git a/jscomp/test/unit_undefined_test.js b/jscomp/test/unit_undefined_test.js index bb3f16dcd6..4a43c971bb 100644 --- a/jscomp/test/unit_undefined_test.js +++ b/jscomp/test/unit_undefined_test.js @@ -46,23 +46,23 @@ function u0(x) { return Caml_option.some(x); } -var u1 = Caml_option.some(); +var u1 = Caml_option.some(undefined); function u2(x) { return Caml_option.some(x); } -var u3 = Caml_option.some(); +var u3 = Caml_option.some(undefined); -eq("File \"unit_undefined_test.res\", line 41, characters 3-10", Caml_option.some(), Caml_option.some()); +eq("File \"unit_undefined_test.res\", line 41, characters 3-10", Caml_option.some(), Caml_option.some(undefined)); -eq("File \"unit_undefined_test.res\", line 42, characters 3-10", u1, Caml_option.some()); +eq("File \"unit_undefined_test.res\", line 42, characters 3-10", u1, Caml_option.some(undefined)); -eq("File \"unit_undefined_test.res\", line 43, characters 3-10", Caml_option.some(), Caml_option.some()); +eq("File \"unit_undefined_test.res\", line 43, characters 3-10", Caml_option.some(), Caml_option.some(undefined)); -eq("File \"unit_undefined_test.res\", line 44, characters 3-10", u3, Caml_option.some()); +eq("File \"unit_undefined_test.res\", line 44, characters 3-10", u3, Caml_option.some(undefined)); -eq("File \"unit_undefined_test.res\", line 45, characters 3-10", undefined); +eq("File \"unit_undefined_test.res\", line 45, characters 3-10", undefined, undefined); Mt.from_pair_suites("unit_undefined_test.res", suites.contents); diff --git a/lib/es6/belt_MapDict.js b/lib/es6/belt_MapDict.js index 52fd0ba2c6..2d93c85ba8 100644 --- a/lib/es6/belt_MapDict.js +++ b/lib/es6/belt_MapDict.js @@ -67,7 +67,7 @@ function updateU(t, newK, f, cmp) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var newD$1 = f(); + var newD$1 = f(undefined); if (newD$1 !== undefined) { return Belt_internalAVLtree.singleton(newK, Caml_option.valFromOption(newD$1)); } else { @@ -210,7 +210,7 @@ function mergeU(s1, s2, f, cmp) { } if (s2 === undefined) { return Belt_internalAVLtree.keepMapU(s1, (function (k, v) { - return f(k, Caml_option.some(v)); + return f(k, Caml_option.some(v), undefined); })); } if (s1.h >= s2.h) { diff --git a/lib/es6/belt_MapInt.js b/lib/es6/belt_MapInt.js index 0b7db40af0..97f186d141 100644 --- a/lib/es6/belt_MapInt.js +++ b/lib/es6/belt_MapInt.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MapString.js b/lib/es6/belt_MapString.js index 3eee917c5a..b6e5e05671 100644 --- a/lib/es6/belt_MapString.js +++ b/lib/es6/belt_MapString.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMap.js b/lib/es6/belt_MutableMap.js index 7169df264a..f12cf3fa0d 100644 --- a/lib/es6/belt_MutableMap.js +++ b/lib/es6/belt_MutableMap.js @@ -118,7 +118,7 @@ function updateDone(t, x, f, cmp) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMapInt.js b/lib/es6/belt_MutableMapInt.js index 4435378074..6dbcb14769 100644 --- a/lib/es6/belt_MutableMapInt.js +++ b/lib/es6/belt_MutableMapInt.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_MutableMapString.js b/lib/es6/belt_MutableMapString.js index 9741762954..8d1fe7a578 100644 --- a/lib/es6/belt_MutableMapString.js +++ b/lib/es6/belt_MutableMapString.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index 74c4332d30..fa889cc4be 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -674,7 +674,7 @@ function subset(_s1, _s2, cmp) { continue ; } if (c < 0) { - if (!subset(create(l1, v1), l2, cmp)) { + if (!subset(create(l1, v1, undefined), l2, cmp)) { return false; } _s1 = r1; diff --git a/lib/es6/belt_internalSetInt.js b/lib/es6/belt_internalSetInt.js index 133c4bc1be..6a271f0021 100644 --- a/lib/es6/belt_internalSetInt.js +++ b/lib/es6/belt_internalSetInt.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { return false; } _s1 = r1; diff --git a/lib/es6/belt_internalSetString.js b/lib/es6/belt_internalSetString.js index 50f5268581..bd5096a72d 100644 --- a/lib/es6/belt_internalSetString.js +++ b/lib/es6/belt_internalSetString.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { return false; } _s1 = r1; diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 7d50d1cf86..1e590cefe3 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -91,7 +91,7 @@ function get_data(count, _d) { _1: d }; } else { - g.curr = Caml_option.some(); + g.curr = Caml_option.some(undefined); return "Sempty"; } diff --git a/lib/js/belt_MapDict.js b/lib/js/belt_MapDict.js index 2642de5e85..ea4e1a614b 100644 --- a/lib/js/belt_MapDict.js +++ b/lib/js/belt_MapDict.js @@ -67,7 +67,7 @@ function updateU(t, newK, f, cmp) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var newD$1 = f(); + var newD$1 = f(undefined); if (newD$1 !== undefined) { return Belt_internalAVLtree.singleton(newK, Caml_option.valFromOption(newD$1)); } else { @@ -210,7 +210,7 @@ function mergeU(s1, s2, f, cmp) { } if (s2 === undefined) { return Belt_internalAVLtree.keepMapU(s1, (function (k, v) { - return f(k, Caml_option.some(v)); + return f(k, Caml_option.some(v), undefined); })); } if (s1.h >= s2.h) { diff --git a/lib/js/belt_MapInt.js b/lib/js/belt_MapInt.js index 632c82f3f3..05bcf2fd5e 100644 --- a/lib/js/belt_MapInt.js +++ b/lib/js/belt_MapInt.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MapString.js b/lib/js/belt_MapString.js index b4ebf3d570..aac72f8822 100644 --- a/lib/js/belt_MapString.js +++ b/lib/js/belt_MapString.js @@ -64,7 +64,7 @@ function updateU(t, x, f) { return Belt_internalAVLtree.bal(l$1, k, v, rr); } } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMap.js b/lib/js/belt_MutableMap.js index 4ec12d1930..fd49cf330d 100644 --- a/lib/js/belt_MutableMap.js +++ b/lib/js/belt_MutableMap.js @@ -118,7 +118,7 @@ function updateDone(t, x, f, cmp) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMapInt.js b/lib/js/belt_MutableMapInt.js index 91ad5ff572..b1f05685ee 100644 --- a/lib/js/belt_MutableMapInt.js +++ b/lib/js/belt_MutableMapInt.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_MutableMapString.js b/lib/js/belt_MutableMapString.js index d49c7df851..372ad59574 100644 --- a/lib/js/belt_MutableMapString.js +++ b/lib/js/belt_MutableMapString.js @@ -221,7 +221,7 @@ function updateDone(t, x, f) { } return Belt_internalAVLtree.balMutate(t); } - var data$1 = f(); + var data$1 = f(undefined); if (data$1 !== undefined) { return Belt_internalAVLtree.singleton(x, Caml_option.valFromOption(data$1)); } else { diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index 6d9edd0d63..8140346f0c 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -674,7 +674,7 @@ function subset(_s1, _s2, cmp) { continue ; } if (c < 0) { - if (!subset(create(l1, v1), l2, cmp)) { + if (!subset(create(l1, v1, undefined), l2, cmp)) { return false; } _s1 = r1; diff --git a/lib/js/belt_internalSetInt.js b/lib/js/belt_internalSetInt.js index 8368b94980..32d5a313de 100644 --- a/lib/js/belt_internalSetInt.js +++ b/lib/js/belt_internalSetInt.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { return false; } _s1 = r1; diff --git a/lib/js/belt_internalSetString.js b/lib/js/belt_internalSetString.js index c4a017808a..e29bec2363 100644 --- a/lib/js/belt_internalSetString.js +++ b/lib/js/belt_internalSetString.js @@ -86,7 +86,7 @@ function subset(_s1, _s2) { continue ; } if (v1 < v2) { - if (!subset(Belt_internalAVLset.create(l1, v1), l2)) { + if (!subset(Belt_internalAVLset.create(l1, v1, undefined), l2)) { return false; } _s1 = r1; diff --git a/lib/js/stream.js b/lib/js/stream.js index 79e4409e39..324cf40805 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -91,7 +91,7 @@ function get_data(count, _d) { _1: d }; } else { - g.curr = Caml_option.some(); + g.curr = Caml_option.some(undefined); return "Sempty"; } From 2ee6795378b2169bb99f7a7042141f764677ddae Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 26 Feb 2024 18:16:34 +0100 Subject: [PATCH 3/5] revert change --- jscomp/core/js_dump.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 4f2bf18f05..ec73230a6b 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -576,10 +576,9 @@ and expression_desc cxt ~(level : int) f x : cxt = | [e] when e.expression_desc = Undefined {isUnit = true} -> (* omit passing undefined when the call is f() *) [] - | _ -> - el - in - arguments cxt f el) + | _ -> + el in + arguments cxt f el) | _, _ -> let len = List.length el in if 1 <= len && len <= 8 then ( From 543f7c01cc2aa900d5bca85af0cc78997fc3693e Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 26 Feb 2024 18:17:51 +0100 Subject: [PATCH 4/5] revert change --- jscomp/core/js_dump.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index ec73230a6b..09514211bc 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -578,7 +578,7 @@ and expression_desc cxt ~(level : int) f x : cxt = [] | _ -> el in - arguments cxt f el) + arguments cxt f el) | _, _ -> let len = List.length el in if 1 <= len && len <= 8 then ( From e720b4a35060f13bc7e4446064a3bc53086494ae Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Mon, 26 Feb 2024 18:25:11 +0100 Subject: [PATCH 5/5] only apply optimization on optional args --- jscomp/core/lam_compile_external_call.ml | 17 +++++++++-------- jscomp/test/bs_unwrap_test.js | 6 +++--- jscomp/test/js_json_test.js | 2 +- jscomp/test/option_repr_test.js | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/jscomp/core/lam_compile_external_call.ml b/jscomp/core/lam_compile_external_call.ml index 245a4fb203..e5fe1f0a2f 100644 --- a/jscomp/core/lam_compile_external_call.ml +++ b/jscomp/core/lam_compile_external_call.ml @@ -271,15 +271,16 @@ let translate_ffi (cxt : Lam_compile_context.t) arg_types else E.call ~info:{ arity = Full; call_info = Call_na } fn args) else let args, eff = assemble_args_no_splice arg_types args in - let rec keepNonUndefinedArgs argsList = ( - match argsList with - | {J.expression_desc=Undefined {isUnit = false}; _} :: rest -> keepNonUndefinedArgs rest + let rec keepNonUndefinedArgs argsList (argTypes : specs) = + match (argsList, argTypes) with + | ( {J.expression_desc = Undefined {isUnit = false}; _} :: rest, + {External_arg_spec.arg_label = Arg_optional; _} :: argTypes ) -> + keepNonUndefinedArgs rest argTypes | _ -> argsList - ) in - let args = args - |> List.rev - |> keepNonUndefinedArgs - |> List.rev in + in + let args = + keepNonUndefinedArgs (List.rev args) (List.rev arg_types) |> List.rev + in add_eff eff @@ E.call ~info:{ arity = Full; call_info = Call_na } fn args | Js_module_as_fn { external_module_name; splice } -> diff --git a/jscomp/test/bs_unwrap_test.js b/jscomp/test/bs_unwrap_test.js index b029601bf9..b020cf41f4 100644 --- a/jscomp/test/bs_unwrap_test.js +++ b/jscomp/test/bs_unwrap_test.js @@ -32,13 +32,13 @@ console.log(arg_pair.VAL); console.log(); -console.log(1); +console.log(1, undefined); console.log(2, "hi"); console.log(3, "hi"); -console.log(4); +console.log(4, undefined); var some_arg = { NAME: "Bool", @@ -47,7 +47,7 @@ var some_arg = { console.log(5, Caml_option.option_unwrap(some_arg)); -console.log(6); +console.log(6, undefined); console.log(7, Caml_option.option_unwrap((console.log("trace"), undefined))); diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 3da48724f8..8068a48e4c 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -662,7 +662,7 @@ eq("File \"js_json_test.res\", line 290, characters 2-9", JSON.stringify({ eq("File \"js_json_test.res\", line 295, characters 12-19", JSON.stringify(null), "null"); -eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify(), undefined); +eq("File \"js_json_test.res\", line 297, characters 12-19", JSON.stringify(undefined), undefined); eq("File \"js_json_test.res\", line 300, characters 5-12", Js_json.decodeString("test"), "test"); diff --git a/jscomp/test/option_repr_test.js b/jscomp/test/option_repr_test.js index 960648b34a..a9cf2b9eb8 100644 --- a/jscomp/test/option_repr_test.js +++ b/jscomp/test/option_repr_test.js @@ -135,7 +135,7 @@ b("File \"option_repr_test.res\", line 96, characters 4-11", Caml_obj.lessthan(u b("File \"option_repr_test.res\", line 97, characters 4-11", Caml_obj.greaterthan(Caml_option.some(undefined), undefined)); -console.log(6); +console.log(6, undefined); function ltx(a, b) { if (Caml_obj.lessthan(a, b)) {