From f7dba5b6355cea4baae46b4d9ddc34691b6ddd80 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 13:39:37 +0400 Subject: [PATCH 01/18] Fix js dump --- jscomp/core/js_dump.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 99a473bcc4..2285cedeb0 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -1224,10 +1224,9 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = match ctch with | None -> cxt | Some (i, b) -> - P.newline f; - P.string f "catch ("; + P.string f " catch ("; let cxt = Ext_pp_scope.ident cxt f i in - P.string f ")"; + P.string f ") "; brace_block cxt f b in match fin with From a3deabe21a25e8a672e2f0675b41a2fc209ddce6 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 13:39:48 +0400 Subject: [PATCH 02/18] Commit compiled test files --- jscomp/runtime/release.ninja | 6 ++-- jscomp/test/406_primitive_test.js | 3 +- jscomp/test/array_safe_get.js | 3 +- jscomp/test/array_test.js | 3 +- jscomp/test/bs_queue_test.js | 3 +- jscomp/test/caml_compare_test.js | 3 +- jscomp/test/custom_error_test.js | 12 +++---- jscomp/test/equal_exception_test.js | 9 ++---- jscomp/test/exception_raise_test.js | 33 +++++++------------ jscomp/test/exception_rebound_err_test.js | 6 ++-- jscomp/test/exception_value_test.js | 9 ++---- jscomp/test/ext_bytes_test.js | 3 +- jscomp/test/ext_filename_test.js | 6 ++-- jscomp/test/ext_pervasives_test.js | 9 ++---- jscomp/test/ext_string_test.js | 6 ++-- jscomp/test/genlex_test.js | 3 +- jscomp/test/gpr_1245_test.js | 3 +- jscomp/test/gpr_1701_test.js | 15 +++------ jscomp/test/gpr_1760_test.js | 18 ++++------- jscomp/test/gpr_2316_test.js | 6 ++-- jscomp/test/gpr_405_test.js | 3 +- jscomp/test/js_exception_catch_test.js | 6 ++-- jscomp/test/js_json_test.js | 3 +- jscomp/test/jsoo_400_test.js | 3 +- jscomp/test/libqueue_test.js | 3 +- jscomp/test/ocaml_re_test.js | 21 ++++-------- jscomp/test/record_extension_test.js | 3 +- jscomp/test/recursive_module.js | 6 ++-- jscomp/test/sexp.js | 3 +- jscomp/test/sexpm.js | 3 +- jscomp/test/stack_comp_test.js | 3 +- jscomp/test/stream_parser_test.js | 6 ++-- jscomp/test/string_test.js | 6 ++-- jscomp/test/test_exception_escape.js | 3 +- jscomp/test/test_match_exception.js | 3 +- jscomp/test/test_seq.js | 6 ++-- jscomp/test/test_string_const.js | 3 +- jscomp/test/test_trywith.js | 30 ++++++----------- jscomp/test/ticker.js | 3 +- jscomp/test/topsort_test.js | 3 +- jscomp/test/variant.js | 6 ++-- lib/es6/arg.js | 39 ++++++++--------------- lib/es6/array.js | 6 ++-- lib/es6/arrayLabels.js | 6 ++-- lib/es6/bytes.js | 6 ++-- lib/es6/bytesLabels.js | 6 ++-- lib/es6/camlinternalLazy.js | 3 +- lib/es6/filename.js | 6 ++-- lib/es6/genlex.js | 15 +++------ lib/es6/hashtbl.js | 9 ++---- lib/es6/int32.js | 3 +- lib/es6/int64.js | 3 +- lib/es6/parsing.js | 6 ++-- lib/es6/pervasives.js | 6 ++-- lib/es6/string.js | 6 ++-- lib/es6/stringLabels.js | 6 ++-- lib/js/arg.js | 39 ++++++++--------------- lib/js/array.js | 6 ++-- lib/js/arrayLabels.js | 6 ++-- lib/js/bytes.js | 6 ++-- lib/js/bytesLabels.js | 6 ++-- lib/js/camlinternalLazy.js | 3 +- lib/js/filename.js | 6 ++-- lib/js/genlex.js | 15 +++------ lib/js/hashtbl.js | 9 ++---- lib/js/int32.js | 3 +- lib/js/int64.js | 3 +- lib/js/parsing.js | 6 ++-- lib/js/pervasives.js | 6 ++-- lib/js/string.js | 6 ++-- lib/js/stringLabels.js | 6 ++-- 71 files changed, 180 insertions(+), 357 deletions(-) diff --git a/jscomp/runtime/release.ninja b/jscomp/runtime/release.ninja index 9b7f58df4c..b848fd71bc 100644 --- a/jscomp/runtime/release.ninja +++ b/jscomp/runtime/release.ninja @@ -25,7 +25,7 @@ o runtime/caml_exceptions.cmj : cc_cmi runtime/caml_exceptions.res | runtime/cam o runtime/caml_exceptions.cmi : cc runtime/caml_exceptions.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_float.cmj : cc_cmi runtime/caml_float.res | runtime/caml_float.cmi runtime/caml_float_extern.cmj o runtime/caml_float.cmi : cc runtime/caml_float.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_format.cmj : cc_cmi runtime/caml_format.res | runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_format.cmi runtime/caml_int64.cmj runtime/caml_int64_extern.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj +o runtime/caml_format.cmj : cc_cmi runtime/caml_format.res | runtime/caml.cmj runtime/caml_float.cmj runtime/caml_float_extern.cmj runtime/caml_format.cmi runtime/caml_int64.cmj runtime/caml_int64_extern.cmj runtime/caml_nativeint_extern.cmj runtime/caml_string_extern.cmj o runtime/caml_format.cmi : cc runtime/caml_format.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_hash.cmj : cc_cmi runtime/caml_hash.res | runtime/caml_hash.cmi runtime/caml_hash_primitive.cmj runtime/caml_nativeint_extern.cmj o runtime/caml_hash.cmi : cc runtime/caml_hash.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj @@ -41,7 +41,7 @@ o runtime/caml_md5.cmj : cc_cmi runtime/caml_md5.res | runtime/caml_array_extern o runtime/caml_md5.cmi : cc runtime/caml_md5.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_module.cmj : cc_cmi runtime/caml_module.res | runtime/caml_array_extern.cmj runtime/caml_module.cmi runtime/caml_obj.cmj o runtime/caml_module.cmi : cc runtime/caml_module.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_obj.cmj : cc_cmi runtime/caml_obj.res | runtime/caml_array_extern.cmj runtime/caml_obj.cmi runtime/caml_option.cmj +o runtime/caml_obj.cmj : cc_cmi runtime/caml_obj.res | runtime/caml.cmj runtime/caml_array_extern.cmj runtime/caml_obj.cmi runtime/caml_option.cmj o runtime/caml_obj.cmi : cc runtime/caml_obj.resi | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_option.cmj : cc_cmi runtime/caml_option.res | runtime/caml_option.cmi runtime/caml_undefined_extern.cmj o runtime/caml_option.cmi : cc runtime/caml_option.resi | runtime/bs_stdlib_mini.cmi runtime/caml_undefined_extern.cmj runtime/js.cmi runtime/js.cmj @@ -57,7 +57,7 @@ o runtime/caml_array_extern.cmi runtime/caml_array_extern.cmj : cc runtime/caml_ o runtime/caml_bigint_extern.cmi runtime/caml_bigint_extern.cmj : cc runtime/caml_bigint_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_float_extern.cmi runtime/caml_float_extern.cmj : cc runtime/caml_float_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_int64_extern.cmi runtime/caml_int64_extern.cmj : cc runtime/caml_int64_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj -o runtime/caml_js_exceptions.cmi runtime/caml_js_exceptions.cmj : cc runtime/caml_js_exceptions.res | runtime/bs_stdlib_mini.cmi runtime/caml_exceptions.cmj runtime/js.cmi runtime/js.cmj +o runtime/caml_js_exceptions.cmi runtime/caml_js_exceptions.cmj : cc runtime/caml_js_exceptions.res | runtime/bs_stdlib_mini.cmi runtime/caml_exceptions.cmj runtime/caml_option.cmj runtime/js.cmi runtime/js.cmj o runtime/caml_nativeint_extern.cmi runtime/caml_nativeint_extern.cmj : cc runtime/caml_nativeint_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_string_extern.cmi runtime/caml_string_extern.cmj : cc runtime/caml_string_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj o runtime/caml_undefined_extern.cmi runtime/caml_undefined_extern.cmj : cc runtime/caml_undefined_extern.res | runtime/bs_stdlib_mini.cmi runtime/js.cmi runtime/js.cmj diff --git a/jscomp/test/406_primitive_test.js b/jscomp/test/406_primitive_test.js index a1b63dd5ff..87114ada18 100644 --- a/jscomp/test/406_primitive_test.js +++ b/jscomp/test/406_primitive_test.js @@ -44,8 +44,7 @@ function f() { } return; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === A) { return; diff --git a/jscomp/test/array_safe_get.js b/jscomp/test/array_safe_get.js index fe009ae40c..9c1f40bc06 100644 --- a/jscomp/test/array_safe_get.js +++ b/jscomp/test/array_safe_get.js @@ -13,8 +13,7 @@ let y; try { y = Caml_array.get(x, 3); -} -catch (raw_msg){ +} catch (raw_msg) { let msg = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg.RE_EXN_ID === "Invalid_argument") { console.log(msg._1); diff --git a/jscomp/test/array_test.js b/jscomp/test/array_test.js index 8e971d222b..a3d5f169a3 100644 --- a/jscomp/test/array_test.js +++ b/jscomp/test/array_test.js @@ -29,8 +29,7 @@ function starts_with(xs, prefix, p) { } return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === H) { return false; diff --git a/jscomp/test/bs_queue_test.js b/jscomp/test/bs_queue_test.js index a57ca4a829..1bb2a3472d 100644 --- a/jscomp/test/bs_queue_test.js +++ b/jscomp/test/bs_queue_test.js @@ -26,8 +26,7 @@ function does_raise(f, q) { try { f(q); return false; - } - catch (exn){ + } catch (exn) { return true; } } diff --git a/jscomp/test/caml_compare_test.js b/jscomp/test/caml_compare_test.js index 1fe8a2fb37..2df1c2ab5b 100644 --- a/jscomp/test/caml_compare_test.js +++ b/jscomp/test/caml_compare_test.js @@ -13,8 +13,7 @@ try { }), (function (x) { return x + 2 | 0; })); -} -catch (raw_exn){ +} catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); function_equal_test = exn.RE_EXN_ID === "Invalid_argument" && exn._1 === "equal: functional value" ? true : false; } diff --git a/jscomp/test/custom_error_test.js b/jscomp/test/custom_error_test.js index e126b6f346..8384688a2c 100644 --- a/jscomp/test/custom_error_test.js +++ b/jscomp/test/custom_error_test.js @@ -8,8 +8,7 @@ function test_js_error() { let e; try { e = JSON.parse(" {\"x\" : }"); - } - catch (raw_err){ + } catch (raw_err) { let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.RE_EXN_ID === Js_exn.$$Error) { console.log(err._1.stack); @@ -25,8 +24,7 @@ function test_js_error() { function test_js_error2() { try { return JSON.parse(" {\"x\" : }"); - } - catch (raw_e){ + } catch (raw_e) { let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.RE_EXN_ID === Js_exn.$$Error) { console.log(e._1.stack); @@ -44,8 +42,7 @@ function example1() { let v; try { v = JSON.parse(" {\"x\" }"); - } - catch (raw_err){ + } catch (raw_err) { let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.RE_EXN_ID === Js_exn.$$Error) { console.log(err._1.stack); @@ -61,8 +58,7 @@ function example1() { function example2() { try { return JSON.parse(" {\"x\"}"); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Js_exn.$$Error) { return; diff --git a/jscomp/test/equal_exception_test.js b/jscomp/test/equal_exception_test.js index 082585d43c..f407bef1a2 100644 --- a/jscomp/test/equal_exception_test.js +++ b/jscomp/test/equal_exception_test.js @@ -72,8 +72,7 @@ function is_exception() { RE_EXN_ID: "Not_found" } }); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return; @@ -94,8 +93,7 @@ function is_normal_exception(_x) { throw new Error(v.RE_EXN_ID, { cause: v }); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === A) { if (exn._1 === 3) { @@ -119,8 +117,7 @@ function is_arbitrary_exception() { RE_EXN_ID: A } }); - } - catch (exn){ + } catch (exn) { return; } } diff --git a/jscomp/test/exception_raise_test.js b/jscomp/test/exception_raise_test.js index e46937b21b..7e5c56ec42 100644 --- a/jscomp/test/exception_raise_test.js +++ b/jscomp/test/exception_raise_test.js @@ -19,8 +19,7 @@ function appf(g, x) { let A = /* @__PURE__ */Caml_exceptions.create("A"); try { return g(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Local) { return 3; @@ -63,8 +62,7 @@ let f; try { f = (function () {throw (new Error ("x"))} ()); -} -catch (raw_x){ +} catch (raw_x) { let x = Caml_js_exceptions.internalToOCamlException(raw_x); f = x.RE_EXN_ID === A ? x._1 : 2; } @@ -73,8 +71,7 @@ let ff; try { ff = (function () {throw 3} ()); -} -catch (raw_x$1){ +} catch (raw_x$1) { let x$1 = Caml_js_exceptions.internalToOCamlException(raw_x$1); ff = x$1.RE_EXN_ID === A ? x$1._1 : 2; } @@ -83,8 +80,7 @@ let fff; try { fff = (function () {throw 2} ()); -} -catch (raw_x$2){ +} catch (raw_x$2) { let x$2 = Caml_js_exceptions.internalToOCamlException(raw_x$2); fff = x$2.RE_EXN_ID === A ? x$2._1 : 2; } @@ -93,8 +89,7 @@ let a0; try { a0 = (function (){throw 2} ()); -} -catch (raw_x$3){ +} catch (raw_x$3) { let x$3 = Caml_js_exceptions.internalToOCamlException(raw_x$3); if (x$3.RE_EXN_ID === A || x$3.RE_EXN_ID === Js_exn.$$Error) { a0 = x$3._1; @@ -116,8 +111,7 @@ let a1; try { a1 = (function (){throw 2} ()); -} -catch (raw_e){ +} catch (raw_e) { a1 = Caml_js_exceptions.internalToOCamlException(raw_e); } @@ -125,8 +119,7 @@ let a2; try { a2 = (function (){throw (new Error("x"))} ()); -} -catch (raw_e$1){ +} catch (raw_e$1) { a2 = Caml_js_exceptions.internalToOCamlException(raw_e$1); } @@ -190,8 +183,7 @@ function eq(loc, x, y) { try { ((()=>{throw 2})()); -} -catch (raw_e$2){ +} catch (raw_e$2) { let e = Caml_js_exceptions.internalToOCamlException(raw_e$2); eq("File \"exception_raise_test.res\", line 137, characters 10-17", Caml_js_exceptions.as_js_exn(e) !== undefined, true); } @@ -202,8 +194,7 @@ try { RE_EXN_ID: "Not_found" } }); -} -catch (raw_e$3){ +} catch (raw_e$3) { let e$1 = Caml_js_exceptions.internalToOCamlException(raw_e$3); eq("File \"exception_raise_test.res\", line 141, characters 10-17", Caml_js_exceptions.as_js_exn(e$1) !== undefined, false); } @@ -212,8 +203,7 @@ function fff0(x, g) { let val; try { val = x(); - } - catch (exn){ + } catch (exn) { return 1; } return g(); @@ -225,8 +215,7 @@ function input_lines(ic, _acc) { let line; try { line = input_line(ic); - } - catch (exn){ + } catch (exn) { return List.rev(acc); } _acc = { diff --git a/jscomp/test/exception_rebound_err_test.js b/jscomp/test/exception_rebound_err_test.js index 3c0843c748..294a4f07e4 100644 --- a/jscomp/test/exception_rebound_err_test.js +++ b/jscomp/test/exception_rebound_err_test.js @@ -40,8 +40,7 @@ function test_js_error4() { try { JSON.parse(" {\"x\"}"); return 1; - } - catch (raw_e){ + } catch (raw_e) { let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.RE_EXN_ID === "Not_found") { return 2; @@ -68,8 +67,7 @@ function test_js_error4() { function f(g) { try { return g(); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return 1; diff --git a/jscomp/test/exception_value_test.js b/jscomp/test/exception_value_test.js index a48c45483f..83bab66c11 100644 --- a/jscomp/test/exception_value_test.js +++ b/jscomp/test/exception_value_test.js @@ -51,8 +51,7 @@ let u = { function test_not_found(f, param) { try { return f(); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return 2; @@ -66,8 +65,7 @@ function test_not_found(f, param) { function test_js_error2() { try { return JSON.parse(" {\"x\" : }"); - } - catch (raw_e){ + } catch (raw_e) { let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.RE_EXN_ID === Js_exn.$$Error) { console.log(e._1.stack); @@ -85,8 +83,7 @@ function test_js_error3() { try { JSON.parse(" {\"x\"}"); return 1; - } - catch (e){ + } catch (e) { return 0; } } diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index 6e333d5bf1..947152ca1b 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -145,8 +145,7 @@ function starts_with(xs, prefix, p) { } return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === H) { return false; diff --git a/jscomp/test/ext_filename_test.js b/jscomp/test/ext_filename_test.js index b4df9c0f72..c9e646ae45 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -59,8 +59,7 @@ function chop_extension(locOpt, name) { let loc = locOpt !== undefined ? locOpt : ""; try { return Filename.chop_extension(name); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Invalid_argument") { let s = "Filename.chop_extension ( " + loc + " : " + name + " )"; @@ -80,8 +79,7 @@ function chop_extension(locOpt, name) { function chop_extension_if_any(fname) { try { return Filename.chop_extension(fname); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Invalid_argument") { return fname; diff --git a/jscomp/test/ext_pervasives_test.js b/jscomp/test/ext_pervasives_test.js index 87cf58893c..ef9cdca7c8 100644 --- a/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/ext_pervasives_test.js @@ -9,8 +9,7 @@ function $$finally(v, action, f) { let e; try { e = f(v); - } - catch (e$1){ + } catch (e$1) { action(v); throw new Error(e$1.RE_EXN_ID, { cause: e$1 @@ -45,8 +44,7 @@ function is_pos_pow(n) { } }); }; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === E) { return -1; @@ -82,8 +80,7 @@ function is_pos_pow_2(n) { } }); }; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === E) { return -1; diff --git a/jscomp/test/ext_string_test.js b/jscomp/test/ext_string_test.js index 9939699352..a9cf746e98 100644 --- a/jscomp/test/ext_string_test.js +++ b/jscomp/test/ext_string_test.js @@ -282,8 +282,7 @@ function find(startOpt, sub, s) { i = i + 1 | 0; }; return -1; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Local_exit) { return i; @@ -338,8 +337,7 @@ function rfind(sub, s) { i = i - 1 | 0; }; return -1; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Local_exit) { return i; diff --git a/jscomp/test/genlex_test.js b/jscomp/test/genlex_test.js index 7e3df94193..13288327c5 100644 --- a/jscomp/test/genlex_test.js +++ b/jscomp/test/genlex_test.js @@ -40,8 +40,7 @@ function to_list(s) { let v; try { v = Stream.next(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { return List.rev(acc); diff --git a/jscomp/test/gpr_1245_test.js b/jscomp/test/gpr_1245_test.js index 3ad00c8c05..8cfe9e268a 100644 --- a/jscomp/test/gpr_1245_test.js +++ b/jscomp/test/gpr_1245_test.js @@ -41,8 +41,7 @@ function a1(f) { let E = /* @__PURE__ */Caml_exceptions.create("E"); try { return f(); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === E) { return 1; diff --git a/jscomp/test/gpr_1701_test.js b/jscomp/test/gpr_1701_test.js index e122b7c346..22cf8d7f3a 100644 --- a/jscomp/test/gpr_1701_test.js +++ b/jscomp/test/gpr_1701_test.js @@ -17,8 +17,7 @@ function test(n) { } try { return test(n - 1 | 0); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Foo) { return; @@ -38,8 +37,7 @@ function read_lines(inc) { let l; try { l = input_line(inc); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "End_of_file") { l = undefined; @@ -67,8 +65,7 @@ function read_lines2(inc) { let l; try { l = input_line(inc); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "End_of_file") { return List.rev(acc); @@ -93,8 +90,7 @@ function read_lines3(inc) { hd: l, tl: acc }); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "End_of_file") { return List.rev(acc); @@ -110,8 +106,7 @@ function read_lines3(inc) { function fff(f, x) { try { return fff(f, x); - } - catch (exn){ + } catch (exn) { return x + 1 | 0; } } diff --git a/jscomp/test/gpr_1760_test.js b/jscomp/test/gpr_1760_test.js index e5a68ca3a2..070945f187 100644 --- a/jscomp/test/gpr_1760_test.js +++ b/jscomp/test/gpr_1760_test.js @@ -35,8 +35,7 @@ let a0; try { Caml_int32.div(0, 0); a0 = 0; -} -catch (exn){ +} catch (exn) { a0 = 1; } @@ -45,8 +44,7 @@ let a1; try { Caml_int32.mod_(0, 0); a1 = 0; -} -catch (exn$1){ +} catch (exn$1) { a1 = 1; } @@ -55,8 +53,7 @@ let a4; try { Caml_int32.div(0, 0); a4 = 0; -} -catch (exn$2){ +} catch (exn$2) { a4 = 1; } @@ -65,8 +62,7 @@ let a5; try { Caml_int32.mod_(0, 0); a5 = 0; -} -catch (exn$3){ +} catch (exn$3) { a5 = 1; } @@ -75,8 +71,7 @@ let a6; try { Caml_int64.div(Caml_int64.zero, Caml_int64.zero); a6 = 0; -} -catch (exn$4){ +} catch (exn$4) { a6 = 1; } @@ -85,8 +80,7 @@ let a7; try { Caml_int64.mod_(Caml_int64.zero, Caml_int64.zero); a7 = 0; -} -catch (exn$5){ +} catch (exn$5) { a7 = 1; } diff --git a/jscomp/test/gpr_2316_test.js b/jscomp/test/gpr_2316_test.js index 6d6b817ecd..a4d0e0658b 100644 --- a/jscomp/test/gpr_2316_test.js +++ b/jscomp/test/gpr_2316_test.js @@ -38,8 +38,7 @@ try { _1: "boo" } }); -} -catch (raw_msg){ +} catch (raw_msg) { let msg = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg.RE_EXN_ID === "Failure") { y = msg._1; @@ -61,8 +60,7 @@ try { _1: "boo" } }); -} -catch (raw_msg$1){ +} catch (raw_msg$1) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg$1); if (msg$1.RE_EXN_ID === "Failure") { x = msg$1._1; diff --git a/jscomp/test/gpr_405_test.js b/jscomp/test/gpr_405_test.js index de96727ae0..ef4ab4378a 100644 --- a/jscomp/test/gpr_405_test.js +++ b/jscomp/test/gpr_405_test.js @@ -14,8 +14,7 @@ function Make(funarg) { let find_default = function (htbl, x) { try { return H.find(htbl, x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/jscomp/test/js_exception_catch_test.js b/jscomp/test/js_exception_catch_test.js index 0d08a67689..085b7bd651 100644 --- a/jscomp/test/js_exception_catch_test.js +++ b/jscomp/test/js_exception_catch_test.js @@ -61,8 +61,7 @@ let e; try { e = JSON.parse(" {\"x\"}"); exit = 1; -} -catch (raw_x){ +} catch (raw_x) { let x = Caml_js_exceptions.internalToOCamlException(raw_x); if (x.RE_EXN_ID === Js_exn.$$Error) { add_test("File \"js_exception_catch_test.res\", line 18, characters 37-44", (function () { @@ -97,8 +96,7 @@ function test(f) { try { f(); return "No_error"; - } - catch (raw_e){ + } catch (raw_e) { let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.RE_EXN_ID === "Not_found") { return "Not_found"; diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 92bd902fb2..d51afc4088 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -639,8 +639,7 @@ try { _0: false }; })); -} -catch (exn){ +} catch (exn) { add_test("File \"js_json_test.res\", line 281, characters 17-24", (function () { return { TAG: "Ok", diff --git a/jscomp/test/jsoo_400_test.js b/jscomp/test/jsoo_400_test.js index f88c3ce847..378d6d338c 100644 --- a/jscomp/test/jsoo_400_test.js +++ b/jscomp/test/jsoo_400_test.js @@ -8,8 +8,7 @@ function u() { let n; try { n = "123".length; - } - catch (exn){ + } catch (exn) { return 42; } return Caml_int32.div(3, 0); diff --git a/jscomp/test/libqueue_test.js b/jscomp/test/libqueue_test.js index 9154961b61..00ac4a4290 100644 --- a/jscomp/test/libqueue_test.js +++ b/jscomp/test/libqueue_test.js @@ -38,8 +38,7 @@ function does_raise(f, q) { try { f(q); return false; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Queue.Empty) { return true; diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index 4ec6be2f10..d02bea44ff 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -1531,8 +1531,7 @@ function mk_state(ncol, desc) { function find_state(re, desc) { try { return Re_automata_State.Table.find(re.states, desc); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let st = mk_state(re.ncol, desc); @@ -1602,8 +1601,7 @@ function loop(info, s, pos, st) { function final(info, st, cat) { try { return List.assq(cat, st.final); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let st$p = delta$1(info, cat, -1, st); @@ -1631,8 +1629,7 @@ function final(info, st, cat) { function find_initial_state(re, cat) { try { return List.assq(cat, re.initial_states); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let st = find_state(re, Re_automata_State.create(cat, re.initial)); @@ -1763,8 +1760,7 @@ function trans_set(cache, cm, s) { _param = c < 0 ? param.l : param.r; continue; }; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let l = List.fold_right((function (param, l) { @@ -3386,8 +3382,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }); } - } - catch (exn){ + } catch (exn) { throw new Error(Pervasives.Exit, { cause: { RE_EXN_ID: Pervasives.Exit @@ -3397,8 +3392,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } i.contents = i.contents + len | 0; return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$1.RE_EXN_ID === Pervasives.Exit) { return false; @@ -3852,8 +3846,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } } }); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Parse_error, { diff --git a/jscomp/test/record_extension_test.js b/jscomp/test/record_extension_test.js index 2067603615..79d2317167 100644 --- a/jscomp/test/record_extension_test.js +++ b/jscomp/test/record_extension_test.js @@ -64,8 +64,7 @@ let C = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.C"); function u(f) { try { return f(); - } - catch (raw_x){ + } catch (raw_x) { let x = Caml_js_exceptions.internalToOCamlException(raw_x); if (x.RE_EXN_ID === A) { return x.name + x.x | 0; diff --git a/jscomp/test/recursive_module.js b/jscomp/test/recursive_module.js index 6d916dc60a..ba1c713297 100644 --- a/jscomp/test/recursive_module.js +++ b/jscomp/test/recursive_module.js @@ -101,8 +101,7 @@ let tmp; try { tmp = CamlinternalLazy.force(Intb.a); -} -catch (raw_exn){ +} catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Lazy.Undefined) { tmp = -1; @@ -179,8 +178,7 @@ let tmp$1; try { Int3.u(3); tmp$1 = 3; -} -catch (raw_exn$1){ +} catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Undefined_recursive_module") { tmp$1 = 4; diff --git a/jscomp/test/sexp.js b/jscomp/test/sexp.js index ec021c83c3..fbb9417026 100644 --- a/jscomp/test/sexp.js +++ b/jscomp/test/sexp.js @@ -235,8 +235,7 @@ function _try_atom(e, f) { } try { return Caml_option.some(f(e.VAL)); - } - catch (exn){ + } catch (exn) { return; } } diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 9ac601aa21..3183bef6a9 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -80,8 +80,7 @@ function _must_escape(s) { } return false; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Pervasives.Exit) { return true; diff --git a/jscomp/test/stack_comp_test.js b/jscomp/test/stack_comp_test.js index dabb3ee849..04d4f0921c 100644 --- a/jscomp/test/stack_comp_test.js +++ b/jscomp/test/stack_comp_test.js @@ -59,8 +59,7 @@ function does_raise(f, s) { try { f(s); return false; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stack.Empty) { return true; diff --git a/jscomp/test/stream_parser_test.js b/jscomp/test/stream_parser_test.js index d8c949d0ee..5b700761ed 100644 --- a/jscomp/test/stream_parser_test.js +++ b/jscomp/test/stream_parser_test.js @@ -22,8 +22,7 @@ function parse(token) { } try { return token(); - } - catch (exn){ + } catch (exn) { return { TAG: "Kwd", _0: "==" @@ -162,8 +161,7 @@ function l_parse(token) { } try { return token(); - } - catch (exn){ + } catch (exn) { return { TAG: "Kwd", _0: "==" diff --git a/jscomp/test/string_test.js b/jscomp/test/string_test.js index 23f7e57812..8e57572e70 100644 --- a/jscomp/test/string_test.js +++ b/jscomp/test/string_test.js @@ -64,8 +64,7 @@ function rev_split_by_char(c, s) { hd: s$p, tl: l })); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return { @@ -95,8 +94,7 @@ function xsplit(delim, s) { let i$p; try { i$p = $$String.rindex_from(s, x - 1 | 0, delim); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return { diff --git a/jscomp/test/test_exception_escape.js b/jscomp/test/test_exception_escape.js index 8b90039f39..4e4957d2b5 100644 --- a/jscomp/test/test_exception_escape.js +++ b/jscomp/test/test_exception_escape.js @@ -14,8 +14,7 @@ try { _1: 3 } }); -} -catch (exn){ +} catch (exn) { f = 3; } diff --git a/jscomp/test/test_match_exception.js b/jscomp/test/test_match_exception.js index 4fa365dee3..90b1f424e5 100644 --- a/jscomp/test/test_match_exception.js +++ b/jscomp/test/test_match_exception.js @@ -6,8 +6,7 @@ let Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); function f(g, x) { try { return g(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return 3; diff --git a/jscomp/test/test_seq.js b/jscomp/test/test_seq.js index fe6bb57c1a..6213aced55 100644 --- a/jscomp/test/test_seq.js +++ b/jscomp/test/test_seq.js @@ -57,8 +57,7 @@ function add_help(speclist) { try { assoc3("-help", speclist); add1 = /* [] */0; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { add1 = { @@ -82,8 +81,7 @@ function add_help(speclist) { try { assoc3("--help", speclist); add2 = /* [] */0; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { add2 = { diff --git a/jscomp/test/test_string_const.js b/jscomp/test/test_string_const.js index d6335edda9..a5c13796fc 100644 --- a/jscomp/test/test_string_const.js +++ b/jscomp/test/test_string_const.js @@ -10,8 +10,7 @@ let hh; try { hh = Caml_string.get("ghsogh", -3); -} -catch (raw_e){ +} catch (raw_e) { let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.RE_EXN_ID === "Invalid_argument") { console.log(e._1); diff --git a/jscomp/test/test_trywith.js b/jscomp/test/test_trywith.js index 1f81560003..72253026dc 100644 --- a/jscomp/test/test_trywith.js +++ b/jscomp/test/test_trywith.js @@ -15,8 +15,7 @@ let Sys_blocked_io = /* @__PURE__ */Caml_exceptions.create("Test_trywith.Sys_blo function ff(g, x) { try { g(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID !== "Not_found") { throw new Error(exn.RE_EXN_ID, { @@ -27,8 +26,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID !== Out_of_memory) { throw new Error(exn$1.RE_EXN_ID, { @@ -39,8 +37,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$2){ + } catch (raw_exn$2) { let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.RE_EXN_ID !== Sys_error) { throw new Error(exn$2.RE_EXN_ID, { @@ -51,8 +48,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$3){ + } catch (raw_exn$3) { let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.RE_EXN_ID !== "Invalid_argument") { throw new Error(exn$3.RE_EXN_ID, { @@ -63,8 +59,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$4){ + } catch (raw_exn$4) { let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.RE_EXN_ID !== "End_of_file") { throw new Error(exn$4.RE_EXN_ID, { @@ -75,8 +70,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$5){ + } catch (raw_exn$5) { let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.RE_EXN_ID !== "Match_failure") { throw new Error(exn$5.RE_EXN_ID, { @@ -87,8 +81,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$6){ + } catch (raw_exn$6) { let exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); if (exn$6.RE_EXN_ID !== Stack_overflow) { throw new Error(exn$6.RE_EXN_ID, { @@ -99,8 +92,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$7){ + } catch (raw_exn$7) { let exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); if (exn$7.RE_EXN_ID !== Sys_blocked_io) { throw new Error(exn$7.RE_EXN_ID, { @@ -111,8 +103,7 @@ function ff(g, x) { } try { g(x); - } - catch (raw_exn$8){ + } catch (raw_exn$8) { let exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); if (exn$8.RE_EXN_ID !== "Assert_failure") { throw new Error(exn$8.RE_EXN_ID, { @@ -123,8 +114,7 @@ function ff(g, x) { } try { return g(x); - } - catch (raw_exn$9){ + } catch (raw_exn$9) { let exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); if (exn$9.RE_EXN_ID === "Undefined_recursive_module") { return; diff --git a/jscomp/test/ticker.js b/jscomp/test/ticker.js index c785f5687c..4d033d62be 100644 --- a/jscomp/test/ticker.js +++ b/jscomp/test/ticker.js @@ -24,8 +24,7 @@ function split(delim, s) { let i$p; try { i$p = $$String.rindex_from(s, x - 1 | 0, delim); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return { diff --git a/jscomp/test/topsort_test.js b/jscomp/test/topsort_test.js index d9f7b1d719..6dc24323dc 100644 --- a/jscomp/test/topsort_test.js +++ b/jscomp/test/topsort_test.js @@ -1569,8 +1569,7 @@ try { ] } }); -} -catch (raw_exn){ +} catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); let exit = 0; if (exn.RE_EXN_ID === Cycle) { diff --git a/jscomp/test/variant.js b/jscomp/test/variant.js index 40c6abea1f..4190ed6b8a 100644 --- a/jscomp/test/variant.js +++ b/jscomp/test/variant.js @@ -83,8 +83,7 @@ let M = { function rollback_path(subst, p) { try { return "try"; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { switch (p.TAG) { @@ -116,8 +115,7 @@ let ED = /* @__PURE__ */Caml_exceptions.create("Variant.ED"); function fooExn(f) { try { return f(); - } - catch (raw_n){ + } catch (raw_n) { let n = Caml_js_exceptions.internalToOCamlException(raw_n); if (n.RE_EXN_ID === EA1) { return 1; diff --git a/lib/es6/arg.js b/lib/es6/arg.js index c65c77c67f..03621c004e 100644 --- a/lib/es6/arg.js +++ b/lib/es6/arg.js @@ -75,8 +75,7 @@ function add_help(speclist) { try { assoc3("-help", speclist); add1 = /* [] */0; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { add1 = { @@ -100,8 +99,7 @@ function add_help(speclist) { try { assoc3("--help", speclist); add2 = /* [] */0; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { add2 = { @@ -158,8 +156,7 @@ let current = { function bool_of_string_opt(x) { try { return Pervasives.bool_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Invalid_argument") { return; @@ -173,8 +170,7 @@ function bool_of_string_opt(x) { function int_of_string_opt(x) { try { return Caml_format.int_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -188,8 +184,7 @@ function int_of_string_opt(x) { function float_of_string_opt(x) { try { return Caml_format.float_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -257,8 +252,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist assoc3(s, speclist.contents), undefined ]; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { try { @@ -267,8 +261,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist assoc3(match$1[0], speclist.contents), match$1[1] ]; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { throw new Error(Stop, { @@ -506,8 +499,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } else { anonfun(s); } - } - catch (raw_m){ + } catch (raw_m) { let m = Caml_js_exceptions.internalToOCamlException(raw_m); if (m.RE_EXN_ID === Bad) { throw new Error(convert_error({ @@ -554,8 +546,7 @@ function parse_argv(currentOpt, argv, speclist, anonfun, errmsg) { function parse(l, f, msg) { try { return parse_argv(undefined, Sys.argv, l, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -574,8 +565,7 @@ function parse(l, f, msg) { function parse_dynamic(l, f, msg) { try { return parse_argv_dynamic(undefined, Sys.argv, l, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -603,8 +593,7 @@ function parse_expand(l, f, msg) { contents: current.contents }; return parse_and_expand_argv_dynamic(current$1, argv, spec, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -638,8 +627,7 @@ function second_word(s) { let n; try { n = $$String.index(s, /* '\t' */9); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let exit = 0; @@ -647,8 +635,7 @@ function second_word(s) { try { n$1 = $$String.index(s, /* ' ' */32); exit = 2; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { return len; diff --git a/lib/es6/array.js b/lib/es6/array.js index c027a50579..d6a7a5f4bb 100644 --- a/lib/es6/array.js +++ b/lib/es6/array.js @@ -337,8 +337,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return Caml_array.set(a, i$2._1, e); @@ -358,8 +357,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return i$2._1; diff --git a/lib/es6/arrayLabels.js b/lib/es6/arrayLabels.js index cf122ba8dd..54425e8f6a 100644 --- a/lib/es6/arrayLabels.js +++ b/lib/es6/arrayLabels.js @@ -337,8 +337,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return Caml_array.set(a, i$2._1, e); @@ -358,8 +357,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return i$2._1; diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index 39bf696da3..be39f20aef 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -630,8 +630,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -658,8 +657,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index 39bf696da3..be39f20aef 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -630,8 +630,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -658,8 +657,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/es6/camlinternalLazy.js b/lib/es6/camlinternalLazy.js index cf6061cc29..b7f110ecdf 100644 --- a/lib/es6/camlinternalLazy.js +++ b/lib/es6/camlinternalLazy.js @@ -31,8 +31,7 @@ function force(lzv) { lzv.VAL = raise_undefined; try { return forward_with_closure(lzv, closure); - } - catch (e){ + } catch (e) { lzv.VAL = (function () { throw new Error(e.RE_EXN_ID, { cause: e diff --git a/lib/es6/filename.js b/lib/es6/filename.js index 1c278eaa94..c35edb6f5e 100644 --- a/lib/es6/filename.js +++ b/lib/es6/filename.js @@ -118,8 +118,7 @@ let temp_dir_name; try { temp_dir_name = Caml_sys.sys_getenv("TMPDIR"); -} -catch (raw_exn){ +} catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { temp_dir_name = "/tmp"; @@ -201,8 +200,7 @@ let temp_dir_name$1; try { temp_dir_name$1 = Caml_sys.sys_getenv("TEMP"); -} -catch (raw_exn$1){ +} catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { temp_dir_name$1 = "."; diff --git a/lib/es6/genlex.js b/lib/es6/genlex.js index db2acdd716..c449e63ae3 100644 --- a/lib/es6/genlex.js +++ b/lib/es6/genlex.js @@ -52,8 +52,7 @@ function make_lexer(keywords) { let ident_or_keyword = function (id) { try { return Hashtbl.find(kwd_table, id); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return { @@ -70,8 +69,7 @@ function make_lexer(keywords) { let s = Caml_string.make(1, c); try { return Hashtbl.find(kwd_table, s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Stream.$$Error, { @@ -119,8 +117,7 @@ function make_lexer(keywords) { let c$1; try { c$1 = char(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { @@ -478,8 +475,7 @@ function make_lexer(keywords) { let c$1; try { c$1 = escape(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { @@ -516,8 +512,7 @@ function make_lexer(keywords) { Stream.junk(strm__); try { return escape(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index c0ea9129b9..1553bd99d7 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -468,8 +468,7 @@ function iter(f, h) { } else { return; } - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn @@ -526,8 +525,7 @@ function filter_map_inplace(f, h) { filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn @@ -570,8 +568,7 @@ function fold(f, h, init) { flip_ongoing_traversal(h); } return accu; - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn diff --git a/lib/es6/int32.js b/lib/es6/int32.js index 6c511f43e4..7a18fc37ad 100644 --- a/lib/es6/int32.js +++ b/lib/es6/int32.js @@ -31,8 +31,7 @@ function to_string(n) { function of_string_opt(s) { try { return Caml_format.int_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/es6/int64.js b/lib/es6/int64.js index c437037663..aaa83e9271 100644 --- a/lib/es6/int64.js +++ b/lib/es6/int64.js @@ -24,8 +24,7 @@ function lognot(n) { function of_string_opt(s) { try { return Caml_format.int64_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/es6/parsing.js b/lib/es6/parsing.js index a17af3f6e4..c56d1eb06d 100644 --- a/lib/es6/parsing.js +++ b/lib/es6/parsing.js @@ -109,8 +109,7 @@ function yyparse(tables, start, lexer, lexbuf) { "Semantic_action_computed", Caml_array.get(tables.actions, env.rule_number)(env) ]; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Parse_error) { match$1 = [ @@ -134,8 +133,7 @@ function yyparse(tables, start, lexer, lexbuf) { } }; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); let curr_char = env.curr_char; env.asp = init_asp; diff --git a/lib/es6/pervasives.js b/lib/es6/pervasives.js index 255eeeffc4..fab24da886 100644 --- a/lib/es6/pervasives.js +++ b/lib/es6/pervasives.js @@ -106,8 +106,7 @@ function bool_of_string_opt(param) { function int_of_string_opt(s) { try { return Caml_format.int_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -149,8 +148,7 @@ function string_of_float(f) { function float_of_string_opt(s) { try { return Caml_format.float_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/es6/string.js b/lib/es6/string.js index 80b4bd8637..95801f7799 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -229,8 +229,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -257,8 +256,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index 38232f9ba9..ea0b1e5eef 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -231,8 +231,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -259,8 +258,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/js/arg.js b/lib/js/arg.js index 192e936c98..e5205a6cca 100644 --- a/lib/js/arg.js +++ b/lib/js/arg.js @@ -75,8 +75,7 @@ function add_help(speclist) { try { assoc3("-help", speclist); add1 = /* [] */0; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { add1 = { @@ -100,8 +99,7 @@ function add_help(speclist) { try { assoc3("--help", speclist); add2 = /* [] */0; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { add2 = { @@ -158,8 +156,7 @@ let current = { function bool_of_string_opt(x) { try { return Pervasives.bool_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Invalid_argument") { return; @@ -173,8 +170,7 @@ function bool_of_string_opt(x) { function int_of_string_opt(x) { try { return Caml_format.int_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -188,8 +184,7 @@ function int_of_string_opt(x) { function float_of_string_opt(x) { try { return Caml_format.float_of_string(x); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -257,8 +252,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist assoc3(s, speclist.contents), undefined ]; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { try { @@ -267,8 +261,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist assoc3(match$1[0], speclist.contents), match$1[1] ]; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { throw new Error(Stop, { @@ -506,8 +499,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } else { anonfun(s); } - } - catch (raw_m){ + } catch (raw_m) { let m = Caml_js_exceptions.internalToOCamlException(raw_m); if (m.RE_EXN_ID === Bad) { throw new Error(convert_error({ @@ -554,8 +546,7 @@ function parse_argv(currentOpt, argv, speclist, anonfun, errmsg) { function parse(l, f, msg) { try { return parse_argv(undefined, Sys.argv, l, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -574,8 +565,7 @@ function parse(l, f, msg) { function parse_dynamic(l, f, msg) { try { return parse_argv_dynamic(undefined, Sys.argv, l, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -603,8 +593,7 @@ function parse_expand(l, f, msg) { contents: current.contents }; return parse_and_expand_argv_dynamic(current$1, argv, spec, f, msg); - } - catch (raw_msg){ + } catch (raw_msg) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg$1.RE_EXN_ID === Bad) { console.log(msg$1._1); @@ -638,8 +627,7 @@ function second_word(s) { let n; try { n = $$String.index(s, /* '\t' */9); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { let exit = 0; @@ -647,8 +635,7 @@ function second_word(s) { try { n$1 = $$String.index(s, /* ' ' */32); exit = 2; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { return len; diff --git a/lib/js/array.js b/lib/js/array.js index 9407d2ffc0..1025476d12 100644 --- a/lib/js/array.js +++ b/lib/js/array.js @@ -337,8 +337,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return Caml_array.set(a, i$2._1, e); @@ -358,8 +357,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return i$2._1; diff --git a/lib/js/arrayLabels.js b/lib/js/arrayLabels.js index c486cfe363..5f34ed8643 100644 --- a/lib/js/arrayLabels.js +++ b/lib/js/arrayLabels.js @@ -337,8 +337,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return Caml_array.set(a, i$2._1, e); @@ -358,8 +357,7 @@ function sort(cmp, a) { _i = j; continue; }; - } - catch (raw_i){ + } catch (raw_i) { let i$2 = Caml_js_exceptions.internalToOCamlException(raw_i); if (i$2.RE_EXN_ID === Bottom) { return i$2._1; diff --git a/lib/js/bytes.js b/lib/js/bytes.js index e1a49076b5..7c65f2240a 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -630,8 +630,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -658,8 +657,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index e1a49076b5..7c65f2240a 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -630,8 +630,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -658,8 +657,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/js/camlinternalLazy.js b/lib/js/camlinternalLazy.js index 4125262ab5..f754861cee 100644 --- a/lib/js/camlinternalLazy.js +++ b/lib/js/camlinternalLazy.js @@ -31,8 +31,7 @@ function force(lzv) { lzv.VAL = raise_undefined; try { return forward_with_closure(lzv, closure); - } - catch (e){ + } catch (e) { lzv.VAL = (function () { throw new Error(e.RE_EXN_ID, { cause: e diff --git a/lib/js/filename.js b/lib/js/filename.js index 530e6fe8cf..f6e6bd8479 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -118,8 +118,7 @@ let temp_dir_name; try { temp_dir_name = Caml_sys.sys_getenv("TMPDIR"); -} -catch (raw_exn){ +} catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { temp_dir_name = "/tmp"; @@ -201,8 +200,7 @@ let temp_dir_name$1; try { temp_dir_name$1 = Caml_sys.sys_getenv("TEMP"); -} -catch (raw_exn$1){ +} catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { temp_dir_name$1 = "."; diff --git a/lib/js/genlex.js b/lib/js/genlex.js index 55f524893e..c1da97a6d6 100644 --- a/lib/js/genlex.js +++ b/lib/js/genlex.js @@ -52,8 +52,7 @@ function make_lexer(keywords) { let ident_or_keyword = function (id) { try { return Hashtbl.find(kwd_table, id); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return { @@ -70,8 +69,7 @@ function make_lexer(keywords) { let s = Caml_string.make(1, c); try { return Hashtbl.find(kwd_table, s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Stream.$$Error, { @@ -119,8 +117,7 @@ function make_lexer(keywords) { let c$1; try { c$1 = char(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { @@ -478,8 +475,7 @@ function make_lexer(keywords) { let c$1; try { c$1 = escape(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { @@ -516,8 +512,7 @@ function make_lexer(keywords) { Stream.junk(strm__); try { return escape(strm__); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index e882bc97c2..cb45f8541d 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -468,8 +468,7 @@ function iter(f, h) { } else { return; } - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn @@ -526,8 +525,7 @@ function filter_map_inplace(f, h) { filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn @@ -570,8 +568,7 @@ function fold(f, h, init) { flip_ongoing_traversal(h); } return accu; - } - catch (exn){ + } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { cause: exn diff --git a/lib/js/int32.js b/lib/js/int32.js index ac4211520b..a5e4870acf 100644 --- a/lib/js/int32.js +++ b/lib/js/int32.js @@ -31,8 +31,7 @@ function to_string(n) { function of_string_opt(s) { try { return Caml_format.int_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/js/int64.js b/lib/js/int64.js index 58018e5256..af597f0f9a 100644 --- a/lib/js/int64.js +++ b/lib/js/int64.js @@ -24,8 +24,7 @@ function lognot(n) { function of_string_opt(s) { try { return Caml_format.int64_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/js/parsing.js b/lib/js/parsing.js index a5da32f420..7196d6756f 100644 --- a/lib/js/parsing.js +++ b/lib/js/parsing.js @@ -109,8 +109,7 @@ function yyparse(tables, start, lexer, lexbuf) { "Semantic_action_computed", Caml_array.get(tables.actions, env.rule_number)(env) ]; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Parse_error) { match$1 = [ @@ -134,8 +133,7 @@ function yyparse(tables, start, lexer, lexbuf) { } }; - } - catch (raw_exn$1){ + } catch (raw_exn$1) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); let curr_char = env.curr_char; env.asp = init_asp; diff --git a/lib/js/pervasives.js b/lib/js/pervasives.js index f849b7806a..376bea7a60 100644 --- a/lib/js/pervasives.js +++ b/lib/js/pervasives.js @@ -106,8 +106,7 @@ function bool_of_string_opt(param) { function int_of_string_opt(s) { try { return Caml_format.int_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; @@ -149,8 +148,7 @@ function string_of_float(f) { function float_of_string_opt(s) { try { return Caml_format.float_of_string(s); - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Failure") { return; diff --git a/lib/js/string.js b/lib/js/string.js index e26e35272b..bdc1e92b46 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -229,8 +229,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -257,8 +256,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index 66077dc73c..b0e2af9c9e 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -231,8 +231,7 @@ function contains_from(s, i, c) { try { index_rec(s, l, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; @@ -259,8 +258,7 @@ function rcontains_from(s, i, c) { try { rindex_rec(s, i, c); return true; - } - catch (raw_exn){ + } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return false; From 2a220b9b261948b81c1a19c099e3d2a0a5328b92 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 13:42:01 +0400 Subject: [PATCH 03/18] Update change log --- CHANGELOG.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eddc03cdf..0ae99d8d4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ # 12.0.0-alpha.2 (Unreleased) +#### :nail_care: Polish + +- Improve try/catch formatting in generated js code. https://github.com/rescript-lang/rescript-compiler/pull/6930 + # 12.0.0-alpha.1 #### :rocket: New Feature @@ -234,7 +238,7 @@ #### :rocket: New Feature -- Experimental support of tagged template literals, e.g. ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 +- Experimental support of tagged template literals, e.g. `` sql`select * from ${table} ``. https://github.com/rescript-lang/rescript-compiler/pull/6250 - Experimental support for generic/custom JSX transforms. https://github.com/rescript-lang/rescript-compiler/pull/6565 - `dict` is now a builtin type. https://github.com/rescript-lang/rescript-compiler/pull/6590 @@ -414,7 +418,7 @@ No changes compared to rc.9. #### :boom: Breaking Change -- Stop mangling object field names. If you had objects with field names containing "__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 +- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 #### :bug: Bug Fix @@ -469,7 +473,7 @@ No changes compared to rc.9. #### :rocket: New Feature -- Introduced a new `%ffi` extension (*experimental* - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251 +- Introduced a new `%ffi` extension (_experimental_ - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251 - Extended untagged variants with function types. https://github.com/rescript-lang/rescript-compiler/pull/6279 #### :boom: Breaking Change @@ -547,14 +551,14 @@ No changes compared to rc.9. #### :bug: Bug Fix -- Fix broken formatting in uncurried mode for functions with _ placeholder args. https://github.com/rescript-lang/rescript-compiler/pull/6148 +- Fix broken formatting in uncurried mode for functions with \_ placeholder args. https://github.com/rescript-lang/rescript-compiler/pull/6148 - Fix issue where spreading record types with optional labels would not have their labels preserved as optional. https://github.com/rescript-lang/rescript-compiler/pull/6154 - Fix error location to be the type with the spreads when spreading record types with duplicate labels. https://github.com/rescript-lang/rescript-compiler/pull/6157 - Disable warning on `@inline` attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152 - Support doc comments on arguments of function types. https://github.com/rescript-lang/rescript-compiler/pull/6161 - Fix issue with record type coercion and unboxed. https://github.com/rescript-lang/rescript-compiler/issues/6158 - Fixed subtype checking for record types with "@as" attributes: The subtype relationship now takes into account the compatibility of "@as" attributes between corresponding fields, ensuring correctness in runtime representation. - https://github.com/rescript-lang/rescript-compiler/issues/6158 + https://github.com/rescript-lang/rescript-compiler/issues/6158 - Emit directive above header comment. https://github.com/rescript-lang/rescript-compiler/pull/6172 - Add error message to private extension. https://github.com/rescript-lang/rescript-compiler/pull/6175 @@ -583,7 +587,6 @@ No changes compared to rc.9. - Special case generation of uncurried functions with 1 argument of unit type so they don't take a parameter. https://github.com/rescript-lang/rescript-compiler/pull/6131 - # 11.0.0-alpha.1 #### :rocket: Main New Feature @@ -594,16 +597,16 @@ No changes compared to rc.9. #### :rocket: New Feature - Add support for uncurried mode: a mode where everything is considered uncurried, whether with or without the `.`. This can be turned on with `@@uncurried` locally in a file. For project-level configuration in `bsconfig.json`, there's a boolean config `"uncurried"`, which propagates to dependencies, to turn on uncurried mode. -Since there's no syntax for partial application in this new mode, introduce `@res.partial foo(x)` to express partial application. This is temporary and will later have some surface syntax. -Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. -The `make` function of components is generated as an uncurried function. -Use best effort to determine the config when formatting a file. -https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087 + Since there's no syntax for partial application in this new mode, introduce `@res.partial foo(x)` to express partial application. This is temporary and will later have some surface syntax. + Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. + The `make` function of components is generated as an uncurried function. + Use best effort to determine the config when formatting a file. + https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087 - Customization of runtime representation of variants. This is work in progress. E.g. some restrictions on the input. See comments of the form "TODO: put restriction on the variant definitions allowed, to make sure this never happens". https://github.com/rescript-lang/rescript-compiler/pull/6095 - Introduce untagged variants https://github.com/rescript-lang/rescript-compiler/pull/6103 - Add support for unary uncurried pipe in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/5804 - Add support for partial application of uncurried functions: with uncurried application one can provide a -subset of the arguments, and return a curried type with the remaining ones https://github.com/rescript-lang/rescript-compiler/pull/5805 + subset of the arguments, and return a curried type with the remaining ones https://github.com/rescript-lang/rescript-compiler/pull/5805 - Add support for uncurried externals https://github.com/rescript-lang/rescript-compiler/pull/5815 https://github.com/rescript-lang/rescript-compiler/pull/5819 https://github.com/rescript-lang/rescript-compiler/pull/5830 https://github.com/rescript-lang/rescript-compiler/pull/5894 - Parser/Printer: unify uncurried functions of arity 0, and of arity 1 taking unit. There's now only arity 1 in the source language. https://github.com/rescript-lang/rescript-compiler/pull/5825 - Add support for default arguments in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5835 @@ -625,12 +628,12 @@ subset of the arguments, and return a curried type with the remaining ones https - `rescript convert ` - Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) which is maintained separately. - Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore. -- Made pinned dependencies transitive: if *a* is a pinned dependency of *b* and *b* is a pinned dependency of *c*, then *a* is implicitly a pinned dependency of *c*. This change is only breaking if your build process assumes non-transitivity. +- Made pinned dependencies transitive: if _a_ is a pinned dependency of _b_ and _b_ is a pinned dependency of _c_, then _a_ is implicitly a pinned dependency of _c_. This change is only breaking if your build process assumes non-transitivity. - Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`. -Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. -These are only breaking changes for unformatted code. + Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. + These are only breaking changes for unformatted code. - Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. -- Remove unsafe ``` j`$(a)$(b)` ``` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 +- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 - Remove deprecated module `Printexc` - `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 - New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 @@ -679,19 +682,21 @@ These are only breaking changes for unformatted code. # 10.1.4 #### :bug: Bug Fix + - Fix implementation of directives https://github.com/rescript-lang/rescript-compiler/pull/6052 - Fix issue if the `lib` dir is included in the sources of bsconfig.json https://github.com/rescript-lang/rescript-compiler/pull/6055 - Fix issue with string escape in pattern match https://github.com/rescript-lang/rescript-compiler/pull/6062 - Fix issue with literal comparison of string constants https://github.com/rescript-lang/rescript-compiler/pull/6065 #### :rocket: New Feature + - Add support for toplevel `await` https://github.com/rescript-lang/rescript-compiler/pull/6054 #### :nail_care: Polish - Better error message for extension point https://github.com/rescript-lang/rescript-compiler/pull/6057 - Improve format check help https://github.com/rescript-lang/rescript-compiler/pull/6056 -- Deprecate unsafe ``` j`$(a)$(b)` ``` interpolation: use string templates ``` `${a}${b}` ``` instead https://github.com/rescript-lang/rescript-compiler/pull/6067 +- Deprecate unsafe `` j`$(a)$(b)` `` interpolation: use string templates `` `${a}${b}` `` instead https://github.com/rescript-lang/rescript-compiler/pull/6067 # 10.1.3 From 63bf337e49e3d69c1e003d996f275a1e78249a4f Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 13:58:07 +0400 Subject: [PATCH 04/18] Fix space in front comma for for in loop --- 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 2285cedeb0..4aebdb0ed3 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -1081,8 +1081,8 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = let cxt = expression ~level:1 cxt f ident_expression in - P.space f; comma f; + P.space f; let id = Ext_ident.create (Ident.name id ^ "_finish") in From 44a93f9ba6b43f526b8925309ab9c7d143e20bd0 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 13:58:22 +0400 Subject: [PATCH 05/18] Commit test output --- jscomp/test/bdd.js | 4 ++-- jscomp/test/bench.js | 2 +- jscomp/test/bs_mutable_set_test.js | 8 ++++---- jscomp/test/bs_poly_mutable_set_test.js | 2 +- jscomp/test/complex_if_test.js | 4 ++-- jscomp/test/earger_curry_test.js | 2 +- jscomp/test/ext_array_test.js | 2 +- jscomp/test/ext_bytes_test.js | 4 ++-- jscomp/test/ext_pervasives_test.js | 2 +- jscomp/test/flexible_array_test.js | 8 ++++---- jscomp/test/for_loop_test.js | 8 ++++---- jscomp/test/for_side_effect_test.js | 2 +- jscomp/test/int_overflow_test.js | 4 ++-- jscomp/test/ocaml_re_test.js | 2 +- jscomp/test/sexpm.js | 2 +- jscomp/test/test_bug.js | 4 ++-- jscomp/test/test_for_loop.js | 12 ++++++------ lib/es6/array.js | 10 +++++----- lib/es6/arrayLabels.js | 10 +++++----- lib/es6/belt_Array.js | 14 +++++++------- lib/es6/belt_MutableMap.js | 2 +- lib/es6/belt_MutableQueue.js | 2 +- lib/es6/belt_MutableSet.js | 2 +- lib/es6/belt_MutableSetInt.js | 2 +- lib/es6/belt_MutableSetString.js | 2 +- lib/es6/belt_internalBuckets.js | 8 ++++---- lib/es6/belt_internalSetBuckets.js | 6 +++--- lib/es6/bytes.js | 10 +++++----- lib/es6/bytesLabels.js | 10 +++++----- lib/es6/caml_module.js | 4 ++-- lib/es6/hashtbl.js | 6 +++--- lib/es6/lexing.js | 2 +- lib/es6/random.js | 2 +- lib/es6/sort.js | 2 +- lib/es6/string.js | 4 ++-- lib/es6/stringLabels.js | 4 ++-- lib/js/array.js | 10 +++++----- lib/js/arrayLabels.js | 10 +++++----- lib/js/belt_Array.js | 14 +++++++------- lib/js/belt_MutableMap.js | 2 +- lib/js/belt_MutableQueue.js | 2 +- lib/js/belt_MutableSet.js | 2 +- lib/js/belt_MutableSetInt.js | 2 +- lib/js/belt_MutableSetString.js | 2 +- lib/js/belt_internalBuckets.js | 8 ++++---- lib/js/belt_internalSetBuckets.js | 6 +++--- lib/js/bytes.js | 10 +++++----- lib/js/bytesLabels.js | 10 +++++----- lib/js/caml_module.js | 4 ++-- lib/js/hashtbl.js | 6 +++--- lib/js/lexing.js | 2 +- lib/js/random.js | 2 +- lib/js/sort.js | 2 +- lib/js/string.js | 4 ++-- lib/js/stringLabels.js | 4 ++-- 55 files changed, 138 insertions(+), 138 deletions(-) diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index db7281675d..b126de3cb2 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -99,7 +99,7 @@ function resize(newSize) { } }; }; - for(let n = 0 ,n_finish = sz_1.contents; n <= n_finish; ++n){ + for(let n = 0, n_finish = sz_1.contents; n <= n_finish; ++n){ copyBucket(Caml_array.get(arr, n)); } htab.contents = newArr; @@ -386,7 +386,7 @@ function bool_equal(a, b) { function test_hwb(bdd, vars) { let ntrue = 0; - for(let i = 0 ,i_finish = vars.length; i < i_finish; ++i){ + for(let i = 0, i_finish = vars.length; i < i_finish; ++i){ if (Caml_array.get(vars, i)) { ntrue = ntrue + 1 | 0; } diff --git a/jscomp/test/bench.js b/jscomp/test/bench.js index d23518c4a5..f1103435ae 100644 --- a/jscomp/test/bench.js +++ b/jscomp/test/bench.js @@ -46,7 +46,7 @@ function fold_left(f, x, a) { return f(x, y); }; let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f$1(r, a[i]); } return r; diff --git a/jscomp/test/bs_mutable_set_test.js b/jscomp/test/bs_mutable_set_test.js index 16d171bb1f..b2fecf0a67 100644 --- a/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/bs_mutable_set_test.js @@ -51,7 +51,7 @@ b("File \"bs_mutable_set_test.res\", line 28, characters 8-15", 1 === Belt_inter Belt_MutableSetInt.add(u, 3); -for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){ +for(let i = 0, i_finish = r.length; i < i_finish; ++i){ Belt_MutableSetInt.remove(u, r[i]); } @@ -455,7 +455,7 @@ eq("File \"bs_mutable_set_test.res\", line 203, characters 5-12", Belt_internalA let u$3 = Array_data_util.randomRange(50000, 80000); -for(let i$3 = 0 ,i_finish$1 = u$3.length; i$3 < i_finish$1; ++i$3){ +for(let i$3 = 0, i_finish$1 = u$3.length; i$3 < i_finish$1; ++i$3){ Belt_MutableSetInt.remove(v$3, i$3); } @@ -463,7 +463,7 @@ eq("File \"bs_mutable_set_test.res\", line 210, characters 5-12", Belt_internalA let vv = Array_data_util.randomRange(0, 100000); -for(let i$4 = 0 ,i_finish$2 = vv.length; i$4 < i_finish$2; ++i$4){ +for(let i$4 = 0, i_finish$2 = vv.length; i$4 < i_finish$2; ++i$4){ Belt_MutableSetInt.remove(v$3, Caml_array.get(vv, i$4)); } @@ -493,7 +493,7 @@ eq("File \"bs_mutable_set_test.res\", line 227, characters 5-12", Belt_internalA let vv$1 = Array_data_util.randomRange(1, 28); -for(let i$5 = 0 ,i_finish$3 = vv$1.length; i$5 < i_finish$3; ++i$5){ +for(let i$5 = 0, i_finish$3 = vv$1.length; i$5 < i_finish$3; ++i$5){ Belt_MutableSetInt.remove(v$4, Caml_array.get(vv$1, i$5)); } diff --git a/jscomp/test/bs_poly_mutable_set_test.js b/jscomp/test/bs_poly_mutable_set_test.js index 33a00591d1..b70f7a1cf6 100644 --- a/jscomp/test/bs_poly_mutable_set_test.js +++ b/jscomp/test/bs_poly_mutable_set_test.js @@ -59,7 +59,7 @@ b("File \"bs_poly_mutable_set_test.res\", line 23, characters 4-11", 1 === Belt_ Belt_MutableSet.add(u, 3); -for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){ +for(let i = 0, i_finish = r.length; i < i_finish; ++i){ Belt_MutableSet.remove(u, r[i]); } diff --git a/jscomp/test/complex_if_test.js b/jscomp/test/complex_if_test.js index ac9d60a393..90c77d5c55 100644 --- a/jscomp/test/complex_if_test.js +++ b/jscomp/test/complex_if_test.js @@ -15,7 +15,7 @@ function fib(x) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -38,7 +38,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/jscomp/test/earger_curry_test.js b/jscomp/test/earger_curry_test.js index f7ad48dad5..f36ecee8a2 100644 --- a/jscomp/test/earger_curry_test.js +++ b/jscomp/test/earger_curry_test.js @@ -47,7 +47,7 @@ function fold_left(f, x, a) { return f(x, y); }; let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f$1(r, a[i]); } return r; diff --git a/jscomp/test/ext_array_test.js b/jscomp/test/ext_array_test.js index de2c274cb2..f23592ff27 100644 --- a/jscomp/test/ext_array_test.js +++ b/jscomp/test/ext_array_test.js @@ -10,7 +10,7 @@ function reverse_range(a, i, len) { if (len === 0) { return; } - for(let k = 0 ,k_finish = (len - 1 | 0) / 2 | 0; k <= k_finish; ++k){ + for(let k = 0, k_finish = (len - 1 | 0) / 2 | 0; k <= k_finish; ++k){ let t = a[i + k | 0]; a[i + k | 0] = a[((i + len | 0) - 1 | 0) - k | 0]; a[((i + len | 0) - 1 | 0) - k | 0] = t; diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index 947152ca1b..f30a2aa205 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -23,7 +23,7 @@ function eq(loc, x, y) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -46,7 +46,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/jscomp/test/ext_pervasives_test.js b/jscomp/test/ext_pervasives_test.js index ef9cdca7c8..ee316aa7bf 100644 --- a/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/ext_pervasives_test.js @@ -93,7 +93,7 @@ function is_pos_pow_2(n) { function hash_variant(s) { let accu = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ accu = Math.imul(223, accu) + Caml_string.get(s, i) | 0; } accu = accu & 2147483647; diff --git a/jscomp/test/flexible_array_test.js b/jscomp/test/flexible_array_test.js index c2d2426b27..bb0579cb94 100644 --- a/jscomp/test/flexible_array_test.js +++ b/jscomp/test/flexible_array_test.js @@ -242,7 +242,7 @@ function pop_back(param) { function filter_from(i, p, s) { let u = empty; - for(let i$1 = i ,i_finish = length(s); i$1 < i_finish; ++i$1){ + for(let i$1 = i, i_finish = length(s); i$1 < i_finish; ++i$1){ let ele = get(s, i$1); if (p(ele)) { u = push_back(u, ele); @@ -254,10 +254,10 @@ function filter_from(i, p, s) { function append(a, b) { let empty$1 = empty; - for(let i = 0 ,i_finish = length(a); i < i_finish; ++i){ + for(let i = 0, i_finish = length(a); i < i_finish; ++i){ empty$1 = push_back(empty$1, get(a, i)); } - for(let i$1 = 0 ,i_finish$1 = length(b); i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = length(b); i$1 < i_finish$1; ++i$1){ empty$1 = push_back(empty$1, get(b, i$1)); } return empty$1; @@ -280,7 +280,7 @@ function sort(s) { function of_array(arr) { let v = empty; - for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ v = push_back(v, Caml_array.get(arr, i)); } return v; diff --git a/jscomp/test/for_loop_test.js b/jscomp/test/for_loop_test.js index 167938029a..534702023e 100644 --- a/jscomp/test/for_loop_test.js +++ b/jscomp/test/for_loop_test.js @@ -14,7 +14,7 @@ function for_3(x) { }; }), x); - for(let i = 0 ,i_finish = x.length; i < i_finish; ++i){ + for(let i = 0, i_finish = x.length; i < i_finish; ++i){ let j = (i << 1); Caml_array.set(arr, i, (function () { v.contents = v.contents + j | 0; @@ -35,7 +35,7 @@ function for_4(x) { }; }), x); - for(let i = 0 ,i_finish = x.length; i < i_finish; ++i){ + for(let i = 0, i_finish = x.length; i < i_finish; ++i){ let j = (i << 1); let k = (j << 1); Caml_array.set(arr, i, (function () { @@ -57,7 +57,7 @@ function for_5(x, u) { }; }), x); - for(let i = 0 ,i_finish = x.length; i < i_finish; ++i){ + for(let i = 0, i_finish = x.length; i < i_finish; ++i){ let k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function () { v.contents = v.contents + k | 0; @@ -91,7 +91,7 @@ function for_6(x, u) { let v2 = { contents: 0 }; - for(let i = 0 ,i_finish = x.length; i < i_finish; ++i){ + for(let i = 0, i_finish = x.length; i < i_finish; ++i){ let k = Math.imul((u << 1), u); let h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; diff --git a/jscomp/test/for_side_effect_test.js b/jscomp/test/for_side_effect_test.js index 0a047d4d17..f914db1ea9 100644 --- a/jscomp/test/for_side_effect_test.js +++ b/jscomp/test/for_side_effect_test.js @@ -4,7 +4,7 @@ let Mt = require("./mt.js"); function tst() { - for(let i = (console.log("hi"), 0) ,i_finish = (console.log("hello"), 3); i <= i_finish; ++i){ + for(let i = (console.log("hi"), 0), i_finish = (console.log("hello"), 3); i <= i_finish; ++i){ } } diff --git a/jscomp/test/int_overflow_test.js b/jscomp/test/int_overflow_test.js index 7658f197d3..edc59e5d9f 100644 --- a/jscomp/test/int_overflow_test.js +++ b/jscomp/test/int_overflow_test.js @@ -7,7 +7,7 @@ let Caml_string = require("../../lib/js/caml_string.js"); function hash_variant(s) { let accu = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ accu = Math.imul(223, accu) + Caml_string.get(s, i) & 2147483647; } if (accu > 1073741823) { @@ -19,7 +19,7 @@ function hash_variant(s) { function hash_variant2(s) { let accu = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ accu = Math.imul(223, accu) + Caml_string.get(s, i) | 0; } accu = accu & 2147483647; diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index d02bea44ff..bc089db4ed 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -2836,7 +2836,7 @@ function repn(r, i, j) { function set(str) { let s = /* [] */0; - for(let i = 0 ,i_finish = str.length; i < i_finish; ++i){ + for(let i = 0, i_finish = str.length; i < i_finish; ++i){ s = union(single(Caml_string.get(str, i)), s); } return { diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 3183bef6a9..58e8787499 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -14,7 +14,7 @@ let Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); function _must_escape(s) { try { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let c = s.codePointAt(i); let exit = 0; if (c >= 42) { diff --git a/jscomp/test/test_bug.js b/jscomp/test/test_bug.js index 1dd0680f50..e245ad4e49 100644 --- a/jscomp/test/test_bug.js +++ b/jscomp/test/test_bug.js @@ -7,7 +7,7 @@ let Caml_bytes = require("../../lib/js/caml_bytes.js"); function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let c = s[i]; let tmp; let exit = 0; @@ -38,7 +38,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c$1 = s[i$1]; let exit$1 = 0; if (c$1 > 92 || c$1 < 34) { diff --git a/jscomp/test/test_for_loop.js b/jscomp/test/test_for_loop.js index 343bc858c5..347774a382 100644 --- a/jscomp/test/test_for_loop.js +++ b/jscomp/test/test_for_loop.js @@ -5,13 +5,13 @@ let $$Array = require("../../lib/js/array.js"); let Caml_array = require("../../lib/js/caml_array.js"); function for_(x) { - for(let i = 0 ,i_finish = (console.log("hi"), x.length); i <= i_finish; ++i){ + for(let i = 0, i_finish = (console.log("hi"), x.length); i <= i_finish; ++i){ console.log(Caml_array.get(x, i)); } } function for_2(x) { - for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ console.log(Caml_array.get(x, i)); } } @@ -25,7 +25,7 @@ function for_3(x) { }; }), x); - for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ let j = (i << 1); Caml_array.set(arr, i, (function () { v.contents = v.contents + j | 0; @@ -46,7 +46,7 @@ function for_4(x) { }; }), x); - for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ let j = (i << 1); let k = (j << 1); Caml_array.set(arr, i, (function () { @@ -68,7 +68,7 @@ function for_5(x, u) { }; }), x); - for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ let k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function () { v.contents = v.contents + k | 0; @@ -101,7 +101,7 @@ function for_6(x, u) { let v2 = { contents: 0 }; - for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ let k = Math.imul((u << 1), u); let h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; diff --git a/lib/es6/array.js b/lib/es6/array.js index d6a7a5f4bb..8d22519dd8 100644 --- a/lib/es6/array.js +++ b/lib/es6/array.js @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs ,i_finish = ofs + len | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i], b[i]); } } @@ -148,7 +148,7 @@ function map2(f, a, b) { } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; diff --git a/lib/es6/arrayLabels.js b/lib/es6/arrayLabels.js index 54425e8f6a..1ac94c9618 100644 --- a/lib/es6/arrayLabels.js +++ b/lib/es6/arrayLabels.js @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs ,i_finish = ofs + len | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i], b[i]); } } @@ -148,7 +148,7 @@ function map2(f, a, b) { } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; diff --git a/lib/es6/belt_Array.js b/lib/es6/belt_Array.js index ddfd231929..dc3805b38b 100644 --- a/lib/es6/belt_Array.js +++ b/lib/es6/belt_Array.js @@ -76,7 +76,7 @@ function shuffle(xs) { function reverseInPlace(xs) { let len = xs.length; let ofs = 0; - for(let i = 0 ,i_finish = len / 2 | 0; i < i_finish; ++i){ + for(let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i){ swapUnsafe(xs, ofs + i | 0, ((ofs + len | 0) - i | 0) - 1 | 0); } } @@ -211,7 +211,7 @@ function concatMany(arrs) { totalLen = 0; for(let j = 0; j < lenArrs; ++j){ let cur = arrs[j]; - for(let k = 0 ,k_finish = cur.length; k < k_finish; ++k){ + for(let k = 0, k_finish = cur.length; k < k_finish; ++k){ result[totalLen] = cur[k]; totalLen = totalLen + 1 | 0; } @@ -259,7 +259,7 @@ function fill(a, offset, len, v) { if (fillLength <= 0) { return; } - for(let i = ofs ,i_finish = ofs + fillLength | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i){ a[i] = v; } } @@ -294,7 +294,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function forEachU(a, f) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -438,7 +438,7 @@ function keepMap(a, f) { } function forEachWithIndexU(a, f) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -466,7 +466,7 @@ function mapWithIndex(a, f) { function reduceU(a, x, f) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; @@ -509,7 +509,7 @@ function reduceReverse2(a, b, x, f) { function reduceWithIndexU(a, x, f) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i], i); } return r; diff --git a/lib/es6/belt_MutableMap.js b/lib/es6/belt_MutableMap.js index 009ef39219..deddefec94 100644 --- a/lib/es6/belt_MutableMap.js +++ b/lib/es6/belt_MutableMap.js @@ -339,7 +339,7 @@ function set(m, e, v) { function mergeManyAux(t, xs, cmp) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ let match = xs[i]; v = Belt_internalAVLtree.updateMutate(v, match[0], match[1], cmp); } diff --git a/lib/es6/belt_MutableQueue.js b/lib/es6/belt_MutableQueue.js index 792e610d4b..94ab476845 100644 --- a/lib/es6/belt_MutableQueue.js +++ b/lib/es6/belt_MutableQueue.js @@ -274,7 +274,7 @@ function fromArray(arr) { first: undefined, last: undefined }; - for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ add(q, arr[i]); } return q; diff --git a/lib/es6/belt_MutableSet.js b/lib/es6/belt_MutableSet.js index 49ca11d976..7ef884bc5a 100644 --- a/lib/es6/belt_MutableSet.js +++ b/lib/es6/belt_MutableSet.js @@ -174,7 +174,7 @@ function add(m, e) { function addArrayMutate(t, xs, cmp) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalAVLset.addMutate(cmp, v, xs[i]); } return v; diff --git a/lib/es6/belt_MutableSetInt.js b/lib/es6/belt_MutableSetInt.js index 1507932c69..adfd061693 100644 --- a/lib/es6/belt_MutableSetInt.js +++ b/lib/es6/belt_MutableSetInt.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalSetInt.addMutate(v, xs[i]); } return v; diff --git a/lib/es6/belt_MutableSetString.js b/lib/es6/belt_MutableSetString.js index 004803ecb6..60053fba05 100644 --- a/lib/es6/belt_MutableSetString.js +++ b/lib/es6/belt_MutableSetString.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalSetString.addMutate(v, xs[i]); } return v; diff --git a/lib/es6/belt_internalBuckets.js b/lib/es6/belt_internalBuckets.js index 7842375964..d5c51865fa 100644 --- a/lib/es6/belt_internalBuckets.js +++ b/lib/es6/belt_internalBuckets.js @@ -80,7 +80,7 @@ function do_bucket_iter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ do_bucket_iter(f, d[i]); } } @@ -107,7 +107,7 @@ function do_bucket_fold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = do_bucket_fold(f, d[i], accu); } return accu; @@ -188,7 +188,7 @@ function filterMapInplaceBucket(f, h, i, _prec, _cell) { function keepMapInPlaceU(h, f) { let h_buckets = h.buckets; - for(let i = 0 ,i_finish = h_buckets.length; i < i_finish; ++i){ + for(let i = 0, i_finish = h_buckets.length; i < i_finish; ++i){ let v = h_buckets[i]; if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); @@ -240,7 +240,7 @@ function linear(h, f) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ let cell = d[i]; if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); diff --git a/lib/es6/belt_internalSetBuckets.js b/lib/es6/belt_internalSetBuckets.js index e4b289dd09..6a7fb65037 100644 --- a/lib/es6/belt_internalSetBuckets.js +++ b/lib/es6/belt_internalSetBuckets.js @@ -77,7 +77,7 @@ function doBucketIter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ doBucketIter(f, d[i]); } } @@ -107,7 +107,7 @@ function toArray(h) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ let cell = d[i]; if (cell !== undefined) { current = fillArray(current, arr, cell); @@ -133,7 +133,7 @@ function doBucketFold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = doBucketFold(f, d[i], accu); } return accu; diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index be39f20aef..7546271b57 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i ,k_finish = l + i | 0; k < k_finish; ++k){ + for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ s[k] = c; } } @@ -230,13 +230,13 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index be39f20aef..7546271b57 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i ,k_finish = l + i | 0; k < k_finish; ++k){ + for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ s[k] = c; } } @@ -230,13 +230,13 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index 29fd105708..eb2ab0f357 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -67,7 +67,7 @@ function update_mod(shape, o, n) { return; } let comps = shape._0; - for(let i$1 = 0 ,i_finish = comps.length; i$1 < i_finish; ++i$1){ + for(let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1){ let match = comps[i$1]; let name = match[1]; aux(match[0], o[name], n[name], o, name); @@ -89,7 +89,7 @@ function update_mod(shape, o, n) { } if (shape.TAG === "Module") { let comps = shape._0; - for(let i = 0 ,i_finish = comps.length; i < i_finish; ++i){ + for(let i = 0, i_finish = comps.length; i < i_finish; ++i){ let match = comps[i]; let name = match[1]; aux(match[0], o[name], n[name], o, name); diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index 1553bd99d7..abd355c57e 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -460,7 +460,7 @@ function iter(f, h) { } try { let d = h.data; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ do_bucket(Caml_array.get(d, i)); } if (!old_trav) { @@ -521,7 +521,7 @@ function filter_map_inplace(f, h) { flip_ongoing_traversal(h); } try { - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; @@ -561,7 +561,7 @@ function fold(f, h, init) { try { let d = h.data; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = do_bucket(Caml_array.get(d, i), accu); } if (!old_trav) { diff --git a/lib/es6/lexing.js b/lib/es6/lexing.js index e2f6ccdb75..17d84cd520 100644 --- a/lib/es6/lexing.js +++ b/lib/es6/lexing.js @@ -72,7 +72,7 @@ function from_function(f) { x.lex_last_pos = x.lex_last_pos - s | 0; x.lex_buffer_len = x.lex_buffer_len - s | 0; let t = x.lex_mem; - for(let i = 0 ,i_finish = t.length; i < i_finish; ++i){ + for(let i = 0, i_finish = t.length; i < i_finish; ++i){ let v = Caml_array.get(t, i); if (v >= 0) { Caml_array.set(t, i, v - s | 0); diff --git a/lib/es6/random.js b/lib/es6/random.js index e2e703067e..06d4957792 100644 --- a/lib/es6/random.js +++ b/lib/es6/random.js @@ -31,7 +31,7 @@ function full_init(s, seed) { Caml_array.set(s.st, i, i); } let accu = "x"; - for(let i$1 = 0 ,i_finish = 54 + ( + for(let i$1 = 0, i_finish = 54 + ( 55 > l ? 55 : l ) | 0; i$1 <= i_finish; ++i$1){ let j = i$1 % 55; diff --git a/lib/es6/sort.js b/lib/es6/sort.js index 64395cfd55..7992d0e835 100644 --- a/lib/es6/sort.js +++ b/lib/es6/sort.js @@ -145,7 +145,7 @@ function array(cmp, arr) { }; }; qsort(0, arr.length - 1 | 0); - for(let i = 1 ,i_finish = arr.length; i < i_finish; ++i){ + for(let i = 1, i_finish = arr.length; i < i_finish; ++i){ let val_i = arr[i]; if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; diff --git a/lib/es6/string.js b/lib/es6/string.js index 95801f7799..58ada70c6b 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -19,13 +19,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(i, s.codePointAt(i)); } } diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index ea0b1e5eef..32fc9ca1b7 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -21,13 +21,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(i, s.codePointAt(i)); } } diff --git a/lib/js/array.js b/lib/js/array.js index 1025476d12..e1374bc84f 100644 --- a/lib/js/array.js +++ b/lib/js/array.js @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs ,i_finish = ofs + len | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i], b[i]); } } @@ -148,7 +148,7 @@ function map2(f, a, b) { } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; diff --git a/lib/js/arrayLabels.js b/lib/js/arrayLabels.js index 5f34ed8643..1e630201fe 100644 --- a/lib/js/arrayLabels.js +++ b/lib/js/arrayLabels.js @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs ,i_finish = ofs + len | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i], b[i]); } } @@ -148,7 +148,7 @@ function map2(f, a, b) { } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; diff --git a/lib/js/belt_Array.js b/lib/js/belt_Array.js index 596da5e5c6..f8e252c7f1 100644 --- a/lib/js/belt_Array.js +++ b/lib/js/belt_Array.js @@ -76,7 +76,7 @@ function shuffle(xs) { function reverseInPlace(xs) { let len = xs.length; let ofs = 0; - for(let i = 0 ,i_finish = len / 2 | 0; i < i_finish; ++i){ + for(let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i){ swapUnsafe(xs, ofs + i | 0, ((ofs + len | 0) - i | 0) - 1 | 0); } } @@ -211,7 +211,7 @@ function concatMany(arrs) { totalLen = 0; for(let j = 0; j < lenArrs; ++j){ let cur = arrs[j]; - for(let k = 0 ,k_finish = cur.length; k < k_finish; ++k){ + for(let k = 0, k_finish = cur.length; k < k_finish; ++k){ result[totalLen] = cur[k]; totalLen = totalLen + 1 | 0; } @@ -259,7 +259,7 @@ function fill(a, offset, len, v) { if (fillLength <= 0) { return; } - for(let i = ofs ,i_finish = ofs + fillLength | 0; i < i_finish; ++i){ + for(let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i){ a[i] = v; } } @@ -294,7 +294,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function forEachU(a, f) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } @@ -438,7 +438,7 @@ function keepMap(a, f) { } function forEachWithIndexU(a, f) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -466,7 +466,7 @@ function mapWithIndex(a, f) { function reduceU(a, x, f) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i]); } return r; @@ -509,7 +509,7 @@ function reduceReverse2(a, b, x, f) { function reduceWithIndexU(a, x, f) { let r = x; - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ r = f(r, a[i], i); } return r; diff --git a/lib/js/belt_MutableMap.js b/lib/js/belt_MutableMap.js index 9da165b978..7c5f421c6c 100644 --- a/lib/js/belt_MutableMap.js +++ b/lib/js/belt_MutableMap.js @@ -339,7 +339,7 @@ function set(m, e, v) { function mergeManyAux(t, xs, cmp) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ let match = xs[i]; v = Belt_internalAVLtree.updateMutate(v, match[0], match[1], cmp); } diff --git a/lib/js/belt_MutableQueue.js b/lib/js/belt_MutableQueue.js index 6f4af135ad..d1596bf99b 100644 --- a/lib/js/belt_MutableQueue.js +++ b/lib/js/belt_MutableQueue.js @@ -274,7 +274,7 @@ function fromArray(arr) { first: undefined, last: undefined }; - for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ add(q, arr[i]); } return q; diff --git a/lib/js/belt_MutableSet.js b/lib/js/belt_MutableSet.js index bc44cafdd5..f0470af53e 100644 --- a/lib/js/belt_MutableSet.js +++ b/lib/js/belt_MutableSet.js @@ -174,7 +174,7 @@ function add(m, e) { function addArrayMutate(t, xs, cmp) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalAVLset.addMutate(cmp, v, xs[i]); } return v; diff --git a/lib/js/belt_MutableSetInt.js b/lib/js/belt_MutableSetInt.js index 830f3b4e26..fc30c410de 100644 --- a/lib/js/belt_MutableSetInt.js +++ b/lib/js/belt_MutableSetInt.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalSetInt.addMutate(v, xs[i]); } return v; diff --git a/lib/js/belt_MutableSetString.js b/lib/js/belt_MutableSetString.js index f7a1bbd568..9848441f0e 100644 --- a/lib/js/belt_MutableSetString.js +++ b/lib/js/belt_MutableSetString.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0 ,i_finish = xs.length; i < i_finish; ++i){ + for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ v = Belt_internalSetString.addMutate(v, xs[i]); } return v; diff --git a/lib/js/belt_internalBuckets.js b/lib/js/belt_internalBuckets.js index bde6492a04..ce6167a2fb 100644 --- a/lib/js/belt_internalBuckets.js +++ b/lib/js/belt_internalBuckets.js @@ -80,7 +80,7 @@ function do_bucket_iter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ do_bucket_iter(f, d[i]); } } @@ -107,7 +107,7 @@ function do_bucket_fold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = do_bucket_fold(f, d[i], accu); } return accu; @@ -188,7 +188,7 @@ function filterMapInplaceBucket(f, h, i, _prec, _cell) { function keepMapInPlaceU(h, f) { let h_buckets = h.buckets; - for(let i = 0 ,i_finish = h_buckets.length; i < i_finish; ++i){ + for(let i = 0, i_finish = h_buckets.length; i < i_finish; ++i){ let v = h_buckets[i]; if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); @@ -240,7 +240,7 @@ function linear(h, f) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ let cell = d[i]; if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); diff --git a/lib/js/belt_internalSetBuckets.js b/lib/js/belt_internalSetBuckets.js index 95789558f2..f05aecdede 100644 --- a/lib/js/belt_internalSetBuckets.js +++ b/lib/js/belt_internalSetBuckets.js @@ -77,7 +77,7 @@ function doBucketIter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ doBucketIter(f, d[i]); } } @@ -107,7 +107,7 @@ function toArray(h) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ let cell = d[i]; if (cell !== undefined) { current = fillArray(current, arr, cell); @@ -133,7 +133,7 @@ function doBucketFold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = doBucketFold(f, d[i], accu); } return accu; diff --git a/lib/js/bytes.js b/lib/js/bytes.js index 7c65f2240a..648fa8f2ff 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i ,k_finish = l + i | 0; k < k_finish; ++k){ + for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ s[k] = c; } } @@ -230,13 +230,13 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index 7c65f2240a..648fa8f2ff 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i ,k_finish = l + i | 0; k < k_finish; ++k){ + for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ s[k] = c; } } @@ -230,13 +230,13 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } function iter(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(a[i]); } } function iteri(f, a) { - for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ + for(let i = 0, i_finish = a.length; i < i_finish; ++i){ f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index cb34132725..57cea1208f 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -67,7 +67,7 @@ function update_mod(shape, o, n) { return; } let comps = shape._0; - for(let i$1 = 0 ,i_finish = comps.length; i$1 < i_finish; ++i$1){ + for(let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1){ let match = comps[i$1]; let name = match[1]; aux(match[0], o[name], n[name], o, name); @@ -89,7 +89,7 @@ function update_mod(shape, o, n) { } if (shape.TAG === "Module") { let comps = shape._0; - for(let i = 0 ,i_finish = comps.length; i < i_finish; ++i){ + for(let i = 0, i_finish = comps.length; i < i_finish; ++i){ let match = comps[i]; let name = match[1]; aux(match[0], o[name], n[name], o, name); diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index cb45f8541d..02bfa200a9 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -460,7 +460,7 @@ function iter(f, h) { } try { let d = h.data; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ do_bucket(Caml_array.get(d, i)); } if (!old_trav) { @@ -521,7 +521,7 @@ function filter_map_inplace(f, h) { flip_ongoing_traversal(h); } try { - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; @@ -561,7 +561,7 @@ function fold(f, h, init) { try { let d = h.data; let accu = init; - for(let i = 0 ,i_finish = d.length; i < i_finish; ++i){ + for(let i = 0, i_finish = d.length; i < i_finish; ++i){ accu = do_bucket(Caml_array.get(d, i), accu); } if (!old_trav) { diff --git a/lib/js/lexing.js b/lib/js/lexing.js index fc24dc97ac..087e45027c 100644 --- a/lib/js/lexing.js +++ b/lib/js/lexing.js @@ -72,7 +72,7 @@ function from_function(f) { x.lex_last_pos = x.lex_last_pos - s | 0; x.lex_buffer_len = x.lex_buffer_len - s | 0; let t = x.lex_mem; - for(let i = 0 ,i_finish = t.length; i < i_finish; ++i){ + for(let i = 0, i_finish = t.length; i < i_finish; ++i){ let v = Caml_array.get(t, i); if (v >= 0) { Caml_array.set(t, i, v - s | 0); diff --git a/lib/js/random.js b/lib/js/random.js index bf7a70c1b7..686145fe5f 100644 --- a/lib/js/random.js +++ b/lib/js/random.js @@ -31,7 +31,7 @@ function full_init(s, seed) { Caml_array.set(s.st, i, i); } let accu = "x"; - for(let i$1 = 0 ,i_finish = 54 + ( + for(let i$1 = 0, i_finish = 54 + ( 55 > l ? 55 : l ) | 0; i$1 <= i_finish; ++i$1){ let j = i$1 % 55; diff --git a/lib/js/sort.js b/lib/js/sort.js index b67fc300e9..819a09270e 100644 --- a/lib/js/sort.js +++ b/lib/js/sort.js @@ -145,7 +145,7 @@ function array(cmp, arr) { }; }; qsort(0, arr.length - 1 | 0); - for(let i = 1 ,i_finish = arr.length; i < i_finish; ++i){ + for(let i = 1, i_finish = arr.length; i < i_finish; ++i){ let val_i = arr[i]; if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; diff --git a/lib/js/string.js b/lib/js/string.js index bdc1e92b46..c828d5894b 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -19,13 +19,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(i, s.codePointAt(i)); } } diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index b0e2af9c9e..bb9f069960 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -21,13 +21,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0, i_finish = s.length; i < i_finish; ++i){ f(i, s.codePointAt(i)); } } From 36c3c2711cb69d162eaff4873d6e50fc8a10e73c Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 14:05:58 +0400 Subject: [PATCH 06/18] Return spaces around () in for loop --- jscomp/core/js_dump.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 4aebdb0ed3..8265d73d5a 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -1068,7 +1068,8 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = P.group f 0 (fun _ -> (* The only place that [semi] may have semantics here *) P.string f L.for_; - P.paren_group f 1 (fun _ -> + P.space f; + let ctx = P.paren_group f 1 (fun _ -> let cxt, new_id = match (for_ident_expression, finish.expression_desc) @@ -1128,7 +1129,9 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = semi f; P.space f; pp_direction f direction; - Ext_pp_scope.ident cxt f id)) + Ext_pp_scope.ident cxt f id) in + P.space f; + ctx) in brace_block cxt f s) in From 4a6dcd2df9d9dfd2cce839d64b823f04aeee18a1 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 14:06:05 +0400 Subject: [PATCH 07/18] Commit tests output --- jscomp/test/406_primitive_test.js | 2 +- jscomp/test/array_test.js | 2 +- jscomp/test/async_inside_loop.js | 2 +- jscomp/test/bal_set_mini.js | 6 +-- jscomp/test/bdd.js | 8 +-- jscomp/test/bench.js | 6 +-- jscomp/test/bs_MapInt_test.js | 6 +-- jscomp/test/bs_array_test.js | 4 +- jscomp/test/bs_hashmap_test.js | 4 +- jscomp/test/bs_hashset_int_test.js | 8 +-- jscomp/test/bs_list_test.js | 2 +- jscomp/test/bs_map_set_dict_test.js | 4 +- jscomp/test/bs_mutable_set_test.js | 14 ++--- jscomp/test/bs_poly_mutable_set_test.js | 4 +- jscomp/test/bs_queue_test.js | 22 ++++---- jscomp/test/bs_set_int_test.js | 2 +- jscomp/test/buffer_test.js | 2 +- jscomp/test/complex_if_test.js | 4 +- jscomp/test/cps_test.js | 4 +- jscomp/test/demo_int_map.js | 4 +- jscomp/test/demo_page.js | 2 +- jscomp/test/earger_curry_test.js | 6 +-- jscomp/test/ext_array_test.js | 4 +- jscomp/test/ext_bytes_test.js | 6 +-- jscomp/test/ext_pervasives_test.js | 2 +- jscomp/test/ext_string_test.js | 2 +- jscomp/test/fib.js | 2 +- jscomp/test/flexible_array_test.js | 8 +-- jscomp/test/floatarray_test.js | 2 +- jscomp/test/for_loop_test.js | 22 ++++---- jscomp/test/for_side_effect_test.js | 4 +- jscomp/test/gpr_4280_test.js | 4 +- jscomp/test/gpr_858_unit2_test.js | 2 +- jscomp/test/gpr_977_test.js | 4 +- jscomp/test/hashtbl_test.js | 4 +- jscomp/test/inline_record_test.js | 4 +- jscomp/test/int64_string_bench.js | 6 +-- jscomp/test/int64_string_test.js | 10 ++-- jscomp/test/int_hashtbl_test.js | 4 +- jscomp/test/int_overflow_test.js | 4 +- jscomp/test/libqueue_test.js | 22 ++++---- jscomp/test/map_test.js | 4 +- jscomp/test/ocaml_re_test.js | 6 +-- jscomp/test/random_test.js | 2 +- jscomp/test/raw_hash_tbl_bench.js | 6 +-- jscomp/test/sexpm.js | 2 +- jscomp/test/stack_comp_test.js | 16 +++--- jscomp/test/string_set_test.js | 2 +- jscomp/test/tagged_template_test.js | 2 +- jscomp/test/tailcall_inline_test.js | 2 +- jscomp/test/test_array_primitive.js | 4 +- jscomp/test/test_bug.js | 4 +- jscomp/test/test_closure.js | 2 +- jscomp/test/test_cps.js | 2 +- jscomp/test/test_demo.js | 2 +- jscomp/test/test_fib.js | 4 +- jscomp/test/test_for_loop.js | 14 ++--- jscomp/test/test_for_map.js | 4 +- jscomp/test/test_for_map2.js | 4 +- jscomp/test/test_google_closure.js | 2 +- jscomp/test/test_runtime_encoding.js | 2 +- jscomp/test/test_static_catch_ident.js | 2 +- jscomp/test/test_string_map.js | 4 +- jscomp/test/test_tuple.js | 4 +- lib/es6/array.js | 28 +++++----- lib/es6/arrayLabels.js | 28 +++++----- lib/es6/belt_Array.js | 70 ++++++++++++------------- lib/es6/belt_HashMap.js | 8 +-- lib/es6/belt_HashMapInt.js | 8 +-- lib/es6/belt_HashMapString.js | 8 +-- lib/es6/belt_HashSet.js | 8 +-- lib/es6/belt_HashSetInt.js | 8 +-- lib/es6/belt_HashSetString.js | 8 +-- lib/es6/belt_List.js | 2 +- lib/es6/belt_MapDict.js | 2 +- lib/es6/belt_MapInt.js | 2 +- lib/es6/belt_MapString.js | 2 +- lib/es6/belt_MutableMap.js | 2 +- lib/es6/belt_MutableQueue.js | 2 +- lib/es6/belt_MutableSet.js | 2 +- lib/es6/belt_MutableSetInt.js | 2 +- lib/es6/belt_MutableSetString.js | 2 +- lib/es6/belt_Range.js | 2 +- lib/es6/belt_SetDict.js | 4 +- lib/es6/belt_SetInt.js | 4 +- lib/es6/belt_SetString.js | 4 +- lib/es6/belt_SortArray.js | 2 +- lib/es6/belt_SortArrayInt.js | 2 +- lib/es6/belt_SortArrayString.js | 2 +- lib/es6/belt_internalAVLset.js | 2 +- lib/es6/belt_internalAVLtree.js | 2 +- lib/es6/belt_internalBuckets.js | 10 ++-- lib/es6/belt_internalBucketsType.js | 2 +- lib/es6/belt_internalMapInt.js | 2 +- lib/es6/belt_internalMapString.js | 2 +- lib/es6/belt_internalSetBuckets.js | 8 +-- lib/es6/belt_internalSetInt.js | 2 +- lib/es6/belt_internalSetString.js | 2 +- lib/es6/bytes.js | 36 ++++++------- lib/es6/bytesLabels.js | 36 ++++++------- lib/es6/caml_array.js | 8 +-- lib/es6/caml_bytes.js | 2 +- lib/es6/caml_format.js | 6 +-- lib/es6/caml_hash.js | 2 +- lib/es6/caml_hash_primitive.js | 2 +- lib/es6/caml_md5.js | 12 ++--- lib/es6/caml_module.js | 6 +-- lib/es6/digest.js | 4 +- lib/es6/filename.js | 4 +- lib/es6/hashtbl.js | 12 ++--- lib/es6/js_dict.js | 8 +-- lib/es6/lexing.js | 2 +- lib/es6/random.js | 6 +-- lib/es6/sort.js | 2 +- lib/es6/string.js | 6 +-- lib/es6/stringLabels.js | 6 +-- lib/js/array.js | 28 +++++----- lib/js/arrayLabels.js | 28 +++++----- lib/js/belt_Array.js | 70 ++++++++++++------------- lib/js/belt_HashMap.js | 8 +-- lib/js/belt_HashMapInt.js | 8 +-- lib/js/belt_HashMapString.js | 8 +-- lib/js/belt_HashSet.js | 8 +-- lib/js/belt_HashSetInt.js | 8 +-- lib/js/belt_HashSetString.js | 8 +-- lib/js/belt_List.js | 2 +- lib/js/belt_MapDict.js | 2 +- lib/js/belt_MapInt.js | 2 +- lib/js/belt_MapString.js | 2 +- lib/js/belt_MutableMap.js | 2 +- lib/js/belt_MutableQueue.js | 2 +- lib/js/belt_MutableSet.js | 2 +- lib/js/belt_MutableSetInt.js | 2 +- lib/js/belt_MutableSetString.js | 2 +- lib/js/belt_Range.js | 2 +- lib/js/belt_SetDict.js | 4 +- lib/js/belt_SetInt.js | 4 +- lib/js/belt_SetString.js | 4 +- lib/js/belt_SortArray.js | 2 +- lib/js/belt_SortArrayInt.js | 2 +- lib/js/belt_SortArrayString.js | 2 +- lib/js/belt_internalAVLset.js | 2 +- lib/js/belt_internalAVLtree.js | 2 +- lib/js/belt_internalBuckets.js | 10 ++-- lib/js/belt_internalBucketsType.js | 2 +- lib/js/belt_internalMapInt.js | 2 +- lib/js/belt_internalMapString.js | 2 +- lib/js/belt_internalSetBuckets.js | 8 +-- lib/js/belt_internalSetInt.js | 2 +- lib/js/belt_internalSetString.js | 2 +- lib/js/bytes.js | 36 ++++++------- lib/js/bytesLabels.js | 36 ++++++------- lib/js/caml_array.js | 8 +-- lib/js/caml_bytes.js | 2 +- lib/js/caml_format.js | 6 +-- lib/js/caml_hash.js | 2 +- lib/js/caml_hash_primitive.js | 2 +- lib/js/caml_md5.js | 12 ++--- lib/js/caml_module.js | 6 +-- lib/js/digest.js | 4 +- lib/js/filename.js | 4 +- lib/js/hashtbl.js | 12 ++--- lib/js/js_dict.js | 8 +-- lib/js/lexing.js | 2 +- lib/js/random.js | 6 +-- lib/js/sort.js | 2 +- lib/js/string.js | 6 +-- lib/js/stringLabels.js | 6 +-- 168 files changed, 569 insertions(+), 569 deletions(-) diff --git a/jscomp/test/406_primitive_test.js b/jscomp/test/406_primitive_test.js index 87114ada18..35fd327e7e 100644 --- a/jscomp/test/406_primitive_test.js +++ b/jscomp/test/406_primitive_test.js @@ -32,7 +32,7 @@ eq("File \"406_primitive_test.res\", line 23, characters 3-10", backend_type, { function f() { let A = /* @__PURE__ */Caml_exceptions.create("A"); try { - for(let i = 0; i <= 200; ++i){ + for (let i = 0; i <= 200; ++i) { if (i === 10) { throw new Error(A, { cause: { diff --git a/jscomp/test/array_test.js b/jscomp/test/array_test.js index a3d5f169a3..4753259574 100644 --- a/jscomp/test/array_test.js +++ b/jscomp/test/array_test.js @@ -18,7 +18,7 @@ function starts_with(xs, prefix, p) { return false; } try { - for(let i = 0; i < len2; ++i){ + for (let i = 0; i < len2; ++i) { if (!p(Caml_array.get(xs, i), Caml_array.get(prefix, i))) { throw new Error(H, { cause: { diff --git a/jscomp/test/async_inside_loop.js b/jscomp/test/async_inside_loop.js index 226c4ac47b..0f1d7d0fe1 100644 --- a/jscomp/test/async_inside_loop.js +++ b/jscomp/test/async_inside_loop.js @@ -3,7 +3,7 @@ async function topLevelAsyncFunction() { - for(let innerScopeVal = 0; innerScopeVal <= 3; ++innerScopeVal){ + for (let innerScopeVal = 0; innerScopeVal <= 3; ++innerScopeVal) { let asyncClosureAccessingScopedVal = async function () { console.log("Accessing scoped var inside loop", innerScopeVal); return await Promise.resolve(); diff --git a/jscomp/test/bal_set_mini.js b/jscomp/test/bal_set_mini.js index 45059e12cf..efc0a3daa8 100644 --- a/jscomp/test/bal_set_mini.js +++ b/jscomp/test/bal_set_mini.js @@ -167,18 +167,18 @@ function mem(x, _x_) { let v = "Empty"; -for(let i = 0; i <= 100000; ++i){ +for (let i = 0; i <= 100000; ++i) { v = add(i, v); } -for(let i$1 = 0; i$1 <= 100000; ++i$1){ +for (let i$1 = 0; i$1 <= 100000; ++i$1) { if (!mem(i$1, v)) { console.log("impossible"); } } -for(let i$2 = 0; i$2 <= 100000; ++i$2){ +for (let i$2 = 0; i$2 <= 100000; ++i$2) { v = remove(i$2, v); } diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index b126de3cb2..830014b283 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -99,7 +99,7 @@ function resize(newSize) { } }; }; - for(let n = 0, n_finish = sz_1.contents; n <= n_finish; ++n){ + for (let n = 0, n_finish = sz_1.contents; n <= n_finish; ++n) { copyBucket(Caml_array.get(arr, n)); } htab.contents = newArr; @@ -364,7 +364,7 @@ function random() { function random_vars(n) { let vars = Caml_array.make(n, false); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { Caml_array.set(vars, i, random()); } return vars; @@ -386,7 +386,7 @@ function bool_equal(a, b) { function test_hwb(bdd, vars) { let ntrue = 0; - for(let i = 0, i_finish = vars.length; i < i_finish; ++i){ + for (let i = 0, i_finish = vars.length; i < i_finish; ++i) { if (Caml_array.get(vars, i)) { ntrue = ntrue + 1 | 0; } @@ -398,7 +398,7 @@ function test_hwb(bdd, vars) { function main() { let bdd = hwb(22); let succeeded = true; - for(let i = 1; i <= 100; ++i){ + for (let i = 1; i <= 100; ++i) { succeeded = succeeded && test_hwb(bdd, random_vars(22)); } if (succeeded) { diff --git a/jscomp/test/bench.js b/jscomp/test/bench.js index f1103435ae..c4eefe7078 100644 --- a/jscomp/test/bench.js +++ b/jscomp/test/bench.js @@ -13,7 +13,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f$1(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f$1(a[i]); } return r; @@ -35,7 +35,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f$1(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f$1(i); } return res; @@ -46,7 +46,7 @@ function fold_left(f, x, a) { return f(x, y); }; let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f$1(r, a[i]); } return r; diff --git a/jscomp/test/bs_MapInt_test.js b/jscomp/test/bs_MapInt_test.js index 4934a8aaf3..f076fc6a75 100644 --- a/jscomp/test/bs_MapInt_test.js +++ b/jscomp/test/bs_MapInt_test.js @@ -13,13 +13,13 @@ function should(b) { function test() { let m; - for(let i = 0; i <= 999999; ++i){ + for (let i = 0; i <= 999999; ++i) { m = Belt_MapInt.set(m, i, i); } - for(let i$1 = 0; i$1 <= 999999; ++i$1){ + for (let i$1 = 0; i$1 <= 999999; ++i$1) { should(Belt_MapInt.get(m, i$1) !== undefined); } - for(let i$2 = 0; i$2 <= 999999; ++i$2){ + for (let i$2 = 0; i$2 <= 999999; ++i$2) { m = Belt_MapInt.remove(m, i$2); } should(Belt_MapInt.isEmpty(m)); diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index c2abc8919b..42127e7a76 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -290,9 +290,9 @@ function makeMatrixExn(sx, sy, init) { }); } let res = new Array(sx); - for(let x = 0; x < sx; ++x){ + for (let x = 0; x < sx; ++x) { let initY = new Array(sy); - for(let y = 0; y < sy; ++y){ + for (let y = 0; y < sy; ++y) { initY[y] = init; } res[x] = initY; diff --git a/jscomp/test/bs_hashmap_test.js b/jscomp/test/bs_hashmap_test.js index e44cd0452e..04a18931f9 100644 --- a/jscomp/test/bs_hashmap_test.js +++ b/jscomp/test/bs_hashmap_test.js @@ -84,13 +84,13 @@ Belt_HashMap.mergeMany(v$1, Belt_Array.zip(u$1, u$1)); eqx("File \"bs_hashmap_test.res\", line 49, characters 6-13", v$1.size, 100001); -for(let i = 0; i <= 1000; ++i){ +for (let i = 0; i <= 1000; ++i) { Belt_HashMap.remove(v$1, i); } eqx("File \"bs_hashmap_test.res\", line 53, characters 6-13", v$1.size, 99000); -for(let i$1 = 0; i$1 <= 2000; ++i$1){ +for (let i$1 = 0; i$1 <= 2000; ++i$1) { Belt_HashMap.remove(v$1, i$1); } diff --git a/jscomp/test/bs_hashset_int_test.js b/jscomp/test/bs_hashset_int_test.js index 3abb87e389..36dbe3366d 100644 --- a/jscomp/test/bs_hashset_int_test.js +++ b/jscomp/test/bs_hashset_int_test.js @@ -61,13 +61,13 @@ Belt_HashSetInt.mergeMany(v$1, u$1); eq("File \"bs_hashset_int_test.res\", line 32, characters 5-12", v$1.size, 100001); -for(let i = 0; i <= 1000; ++i){ +for (let i = 0; i <= 1000; ++i) { Belt_HashSetInt.remove(v$1, i); } eq("File \"bs_hashset_int_test.res\", line 36, characters 5-12", v$1.size, 99000); -for(let i$1 = 0; i$1 <= 2000; ++i$1){ +for (let i$1 = 0; i$1 <= 2000; ++i$1) { Belt_HashSetInt.remove(v$1, i$1); } @@ -79,11 +79,11 @@ let u1 = Belt_HashSetInt.copy(u0); eq("File \"bs_hashset_int_test.res\", line 49, characters 5-12", Belt_HashSetInt.toArray(u0), Belt_HashSetInt.toArray(u1)); -for(let i$2 = 0; i$2 <= 2000; ++i$2){ +for (let i$2 = 0; i$2 <= 2000; ++i$2) { Belt_HashSetInt.remove(u1, i$2); } -for(let i$3 = 0; i$3 <= 1000; ++i$3){ +for (let i$3 = 0; i$3 <= 1000; ++i$3) { Belt_HashSetInt.remove(u0, i$3); } diff --git a/jscomp/test/bs_list_test.js b/jscomp/test/bs_list_test.js index 3d5f260957..ab3f5d2f58 100644 --- a/jscomp/test/bs_list_test.js +++ b/jscomp/test/bs_list_test.js @@ -55,7 +55,7 @@ function f(i) { eq("File \"bs_list_test.res\", line 27, characters 18-25", Belt_List.getExn(u, i), Math.imul(i, i)); } -for(let i = 0; i <= 4; ++i){ +for (let i = 0; i <= 4; ++i) { f(i); } diff --git a/jscomp/test/bs_map_set_dict_test.js b/jscomp/test/bs_map_set_dict_test.js index 0f22228a21..7a481f76e4 100644 --- a/jscomp/test/bs_map_set_dict_test.js +++ b/jscomp/test/bs_map_set_dict_test.js @@ -71,7 +71,7 @@ Belt_Map.getId(m2); let m_dict = Belt_Map.getId(m); -for(let i = 0; i <= 100000; ++i){ +for (let i = 0; i <= 100000; ++i) { data = Belt_MapDict.set(data, i, i, m_dict.cmp); } @@ -96,7 +96,7 @@ let cmp = m_dict$1.cmp; let data$2; -for(let i$1 = 0; i$1 <= 100000; ++i$1){ +for (let i$1 = 0; i$1 <= 100000; ++i$1) { data$2 = Belt_SetDict.add(data$2, i$1, cmp); } diff --git a/jscomp/test/bs_mutable_set_test.js b/jscomp/test/bs_mutable_set_test.js index b2fecf0a67..484e86f318 100644 --- a/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/bs_mutable_set_test.js @@ -51,7 +51,7 @@ b("File \"bs_mutable_set_test.res\", line 28, characters 8-15", 1 === Belt_inter Belt_MutableSetInt.add(u, 3); -for(let i = 0, i_finish = r.length; i < i_finish; ++i){ +for (let i = 0, i_finish = r.length; i < i_finish; ++i) { Belt_MutableSetInt.remove(u, r[i]); } @@ -69,7 +69,7 @@ eq("File \"bs_mutable_set_test.res\", line 38, characters 9-16", Belt_internalAV b("File \"bs_mutable_set_test.res\", line 39, characters 8-15", !Belt_MutableSetInt.isEmpty(u)); -for(let i$1 = 0; i$1 <= 3; ++i$1){ +for (let i$1 = 0; i$1 <= 3; ++i$1) { Belt_MutableSetInt.remove(u, i$1); } @@ -421,7 +421,7 @@ let v$1 = { data: undefined }; -for(let i$2 = 0; i$2 <= 100000; ++i$2){ +for (let i$2 = 0; i$2 <= 100000; ++i$2) { Belt_MutableSetInt.add(v$1, i$2); } @@ -455,7 +455,7 @@ eq("File \"bs_mutable_set_test.res\", line 203, characters 5-12", Belt_internalA let u$3 = Array_data_util.randomRange(50000, 80000); -for(let i$3 = 0, i_finish$1 = u$3.length; i$3 < i_finish$1; ++i$3){ +for (let i$3 = 0, i_finish$1 = u$3.length; i$3 < i_finish$1; ++i$3) { Belt_MutableSetInt.remove(v$3, i$3); } @@ -463,7 +463,7 @@ eq("File \"bs_mutable_set_test.res\", line 210, characters 5-12", Belt_internalA let vv = Array_data_util.randomRange(0, 100000); -for(let i$4 = 0, i_finish$2 = vv.length; i$4 < i_finish$2; ++i$4){ +for (let i$4 = 0, i_finish$2 = vv.length; i$4 < i_finish$2; ++i$4) { Belt_MutableSetInt.remove(v$3, Caml_array.get(vv, i$4)); } @@ -493,7 +493,7 @@ eq("File \"bs_mutable_set_test.res\", line 227, characters 5-12", Belt_internalA let vv$1 = Array_data_util.randomRange(1, 28); -for(let i$5 = 0, i_finish$3 = vv$1.length; i$5 < i_finish$3; ++i$5){ +for (let i$5 = 0, i_finish$3 = vv$1.length; i$5 < i_finish$3; ++i$5) { Belt_MutableSetInt.remove(v$4, Caml_array.get(vv$1, i$5)); } @@ -610,7 +610,7 @@ let cc$1 = Belt_MutableSetInt.keep(v$5, (function (x) { return x % 8 !== 0; })); -for(let i$6 = 0; i$6 <= 200; ++i$6){ +for (let i$6 = 0; i$6 <= 200; ++i$6) { Belt_MutableSetInt.remove(v$5, i$6); } diff --git a/jscomp/test/bs_poly_mutable_set_test.js b/jscomp/test/bs_poly_mutable_set_test.js index b70f7a1cf6..338cec9700 100644 --- a/jscomp/test/bs_poly_mutable_set_test.js +++ b/jscomp/test/bs_poly_mutable_set_test.js @@ -59,7 +59,7 @@ b("File \"bs_poly_mutable_set_test.res\", line 23, characters 4-11", 1 === Belt_ Belt_MutableSet.add(u, 3); -for(let i = 0, i_finish = r.length; i < i_finish; ++i){ +for (let i = 0, i_finish = r.length; i < i_finish; ++i) { Belt_MutableSet.remove(u, r[i]); } @@ -77,7 +77,7 @@ eq("File \"bs_poly_mutable_set_test.res\", line 33, characters 5-12", Belt_inter b("File \"bs_poly_mutable_set_test.res\", line 34, characters 4-11", !Belt_MutableSet.isEmpty(u)); -for(let i$1 = 0; i$1 <= 3; ++i$1){ +for (let i$1 = 0; i$1 <= 3; ++i$1) { Belt_MutableSet.remove(u, i$1); } diff --git a/jscomp/test/bs_queue_test.js b/jscomp/test/bs_queue_test.js index 1bb2a3472d..803b9790f7 100644 --- a/jscomp/test/bs_queue_test.js +++ b/jscomp/test/bs_queue_test.js @@ -469,7 +469,7 @@ let q$3 = { last: undefined }; -for(let i = 1; i <= 10; ++i){ +for (let i = 1; i <= 10; ++i) { Belt_MutableQueue.add(q$3, i); } @@ -539,7 +539,7 @@ let q1 = { last: undefined }; -for(let i$1 = 1; i$1 <= 10; ++i$1){ +for (let i$1 = 1; i$1 <= 10; ++i$1) { Belt_MutableQueue.add(q1, i$1); } @@ -619,7 +619,7 @@ if (q2.length !== 10) { }); } -for(let i$2 = 1; i$2 <= 10; ++i$2){ +for (let i$2 = 1; i$2 <= 10; ++i$2) { if (Belt_MutableQueue.popExn(q1) !== i$2) { throw new Error("Assert_failure", { cause: { @@ -635,7 +635,7 @@ for(let i$2 = 1; i$2 <= 10; ++i$2){ } -for(let i$3 = 1; i$3 <= 10; ++i$3){ +for (let i$3 = 1; i$3 <= 10; ++i$3) { if (Belt_MutableQueue.popExn(q2) !== i$3) { throw new Error("Assert_failure", { cause: { @@ -670,7 +670,7 @@ if (q$4.length !== 0) { }); } -for(let i$4 = 1; i$4 <= 10; ++i$4){ +for (let i$4 = 1; i$4 <= 10; ++i$4) { Belt_MutableQueue.add(q$4, i$4); if (q$4.length !== i$4) { throw new Error("Assert_failure", { @@ -699,7 +699,7 @@ for(let i$4 = 1; i$4 <= 10; ++i$4){ } -for(let i$5 = 10; i$5 >= 1; --i$5){ +for (let i$5 = 10; i$5 >= 1; --i$5) { if (q$4.length !== i$5) { throw new Error("Assert_failure", { cause: { @@ -759,7 +759,7 @@ let q$5 = { last: undefined }; -for(let i$6 = 1; i$6 <= 10; ++i$6){ +for (let i$6 = 1; i$6 <= 10; ++i$6) { Belt_MutableQueue.add(q$5, i$6); } @@ -913,7 +913,7 @@ let q2$2 = { last: undefined }; -for(let i$8 = 1; i$8 <= 4; ++i$8){ +for (let i$8 = 1; i$8 <= 4; ++i$8) { Belt_MutableQueue.add(q1$2, i$8); } @@ -1045,7 +1045,7 @@ let q2$3 = { last: undefined }; -for(let i$9 = 5; i$9 <= 8; ++i$9){ +for (let i$9 = 5; i$9 <= 8; ++i$9) { Belt_MutableQueue.add(q2$3, i$9); } @@ -1177,11 +1177,11 @@ let q2$4 = { last: undefined }; -for(let i$10 = 1; i$10 <= 4; ++i$10){ +for (let i$10 = 1; i$10 <= 4; ++i$10) { Belt_MutableQueue.add(q1$4, i$10); } -for(let i$11 = 5; i$11 <= 8; ++i$11){ +for (let i$11 = 5; i$11 <= 8; ++i$11) { Belt_MutableQueue.add(q2$4, i$11); } diff --git a/jscomp/test/bs_set_int_test.js b/jscomp/test/bs_set_int_test.js index 80039fd7d5..b3eb0f0a2a 100644 --- a/jscomp/test/bs_set_int_test.js +++ b/jscomp/test/bs_set_int_test.js @@ -80,7 +80,7 @@ let l; let r; -for(let i$1 = 100; i$1 <= 1500; ++i$1){ +for (let i$1 = 100; i$1 <= 1500; ++i$1) { if (i$1 % 3 === 0) { l = Belt_SetInt.add(l, i$1); } else { diff --git a/jscomp/test/buffer_test.js b/jscomp/test/buffer_test.js index 71888e3cba..8c5c3c9701 100644 --- a/jscomp/test/buffer_test.js +++ b/jscomp/test/buffer_test.js @@ -50,7 +50,7 @@ let suites_1 = { "buffer", (function (param) { let v = Buffer.create(30); - for(let i = 0; i <= 10; ++i){ + for (let i = 0; i <= 10; ++i) { Buffer.add_string(v, String(i)); } return { diff --git a/jscomp/test/complex_if_test.js b/jscomp/test/complex_if_test.js index 90c77d5c55..62d5240e6a 100644 --- a/jscomp/test/complex_if_test.js +++ b/jscomp/test/complex_if_test.js @@ -15,7 +15,7 @@ function fib(x) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -38,7 +38,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { diff --git a/jscomp/test/cps_test.js b/jscomp/test/cps_test.js index 8939bea0dd..78e5957bf0 100644 --- a/jscomp/test/cps_test.js +++ b/jscomp/test/cps_test.js @@ -37,7 +37,7 @@ function test_closure() { let arr = Caml_array.make(6, (function (x) { return x; })); - for(let i = 0; i <= 5; ++i){ + for (let i = 0; i <= 5; ++i) { Caml_array.set(arr, i, (function (param) { return i; })); @@ -55,7 +55,7 @@ function test_closure2() { let arr = Caml_array.make(6, (function (x) { return x; })); - for(let i = 0; i <= 5; ++i){ + for (let i = 0; i <= 5; ++i) { let j = i + i | 0; Caml_array.set(arr, i, (function (param) { return j; diff --git a/jscomp/test/demo_int_map.js b/jscomp/test/demo_int_map.js index 34ee5f4df4..37009e1015 100644 --- a/jscomp/test/demo_int_map.js +++ b/jscomp/test/demo_int_map.js @@ -157,10 +157,10 @@ function find(x, _param) { function test() { let m = "Empty"; - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { m = add(i, i, m); } - for(let i$1 = 0; i$1 <= 1000000; ++i$1){ + for (let i$1 = 0; i$1 <= 1000000; ++i$1) { find(i$1, m); } } diff --git a/jscomp/test/demo_page.js b/jscomp/test/demo_page.js index 03af90cb46..2148270da4 100644 --- a/jscomp/test/demo_page.js +++ b/jscomp/test/demo_page.js @@ -14,7 +14,7 @@ function fib(x) { function sum(n) { let v = 0; - for(let i = 0; i <= n; ++i){ + for (let i = 0; i <= n; ++i) { v = v + i | 0; } return v; diff --git a/jscomp/test/earger_curry_test.js b/jscomp/test/earger_curry_test.js index f36ecee8a2..c135ad49fb 100644 --- a/jscomp/test/earger_curry_test.js +++ b/jscomp/test/earger_curry_test.js @@ -14,7 +14,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f$1(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f$1(a[i]); } return r; @@ -36,7 +36,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f$1(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f$1(i); } return res; @@ -47,7 +47,7 @@ function fold_left(f, x, a) { return f(x, y); }; let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f$1(r, a[i]); } return r; diff --git a/jscomp/test/ext_array_test.js b/jscomp/test/ext_array_test.js index f23592ff27..9fd4282ea3 100644 --- a/jscomp/test/ext_array_test.js +++ b/jscomp/test/ext_array_test.js @@ -10,7 +10,7 @@ function reverse_range(a, i, len) { if (len === 0) { return; } - for(let k = 0, k_finish = (len - 1 | 0) / 2 | 0; k <= k_finish; ++k){ + for (let k = 0, k_finish = (len - 1 | 0) / 2 | 0; k <= k_finish; ++k) { let t = a[i + k | 0]; a[i + k | 0] = a[((i + len | 0) - 1 | 0) - k | 0]; a[((i + len | 0) - 1 | 0) - k | 0] = t; @@ -27,7 +27,7 @@ function reverse(a) { return []; } let b = $$Array.copy(a); - for(let i = 0; i < b_len; ++i){ + for (let i = 0; i < b_len; ++i) { b[i] = a[(b_len - 1 | 0) - i | 0]; } return b; diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index f30a2aa205..c5d9b7d860 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -23,7 +23,7 @@ function eq(loc, x, y) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -46,7 +46,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { @@ -134,7 +134,7 @@ function starts_with(xs, prefix, p) { return false; } try { - for(let i = 0; i < len2; ++i){ + for (let i = 0; i < len2; ++i) { if (!p(Caml_bytes.get(xs, i), Caml_bytes.get(prefix, i))) { throw new Error(H, { cause: { diff --git a/jscomp/test/ext_pervasives_test.js b/jscomp/test/ext_pervasives_test.js index ee316aa7bf..2edf2335ef 100644 --- a/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/ext_pervasives_test.js @@ -93,7 +93,7 @@ function is_pos_pow_2(n) { function hash_variant(s) { let accu = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { accu = Math.imul(223, accu) + Caml_string.get(s, i) | 0; } accu = accu & 2147483647; diff --git a/jscomp/test/ext_string_test.js b/jscomp/test/ext_string_test.js index a9cf746e98..bc5744ec11 100644 --- a/jscomp/test/ext_string_test.js +++ b/jscomp/test/ext_string_test.js @@ -238,7 +238,7 @@ function is_empty(s) { function repeat(n, s) { let len = s.length; let res = Caml_bytes.create(Math.imul(n, len)); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { $$String.blit(s, 0, res, Math.imul(i, len), len); } return Bytes.to_string(res); diff --git a/jscomp/test/fib.js b/jscomp/test/fib.js index 1bb77507c2..8219349751 100644 --- a/jscomp/test/fib.js +++ b/jscomp/test/fib.js @@ -31,7 +31,7 @@ function fib2(n) { function fib3(n) { let a = 1; let b = 1; - for(let i = 1; i <= n; ++i){ + for (let i = 1; i <= n; ++i) { let tmp = a; a = b; b = b + tmp | 0; diff --git a/jscomp/test/flexible_array_test.js b/jscomp/test/flexible_array_test.js index bb0579cb94..fe7b0dd111 100644 --- a/jscomp/test/flexible_array_test.js +++ b/jscomp/test/flexible_array_test.js @@ -242,7 +242,7 @@ function pop_back(param) { function filter_from(i, p, s) { let u = empty; - for(let i$1 = i, i_finish = length(s); i$1 < i_finish; ++i$1){ + for (let i$1 = i, i_finish = length(s); i$1 < i_finish; ++i$1) { let ele = get(s, i$1); if (p(ele)) { u = push_back(u, ele); @@ -254,10 +254,10 @@ function filter_from(i, p, s) { function append(a, b) { let empty$1 = empty; - for(let i = 0, i_finish = length(a); i < i_finish; ++i){ + for (let i = 0, i_finish = length(a); i < i_finish; ++i) { empty$1 = push_back(empty$1, get(a, i)); } - for(let i$1 = 0, i_finish$1 = length(b); i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = length(b); i$1 < i_finish$1; ++i$1) { empty$1 = push_back(empty$1, get(b, i$1)); } return empty$1; @@ -280,7 +280,7 @@ function sort(s) { function of_array(arr) { let v = empty; - for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ + for (let i = 0, i_finish = arr.length; i < i_finish; ++i) { v = push_back(v, Caml_array.get(arr, i)); } return v; diff --git a/jscomp/test/floatarray_test.js b/jscomp/test/floatarray_test.js index bc248ec6d9..1a799f592d 100644 --- a/jscomp/test/floatarray_test.js +++ b/jscomp/test/floatarray_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { let v = Caml_array.make_float(5); -for(let i = 0; i <= 4; ++i){ +for (let i = 0; i <= 4; ++i) { v[i] = 0; } diff --git a/jscomp/test/for_loop_test.js b/jscomp/test/for_loop_test.js index 534702023e..55b6cf0e27 100644 --- a/jscomp/test/for_loop_test.js +++ b/jscomp/test/for_loop_test.js @@ -14,7 +14,7 @@ function for_3(x) { }; }), x); - for(let i = 0, i_finish = x.length; i < i_finish; ++i){ + for (let i = 0, i_finish = x.length; i < i_finish; ++i) { let j = (i << 1); Caml_array.set(arr, i, (function () { v.contents = v.contents + j | 0; @@ -35,7 +35,7 @@ function for_4(x) { }; }), x); - for(let i = 0, i_finish = x.length; i < i_finish; ++i){ + for (let i = 0, i_finish = x.length; i < i_finish; ++i) { let j = (i << 1); let k = (j << 1); Caml_array.set(arr, i, (function () { @@ -57,7 +57,7 @@ function for_5(x, u) { }; }), x); - for(let i = 0, i_finish = x.length; i < i_finish; ++i){ + for (let i = 0, i_finish = x.length; i < i_finish; ++i) { let k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function () { v.contents = v.contents + k | 0; @@ -86,12 +86,12 @@ function for_6(x, u) { }; let inspect_3 = -1; v4.contents = v4.contents + 1 | 0; - for(let j = 0; j <= 1; ++j){ + for (let j = 0; j <= 1; ++j) { v5.contents = v5.contents + 1 | 0; let v2 = { contents: 0 }; - for(let i = 0, i_finish = x.length; i < i_finish; ++i){ + for (let i = 0, i_finish = x.length; i < i_finish; ++i) { let k = Math.imul((u << 1), u); let h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; @@ -119,8 +119,8 @@ function for_7() { let arr = Caml_array.make(21, (function () { })); - for(let i = 0; i <= 6; ++i){ - for(let j = 0; j <= 2; ++j){ + for (let i = 0; i <= 6; ++i) { + for (let j = 0; j <= 2; ++j) { Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function () { v.contents = (v.contents + i | 0) + j | 0; })); @@ -139,9 +139,9 @@ function for_8() { let arr = Caml_array.make(21, (function () { })); - for(let i = 0; i <= 6; ++i){ + for (let i = 0; i <= 6; ++i) { let k = (i << 1); - for(let j = 0; j <= 2; ++j){ + for (let j = 0; j <= 2; ++j) { let h = i + j | 0; Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function () { v.contents = (((v.contents + i | 0) + j | 0) + h | 0) + k | 0; @@ -176,12 +176,12 @@ function for_9() { let arr2 = Caml_array.make(2, (function () { })); - for(let i = 0; i <= 1; ++i){ + for (let i = 0; i <= 1; ++i) { let v$1 = { contents: 0 }; v$1.contents = v$1.contents + i | 0; - for(let j = 0; j <= 1; ++j){ + for (let j = 0; j <= 1; ++j) { v$1.contents = v$1.contents + 1 | 0; collect(v$1.contents); Caml_array.set(arr, (i << 1) + j | 0, (function () { diff --git a/jscomp/test/for_side_effect_test.js b/jscomp/test/for_side_effect_test.js index f914db1ea9..ad61a8bb8d 100644 --- a/jscomp/test/for_side_effect_test.js +++ b/jscomp/test/for_side_effect_test.js @@ -4,7 +4,7 @@ let Mt = require("./mt.js"); function tst() { - for(let i = (console.log("hi"), 0), i_finish = (console.log("hello"), 3); i <= i_finish; ++i){ + for (let i = (console.log("hi"), 0), i_finish = (console.log("hello"), 3); i <= i_finish; ++i) { } } @@ -13,7 +13,7 @@ function test2() { let v = 0; v = 3; v = 10; - for(let i = 0; i <= 1; ++i){ + for (let i = 0; i <= 1; ++i) { } return v; diff --git a/jscomp/test/gpr_4280_test.js b/jscomp/test/gpr_4280_test.js index 216ce2193d..ace40e3643 100644 --- a/jscomp/test/gpr_4280_test.js +++ b/jscomp/test/gpr_4280_test.js @@ -20,14 +20,14 @@ let u = { }; function div(children, param) { - for(let i = 0; i <= 1; ++i){ + for (let i = 0; i <= 1; ++i) { u.contents = 300; console.log("nonline"); } } function string(s) { - for(let i = 0; i <= 1; ++i){ + for (let i = 0; i <= 1; ++i) { u.contents = 200; console.log("no"); } diff --git a/jscomp/test/gpr_858_unit2_test.js b/jscomp/test/gpr_858_unit2_test.js index 5a84b19c17..83f91cc71e 100644 --- a/jscomp/test/gpr_858_unit2_test.js +++ b/jscomp/test/gpr_858_unit2_test.js @@ -8,7 +8,7 @@ let delayed = { }) }; -for(let i = 1; i <= 2; ++i){ +for (let i = 1; i <= 2; ++i) { let f = function (n, x) { if (x !== 0) { let prev = delayed.contents; diff --git a/jscomp/test/gpr_977_test.js b/jscomp/test/gpr_977_test.js index b8056514fd..46834c894a 100644 --- a/jscomp/test/gpr_977_test.js +++ b/jscomp/test/gpr_977_test.js @@ -30,14 +30,14 @@ function eq(loc, x, y) { } function f(x) { - for(let i = 0; i <= 100; ++i){ + for (let i = 0; i <= 100; ++i) { console.log("."); } return -x | 0; } function int32_f(x) { - for(let i = 0; i <= 100; ++i){ + for (let i = 0; i <= 100; ++i) { console.log("."); } return -x | 0; diff --git a/jscomp/test/hashtbl_test.js b/jscomp/test/hashtbl_test.js index 979cf206eb..c772bd678d 100644 --- a/jscomp/test/hashtbl_test.js +++ b/jscomp/test/hashtbl_test.js @@ -32,10 +32,10 @@ function f() { function g(count) { let tbl = Hashtbl.create(undefined, 17); - for(let i = 0; i <= count; ++i){ + for (let i = 0; i <= count; ++i) { Hashtbl.replace(tbl, (i << 1), String(i)); } - for(let i$1 = 0; i$1 <= count; ++i$1){ + for (let i$1 = 0; i$1 <= count; ++i$1) { Hashtbl.replace(tbl, (i$1 << 1), String(i$1)); } let v = to_list(tbl); diff --git a/jscomp/test/inline_record_test.js b/jscomp/test/inline_record_test.js index a9a339501c..f45c9b7538 100644 --- a/jscomp/test/inline_record_test.js +++ b/jscomp/test/inline_record_test.js @@ -101,7 +101,7 @@ let v5 = { z: 0 }; -for(let i = 0; i <= 10; ++i){ +for (let i = 0; i <= 10; ++i) { ff(v4); ff(v5); } @@ -162,7 +162,7 @@ function ff0(x) { } -for(let i$1 = 0; i$1 <= 10; ++i$1){ +for (let i$1 = 0; i$1 <= 10; ++i$1) { ff0(v6); } diff --git a/jscomp/test/int64_string_bench.js b/jscomp/test/int64_string_bench.js index 0d1de13d39..aba68c3263 100644 --- a/jscomp/test/int64_string_bench.js +++ b/jscomp/test/int64_string_bench.js @@ -11,7 +11,7 @@ let u = Caml_int64.sub(Int64.max_int, [ 200000 ]); -for(let i = 0; i <= 100000; ++i){ +for (let i = 0; i <= 100000; ++i) { Caml_int64.to_string(u); } @@ -26,7 +26,7 @@ let u$1 = [ 30000000 ]; -for(let i$1 = 0; i$1 <= 100000; ++i$1){ +for (let i$1 = 0; i$1 <= 100000; ++i$1) { Caml_int64.to_string(u$1); } @@ -41,7 +41,7 @@ let u$2 = Caml_int64.add(Int64.min_int, [ 100 ]); -for(let i$2 = 0; i$2 <= 100000; ++i$2){ +for (let i$2 = 0; i$2 <= 100000; ++i$2) { Caml_int64.to_string(u$2); } diff --git a/jscomp/test/int64_string_test.js b/jscomp/test/int64_string_test.js index 049b421fe2..0e3c3c116f 100644 --- a/jscomp/test/int64_string_test.js +++ b/jscomp/test/int64_string_test.js @@ -55,15 +55,15 @@ f([ 2764472320 ], "1000000000000000"); -for(let i = 0; i <= 8; ++i){ +for (let i = 0; i <= 8; ++i) { eq("File \"int64_string_test.res\", line 22, characters 4-11", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(i))), "-922337203685477580" + String(8 - i | 0)); } -for(let i$1 = 0; i$1 <= 8; ++i$1){ +for (let i$1 = 0; i$1 <= 8; ++i$1) { eq("File \"int64_string_test.res\", line 32, characters 4-11", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(100 + i$1 | 0))), "-922337203685477570" + String(8 - i$1 | 0)); } -for(let i$2 = 0; i$2 <= 8; ++i$2){ +for (let i$2 = 0; i$2 <= 8; ++i$2) { eq("File \"int64_string_test.res\", line 42, characters 4-11", Caml_int64.to_string(Caml_int64.add(Int64.min_int, Caml_int64.of_int32(1000000 + i$2 | 0))), "-922337203685377580" + String(8 - i$2 | 0)); } @@ -72,7 +72,7 @@ let u = [ 4294957295 ]; -for(let i$3 = 0; i$3 <= 6; ++i$3){ +for (let i$3 = 0; i$3 <= 6; ++i$3) { eq("File \"int64_string_test.res\", line 56, characters 4-11", Caml_int64.to_string(Caml_int64.add(u, Caml_int64.of_int32(Math.imul(i$3, 10000)))), "90071992547" + (String(3 + i$3 | 0) + "0991")); } @@ -81,7 +81,7 @@ let v$1 = [ 4294917297 ]; -for(let i$4 = 0; i$4 <= 9; ++i$4){ +for (let i$4 = 0; i$4 <= 9; ++i$4) { eq("File \"int64_string_test.res\", line 67, characters 4-11", Caml_int64.to_string(Caml_int64.add(v$1, Caml_int64.of_int32(Math.imul(i$4, 10000)))), "-90071992547" + (String(9 - i$4 | 0) + "0991")); } diff --git a/jscomp/test/int_hashtbl_test.js b/jscomp/test/int_hashtbl_test.js index bf32e0b592..837abb1369 100644 --- a/jscomp/test/int_hashtbl_test.js +++ b/jscomp/test/int_hashtbl_test.js @@ -27,10 +27,10 @@ function f(H) { function g(H, count) { let tbl = H.create(17); - for(let i = 0; i <= count; ++i){ + for (let i = 0; i <= count; ++i) { H.replace(tbl, (i << 1), String(i)); } - for(let i$1 = 0; i$1 <= count; ++i$1){ + for (let i$1 = 0; i$1 <= count; ++i$1) { H.replace(tbl, (i$1 << 1), String(i$1)); } let v = H.fold((function (k, v, acc) { diff --git a/jscomp/test/int_overflow_test.js b/jscomp/test/int_overflow_test.js index edc59e5d9f..e8c7c42cee 100644 --- a/jscomp/test/int_overflow_test.js +++ b/jscomp/test/int_overflow_test.js @@ -7,7 +7,7 @@ let Caml_string = require("../../lib/js/caml_string.js"); function hash_variant(s) { let accu = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { accu = Math.imul(223, accu) + Caml_string.get(s, i) & 2147483647; } if (accu > 1073741823) { @@ -19,7 +19,7 @@ function hash_variant(s) { function hash_variant2(s) { let accu = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { accu = Math.imul(223, accu) + Caml_string.get(s, i) | 0; } accu = accu & 2147483647; diff --git a/jscomp/test/libqueue_test.js b/jscomp/test/libqueue_test.js index 00ac4a4290..edc4076796 100644 --- a/jscomp/test/libqueue_test.js +++ b/jscomp/test/libqueue_test.js @@ -529,7 +529,7 @@ let q$3 = { last: "Nil" }; -for(let i = 1; i <= 10; ++i){ +for (let i = 1; i <= 10; ++i) { Queue.add(i, q$3); } @@ -599,7 +599,7 @@ let q1 = { last: "Nil" }; -for(let i$1 = 1; i$1 <= 10; ++i$1){ +for (let i$1 = 1; i$1 <= 10; ++i$1) { Queue.add(i$1, q1); } @@ -717,7 +717,7 @@ if (q2.length !== 10) { }); } -for(let i$2 = 1; i$2 <= 10; ++i$2){ +for (let i$2 = 1; i$2 <= 10; ++i$2) { if (Queue.take(q1) !== i$2) { throw new Error("Assert_failure", { cause: { @@ -733,7 +733,7 @@ for(let i$2 = 1; i$2 <= 10; ++i$2){ } -for(let i$3 = 1; i$3 <= 10; ++i$3){ +for (let i$3 = 1; i$3 <= 10; ++i$3) { if (Queue.take(q2) !== i$3) { throw new Error("Assert_failure", { cause: { @@ -768,7 +768,7 @@ if (q$4.length !== 0) { }); } -for(let i$4 = 1; i$4 <= 10; ++i$4){ +for (let i$4 = 1; i$4 <= 10; ++i$4) { Queue.add(i$4, q$4); if (q$4.length !== i$4) { throw new Error("Assert_failure", { @@ -797,7 +797,7 @@ for(let i$4 = 1; i$4 <= 10; ++i$4){ } -for(let i$5 = 10; i$5 >= 1; --i$5){ +for (let i$5 = 10; i$5 >= 1; --i$5) { if (q$4.length !== i$5) { throw new Error("Assert_failure", { cause: { @@ -857,7 +857,7 @@ let q$5 = { last: "Nil" }; -for(let i$6 = 1; i$6 <= 10; ++i$6){ +for (let i$6 = 1; i$6 <= 10; ++i$6) { Queue.add(i$6, q$5); } @@ -1011,7 +1011,7 @@ let q2$2 = { last: "Nil" }; -for(let i$8 = 1; i$8 <= 4; ++i$8){ +for (let i$8 = 1; i$8 <= 4; ++i$8) { Queue.add(i$8, q1$2); } @@ -1157,7 +1157,7 @@ let q2$3 = { last: "Nil" }; -for(let i$9 = 5; i$9 <= 8; ++i$9){ +for (let i$9 = 5; i$9 <= 8; ++i$9) { Queue.add(i$9, q2$3); } @@ -1303,11 +1303,11 @@ let q2$4 = { last: "Nil" }; -for(let i$10 = 1; i$10 <= 4; ++i$10){ +for (let i$10 = 1; i$10 <= 4; ++i$10) { Queue.add(i$10, q1$4); } -for(let i$11 = 5; i$11 <= 8; ++i$11){ +for (let i$11 = 5; i$11 <= 8; ++i$11) { Queue.add(i$11, q2$4); } diff --git a/jscomp/test/map_test.js b/jscomp/test/map_test.js index 3979650d1f..a3b3e85998 100644 --- a/jscomp/test/map_test.js +++ b/jscomp/test/map_test.js @@ -2141,11 +2141,11 @@ let int_map_suites_1 = { "iteration", (function (param) { let m = "Empty"; - for(let i = 0; i <= 10000; ++i){ + for (let i = 0; i <= 10000; ++i) { m = add$1(String(i), String(i), m); } let v = -1; - for(let i$1 = 0; i$1 <= 10000; ++i$1){ + for (let i$1 = 0; i$1 <= 10000; ++i$1) { if (find$1(String(i$1), m) !== String(i$1)) { v = i$1; } diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index bc089db4ed..cd4df05bc6 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -1935,7 +1935,7 @@ function flatten_cmap(cm) { let v = 0; Caml_bytes.set(c, 0, /* '\000' */0); Caml_bytes.set(col_repr, 0, /* '\000' */0); - for(let i = 1; i <= 255; ++i){ + for (let i = 1; i <= 255; ++i) { if (Caml_bytes.get(cm, i) !== /* '\000' */0) { v = v + 1 | 0; } @@ -2836,7 +2836,7 @@ function repn(r, i, j) { function set(str) { let s = /* [] */0; - for(let i = 0, i_finish = str.length; i < i_finish; ++i){ + for (let i = 0, i_finish = str.length; i < i_finish; ++i) { s = union(single(Caml_string.get(str, i)), s); } return { @@ -3372,7 +3372,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let accept_s = function (s$p) { let len = s$p.length; try { - for(let j = 0; j < len; ++j){ + for (let j = 0; j < len; ++j) { try { if (Caml_string.get(s$p, j) !== Caml_string.get(s, i.contents + j | 0)) { throw new Error(Pervasives.Exit, { diff --git a/jscomp/test/random_test.js b/jscomp/test/random_test.js index c17e6947e0..f1460f1e59 100644 --- a/jscomp/test/random_test.js +++ b/jscomp/test/random_test.js @@ -39,7 +39,7 @@ Random.init(0); let v = Caml_array.make(10, false); -for(let i = 0; i <= 9; ++i){ +for (let i = 0; i <= 9; ++i) { Caml_array.set(v, i, Random.bool()); } diff --git a/jscomp/test/raw_hash_tbl_bench.js b/jscomp/test/raw_hash_tbl_bench.js index 1f295c92bb..3cbbb305b7 100644 --- a/jscomp/test/raw_hash_tbl_bench.js +++ b/jscomp/test/raw_hash_tbl_bench.js @@ -5,10 +5,10 @@ let Hashtbl = require("../../lib/js/hashtbl.js"); function bench() { let table = Hashtbl.create(undefined, 1000000); - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { Hashtbl.add(table, i, i); } - for(let i$1 = 0; i$1 <= 1000000; ++i$1){ + for (let i$1 = 0; i$1 <= 1000000; ++i$1) { if (!Hashtbl.mem(table, i$1)) { throw new Error("Assert_failure", { cause: { @@ -23,7 +23,7 @@ function bench() { } } - for(let i$2 = 0; i$2 <= 1000000; ++i$2){ + for (let i$2 = 0; i$2 <= 1000000; ++i$2) { Hashtbl.remove(table, i$2); } } diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 58e8787499..85ee8d9747 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -14,7 +14,7 @@ let Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); function _must_escape(s) { try { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let c = s.codePointAt(i); let exit = 0; if (c >= 42) { diff --git a/jscomp/test/stack_comp_test.js b/jscomp/test/stack_comp_test.js index 04d4f0921c..2a14136b37 100644 --- a/jscomp/test/stack_comp_test.js +++ b/jscomp/test/stack_comp_test.js @@ -216,7 +216,7 @@ let s$3 = { len: 0 }; -for(let i = 1; i <= 10; ++i){ +for (let i = 1; i <= 10; ++i) { Stack.push(i, s$3); } @@ -240,7 +240,7 @@ let s1 = { len: 0 }; -for(let i$1 = 1; i$1 <= 10; ++i$1){ +for (let i$1 = 1; i$1 <= 10; ++i$1) { Stack.push(i$1, s1); } @@ -314,11 +314,11 @@ assert_("File \"stack_comp_test.res\", line 109, characters 10-17", s1.len === 1 assert_("File \"stack_comp_test.res\", line 110, characters 10-17", s2.len === 10); -for(let i$2 = 10; i$2 >= 1; --i$2){ +for (let i$2 = 10; i$2 >= 1; --i$2) { assert_("File \"stack_comp_test.res\", line 112, characters 12-19", Stack.pop(s1) === i$2); } -for(let i$3 = 10; i$3 >= 1; --i$3){ +for (let i$3 = 10; i$3 >= 1; --i$3) { assert_("File \"stack_comp_test.res\", line 115, characters 12-19", Stack.pop(s2) === i$3); } @@ -329,13 +329,13 @@ let s$4 = { assert_("File \"stack_comp_test.res\", line 121, characters 10-17", s$4.c === /* [] */0); -for(let i$4 = 1; i$4 <= 10; ++i$4){ +for (let i$4 = 1; i$4 <= 10; ++i$4) { Stack.push(i$4, s$4); assert_("File \"stack_comp_test.res\", line 124, characters 12-19", s$4.len === i$4); assert_("File \"stack_comp_test.res\", line 125, characters 12-19", s$4.c !== /* [] */0); } -for(let i$5 = 10; i$5 >= 1; --i$5){ +for (let i$5 = 10; i$5 >= 1; --i$5) { assert_("File \"stack_comp_test.res\", line 128, characters 12-19", s$4.len === i$5); assert_("File \"stack_comp_test.res\", line 129, characters 12-19", s$4.c !== /* [] */0); Stack.pop(s$4); @@ -350,7 +350,7 @@ let s$5 = { len: 0 }; -for(let i$6 = 10; i$6 >= 1; --i$6){ +for (let i$6 = 10; i$6 >= 1; --i$6) { Stack.push(i$6, s$5); } @@ -387,7 +387,7 @@ let s1$2 = { len: 0 }; -for(let i$8 = 1; i$8 <= 4; ++i$8){ +for (let i$8 = 1; i$8 <= 4; ++i$8) { Stack.push(i$8, s1$2); } diff --git a/jscomp/test/string_set_test.js b/jscomp/test/string_set_test.js index 17bf8448c9..b4c2594891 100644 --- a/jscomp/test/string_set_test.js +++ b/jscomp/test/string_set_test.js @@ -31,7 +31,7 @@ function eq(loc, x, y) { let s = String_set.empty; -for(let i = 0; i <= 99999; ++i){ +for (let i = 0; i <= 99999; ++i) { s = String_set.add(String(i), s); } diff --git a/jscomp/test/tagged_template_test.js b/jscomp/test/tagged_template_test.js index 02226e62b1..9fc3b9c2f4 100644 --- a/jscomp/test/tagged_template_test.js +++ b/jscomp/test/tagged_template_test.js @@ -30,7 +30,7 @@ let length = Tagged_template_libJs.length`hello ${10} what's the total length? I function foo(strings, values) { let res = ""; let valueCount = values.length; - for(let i = 0; i < valueCount; ++i){ + for (let i = 0; i < valueCount; ++i) { res = res + Caml_array.get(strings, i) + String(Math.imul(Caml_array.get(values, i), 10)); } return res + Caml_array.get(strings, valueCount); diff --git a/jscomp/test/tailcall_inline_test.js b/jscomp/test/tailcall_inline_test.js index 820658b385..a226210935 100644 --- a/jscomp/test/tailcall_inline_test.js +++ b/jscomp/test/tailcall_inline_test.js @@ -19,7 +19,7 @@ function f() { }; }; let v = Caml_array.make(10, 0); - for(let i = 0; i <= 9; ++i){ + for (let i = 0; i <= 9; ++i) { Caml_array.set(v, i, f$1(0, i)); } return v; diff --git a/jscomp/test/test_array_primitive.js b/jscomp/test/test_array_primitive.js index d1dc53858d..ab453f968a 100644 --- a/jscomp/test/test_array_primitive.js +++ b/jscomp/test/test_array_primitive.js @@ -5,7 +5,7 @@ let Caml_array = require("../../lib/js/caml_array.js"); function caml_array_sub(x, offset, len) { let result = new Array(len); - for(let j = 0; j < len; ++j){ + for (let j = 0; j < len; ++j) { Caml_array.set(result, j, Caml_array.get(x, offset + j | 0)); } return result; @@ -37,7 +37,7 @@ function caml_array_get(xs, index) { function caml_make_vect(len, init) { let b = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { Caml_array.set(b, i, init); } return b; diff --git a/jscomp/test/test_bug.js b/jscomp/test/test_bug.js index e245ad4e49..2b46d0cd01 100644 --- a/jscomp/test/test_bug.js +++ b/jscomp/test/test_bug.js @@ -7,7 +7,7 @@ let Caml_bytes = require("../../lib/js/caml_bytes.js"); function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let c = s[i]; let tmp; let exit = 0; @@ -38,7 +38,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c$1 = s[i$1]; let exit$1 = 0; if (c$1 > 92 || c$1 < 34) { diff --git a/jscomp/test/test_closure.js b/jscomp/test/test_closure.js index d19b24cb89..6ff2a91399 100644 --- a/jscomp/test/test_closure.js +++ b/jscomp/test/test_closure.js @@ -12,7 +12,7 @@ function f() { let arr = Caml_array.make(10, (function (param) { })); - for(let i = 0; i <= 9; ++i){ + for (let i = 0; i <= 9; ++i) { Caml_array.set(arr, i, (function (param) { v.contents = v.contents + i | 0; })); diff --git a/jscomp/test/test_cps.js b/jscomp/test/test_cps.js index f1dff037ec..2dcdc18a35 100644 --- a/jscomp/test/test_cps.js +++ b/jscomp/test/test_cps.js @@ -23,7 +23,7 @@ function test_closure() { let arr = Caml_array.make(6, (function (x) { return x; })); - for(let i = 0; i <= 6; ++i){ + for (let i = 0; i <= 6; ++i) { Caml_array.set(arr, i, (function (param) { return i; })); diff --git a/jscomp/test/test_demo.js b/jscomp/test/test_demo.js index 4a5a6409e0..4fb912cfb3 100644 --- a/jscomp/test/test_demo.js +++ b/jscomp/test/test_demo.js @@ -33,7 +33,7 @@ function map(f, x) { function sum(n) { let v = 0; - for(let i = 0; i <= n; ++i){ + for (let i = 0; i <= n; ++i) { v = v + i | 0; } return v; diff --git a/jscomp/test/test_fib.js b/jscomp/test/test_fib.js index ccc19ec289..8cd78ffca9 100644 --- a/jscomp/test/test_fib.js +++ b/jscomp/test/test_fib.js @@ -20,7 +20,7 @@ function fib2(x) { let v = 0; -for(let i = 0; i <= 10; ++i){ +for (let i = 0; i <= 10; ++i) { v = v + i | 0; } @@ -28,7 +28,7 @@ let sum = v; let v$1 = 0; -for(let i$1 = 10; i$1 >= 0; --i$1){ +for (let i$1 = 10; i$1 >= 0; --i$1) { v$1 = v$1 + i$1 | 0; } diff --git a/jscomp/test/test_for_loop.js b/jscomp/test/test_for_loop.js index 347774a382..23a212f718 100644 --- a/jscomp/test/test_for_loop.js +++ b/jscomp/test/test_for_loop.js @@ -5,13 +5,13 @@ let $$Array = require("../../lib/js/array.js"); let Caml_array = require("../../lib/js/caml_array.js"); function for_(x) { - for(let i = 0, i_finish = (console.log("hi"), x.length); i <= i_finish; ++i){ + for (let i = 0, i_finish = (console.log("hi"), x.length); i <= i_finish; ++i) { console.log(Caml_array.get(x, i)); } } function for_2(x) { - for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ + for (let i = 0, i_finish = x.length; i <= i_finish; ++i) { console.log(Caml_array.get(x, i)); } } @@ -25,7 +25,7 @@ function for_3(x) { }; }), x); - for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ + for (let i = 0, i_finish = x.length; i <= i_finish; ++i) { let j = (i << 1); Caml_array.set(arr, i, (function () { v.contents = v.contents + j | 0; @@ -46,7 +46,7 @@ function for_4(x) { }; }), x); - for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ + for (let i = 0, i_finish = x.length; i <= i_finish; ++i) { let j = (i << 1); let k = (j << 1); Caml_array.set(arr, i, (function () { @@ -68,7 +68,7 @@ function for_5(x, u) { }; }), x); - for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ + for (let i = 0, i_finish = x.length; i <= i_finish; ++i) { let k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function () { v.contents = v.contents + k | 0; @@ -96,12 +96,12 @@ function for_6(x, u) { contents: 0 }; v4.contents = v4.contents + 1 | 0; - for(let j = 0; j <= 1; ++j){ + for (let j = 0; j <= 1; ++j) { v5.contents = v5.contents + 1 | 0; let v2 = { contents: 0 }; - for(let i = 0, i_finish = x.length; i <= i_finish; ++i){ + for (let i = 0, i_finish = x.length; i <= i_finish; ++i) { let k = Math.imul((u << 1), u); let h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; diff --git a/jscomp/test/test_for_map.js b/jscomp/test/test_for_map.js index 6c0aa0b9e9..d1726f5320 100644 --- a/jscomp/test/test_for_map.js +++ b/jscomp/test/test_for_map.js @@ -1000,10 +1000,10 @@ let IntMap = { function assertion_test() { let m = "Empty"; - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { m = add(i, i, m); } - for(let i$1 = 0; i$1 <= 1000000; ++i$1){ + for (let i$1 = 0; i$1 <= 1000000; ++i$1) { find(i$1, m); } } diff --git a/jscomp/test/test_for_map2.js b/jscomp/test/test_for_map2.js index ccdd27da39..ff20587c02 100644 --- a/jscomp/test/test_for_map2.js +++ b/jscomp/test/test_for_map2.js @@ -5,10 +5,10 @@ let Int_map = require("./int_map.js"); function assertion_test() { let m = "Empty"; - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { m = Int_map.add(i, i, m); } - for(let i$1 = 0; i$1 <= 1000000; ++i$1){ + for (let i$1 = 0; i$1 <= 1000000; ++i$1) { Int_map.find(i$1, m); } } diff --git a/jscomp/test/test_google_closure.js b/jscomp/test/test_google_closure.js index 521a669292..55fd61de0f 100644 --- a/jscomp/test/test_google_closure.js +++ b/jscomp/test/test_google_closure.js @@ -26,7 +26,7 @@ let arr = $$Array.init(2, (function (param) { return 0; })); -for(let i = 0; i <= 1; ++i){ +for (let i = 0; i <= 1; ++i) { let f3$1 = function (extra) { return i + 1 | 0; }; diff --git a/jscomp/test/test_runtime_encoding.js b/jscomp/test/test_runtime_encoding.js index e5193310b3..77edc3a296 100644 --- a/jscomp/test/test_runtime_encoding.js +++ b/jscomp/test/test_runtime_encoding.js @@ -41,7 +41,7 @@ function aaaa(x) { } function f(x) { - for(let i = 0; i <= 10; ++i){ + for (let i = 0; i <= 10; ++i) { Caml_array.set(x, i, i); } } diff --git a/jscomp/test/test_static_catch_ident.js b/jscomp/test/test_static_catch_ident.js index df30925c09..358620938a 100644 --- a/jscomp/test/test_static_catch_ident.js +++ b/jscomp/test/test_static_catch_ident.js @@ -14,7 +14,7 @@ function scanf_bad_input(ib, x) { cause: x }); } - for(let i = 0; i <= 100; ++i){ + for (let i = 0; i <= 100; ++i) { console.log(s); console.log("don't inlinie"); } diff --git a/jscomp/test/test_string_map.js b/jscomp/test/test_string_map.js index 9aa866bb25..7150d2fbf4 100644 --- a/jscomp/test/test_string_map.js +++ b/jscomp/test/test_string_map.js @@ -167,12 +167,12 @@ function assertion_test() { contents: "Empty" }; timing("building", (function () { - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { m.contents = add(String(i), String(i), m.contents); } })); timing("querying", (function () { - for(let i = 0; i <= 1000000; ++i){ + for (let i = 0; i <= 1000000; ++i) { find(String(i), m.contents); } })); diff --git a/jscomp/test/test_tuple.js b/jscomp/test/test_tuple.js index 77fbe2d158..2cf819e9e3 100644 --- a/jscomp/test/test_tuple.js +++ b/jscomp/test/test_tuple.js @@ -4,8 +4,8 @@ let r = 0; -for(let k = 1; k <= 10; ++k){ - for(let i = 1; i <= 10; ++i){ +for (let k = 1; k <= 10; ++k) { + for (let i = 1; i <= 10; ++i) { let match = i % 2 === 0 ? [ 1, (i << 1) diff --git a/lib/es6/array.js b/lib/es6/array.js index 8d22519dd8..3bb31443bd 100644 --- a/lib/es6/array.js +++ b/lib/es6/array.js @@ -22,7 +22,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f(i); } return res; @@ -30,7 +30,7 @@ function init(l, f) { function make_matrix(sx, sy, init) { let res = Caml_array.make(sx, []); - for(let x = 0; x < sx; ++x){ + for (let x = 0; x < sx; ++x) { res[x] = Caml_array.make(sy, init); } return res; @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); } } @@ -120,7 +120,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -141,14 +141,14 @@ function map2(f, a, b) { return []; } let r = Caml_array.make(la, f(a[0], b[0])); - for(let i = 1; i < la; ++i){ + for (let i = 1; i < la; ++i) { r[i] = f(a[i], b[i]); } return r; } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -159,7 +159,7 @@ function mapi(f, a) { return []; } let r = Caml_array.make(l, f(0, a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -226,7 +226,7 @@ function fold_left(f, x, a) { function fold_right(f, a, x) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(a[i], r); } return r; @@ -395,10 +395,10 @@ function sort(cmp, a) { }; }; let l = a.length; - for(let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i){ + for (let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i) { trickle(l, i, Caml_array.get(a, i)); } - for(let i$1 = l - 1 | 0; i$1 >= 2; --i$1){ + for (let i$1 = l - 1 | 0; i$1 >= 2; --i$1) { let e = Caml_array.get(a, i$1); Caml_array.set(a, i$1, Caml_array.get(a, 0)); trickleup(bubble(i$1, 0), e); @@ -449,7 +449,7 @@ function stable_sort(cmp, a) { }; }; let isortto = function (srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { diff --git a/lib/es6/arrayLabels.js b/lib/es6/arrayLabels.js index 1ac94c9618..c5a54f395b 100644 --- a/lib/es6/arrayLabels.js +++ b/lib/es6/arrayLabels.js @@ -22,7 +22,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f(i); } return res; @@ -30,7 +30,7 @@ function init(l, f) { function make_matrix(sx, sy, init) { let res = Caml_array.make(sx, []); - for(let x = 0; x < sx; ++x){ + for (let x = 0; x < sx; ++x) { res[x] = Caml_array.make(sy, init); } return res; @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); } } @@ -120,7 +120,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -141,14 +141,14 @@ function map2(f, a, b) { return []; } let r = Caml_array.make(la, f(a[0], b[0])); - for(let i = 1; i < la; ++i){ + for (let i = 1; i < la; ++i) { r[i] = f(a[i], b[i]); } return r; } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -159,7 +159,7 @@ function mapi(f, a) { return []; } let r = Caml_array.make(l, f(0, a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -226,7 +226,7 @@ function fold_left(f, x, a) { function fold_right(f, a, x) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(a[i], r); } return r; @@ -395,10 +395,10 @@ function sort(cmp, a) { }; }; let l = a.length; - for(let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i){ + for (let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i) { trickle(l, i, Caml_array.get(a, i)); } - for(let i$1 = l - 1 | 0; i$1 >= 2; --i$1){ + for (let i$1 = l - 1 | 0; i$1 >= 2; --i$1) { let e = Caml_array.get(a, i$1); Caml_array.set(a, i$1, Caml_array.get(a, 0)); trickleup(bubble(i$1, 0), e); @@ -449,7 +449,7 @@ function stable_sort(cmp, a) { }; }; let isortto = function (srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { diff --git a/lib/es6/belt_Array.js b/lib/es6/belt_Array.js index dc3805b38b..260ce68bd9 100644 --- a/lib/es6/belt_Array.js +++ b/lib/es6/belt_Array.js @@ -62,7 +62,7 @@ function shuffleInPlace(xs) { let random_int = function (min, max) { return Math.floor(Math.random() * (max - min | 0)) + min | 0; }; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { swapUnsafe(xs, i, random_int(i, len)); } } @@ -76,7 +76,7 @@ function shuffle(xs) { function reverseInPlace(xs) { let len = xs.length; let ofs = 0; - for(let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i){ + for (let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i) { swapUnsafe(xs, ofs + i | 0, ((ofs + len | 0) - i | 0) - 1 | 0); } } @@ -84,7 +84,7 @@ function reverseInPlace(xs) { function reverse(xs) { let len = xs.length; let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = xs[(len - 1 | 0) - i | 0]; } return result; @@ -95,7 +95,7 @@ function make(l, f) { return []; } let res = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { res[i] = f; } return res; @@ -106,7 +106,7 @@ function makeByU(l, f) { return []; } let res = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { res[i] = f(i); } return res; @@ -136,7 +136,7 @@ function range(start, finish) { return []; } let arr = new Array(cut + 1 | 0); - for(let i = 0; i <= cut; ++i){ + for (let i = 0; i <= cut; ++i) { arr[i] = start + i | 0; } return arr; @@ -150,7 +150,7 @@ function rangeBy(start, finish, step) { let nb = (cut / step | 0) + 1 | 0; let arr = new Array(nb); let cur = start; - for(let i = 0; i < nb; ++i){ + for (let i = 0; i < nb; ++i) { arr[i] = cur; cur = cur + step | 0; } @@ -162,7 +162,7 @@ function zip(xs, ys) { let leny = ys.length; let len = lenx < leny ? lenx : leny; let s = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s[i] = [ xs[i], ys[i] @@ -176,7 +176,7 @@ function zipByU(xs, ys, f) { let leny = ys.length; let len = lenx < leny ? lenx : leny; let s = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s[i] = f(xs[i], ys[i]); } return s; @@ -192,10 +192,10 @@ function concat(a1, a2) { let l1 = a1.length; let l2 = a2.length; let a1a2 = new Array(l1 + l2 | 0); - for(let i = 0; i < l1; ++i){ + for (let i = 0; i < l1; ++i) { a1a2[i] = a1[i]; } - for(let i$1 = 0; i$1 < l2; ++i$1){ + for (let i$1 = 0; i$1 < l2; ++i$1) { a1a2[l1 + i$1 | 0] = a2[i$1]; } return a1a2; @@ -204,14 +204,14 @@ function concat(a1, a2) { function concatMany(arrs) { let lenArrs = arrs.length; let totalLen = 0; - for(let i = 0; i < lenArrs; ++i){ + for (let i = 0; i < lenArrs; ++i) { totalLen = totalLen + arrs[i].length | 0; } let result = new Array(totalLen); totalLen = 0; - for(let j = 0; j < lenArrs; ++j){ + for (let j = 0; j < lenArrs; ++j) { let cur = arrs[j]; - for(let k = 0, k_finish = cur.length; k < k_finish; ++k){ + for (let k = 0, k_finish = cur.length; k < k_finish; ++k) { result[totalLen] = cur[k]; totalLen = totalLen + 1 | 0; } @@ -231,7 +231,7 @@ function slice(a, offset, len) { return []; } let result = new Array(copyLength); - for(let i = 0; i < copyLength; ++i){ + for (let i = 0; i < copyLength; ++i) { result[i] = a[ofs + i | 0]; } return result; @@ -242,7 +242,7 @@ function sliceToEnd(a, offset) { let ofs = offset < 0 ? Caml.int_max(lena + offset | 0, 0) : offset; let len = lena > ofs ? lena - ofs | 0 : 0; let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = a[ofs + i | 0]; } return result; @@ -259,19 +259,19 @@ function fill(a, offset, len, v) { if (fillLength <= 0) { return; } - for(let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i) { a[i] = v; } } function blitUnsafe(a1, srcofs1, a2, srcofs2, blitLength) { if (srcofs2 <= srcofs1) { - for(let j = 0; j < blitLength; ++j){ + for (let j = 0; j < blitLength; ++j) { a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0]; } return; } - for(let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0]; } } @@ -283,18 +283,18 @@ function blit(a1, ofs1, a2, ofs2, len) { let srcofs2 = ofs2 < 0 ? Caml.int_max(lena2 + ofs2 | 0, 0) : ofs2; let blitLength = Caml.int_min(len, Caml.int_min(lena1 - srcofs1 | 0, lena2 - srcofs2 | 0)); if (srcofs2 <= srcofs1) { - for(let j = 0; j < blitLength; ++j){ + for (let j = 0; j < blitLength; ++j) { a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0]; } return; } - for(let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0]; } } function forEachU(a, f) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -308,7 +308,7 @@ function forEach(a, f) { function mapU(a, f) { let l = a.length; let r = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -374,7 +374,7 @@ function keepU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; if (f(v)) { r[j] = v; @@ -396,7 +396,7 @@ function keepWithIndexU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; if (f(v, i)) { r[j] = v; @@ -418,7 +418,7 @@ function keepMapU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; let v$1 = f(v); if (v$1 !== undefined) { @@ -438,7 +438,7 @@ function keepMap(a, f) { } function forEachWithIndexU(a, f) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -452,7 +452,7 @@ function forEachWithIndex(a, f) { function mapWithIndexU(a, f) { let l = a.length; let r = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -466,7 +466,7 @@ function mapWithIndex(a, f) { function reduceU(a, x, f) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -480,7 +480,7 @@ function reduce(a, x, f) { function reduceReverseU(a, x, f) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(r, a[i]); } return r; @@ -495,7 +495,7 @@ function reduceReverse(a, x, f) { function reduceReverse2U(a, b, x, f) { let r = x; let len = Caml.int_min(a.length, b.length); - for(let i = len - 1 | 0; i >= 0; --i){ + for (let i = len - 1 | 0; i >= 0; --i) { r = f(r, a[i], b[i]); } return r; @@ -509,7 +509,7 @@ function reduceReverse2(a, b, x, f) { function reduceWithIndexU(a, x, f) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i], i); } return r; @@ -663,7 +663,7 @@ function partitionU(a, f) { let j = 0; let a1 = new Array(l); let a2 = new Array(l); - for(let ii = 0; ii < l; ++ii){ + for (let ii = 0; ii < l; ++ii) { let v = a[ii]; if (f(v)) { a1[i] = v; @@ -691,7 +691,7 @@ function unzip(a) { let l = a.length; let a1 = new Array(l); let a2 = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let match = a[i]; a1[i] = match[0]; a2[i] = match[1]; @@ -730,7 +730,7 @@ function joinWith(a, sep, toString) { function initU(n, f) { let v = new Array(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { v[i] = f(i); } return v; diff --git a/lib/es6/belt_HashMap.js b/lib/es6/belt_HashMap.js index abefcddf27..b0359e9e22 100644 --- a/lib/es6/belt_HashMap.js +++ b/lib/es6/belt_HashMap.js @@ -76,10 +76,10 @@ function set0(h, key, value, eq, hash) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(hash, h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -202,7 +202,7 @@ function fromArray(arr, id) { let eq = id.eq; let len = arr.length; let v = Belt_internalBucketsType.make(hash, eq, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set0(v, match[0], match[1], eq, hash); } @@ -213,7 +213,7 @@ function mergeMany(h, arr) { let hash = h.hash; let eq = h.eq; let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set0(h, match[0], match[1], eq, hash); } diff --git a/lib/es6/belt_HashMapInt.js b/lib/es6/belt_HashMapInt.js index 2d1d6c8537..882ad6781f 100644 --- a/lib/es6/belt_HashMapInt.js +++ b/lib/es6/belt_HashMapInt.js @@ -73,10 +73,10 @@ function set(h, key, value) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -194,7 +194,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(v, match[0], match[1]); } @@ -203,7 +203,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(h, match[0], match[1]); } diff --git a/lib/es6/belt_HashMapString.js b/lib/es6/belt_HashMapString.js index c4352164cb..8c1eb1f8e3 100644 --- a/lib/es6/belt_HashMapString.js +++ b/lib/es6/belt_HashMapString.js @@ -73,10 +73,10 @@ function set(h, key, value) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -194,7 +194,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(v, match[0], match[1]); } @@ -203,7 +203,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(h, match[0], match[1]); } diff --git a/lib/es6/belt_HashSet.js b/lib/es6/belt_HashSet.js index 78a9a88609..c8d8661f90 100644 --- a/lib/es6/belt_HashSet.js +++ b/lib/es6/belt_HashSet.js @@ -103,10 +103,10 @@ function add0(h, key, hash, eq) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(hash, h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -159,7 +159,7 @@ function fromArray(arr, id) { let hash = id.hash; let len = arr.length; let v = Belt_internalBucketsType.make(hash, eq, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add0(v, arr[i], hash, eq); } return v; @@ -169,7 +169,7 @@ function mergeMany(h, arr) { let eq = h.eq; let hash = h.hash; let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add0(h, arr[i], hash, eq); } } diff --git a/lib/es6/belt_HashSetInt.js b/lib/es6/belt_HashSetInt.js index af39562572..d6b9e87cd7 100644 --- a/lib/es6/belt_HashSetInt.js +++ b/lib/es6/belt_HashSetInt.js @@ -103,10 +103,10 @@ function add(h, key) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -152,7 +152,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(v, arr[i]); } return v; @@ -160,7 +160,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(h, arr[i]); } } diff --git a/lib/es6/belt_HashSetString.js b/lib/es6/belt_HashSetString.js index 0393ba380f..9c16024b37 100644 --- a/lib/es6/belt_HashSetString.js +++ b/lib/es6/belt_HashSetString.js @@ -103,10 +103,10 @@ function add(h, key) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -152,7 +152,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(v, arr[i]); } return v; @@ -160,7 +160,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(h, arr[i]); } } diff --git a/lib/es6/belt_List.js b/lib/es6/belt_List.js index e55399c63a..b0f0569918 100644 --- a/lib/es6/belt_List.js +++ b/lib/es6/belt_List.js @@ -744,7 +744,7 @@ function concatMany(xs) { } let len$1 = xs.length; let v = xs[len$1 - 1 | 0]; - for(let i = len$1 - 2 | 0; i >= 0; --i){ + for (let i = len$1 - 2 | 0; i >= 0; --i) { v = concat(xs[i], v); } return v; diff --git a/lib/es6/belt_MapDict.js b/lib/es6/belt_MapDict.js index ad544897de..78a58d2eaf 100644 --- a/lib/es6/belt_MapDict.js +++ b/lib/es6/belt_MapDict.js @@ -133,7 +133,7 @@ function remove(n, x, cmp) { function mergeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1], cmp); } diff --git a/lib/es6/belt_MapInt.js b/lib/es6/belt_MapInt.js index ced1b1814e..561faf103c 100644 --- a/lib/es6/belt_MapInt.js +++ b/lib/es6/belt_MapInt.js @@ -149,7 +149,7 @@ function removeMany(t, keys) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1]); } diff --git a/lib/es6/belt_MapString.js b/lib/es6/belt_MapString.js index 0880dca3cd..b1464f7071 100644 --- a/lib/es6/belt_MapString.js +++ b/lib/es6/belt_MapString.js @@ -149,7 +149,7 @@ function removeMany(t, keys) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1]); } diff --git a/lib/es6/belt_MutableMap.js b/lib/es6/belt_MutableMap.js index deddefec94..b6032bec32 100644 --- a/lib/es6/belt_MutableMap.js +++ b/lib/es6/belt_MutableMap.js @@ -339,7 +339,7 @@ function set(m, e, v) { function mergeManyAux(t, xs, cmp) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { let match = xs[i]; v = Belt_internalAVLtree.updateMutate(v, match[0], match[1], cmp); } diff --git a/lib/es6/belt_MutableQueue.js b/lib/es6/belt_MutableQueue.js index 94ab476845..3707e80482 100644 --- a/lib/es6/belt_MutableQueue.js +++ b/lib/es6/belt_MutableQueue.js @@ -274,7 +274,7 @@ function fromArray(arr) { first: undefined, last: undefined }; - for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ + for (let i = 0, i_finish = arr.length; i < i_finish; ++i) { add(q, arr[i]); } return q; diff --git a/lib/es6/belt_MutableSet.js b/lib/es6/belt_MutableSet.js index 7ef884bc5a..52a66f1952 100644 --- a/lib/es6/belt_MutableSet.js +++ b/lib/es6/belt_MutableSet.js @@ -174,7 +174,7 @@ function add(m, e) { function addArrayMutate(t, xs, cmp) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalAVLset.addMutate(cmp, v, xs[i]); } return v; diff --git a/lib/es6/belt_MutableSetInt.js b/lib/es6/belt_MutableSetInt.js index adfd061693..e7fb39eb48 100644 --- a/lib/es6/belt_MutableSetInt.js +++ b/lib/es6/belt_MutableSetInt.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalSetInt.addMutate(v, xs[i]); } return v; diff --git a/lib/es6/belt_MutableSetString.js b/lib/es6/belt_MutableSetString.js index 60053fba05..1f4c383837 100644 --- a/lib/es6/belt_MutableSetString.js +++ b/lib/es6/belt_MutableSetString.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalSetString.addMutate(v, xs[i]); } return v; diff --git a/lib/es6/belt_Range.js b/lib/es6/belt_Range.js index 6dc8c014d2..bc5012ac24 100644 --- a/lib/es6/belt_Range.js +++ b/lib/es6/belt_Range.js @@ -2,7 +2,7 @@ function forEachU(s, f, action) { - for(let i = s; i <= f; ++i){ + for (let i = s; i <= f; ++i) { action(i); } } diff --git a/lib/es6/belt_SetDict.js b/lib/es6/belt_SetDict.js index 4231c26328..7e930e81ce 100644 --- a/lib/es6/belt_SetDict.js +++ b/lib/es6/belt_SetDict.js @@ -69,7 +69,7 @@ function remove(t, x, cmp) { function mergeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key, cmp); } @@ -79,7 +79,7 @@ function mergeMany(h, arr, cmp) { function removeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key, cmp); } diff --git a/lib/es6/belt_SetInt.js b/lib/es6/belt_SetInt.js index 6c172f6644..b40cc8e4c4 100644 --- a/lib/es6/belt_SetInt.js +++ b/lib/es6/belt_SetInt.js @@ -32,7 +32,7 @@ function add(t, x) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key); } @@ -78,7 +78,7 @@ function remove(t, x) { function removeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key); } diff --git a/lib/es6/belt_SetString.js b/lib/es6/belt_SetString.js index 3322ff29fa..b2f54a7447 100644 --- a/lib/es6/belt_SetString.js +++ b/lib/es6/belt_SetString.js @@ -32,7 +32,7 @@ function add(t, x) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key); } @@ -78,7 +78,7 @@ function remove(t, x) { function removeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key); } diff --git a/lib/es6/belt_SortArray.js b/lib/es6/belt_SortArray.js index 11810837e4..2f5a360b9f 100644 --- a/lib/es6/belt_SortArray.js +++ b/lib/es6/belt_SortArray.js @@ -306,7 +306,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) { } function insertionSort(src, srcofs, dst, dstofs, len, cmp) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(dst[j], e) > 0) { diff --git a/lib/es6/belt_SortArrayInt.js b/lib/es6/belt_SortArrayInt.js index 2ba1e57eef..f3bad08b29 100644 --- a/lib/es6/belt_SortArrayInt.js +++ b/lib/es6/belt_SortArrayInt.js @@ -273,7 +273,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { } function insertionSort(src, srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && dst[j] > e) { diff --git a/lib/es6/belt_SortArrayString.js b/lib/es6/belt_SortArrayString.js index 2ba1e57eef..f3bad08b29 100644 --- a/lib/es6/belt_SortArrayString.js +++ b/lib/es6/belt_SortArrayString.js @@ -273,7 +273,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { } function insertionSort(src, srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && dst[j] > e) { diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index 6f6efe8a31..88ec13801d 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -885,7 +885,7 @@ function fromArray(xs, cmp) { next = -next | 0; result = fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(cmp, result, xs[i]); } return result; diff --git a/lib/es6/belt_internalAVLtree.js b/lib/es6/belt_internalAVLtree.js index b2406181e3..4e3967a4cb 100644 --- a/lib/es6/belt_internalAVLtree.js +++ b/lib/es6/belt_internalAVLtree.js @@ -1083,7 +1083,7 @@ function fromArray(xs, cmp) { next = -next | 0; result = fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = updateMutate(result, match[0], match[1], cmp); } diff --git a/lib/es6/belt_internalBuckets.js b/lib/es6/belt_internalBuckets.js index d5c51865fa..24333af0d3 100644 --- a/lib/es6/belt_internalBuckets.js +++ b/lib/es6/belt_internalBuckets.js @@ -38,7 +38,7 @@ function copyBucket(c) { function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { newBuckets[i] = copyBucket(buckets[i]); } return newBuckets; @@ -80,7 +80,7 @@ function do_bucket_iter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { do_bucket_iter(f, d[i]); } } @@ -107,7 +107,7 @@ function do_bucket_fold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = do_bucket_fold(f, d[i], accu); } return accu; @@ -188,7 +188,7 @@ function filterMapInplaceBucket(f, h, i, _prec, _cell) { function keepMapInPlaceU(h, f) { let h_buckets = h.buckets; - for(let i = 0, i_finish = h_buckets.length; i < i_finish; ++i){ + for (let i = 0, i_finish = h_buckets.length; i < i_finish; ++i) { let v = h_buckets[i]; if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); @@ -240,7 +240,7 @@ function linear(h, f) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { let cell = d[i]; if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); diff --git a/lib/es6/belt_internalBucketsType.js b/lib/es6/belt_internalBucketsType.js index 39d523f98a..4655d3b176 100644 --- a/lib/es6/belt_internalBucketsType.js +++ b/lib/es6/belt_internalBucketsType.js @@ -29,7 +29,7 @@ function clear(h) { h.size = 0; let h_buckets = h.buckets; let len = h_buckets.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { h_buckets[i] = undefined; } } diff --git a/lib/es6/belt_internalMapInt.js b/lib/es6/belt_internalMapInt.js index 845b33e8f4..f3258af582 100644 --- a/lib/es6/belt_internalMapInt.js +++ b/lib/es6/belt_internalMapInt.js @@ -331,7 +331,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = addMutate(result, match[0], match[1]); } diff --git a/lib/es6/belt_internalMapString.js b/lib/es6/belt_internalMapString.js index d264f68795..f390e19aa6 100644 --- a/lib/es6/belt_internalMapString.js +++ b/lib/es6/belt_internalMapString.js @@ -331,7 +331,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = addMutate(result, match[0], match[1]); } diff --git a/lib/es6/belt_internalSetBuckets.js b/lib/es6/belt_internalSetBuckets.js index 6a7fb65037..69cb401409 100644 --- a/lib/es6/belt_internalSetBuckets.js +++ b/lib/es6/belt_internalSetBuckets.js @@ -35,7 +35,7 @@ function copyBucket(c) { function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { newBuckets[i] = copyBucket(buckets[i]); } return newBuckets; @@ -77,7 +77,7 @@ function doBucketIter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { doBucketIter(f, d[i]); } } @@ -107,7 +107,7 @@ function toArray(h) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { let cell = d[i]; if (cell !== undefined) { current = fillArray(current, arr, cell); @@ -133,7 +133,7 @@ function doBucketFold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = doBucketFold(f, d[i], accu); } return accu; diff --git a/lib/es6/belt_internalSetInt.js b/lib/es6/belt_internalSetInt.js index 94952bb5c6..8e6da68c13 100644 --- a/lib/es6/belt_internalSetInt.js +++ b/lib/es6/belt_internalSetInt.js @@ -180,7 +180,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(result, xs[i]); } return result; diff --git a/lib/es6/belt_internalSetString.js b/lib/es6/belt_internalSetString.js index 120bbcf0bd..9e3c87a349 100644 --- a/lib/es6/belt_internalSetString.js +++ b/lib/es6/belt_internalSetString.js @@ -180,7 +180,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(result, xs[i]); } return result; diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index 7546271b57..5bb313f976 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ + for (let k = i, k_finish = l + i | 0; k < k_finish; ++k) { s[k] = c; } } @@ -23,7 +23,7 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a = (s1.length - i2 | 0) - 1 | 0; let range_b = len - 1 | 0; let range = range_a > range_b ? range_b : range_a; - for(let j = range; j >= 0; --j){ + for (let j = range; j >= 0; --j) { s1[i2 + j | 0] = s1[i1 + j | 0]; } return; @@ -34,22 +34,22 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a$1 = (s1.length - i1 | 0) - 1 | 0; let range_b$1 = len - 1 | 0; let range$1 = range_a$1 > range_b$1 ? range_b$1 : range_a$1; - for(let k = 0; k <= range$1; ++k){ + for (let k = 0; k <= range$1; ++k) { s1[i2 + k | 0] = s1[i1 + k | 0]; } return; } let off1 = s1.length - i1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[i2 + i | 0] = s1[i1 + i | 0]; } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[i2 + i$1 | 0] = s1[i1 + i$1 | 0]; } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[i2 + i$2 | 0] = /* '\000' */0; } } @@ -62,7 +62,7 @@ function make(n, c) { function init(n, f) { let s = Caml_bytes.create(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { s[i] = f(i); } return s; @@ -89,7 +89,7 @@ function to_string(a) { while(s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); - for(let k = 0; k < next; ++k){ + for (let k = 0; k < next; ++k) { tmp_bytes[k] = a[k + offset | 0]; } s = s + String.fromCharCode.apply(null, tmp_bytes); @@ -102,7 +102,7 @@ function to_string(a) { function of_string(s) { let len = s.length; let res = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { res[i] = s.codePointAt(i); } return res; @@ -216,27 +216,27 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } let off1 = s1.length - ofs1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[ofs2 + i | 0] = s1.codePointAt(ofs1 + i | 0); } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[ofs2 + i$1 | 0] = s1.codePointAt(ofs1 + i$1 | 0); } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[ofs2 + i$2 | 0] = /* '\000' */0; } } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { @@ -444,7 +444,7 @@ function map(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(s[i]); } return r; @@ -456,7 +456,7 @@ function mapi(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, s[i]); } return r; diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index 7546271b57..5bb313f976 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ + for (let k = i, k_finish = l + i | 0; k < k_finish; ++k) { s[k] = c; } } @@ -23,7 +23,7 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a = (s1.length - i2 | 0) - 1 | 0; let range_b = len - 1 | 0; let range = range_a > range_b ? range_b : range_a; - for(let j = range; j >= 0; --j){ + for (let j = range; j >= 0; --j) { s1[i2 + j | 0] = s1[i1 + j | 0]; } return; @@ -34,22 +34,22 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a$1 = (s1.length - i1 | 0) - 1 | 0; let range_b$1 = len - 1 | 0; let range$1 = range_a$1 > range_b$1 ? range_b$1 : range_a$1; - for(let k = 0; k <= range$1; ++k){ + for (let k = 0; k <= range$1; ++k) { s1[i2 + k | 0] = s1[i1 + k | 0]; } return; } let off1 = s1.length - i1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[i2 + i | 0] = s1[i1 + i | 0]; } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[i2 + i$1 | 0] = s1[i1 + i$1 | 0]; } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[i2 + i$2 | 0] = /* '\000' */0; } } @@ -62,7 +62,7 @@ function make(n, c) { function init(n, f) { let s = Caml_bytes.create(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { s[i] = f(i); } return s; @@ -89,7 +89,7 @@ function to_string(a) { while(s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); - for(let k = 0; k < next; ++k){ + for (let k = 0; k < next; ++k) { tmp_bytes[k] = a[k + offset | 0]; } s = s + String.fromCharCode.apply(null, tmp_bytes); @@ -102,7 +102,7 @@ function to_string(a) { function of_string(s) { let len = s.length; let res = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { res[i] = s.codePointAt(i); } return res; @@ -216,27 +216,27 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } let off1 = s1.length - ofs1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[ofs2 + i | 0] = s1.codePointAt(ofs1 + i | 0); } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[ofs2 + i$1 | 0] = s1.codePointAt(ofs1 + i$1 | 0); } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[ofs2 + i$2 | 0] = /* '\000' */0; } } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { @@ -444,7 +444,7 @@ function map(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(s[i]); } return r; @@ -456,7 +456,7 @@ function mapi(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, s[i]); } return r; diff --git a/lib/es6/caml_array.js b/lib/es6/caml_array.js index 80fad5d5c2..794696443c 100644 --- a/lib/es6/caml_array.js +++ b/lib/es6/caml_array.js @@ -81,7 +81,7 @@ function get(xs, index) { function make(len, init) { let b = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { b[i] = init; } return b; @@ -89,7 +89,7 @@ function make(len, init) { function make_float(len) { let b = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { b[i] = 0; } return b; @@ -97,12 +97,12 @@ function make_float(len) { function blit(a1, i1, a2, i2, len) { if (i2 <= i1) { - for(let j = 0; j < len; ++j){ + for (let j = 0; j < len; ++j) { a2[j + i2 | 0] = a1[j + i1 | 0]; } return; } - for(let j$1 = len - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = len - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + i2 | 0] = a1[j$1 + i1 | 0]; } } diff --git a/lib/es6/caml_bytes.js b/lib/es6/caml_bytes.js index 423dc9b0e8..a85e4485cb 100644 --- a/lib/es6/caml_bytes.js +++ b/lib/es6/caml_bytes.js @@ -35,7 +35,7 @@ function create(len) { }); } let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = /* '\000' */0; } return result; diff --git a/lib/es6/caml_format.js b/lib/es6/caml_format.js index 5cdc04e050..1ff7194642 100644 --- a/lib/es6/caml_format.js +++ b/lib/es6/caml_format.js @@ -499,7 +499,7 @@ function finish_formatting(config, rawbuffer) { } let buffer = ""; if (justify === "+" && filter === " ") { - for(let _for = len; _for < width; ++_for){ + for (let _for = len; _for < width; ++_for) { buffer = buffer + filter; } } @@ -518,13 +518,13 @@ function finish_formatting(config, rawbuffer) { buffer = buffer + "0x"; } if (justify === "+" && filter === "0") { - for(let _for$1 = len; _for$1 < width; ++_for$1){ + for (let _for$1 = len; _for$1 < width; ++_for$1) { buffer = buffer + filter; } } buffer = uppercase ? buffer + rawbuffer.toUpperCase() : buffer + rawbuffer; if (justify === "-") { - for(let _for$2 = len; _for$2 < width; ++_for$2){ + for (let _for$2 = len; _for$2 < width; ++_for$2) { buffer = buffer + " "; } } diff --git a/lib/es6/caml_hash.js b/lib/es6/caml_hash.js index 41be4c6ac6..7d248134a0 100644 --- a/lib/es6/caml_hash.js +++ b/lib/es6/caml_hash.js @@ -72,7 +72,7 @@ function hash(count, _limit, seed, obj) { s = Caml_hash_primitive.hash_mix_int(s, tag); let v = size - 1 | 0; let block = v < num ? v : num; - for(let i = 0; i <= block; ++i){ + for (let i = 0; i <= block; ++i) { push_back(queue, obj$1[i]); } } diff --git a/lib/es6/caml_hash_primitive.js b/lib/es6/caml_hash_primitive.js index 2407c206c0..bd5d59943e 100644 --- a/lib/es6/caml_hash_primitive.js +++ b/lib/es6/caml_hash_primitive.js @@ -27,7 +27,7 @@ function hash_mix_string(h, s) { let len = s.length; let block = (len / 4 | 0) - 1 | 0; let hash = h; - for(let i = 0; i <= block; ++i){ + for (let i = 0; i <= block; ++i) { let j = (i << 2); let w = s.charCodeAt(j) | (s.charCodeAt(j + 1 | 0) << 8) | (s.charCodeAt(j + 2 | 0) << 16) | (s.charCodeAt(j + 3 | 0) << 24); hash = hash_mix_int(hash, w); diff --git a/lib/es6/caml_md5.js b/lib/es6/caml_md5.js index f25333fb91..8ae9fe01f9 100644 --- a/lib/es6/caml_md5.js +++ b/lib/es6/caml_md5.js @@ -130,30 +130,30 @@ function md5_string(s, start, len) { state[1] = -271733879; state[2] = -1732584194; state[3] = 271733878; - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { md5blk[i] = 0; } let i_end = n / 64 | 0; - for(let i$1 = 1; i$1 <= i_end; ++i$1){ - for(let j = 0; j <= 15; ++j){ + for (let i$1 = 1; i$1 <= i_end; ++i$1) { + for (let j = 0; j <= 15; ++j) { let k = ((i$1 << 6) - 64 | 0) + (j << 2) | 0; md5blk[j] = ((s$1.charCodeAt(k) + (s$1.charCodeAt(k + 1 | 0) << 8) | 0) + (s$1.charCodeAt(k + 2 | 0) << 16) | 0) + (s$1.charCodeAt(k + 3 | 0) << 24) | 0; } cycle(state, md5blk); } let s_tail = s$1.slice((i_end << 6)); - for(let kk = 0; kk <= 15; ++kk){ + for (let kk = 0; kk <= 15; ++kk) { md5blk[kk] = 0; } let i_end$1 = s_tail.length - 1 | 0; - for(let i$2 = 0; i$2 <= i_end$1; ++i$2){ + for (let i$2 = 0; i$2 <= i_end$1; ++i$2) { md5blk[i$2 / 4 | 0] = md5blk[i$2 / 4 | 0] | (s_tail.charCodeAt(i$2) << (i$2 % 4 << 3)); } let i$3 = i_end$1 + 1 | 0; md5blk[i$3 / 4 | 0] = md5blk[i$3 / 4 | 0] | (128 << (i$3 % 4 << 3)); if (i$3 > 55) { cycle(state, md5blk); - for(let i$4 = 0; i$4 <= 15; ++i$4){ + for (let i$4 = 0; i$4 <= 15; ++i$4) { md5blk[i$4] = 0; } } diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index eb2ab0f357..9260016eb2 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -34,7 +34,7 @@ function init_mod(loc, shape) { let v = {}; struct_[idx] = v; let len = comps.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = comps[i]; loop(match[0], v, match[1]); } @@ -67,7 +67,7 @@ function update_mod(shape, o, n) { return; } let comps = shape._0; - for(let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1){ + for (let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1) { let match = comps[i$1]; let name = match[1]; aux(match[0], o[name], n[name], o, name); @@ -89,7 +89,7 @@ function update_mod(shape, o, n) { } if (shape.TAG === "Module") { let comps = shape._0; - for(let i = 0, i_finish = comps.length; i < i_finish; ++i){ + for (let i = 0, i_finish = comps.length; i < i_finish; ++i) { let match = comps[i]; let name = match[1]; aux(match[0], o[name], n[name], o, name); diff --git a/lib/es6/digest.js b/lib/es6/digest.js index d321133827..04c8b1d33b 100644 --- a/lib/es6/digest.js +++ b/lib/es6/digest.js @@ -47,7 +47,7 @@ function to_hex(d) { }); } let result = Caml_bytes.create(32); - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { let x = Caml_string.get(d, i); result[(i << 1)] = char_hex((x >>> 4)); result[(i << 1) + 1 | 0] = char_hex(x & 15); @@ -101,7 +101,7 @@ function from_hex(s) { return (digit(Caml_string.get(s, i)) << 4) + digit(Caml_string.get(s, i + 1 | 0)) | 0; }; let result = Caml_bytes.create(16); - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { Caml_bytes.set(result, i, Char.chr(byte((i << 1)))); } return Bytes.unsafe_to_string(result); diff --git a/lib/es6/filename.js b/lib/es6/filename.js index c35edb6f5e..75bb3806ae 100644 --- a/lib/es6/filename.js +++ b/lib/es6/filename.js @@ -134,7 +134,7 @@ function quote(x) { let l = x.length; let b = Buffer.create(l + 20 | 0); Buffer.add_char(b, /* '\'' */39); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { if (Caml_string.get(x, i) === /* '\'' */39) { Buffer.add_string(b, quotequote); } else { @@ -257,7 +257,7 @@ function quote$1(s) { }; }; let add_bs = function (n) { - for(let _j = 1; _j <= n; ++_j){ + for (let _j = 1; _j <= n; ++_j) { Buffer.add_char(b, /* '\\' */92); } }; diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index abd355c57e..f66b4ac321 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -71,7 +71,7 @@ function create(randomOpt, initial_size) { function clear(h) { h.size = 0; let len = h.data.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { Caml_array.set(h.data, i, "Empty"); } } @@ -189,13 +189,13 @@ function resize(indexfun, h) { continue; }; }; - for(let i = 0; i < osize; ++i){ + for (let i = 0; i < osize; ++i) { insert_bucket(Caml_array.get(odata, i)); } if (!inplace) { return; } - for(let i$1 = 0; i$1 < nsize; ++i$1){ + for (let i$1 = 0; i$1 < nsize; ++i$1) { let tail = Caml_array.get(ndata_tail, i$1); if (typeof tail === "object") { tail.next = "Empty"; @@ -460,7 +460,7 @@ function iter(f, h) { } try { let d = h.data; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { do_bucket(Caml_array.get(d, i)); } if (!old_trav) { @@ -521,7 +521,7 @@ function filter_map_inplace(f, h) { flip_ongoing_traversal(h); } try { - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; @@ -561,7 +561,7 @@ function fold(f, h, init) { try { let d = h.data; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = do_bucket(Caml_array.get(d, i), accu); } if (!old_trav) { diff --git a/lib/es6/js_dict.js b/lib/es6/js_dict.js index aada879bc8..0f7ff2e9d1 100644 --- a/lib/es6/js_dict.js +++ b/lib/es6/js_dict.js @@ -17,7 +17,7 @@ function entries(dict) { let keys = Object.keys(dict); let l = keys.length; let values = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let key = keys[i]; values[i] = [ key, @@ -31,7 +31,7 @@ function values(dict) { let keys = Object.keys(dict); let l = keys.length; let values$1 = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { values$1[i] = dict[keys[i]]; } return values$1; @@ -55,7 +55,7 @@ function fromList(entries) { function fromArray(entries) { let dict = {}; let l = entries.length; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let match = entries[i]; dict[match[0]] = match[1]; } @@ -66,7 +66,7 @@ function map(f, source) { let target = {}; let keys = Object.keys(source); let l = keys.length; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let key = keys[i]; target[key] = f(source[key]); } diff --git a/lib/es6/lexing.js b/lib/es6/lexing.js index 17d84cd520..0b3f058f7a 100644 --- a/lib/es6/lexing.js +++ b/lib/es6/lexing.js @@ -72,7 +72,7 @@ function from_function(f) { x.lex_last_pos = x.lex_last_pos - s | 0; x.lex_buffer_len = x.lex_buffer_len - s | 0; let t = x.lex_mem; - for(let i = 0, i_finish = t.length; i < i_finish; ++i){ + for (let i = 0, i_finish = t.length; i < i_finish; ++i) { let v = Caml_array.get(t, i); if (v >= 0) { Caml_array.set(t, i, v - s | 0); diff --git a/lib/es6/random.js b/lib/es6/random.js index 06d4957792..2b8046643f 100644 --- a/lib/es6/random.js +++ b/lib/es6/random.js @@ -27,13 +27,13 @@ function full_init(s, seed) { }; let seed$1 = seed.length === 0 ? [0] : seed; let l = seed$1.length; - for(let i = 0; i <= 54; ++i){ + for (let i = 0; i <= 54; ++i) { Caml_array.set(s.st, i, i); } let accu = "x"; - for(let i$1 = 0, i_finish = 54 + ( + for (let i$1 = 0, i_finish = 54 + ( 55 > l ? 55 : l - ) | 0; i$1 <= i_finish; ++i$1){ + ) | 0; i$1 <= i_finish; ++i$1) { let j = i$1 % 55; let k = i$1 % l; accu = combine(accu, Caml_array.get(seed$1, k)); diff --git a/lib/es6/sort.js b/lib/es6/sort.js index 7992d0e835..e9a2386460 100644 --- a/lib/es6/sort.js +++ b/lib/es6/sort.js @@ -145,7 +145,7 @@ function array(cmp, arr) { }; }; qsort(0, arr.length - 1 | 0); - for(let i = 1, i_finish = arr.length; i < i_finish; ++i){ + for (let i = 1, i_finish = arr.length; i < i_finish; ++i) { let val_i = arr[i]; if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; diff --git a/lib/es6/string.js b/lib/es6/string.js index 58ada70c6b..85b6ccb636 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -19,13 +19,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(i, s.codePointAt(i)); } } @@ -292,7 +292,7 @@ function equal(a, b) { function split_on_char(sep, s) { let r = /* [] */0; let j = s.length; - for(let i = s.length - 1 | 0; i >= 0; --i){ + for (let i = s.length - 1 | 0; i >= 0; --i) { if (s.codePointAt(i) === sep) { r = { hd: sub(s, i + 1 | 0, (j - i | 0) - 1 | 0), diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index 32fc9ca1b7..d2bb07e09a 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -21,13 +21,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(i, s.codePointAt(i)); } } @@ -294,7 +294,7 @@ function equal(a, b) { function split_on_char(sep, s) { let r = /* [] */0; let j = s.length; - for(let i = s.length - 1 | 0; i >= 0; --i){ + for (let i = s.length - 1 | 0; i >= 0; --i) { if (s.codePointAt(i) === sep) { r = { hd: sub(s, i + 1 | 0, (j - i | 0) - 1 | 0), diff --git a/lib/js/array.js b/lib/js/array.js index e1374bc84f..415900f6d9 100644 --- a/lib/js/array.js +++ b/lib/js/array.js @@ -22,7 +22,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f(i); } return res; @@ -30,7 +30,7 @@ function init(l, f) { function make_matrix(sx, sy, init) { let res = Caml_array.make(sx, []); - for(let x = 0; x < sx; ++x){ + for (let x = 0; x < sx; ++x) { res[x] = Caml_array.make(sy, init); } return res; @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); } } @@ -120,7 +120,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -141,14 +141,14 @@ function map2(f, a, b) { return []; } let r = Caml_array.make(la, f(a[0], b[0])); - for(let i = 1; i < la; ++i){ + for (let i = 1; i < la; ++i) { r[i] = f(a[i], b[i]); } return r; } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -159,7 +159,7 @@ function mapi(f, a) { return []; } let r = Caml_array.make(l, f(0, a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -226,7 +226,7 @@ function fold_left(f, x, a) { function fold_right(f, a, x) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(a[i], r); } return r; @@ -395,10 +395,10 @@ function sort(cmp, a) { }; }; let l = a.length; - for(let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i){ + for (let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i) { trickle(l, i, Caml_array.get(a, i)); } - for(let i$1 = l - 1 | 0; i$1 >= 2; --i$1){ + for (let i$1 = l - 1 | 0; i$1 >= 2; --i$1) { let e = Caml_array.get(a, i$1); Caml_array.set(a, i$1, Caml_array.get(a, 0)); trickleup(bubble(i$1, 0), e); @@ -449,7 +449,7 @@ function stable_sort(cmp, a) { }; }; let isortto = function (srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { diff --git a/lib/js/arrayLabels.js b/lib/js/arrayLabels.js index 1e630201fe..9097f86f13 100644 --- a/lib/js/arrayLabels.js +++ b/lib/js/arrayLabels.js @@ -22,7 +22,7 @@ function init(l, f) { }); } let res = Caml_array.make(l, f(0)); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { res[i] = f(i); } return res; @@ -30,7 +30,7 @@ function init(l, f) { function make_matrix(sx, sy, init) { let res = Caml_array.make(sx, []); - for(let x = 0; x < sx; ++x){ + for (let x = 0; x < sx; ++x) { res[x] = Caml_array.make(sy, init); } return res; @@ -77,7 +77,7 @@ function fill(a, ofs, len, v) { } }); } - for(let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; } } @@ -95,7 +95,7 @@ function blit(a1, ofs1, a2, ofs2, len) { } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -109,7 +109,7 @@ function iter2(f, a, b) { } }); } - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); } } @@ -120,7 +120,7 @@ function map(f, a) { return []; } let r = Caml_array.make(l, f(a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -141,14 +141,14 @@ function map2(f, a, b) { return []; } let r = Caml_array.make(la, f(a[0], b[0])); - for(let i = 1; i < la; ++i){ + for (let i = 1; i < la; ++i) { r[i] = f(a[i], b[i]); } return r; } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -159,7 +159,7 @@ function mapi(f, a) { return []; } let r = Caml_array.make(l, f(0, a[0])); - for(let i = 1; i < l; ++i){ + for (let i = 1; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -218,7 +218,7 @@ function of_list(param) { function fold_left(f, x, a) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -226,7 +226,7 @@ function fold_left(f, x, a) { function fold_right(f, a, x) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(a[i], r); } return r; @@ -395,10 +395,10 @@ function sort(cmp, a) { }; }; let l = a.length; - for(let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i){ + for (let i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i) { trickle(l, i, Caml_array.get(a, i)); } - for(let i$1 = l - 1 | 0; i$1 >= 2; --i$1){ + for (let i$1 = l - 1 | 0; i$1 >= 2; --i$1) { let e = Caml_array.get(a, i$1); Caml_array.set(a, i$1, Caml_array.get(a, 0)); trickleup(bubble(i$1, 0), e); @@ -449,7 +449,7 @@ function stable_sort(cmp, a) { }; }; let isortto = function (srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { diff --git a/lib/js/belt_Array.js b/lib/js/belt_Array.js index f8e252c7f1..f1b7da9710 100644 --- a/lib/js/belt_Array.js +++ b/lib/js/belt_Array.js @@ -62,7 +62,7 @@ function shuffleInPlace(xs) { let random_int = function (min, max) { return Math.floor(Math.random() * (max - min | 0)) + min | 0; }; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { swapUnsafe(xs, i, random_int(i, len)); } } @@ -76,7 +76,7 @@ function shuffle(xs) { function reverseInPlace(xs) { let len = xs.length; let ofs = 0; - for(let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i){ + for (let i = 0, i_finish = len / 2 | 0; i < i_finish; ++i) { swapUnsafe(xs, ofs + i | 0, ((ofs + len | 0) - i | 0) - 1 | 0); } } @@ -84,7 +84,7 @@ function reverseInPlace(xs) { function reverse(xs) { let len = xs.length; let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = xs[(len - 1 | 0) - i | 0]; } return result; @@ -95,7 +95,7 @@ function make(l, f) { return []; } let res = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { res[i] = f; } return res; @@ -106,7 +106,7 @@ function makeByU(l, f) { return []; } let res = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { res[i] = f(i); } return res; @@ -136,7 +136,7 @@ function range(start, finish) { return []; } let arr = new Array(cut + 1 | 0); - for(let i = 0; i <= cut; ++i){ + for (let i = 0; i <= cut; ++i) { arr[i] = start + i | 0; } return arr; @@ -150,7 +150,7 @@ function rangeBy(start, finish, step) { let nb = (cut / step | 0) + 1 | 0; let arr = new Array(nb); let cur = start; - for(let i = 0; i < nb; ++i){ + for (let i = 0; i < nb; ++i) { arr[i] = cur; cur = cur + step | 0; } @@ -162,7 +162,7 @@ function zip(xs, ys) { let leny = ys.length; let len = lenx < leny ? lenx : leny; let s = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s[i] = [ xs[i], ys[i] @@ -176,7 +176,7 @@ function zipByU(xs, ys, f) { let leny = ys.length; let len = lenx < leny ? lenx : leny; let s = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s[i] = f(xs[i], ys[i]); } return s; @@ -192,10 +192,10 @@ function concat(a1, a2) { let l1 = a1.length; let l2 = a2.length; let a1a2 = new Array(l1 + l2 | 0); - for(let i = 0; i < l1; ++i){ + for (let i = 0; i < l1; ++i) { a1a2[i] = a1[i]; } - for(let i$1 = 0; i$1 < l2; ++i$1){ + for (let i$1 = 0; i$1 < l2; ++i$1) { a1a2[l1 + i$1 | 0] = a2[i$1]; } return a1a2; @@ -204,14 +204,14 @@ function concat(a1, a2) { function concatMany(arrs) { let lenArrs = arrs.length; let totalLen = 0; - for(let i = 0; i < lenArrs; ++i){ + for (let i = 0; i < lenArrs; ++i) { totalLen = totalLen + arrs[i].length | 0; } let result = new Array(totalLen); totalLen = 0; - for(let j = 0; j < lenArrs; ++j){ + for (let j = 0; j < lenArrs; ++j) { let cur = arrs[j]; - for(let k = 0, k_finish = cur.length; k < k_finish; ++k){ + for (let k = 0, k_finish = cur.length; k < k_finish; ++k) { result[totalLen] = cur[k]; totalLen = totalLen + 1 | 0; } @@ -231,7 +231,7 @@ function slice(a, offset, len) { return []; } let result = new Array(copyLength); - for(let i = 0; i < copyLength; ++i){ + for (let i = 0; i < copyLength; ++i) { result[i] = a[ofs + i | 0]; } return result; @@ -242,7 +242,7 @@ function sliceToEnd(a, offset) { let ofs = offset < 0 ? Caml.int_max(lena + offset | 0, 0) : offset; let len = lena > ofs ? lena - ofs | 0 : 0; let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = a[ofs + i | 0]; } return result; @@ -259,19 +259,19 @@ function fill(a, offset, len, v) { if (fillLength <= 0) { return; } - for(let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i){ + for (let i = ofs, i_finish = ofs + fillLength | 0; i < i_finish; ++i) { a[i] = v; } } function blitUnsafe(a1, srcofs1, a2, srcofs2, blitLength) { if (srcofs2 <= srcofs1) { - for(let j = 0; j < blitLength; ++j){ + for (let j = 0; j < blitLength; ++j) { a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0]; } return; } - for(let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0]; } } @@ -283,18 +283,18 @@ function blit(a1, ofs1, a2, ofs2, len) { let srcofs2 = ofs2 < 0 ? Caml.int_max(lena2 + ofs2 | 0, 0) : ofs2; let blitLength = Caml.int_min(len, Caml.int_min(lena1 - srcofs1 | 0, lena2 - srcofs2 | 0)); if (srcofs2 <= srcofs1) { - for(let j = 0; j < blitLength; ++j){ + for (let j = 0; j < blitLength; ++j) { a2[j + srcofs2 | 0] = a1[j + srcofs1 | 0]; } return; } - for(let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = blitLength - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + srcofs2 | 0] = a1[j$1 + srcofs1 | 0]; } } function forEachU(a, f) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } @@ -308,7 +308,7 @@ function forEach(a, f) { function mapU(a, f) { let l = a.length; let r = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(a[i]); } return r; @@ -374,7 +374,7 @@ function keepU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; if (f(v)) { r[j] = v; @@ -396,7 +396,7 @@ function keepWithIndexU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; if (f(v, i)) { r[j] = v; @@ -418,7 +418,7 @@ function keepMapU(a, f) { let l = a.length; let r = new Array(l); let j = 0; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let v = a[i]; let v$1 = f(v); if (v$1 !== undefined) { @@ -438,7 +438,7 @@ function keepMap(a, f) { } function forEachWithIndexU(a, f) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -452,7 +452,7 @@ function forEachWithIndex(a, f) { function mapWithIndexU(a, f) { let l = a.length; let r = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, a[i]); } return r; @@ -466,7 +466,7 @@ function mapWithIndex(a, f) { function reduceU(a, x, f) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i]); } return r; @@ -480,7 +480,7 @@ function reduce(a, x, f) { function reduceReverseU(a, x, f) { let r = x; - for(let i = a.length - 1 | 0; i >= 0; --i){ + for (let i = a.length - 1 | 0; i >= 0; --i) { r = f(r, a[i]); } return r; @@ -495,7 +495,7 @@ function reduceReverse(a, x, f) { function reduceReverse2U(a, b, x, f) { let r = x; let len = Caml.int_min(a.length, b.length); - for(let i = len - 1 | 0; i >= 0; --i){ + for (let i = len - 1 | 0; i >= 0; --i) { r = f(r, a[i], b[i]); } return r; @@ -509,7 +509,7 @@ function reduceReverse2(a, b, x, f) { function reduceWithIndexU(a, x, f) { let r = x; - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { r = f(r, a[i], i); } return r; @@ -663,7 +663,7 @@ function partitionU(a, f) { let j = 0; let a1 = new Array(l); let a2 = new Array(l); - for(let ii = 0; ii < l; ++ii){ + for (let ii = 0; ii < l; ++ii) { let v = a[ii]; if (f(v)) { a1[i] = v; @@ -691,7 +691,7 @@ function unzip(a) { let l = a.length; let a1 = new Array(l); let a2 = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let match = a[i]; a1[i] = match[0]; a2[i] = match[1]; @@ -730,7 +730,7 @@ function joinWith(a, sep, toString) { function initU(n, f) { let v = new Array(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { v[i] = f(i); } return v; diff --git a/lib/js/belt_HashMap.js b/lib/js/belt_HashMap.js index ba9697458a..f187e2a379 100644 --- a/lib/js/belt_HashMap.js +++ b/lib/js/belt_HashMap.js @@ -76,10 +76,10 @@ function set0(h, key, value, eq, hash) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(hash, h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -202,7 +202,7 @@ function fromArray(arr, id) { let eq = id.eq; let len = arr.length; let v = Belt_internalBucketsType.make(hash, eq, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set0(v, match[0], match[1], eq, hash); } @@ -213,7 +213,7 @@ function mergeMany(h, arr) { let hash = h.hash; let eq = h.eq; let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set0(h, match[0], match[1], eq, hash); } diff --git a/lib/js/belt_HashMapInt.js b/lib/js/belt_HashMapInt.js index 7c91e287d5..0b25109416 100644 --- a/lib/js/belt_HashMapInt.js +++ b/lib/js/belt_HashMapInt.js @@ -73,10 +73,10 @@ function set(h, key, value) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -194,7 +194,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(v, match[0], match[1]); } @@ -203,7 +203,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(h, match[0], match[1]); } diff --git a/lib/js/belt_HashMapString.js b/lib/js/belt_HashMapString.js index 258b989a29..e3e4237c47 100644 --- a/lib/js/belt_HashMapString.js +++ b/lib/js/belt_HashMapString.js @@ -73,10 +73,10 @@ function set(h, key, value) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucketReHash(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -194,7 +194,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(v, match[0], match[1]); } @@ -203,7 +203,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; set(h, match[0], match[1]); } diff --git a/lib/js/belt_HashSet.js b/lib/js/belt_HashSet.js index eba89cbe96..ca695eaee9 100644 --- a/lib/js/belt_HashSet.js +++ b/lib/js/belt_HashSet.js @@ -103,10 +103,10 @@ function add0(h, key, hash, eq) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(hash, h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -159,7 +159,7 @@ function fromArray(arr, id) { let hash = id.hash; let len = arr.length; let v = Belt_internalBucketsType.make(hash, eq, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add0(v, arr[i], hash, eq); } return v; @@ -169,7 +169,7 @@ function mergeMany(h, arr) { let eq = h.eq; let hash = h.hash; let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add0(h, arr[i], hash, eq); } } diff --git a/lib/js/belt_HashSetInt.js b/lib/js/belt_HashSetInt.js index 1a38985e11..a7d7a15954 100644 --- a/lib/js/belt_HashSetInt.js +++ b/lib/js/belt_HashSetInt.js @@ -103,10 +103,10 @@ function add(h, key) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -152,7 +152,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(v, arr[i]); } return v; @@ -160,7 +160,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(h, arr[i]); } } diff --git a/lib/js/belt_HashSetString.js b/lib/js/belt_HashSetString.js index f8106cc738..800f227c8b 100644 --- a/lib/js/belt_HashSetString.js +++ b/lib/js/belt_HashSetString.js @@ -103,10 +103,10 @@ function add(h, key) { let h_buckets$1 = new Array(nsize); let ndata_tail = new Array(nsize); h.buckets = h_buckets$1; - for(let i$1 = 0; i$1 < osize; ++i$1){ + for (let i$1 = 0; i$1 < osize; ++i$1) { copyBucket(h_buckets$1, ndata_tail, odata[i$1]); } - for(let i$2 = 0; i$2 < nsize; ++i$2){ + for (let i$2 = 0; i$2 < nsize; ++i$2) { let tail = ndata_tail[i$2]; if (tail !== undefined) { tail.next = undefined; @@ -152,7 +152,7 @@ function size(h) { function fromArray(arr) { let len = arr.length; let v = Belt_internalBucketsType.make(undefined, undefined, len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(v, arr[i]); } return v; @@ -160,7 +160,7 @@ function fromArray(arr) { function mergeMany(h, arr) { let len = arr.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { add(h, arr[i]); } } diff --git a/lib/js/belt_List.js b/lib/js/belt_List.js index 069df3dc72..b3a867dd21 100644 --- a/lib/js/belt_List.js +++ b/lib/js/belt_List.js @@ -744,7 +744,7 @@ function concatMany(xs) { } let len$1 = xs.length; let v = xs[len$1 - 1 | 0]; - for(let i = len$1 - 2 | 0; i >= 0; --i){ + for (let i = len$1 - 2 | 0; i >= 0; --i) { v = concat(xs[i], v); } return v; diff --git a/lib/js/belt_MapDict.js b/lib/js/belt_MapDict.js index f906153838..026b3c744a 100644 --- a/lib/js/belt_MapDict.js +++ b/lib/js/belt_MapDict.js @@ -133,7 +133,7 @@ function remove(n, x, cmp) { function mergeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1], cmp); } diff --git a/lib/js/belt_MapInt.js b/lib/js/belt_MapInt.js index 9143413026..26b49d60ec 100644 --- a/lib/js/belt_MapInt.js +++ b/lib/js/belt_MapInt.js @@ -149,7 +149,7 @@ function removeMany(t, keys) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1]); } diff --git a/lib/js/belt_MapString.js b/lib/js/belt_MapString.js index d5f2530092..92cfbf4485 100644 --- a/lib/js/belt_MapString.js +++ b/lib/js/belt_MapString.js @@ -149,7 +149,7 @@ function removeMany(t, keys) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = arr[i]; v = set(v, match[0], match[1]); } diff --git a/lib/js/belt_MutableMap.js b/lib/js/belt_MutableMap.js index 7c5f421c6c..244d07bba8 100644 --- a/lib/js/belt_MutableMap.js +++ b/lib/js/belt_MutableMap.js @@ -339,7 +339,7 @@ function set(m, e, v) { function mergeManyAux(t, xs, cmp) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { let match = xs[i]; v = Belt_internalAVLtree.updateMutate(v, match[0], match[1], cmp); } diff --git a/lib/js/belt_MutableQueue.js b/lib/js/belt_MutableQueue.js index d1596bf99b..da732e3ff8 100644 --- a/lib/js/belt_MutableQueue.js +++ b/lib/js/belt_MutableQueue.js @@ -274,7 +274,7 @@ function fromArray(arr) { first: undefined, last: undefined }; - for(let i = 0, i_finish = arr.length; i < i_finish; ++i){ + for (let i = 0, i_finish = arr.length; i < i_finish; ++i) { add(q, arr[i]); } return q; diff --git a/lib/js/belt_MutableSet.js b/lib/js/belt_MutableSet.js index f0470af53e..eacc4238d5 100644 --- a/lib/js/belt_MutableSet.js +++ b/lib/js/belt_MutableSet.js @@ -174,7 +174,7 @@ function add(m, e) { function addArrayMutate(t, xs, cmp) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalAVLset.addMutate(cmp, v, xs[i]); } return v; diff --git a/lib/js/belt_MutableSetInt.js b/lib/js/belt_MutableSetInt.js index fc30c410de..3ea3ee2eb9 100644 --- a/lib/js/belt_MutableSetInt.js +++ b/lib/js/belt_MutableSetInt.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalSetInt.addMutate(v, xs[i]); } return v; diff --git a/lib/js/belt_MutableSetString.js b/lib/js/belt_MutableSetString.js index 9848441f0e..20a6807c98 100644 --- a/lib/js/belt_MutableSetString.js +++ b/lib/js/belt_MutableSetString.js @@ -172,7 +172,7 @@ function add(d, k) { function addArrayMutate(t, xs) { let v = t; - for(let i = 0, i_finish = xs.length; i < i_finish; ++i){ + for (let i = 0, i_finish = xs.length; i < i_finish; ++i) { v = Belt_internalSetString.addMutate(v, xs[i]); } return v; diff --git a/lib/js/belt_Range.js b/lib/js/belt_Range.js index f5b60d1289..b8d9b91a7d 100644 --- a/lib/js/belt_Range.js +++ b/lib/js/belt_Range.js @@ -2,7 +2,7 @@ function forEachU(s, f, action) { - for(let i = s; i <= f; ++i){ + for (let i = s; i <= f; ++i) { action(i); } } diff --git a/lib/js/belt_SetDict.js b/lib/js/belt_SetDict.js index f9fcded08d..9ab610ff85 100644 --- a/lib/js/belt_SetDict.js +++ b/lib/js/belt_SetDict.js @@ -69,7 +69,7 @@ function remove(t, x, cmp) { function mergeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key, cmp); } @@ -79,7 +79,7 @@ function mergeMany(h, arr, cmp) { function removeMany(h, arr, cmp) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key, cmp); } diff --git a/lib/js/belt_SetInt.js b/lib/js/belt_SetInt.js index 6c2b170b10..5dd914037d 100644 --- a/lib/js/belt_SetInt.js +++ b/lib/js/belt_SetInt.js @@ -32,7 +32,7 @@ function add(t, x) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key); } @@ -78,7 +78,7 @@ function remove(t, x) { function removeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key); } diff --git a/lib/js/belt_SetString.js b/lib/js/belt_SetString.js index 3c62a4ea0b..e2ad075d50 100644 --- a/lib/js/belt_SetString.js +++ b/lib/js/belt_SetString.js @@ -32,7 +32,7 @@ function add(t, x) { function mergeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = add(v, key); } @@ -78,7 +78,7 @@ function remove(t, x) { function removeMany(h, arr) { let len = arr.length; let v = h; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let key = arr[i]; v = remove(v, key); } diff --git a/lib/js/belt_SortArray.js b/lib/js/belt_SortArray.js index 2ae3650d58..4e7077e05f 100644 --- a/lib/js/belt_SortArray.js +++ b/lib/js/belt_SortArray.js @@ -306,7 +306,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) { } function insertionSort(src, srcofs, dst, dstofs, len, cmp) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && cmp(dst[j], e) > 0) { diff --git a/lib/js/belt_SortArrayInt.js b/lib/js/belt_SortArrayInt.js index 00a3c25a8e..b953e44a9b 100644 --- a/lib/js/belt_SortArrayInt.js +++ b/lib/js/belt_SortArrayInt.js @@ -273,7 +273,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { } function insertionSort(src, srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && dst[j] > e) { diff --git a/lib/js/belt_SortArrayString.js b/lib/js/belt_SortArrayString.js index 00a3c25a8e..b953e44a9b 100644 --- a/lib/js/belt_SortArrayString.js +++ b/lib/js/belt_SortArrayString.js @@ -273,7 +273,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { } function insertionSort(src, srcofs, dst, dstofs, len) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; while(j >= dstofs && dst[j] > e) { diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index aa3c4de016..2d2cef3e81 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -885,7 +885,7 @@ function fromArray(xs, cmp) { next = -next | 0; result = fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(cmp, result, xs[i]); } return result; diff --git a/lib/js/belt_internalAVLtree.js b/lib/js/belt_internalAVLtree.js index 70f0d5cc11..fa0fc376ef 100644 --- a/lib/js/belt_internalAVLtree.js +++ b/lib/js/belt_internalAVLtree.js @@ -1083,7 +1083,7 @@ function fromArray(xs, cmp) { next = -next | 0; result = fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = updateMutate(result, match[0], match[1], cmp); } diff --git a/lib/js/belt_internalBuckets.js b/lib/js/belt_internalBuckets.js index ce6167a2fb..3737fb2ea6 100644 --- a/lib/js/belt_internalBuckets.js +++ b/lib/js/belt_internalBuckets.js @@ -38,7 +38,7 @@ function copyBucket(c) { function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { newBuckets[i] = copyBucket(buckets[i]); } return newBuckets; @@ -80,7 +80,7 @@ function do_bucket_iter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { do_bucket_iter(f, d[i]); } } @@ -107,7 +107,7 @@ function do_bucket_fold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = do_bucket_fold(f, d[i], accu); } return accu; @@ -188,7 +188,7 @@ function filterMapInplaceBucket(f, h, i, _prec, _cell) { function keepMapInPlaceU(h, f) { let h_buckets = h.buckets; - for(let i = 0, i_finish = h_buckets.length; i < i_finish; ++i){ + for (let i = 0, i_finish = h_buckets.length; i < i_finish; ++i) { let v = h_buckets[i]; if (v !== undefined) { filterMapInplaceBucket(f, h, i, undefined, v); @@ -240,7 +240,7 @@ function linear(h, f) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { let cell = d[i]; if (cell !== undefined) { current = fillArrayMap(current, arr, cell, f); diff --git a/lib/js/belt_internalBucketsType.js b/lib/js/belt_internalBucketsType.js index 2a47c3ac5e..c71749141e 100644 --- a/lib/js/belt_internalBucketsType.js +++ b/lib/js/belt_internalBucketsType.js @@ -29,7 +29,7 @@ function clear(h) { h.size = 0; let h_buckets = h.buckets; let len = h_buckets.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { h_buckets[i] = undefined; } } diff --git a/lib/js/belt_internalMapInt.js b/lib/js/belt_internalMapInt.js index 4130367f1b..aebb05085e 100644 --- a/lib/js/belt_internalMapInt.js +++ b/lib/js/belt_internalMapInt.js @@ -331,7 +331,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = addMutate(result, match[0], match[1]); } diff --git a/lib/js/belt_internalMapString.js b/lib/js/belt_internalMapString.js index 0397f66799..1c831cc587 100644 --- a/lib/js/belt_internalMapString.js +++ b/lib/js/belt_internalMapString.js @@ -331,7 +331,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLtree.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { let match = xs[i]; result = addMutate(result, match[0], match[1]); } diff --git a/lib/js/belt_internalSetBuckets.js b/lib/js/belt_internalSetBuckets.js index f05aecdede..fb38312c31 100644 --- a/lib/js/belt_internalSetBuckets.js +++ b/lib/js/belt_internalSetBuckets.js @@ -35,7 +35,7 @@ function copyBucket(c) { function copyBuckets(buckets) { let len = buckets.length; let newBuckets = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { newBuckets[i] = copyBucket(buckets[i]); } return newBuckets; @@ -77,7 +77,7 @@ function doBucketIter(f, _buckets) { function forEachU(h, f) { let d = h.buckets; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { doBucketIter(f, d[i]); } } @@ -107,7 +107,7 @@ function toArray(h) { let d = h.buckets; let current = 0; let arr = new Array(h.size); - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { let cell = d[i]; if (cell !== undefined) { current = fillArray(current, arr, cell); @@ -133,7 +133,7 @@ function doBucketFold(f, _b, _accu) { function reduceU(h, init, f) { let d = h.buckets; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = doBucketFold(f, d[i], accu); } return accu; diff --git a/lib/js/belt_internalSetInt.js b/lib/js/belt_internalSetInt.js index d69005a2ac..f09d7ef232 100644 --- a/lib/js/belt_internalSetInt.js +++ b/lib/js/belt_internalSetInt.js @@ -180,7 +180,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(result, xs[i]); } return result; diff --git a/lib/js/belt_internalSetString.js b/lib/js/belt_internalSetString.js index f2736e5427..dd13567a83 100644 --- a/lib/js/belt_internalSetString.js +++ b/lib/js/belt_internalSetString.js @@ -180,7 +180,7 @@ function fromArray(xs) { next = -next | 0; result = Belt_internalAVLset.fromSortedArrayRevAux(xs, next - 1 | 0, next); } - for(let i = next; i < len; ++i){ + for (let i = next; i < len; ++i) { result = addMutate(result, xs[i]); } return result; diff --git a/lib/js/bytes.js b/lib/js/bytes.js index 648fa8f2ff..85daca5292 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ + for (let k = i, k_finish = l + i | 0; k < k_finish; ++k) { s[k] = c; } } @@ -23,7 +23,7 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a = (s1.length - i2 | 0) - 1 | 0; let range_b = len - 1 | 0; let range = range_a > range_b ? range_b : range_a; - for(let j = range; j >= 0; --j){ + for (let j = range; j >= 0; --j) { s1[i2 + j | 0] = s1[i1 + j | 0]; } return; @@ -34,22 +34,22 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a$1 = (s1.length - i1 | 0) - 1 | 0; let range_b$1 = len - 1 | 0; let range$1 = range_a$1 > range_b$1 ? range_b$1 : range_a$1; - for(let k = 0; k <= range$1; ++k){ + for (let k = 0; k <= range$1; ++k) { s1[i2 + k | 0] = s1[i1 + k | 0]; } return; } let off1 = s1.length - i1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[i2 + i | 0] = s1[i1 + i | 0]; } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[i2 + i$1 | 0] = s1[i1 + i$1 | 0]; } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[i2 + i$2 | 0] = /* '\000' */0; } } @@ -62,7 +62,7 @@ function make(n, c) { function init(n, f) { let s = Caml_bytes.create(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { s[i] = f(i); } return s; @@ -89,7 +89,7 @@ function to_string(a) { while(s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); - for(let k = 0; k < next; ++k){ + for (let k = 0; k < next; ++k) { tmp_bytes[k] = a[k + offset | 0]; } s = s + String.fromCharCode.apply(null, tmp_bytes); @@ -102,7 +102,7 @@ function to_string(a) { function of_string(s) { let len = s.length; let res = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { res[i] = s.codePointAt(i); } return res; @@ -216,27 +216,27 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } let off1 = s1.length - ofs1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[ofs2 + i | 0] = s1.codePointAt(ofs1 + i | 0); } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[ofs2 + i$1 | 0] = s1.codePointAt(ofs1 + i$1 | 0); } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[ofs2 + i$2 | 0] = /* '\000' */0; } } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { @@ -444,7 +444,7 @@ function map(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(s[i]); } return r; @@ -456,7 +456,7 @@ function mapi(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, s[i]); } return r; diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index 648fa8f2ff..85daca5292 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -9,7 +9,7 @@ function unsafe_fill(s, i, l, c) { if (l <= 0) { return; } - for(let k = i, k_finish = l + i | 0; k < k_finish; ++k){ + for (let k = i, k_finish = l + i | 0; k < k_finish; ++k) { s[k] = c; } } @@ -23,7 +23,7 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a = (s1.length - i2 | 0) - 1 | 0; let range_b = len - 1 | 0; let range = range_a > range_b ? range_b : range_a; - for(let j = range; j >= 0; --j){ + for (let j = range; j >= 0; --j) { s1[i2 + j | 0] = s1[i1 + j | 0]; } return; @@ -34,22 +34,22 @@ function unsafe_blit(s1, i1, s2, i2, len) { let range_a$1 = (s1.length - i1 | 0) - 1 | 0; let range_b$1 = len - 1 | 0; let range$1 = range_a$1 > range_b$1 ? range_b$1 : range_a$1; - for(let k = 0; k <= range$1; ++k){ + for (let k = 0; k <= range$1; ++k) { s1[i2 + k | 0] = s1[i1 + k | 0]; } return; } let off1 = s1.length - i1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[i2 + i | 0] = s1[i1 + i | 0]; } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[i2 + i$1 | 0] = s1[i1 + i$1 | 0]; } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[i2 + i$2 | 0] = /* '\000' */0; } } @@ -62,7 +62,7 @@ function make(n, c) { function init(n, f) { let s = Caml_bytes.create(n); - for(let i = 0; i < n; ++i){ + for (let i = 0; i < n; ++i) { s[i] = f(i); } return s; @@ -89,7 +89,7 @@ function to_string(a) { while(s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); - for(let k = 0; k < next; ++k){ + for (let k = 0; k < next; ++k) { tmp_bytes[k] = a[k + offset | 0]; } s = s + String.fromCharCode.apply(null, tmp_bytes); @@ -102,7 +102,7 @@ function to_string(a) { function of_string(s) { let len = s.length; let res = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { res[i] = s.codePointAt(i); } return res; @@ -216,27 +216,27 @@ function blit_string(s1, ofs1, s2, ofs2, len) { } let off1 = s1.length - ofs1 | 0; if (len <= off1) { - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { s2[ofs2 + i | 0] = s1.codePointAt(ofs1 + i | 0); } return; } - for(let i$1 = 0; i$1 < off1; ++i$1){ + for (let i$1 = 0; i$1 < off1; ++i$1) { s2[ofs2 + i$1 | 0] = s1.codePointAt(ofs1 + i$1 | 0); } - for(let i$2 = off1; i$2 < len; ++i$2){ + for (let i$2 = off1; i$2 < len; ++i$2) { s2[ofs2 + i$2 | 0] = /* '\000' */0; } } function iter(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i]); } } function iteri(f, a) { - for(let i = 0, i_finish = a.length; i < i_finish; ++i){ + for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(i, a[i]); } } @@ -335,7 +335,7 @@ function trim(s) { function escaped(s) { let n = 0; - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { let match = s[i]; n = n + ( match >= 32 ? ( @@ -358,7 +358,7 @@ function escaped(s) { } let s$p = Caml_bytes.create(n); n = 0; - for(let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ + for (let i$1 = 0, i_finish$1 = s.length; i$1 < i_finish$1; ++i$1) { let c = s[i$1]; let exit = 0; if (c >= 35) { @@ -444,7 +444,7 @@ function map(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(s[i]); } return r; @@ -456,7 +456,7 @@ function mapi(f, s) { return s; } let r = Caml_bytes.create(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { r[i] = f(i, s[i]); } return r; diff --git a/lib/js/caml_array.js b/lib/js/caml_array.js index b883e460b7..b2d67ce758 100644 --- a/lib/js/caml_array.js +++ b/lib/js/caml_array.js @@ -81,7 +81,7 @@ function get(xs, index) { function make(len, init) { let b = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { b[i] = init; } return b; @@ -89,7 +89,7 @@ function make(len, init) { function make_float(len) { let b = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { b[i] = 0; } return b; @@ -97,12 +97,12 @@ function make_float(len) { function blit(a1, i1, a2, i2, len) { if (i2 <= i1) { - for(let j = 0; j < len; ++j){ + for (let j = 0; j < len; ++j) { a2[j + i2 | 0] = a1[j + i1 | 0]; } return; } - for(let j$1 = len - 1 | 0; j$1 >= 0; --j$1){ + for (let j$1 = len - 1 | 0; j$1 >= 0; --j$1) { a2[j$1 + i2 | 0] = a1[j$1 + i1 | 0]; } } diff --git a/lib/js/caml_bytes.js b/lib/js/caml_bytes.js index 2cf9ece0c7..f4f17d1252 100644 --- a/lib/js/caml_bytes.js +++ b/lib/js/caml_bytes.js @@ -35,7 +35,7 @@ function create(len) { }); } let result = new Array(len); - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { result[i] = /* '\000' */0; } return result; diff --git a/lib/js/caml_format.js b/lib/js/caml_format.js index b34ad42999..a83b12debb 100644 --- a/lib/js/caml_format.js +++ b/lib/js/caml_format.js @@ -499,7 +499,7 @@ function finish_formatting(config, rawbuffer) { } let buffer = ""; if (justify === "+" && filter === " ") { - for(let _for = len; _for < width; ++_for){ + for (let _for = len; _for < width; ++_for) { buffer = buffer + filter; } } @@ -518,13 +518,13 @@ function finish_formatting(config, rawbuffer) { buffer = buffer + "0x"; } if (justify === "+" && filter === "0") { - for(let _for$1 = len; _for$1 < width; ++_for$1){ + for (let _for$1 = len; _for$1 < width; ++_for$1) { buffer = buffer + filter; } } buffer = uppercase ? buffer + rawbuffer.toUpperCase() : buffer + rawbuffer; if (justify === "-") { - for(let _for$2 = len; _for$2 < width; ++_for$2){ + for (let _for$2 = len; _for$2 < width; ++_for$2) { buffer = buffer + " "; } } diff --git a/lib/js/caml_hash.js b/lib/js/caml_hash.js index 62db1bea24..cf5d7ab1f2 100644 --- a/lib/js/caml_hash.js +++ b/lib/js/caml_hash.js @@ -72,7 +72,7 @@ function hash(count, _limit, seed, obj) { s = Caml_hash_primitive.hash_mix_int(s, tag); let v = size - 1 | 0; let block = v < num ? v : num; - for(let i = 0; i <= block; ++i){ + for (let i = 0; i <= block; ++i) { push_back(queue, obj$1[i]); } } diff --git a/lib/js/caml_hash_primitive.js b/lib/js/caml_hash_primitive.js index a691cc43d3..48c71a6725 100644 --- a/lib/js/caml_hash_primitive.js +++ b/lib/js/caml_hash_primitive.js @@ -27,7 +27,7 @@ function hash_mix_string(h, s) { let len = s.length; let block = (len / 4 | 0) - 1 | 0; let hash = h; - for(let i = 0; i <= block; ++i){ + for (let i = 0; i <= block; ++i) { let j = (i << 2); let w = s.charCodeAt(j) | (s.charCodeAt(j + 1 | 0) << 8) | (s.charCodeAt(j + 2 | 0) << 16) | (s.charCodeAt(j + 3 | 0) << 24); hash = hash_mix_int(hash, w); diff --git a/lib/js/caml_md5.js b/lib/js/caml_md5.js index 5fb6b27d56..686a1ec3b6 100644 --- a/lib/js/caml_md5.js +++ b/lib/js/caml_md5.js @@ -130,30 +130,30 @@ function md5_string(s, start, len) { state[1] = -271733879; state[2] = -1732584194; state[3] = 271733878; - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { md5blk[i] = 0; } let i_end = n / 64 | 0; - for(let i$1 = 1; i$1 <= i_end; ++i$1){ - for(let j = 0; j <= 15; ++j){ + for (let i$1 = 1; i$1 <= i_end; ++i$1) { + for (let j = 0; j <= 15; ++j) { let k = ((i$1 << 6) - 64 | 0) + (j << 2) | 0; md5blk[j] = ((s$1.charCodeAt(k) + (s$1.charCodeAt(k + 1 | 0) << 8) | 0) + (s$1.charCodeAt(k + 2 | 0) << 16) | 0) + (s$1.charCodeAt(k + 3 | 0) << 24) | 0; } cycle(state, md5blk); } let s_tail = s$1.slice((i_end << 6)); - for(let kk = 0; kk <= 15; ++kk){ + for (let kk = 0; kk <= 15; ++kk) { md5blk[kk] = 0; } let i_end$1 = s_tail.length - 1 | 0; - for(let i$2 = 0; i$2 <= i_end$1; ++i$2){ + for (let i$2 = 0; i$2 <= i_end$1; ++i$2) { md5blk[i$2 / 4 | 0] = md5blk[i$2 / 4 | 0] | (s_tail.charCodeAt(i$2) << (i$2 % 4 << 3)); } let i$3 = i_end$1 + 1 | 0; md5blk[i$3 / 4 | 0] = md5blk[i$3 / 4 | 0] | (128 << (i$3 % 4 << 3)); if (i$3 > 55) { cycle(state, md5blk); - for(let i$4 = 0; i$4 <= 15; ++i$4){ + for (let i$4 = 0; i$4 <= 15; ++i$4) { md5blk[i$4] = 0; } } diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index 57cea1208f..3c945ecea2 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -34,7 +34,7 @@ function init_mod(loc, shape) { let v = {}; struct_[idx] = v; let len = comps.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { let match = comps[i]; loop(match[0], v, match[1]); } @@ -67,7 +67,7 @@ function update_mod(shape, o, n) { return; } let comps = shape._0; - for(let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1){ + for (let i$1 = 0, i_finish = comps.length; i$1 < i_finish; ++i$1) { let match = comps[i$1]; let name = match[1]; aux(match[0], o[name], n[name], o, name); @@ -89,7 +89,7 @@ function update_mod(shape, o, n) { } if (shape.TAG === "Module") { let comps = shape._0; - for(let i = 0, i_finish = comps.length; i < i_finish; ++i){ + for (let i = 0, i_finish = comps.length; i < i_finish; ++i) { let match = comps[i]; let name = match[1]; aux(match[0], o[name], n[name], o, name); diff --git a/lib/js/digest.js b/lib/js/digest.js index 51307ddf23..9402af7643 100644 --- a/lib/js/digest.js +++ b/lib/js/digest.js @@ -47,7 +47,7 @@ function to_hex(d) { }); } let result = Caml_bytes.create(32); - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { let x = Caml_string.get(d, i); result[(i << 1)] = char_hex((x >>> 4)); result[(i << 1) + 1 | 0] = char_hex(x & 15); @@ -101,7 +101,7 @@ function from_hex(s) { return (digit(Caml_string.get(s, i)) << 4) + digit(Caml_string.get(s, i + 1 | 0)) | 0; }; let result = Caml_bytes.create(16); - for(let i = 0; i <= 15; ++i){ + for (let i = 0; i <= 15; ++i) { Caml_bytes.set(result, i, Char.chr(byte((i << 1)))); } return Bytes.unsafe_to_string(result); diff --git a/lib/js/filename.js b/lib/js/filename.js index f6e6bd8479..13c43a6b24 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -134,7 +134,7 @@ function quote(x) { let l = x.length; let b = Buffer.create(l + 20 | 0); Buffer.add_char(b, /* '\'' */39); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { if (Caml_string.get(x, i) === /* '\'' */39) { Buffer.add_string(b, quotequote); } else { @@ -257,7 +257,7 @@ function quote$1(s) { }; }; let add_bs = function (n) { - for(let _j = 1; _j <= n; ++_j){ + for (let _j = 1; _j <= n; ++_j) { Buffer.add_char(b, /* '\\' */92); } }; diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index 02bfa200a9..1673b9df8c 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -71,7 +71,7 @@ function create(randomOpt, initial_size) { function clear(h) { h.size = 0; let len = h.data.length; - for(let i = 0; i < len; ++i){ + for (let i = 0; i < len; ++i) { Caml_array.set(h.data, i, "Empty"); } } @@ -189,13 +189,13 @@ function resize(indexfun, h) { continue; }; }; - for(let i = 0; i < osize; ++i){ + for (let i = 0; i < osize; ++i) { insert_bucket(Caml_array.get(odata, i)); } if (!inplace) { return; } - for(let i$1 = 0; i$1 < nsize; ++i$1){ + for (let i$1 = 0; i$1 < nsize; ++i$1) { let tail = Caml_array.get(ndata_tail, i$1); if (typeof tail === "object") { tail.next = "Empty"; @@ -460,7 +460,7 @@ function iter(f, h) { } try { let d = h.data; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { do_bucket(Caml_array.get(d, i)); } if (!old_trav) { @@ -521,7 +521,7 @@ function filter_map_inplace(f, h) { flip_ongoing_traversal(h); } try { - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { filter_map_inplace_bucket(f, h, i, "Empty", Caml_array.get(h.data, i)); } return; @@ -561,7 +561,7 @@ function fold(f, h, init) { try { let d = h.data; let accu = init; - for(let i = 0, i_finish = d.length; i < i_finish; ++i){ + for (let i = 0, i_finish = d.length; i < i_finish; ++i) { accu = do_bucket(Caml_array.get(d, i), accu); } if (!old_trav) { diff --git a/lib/js/js_dict.js b/lib/js/js_dict.js index 4ee3231c38..574683fc13 100644 --- a/lib/js/js_dict.js +++ b/lib/js/js_dict.js @@ -17,7 +17,7 @@ function entries(dict) { let keys = Object.keys(dict); let l = keys.length; let values = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let key = keys[i]; values[i] = [ key, @@ -31,7 +31,7 @@ function values(dict) { let keys = Object.keys(dict); let l = keys.length; let values$1 = new Array(l); - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { values$1[i] = dict[keys[i]]; } return values$1; @@ -55,7 +55,7 @@ function fromList(entries) { function fromArray(entries) { let dict = {}; let l = entries.length; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let match = entries[i]; dict[match[0]] = match[1]; } @@ -66,7 +66,7 @@ function map(f, source) { let target = {}; let keys = Object.keys(source); let l = keys.length; - for(let i = 0; i < l; ++i){ + for (let i = 0; i < l; ++i) { let key = keys[i]; target[key] = f(source[key]); } diff --git a/lib/js/lexing.js b/lib/js/lexing.js index 087e45027c..4dcf861f9b 100644 --- a/lib/js/lexing.js +++ b/lib/js/lexing.js @@ -72,7 +72,7 @@ function from_function(f) { x.lex_last_pos = x.lex_last_pos - s | 0; x.lex_buffer_len = x.lex_buffer_len - s | 0; let t = x.lex_mem; - for(let i = 0, i_finish = t.length; i < i_finish; ++i){ + for (let i = 0, i_finish = t.length; i < i_finish; ++i) { let v = Caml_array.get(t, i); if (v >= 0) { Caml_array.set(t, i, v - s | 0); diff --git a/lib/js/random.js b/lib/js/random.js index 686145fe5f..d8909c2f6a 100644 --- a/lib/js/random.js +++ b/lib/js/random.js @@ -27,13 +27,13 @@ function full_init(s, seed) { }; let seed$1 = seed.length === 0 ? [0] : seed; let l = seed$1.length; - for(let i = 0; i <= 54; ++i){ + for (let i = 0; i <= 54; ++i) { Caml_array.set(s.st, i, i); } let accu = "x"; - for(let i$1 = 0, i_finish = 54 + ( + for (let i$1 = 0, i_finish = 54 + ( 55 > l ? 55 : l - ) | 0; i$1 <= i_finish; ++i$1){ + ) | 0; i$1 <= i_finish; ++i$1) { let j = i$1 % 55; let k = i$1 % l; accu = combine(accu, Caml_array.get(seed$1, k)); diff --git a/lib/js/sort.js b/lib/js/sort.js index 819a09270e..09f4fcf718 100644 --- a/lib/js/sort.js +++ b/lib/js/sort.js @@ -145,7 +145,7 @@ function array(cmp, arr) { }; }; qsort(0, arr.length - 1 | 0); - for(let i = 1, i_finish = arr.length; i < i_finish; ++i){ + for (let i = 1, i_finish = arr.length; i < i_finish; ++i) { let val_i = arr[i]; if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; diff --git a/lib/js/string.js b/lib/js/string.js index c828d5894b..205f91ce08 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -19,13 +19,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(i, s.codePointAt(i)); } } @@ -292,7 +292,7 @@ function equal(a, b) { function split_on_char(sep, s) { let r = /* [] */0; let j = s.length; - for(let i = s.length - 1 | 0; i >= 0; --i){ + for (let i = s.length - 1 | 0; i >= 0; --i) { if (s.codePointAt(i) === sep) { r = { hd: sub(s, i + 1 | 0, (j - i | 0) - 1 | 0), diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index bb9f069960..41296e6022 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -21,13 +21,13 @@ function concat(sep, xs) { } function iter(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(s.codePointAt(i)); } } function iteri(f, s) { - for(let i = 0, i_finish = s.length; i < i_finish; ++i){ + for (let i = 0, i_finish = s.length; i < i_finish; ++i) { f(i, s.codePointAt(i)); } } @@ -294,7 +294,7 @@ function equal(a, b) { function split_on_char(sep, s) { let r = /* [] */0; let j = s.length; - for(let i = s.length - 1 | 0; i >= 0; --i){ + for (let i = s.length - 1 | 0; i >= 0; --i) { if (s.codePointAt(i) === sep) { r = { hd: sub(s, i + 1 | 0, (j - i | 0) - 1 | 0), From 2aab907b7cf982c82b143f609dc69558f83d5ad0 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 14:11:58 +0400 Subject: [PATCH 08/18] Add space around brackets in while loop --- jscomp/core/js_dump.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 8265d73d5a..843133f378 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -1045,6 +1045,7 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = match e.expression_desc with | Number (Int { i = 1l }) -> P.string f L.while_; + P.space f; P.string f L.lparen; P.string f L.true_; P.string f L.rparen; @@ -1052,6 +1053,7 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = cxt | _ -> P.string f L.while_; + P.space f; let cxt = P.paren_group f 1 (fun _ -> expression ~level:0 cxt f e) in From efaf3d03b53ed830c7ec7d3763b21f58b1d0ce36 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sat, 3 Aug 2024 14:12:07 +0400 Subject: [PATCH 09/18] Commit test outputs --- jscomp/test/a_scope_bug.js | 2 +- jscomp/test/and_or_tailcall_test.js | 4 +- jscomp/test/arith_lexer.js | 2 +- jscomp/test/array_subtle_test.js | 2 +- jscomp/test/array_test.js | 2 +- jscomp/test/bal_set_mini.js | 4 +- jscomp/test/bdd.js | 6 +- jscomp/test/bs_stack_test.js | 14 ++-- jscomp/test/complex_while_loop.js | 4 +- jscomp/test/cps_test.js | 2 +- jscomp/test/demo_int_map.js | 2 +- jscomp/test/exception_raise_test.js | 2 +- jscomp/test/ext_array_test.js | 18 ++--- jscomp/test/ext_filename_test.js | 16 ++-- jscomp/test/ext_list_test.js | 52 ++++++------ jscomp/test/ext_pervasives_test.js | 4 +- jscomp/test/ext_string_test.js | 36 ++++----- jscomp/test/fib.js | 2 +- jscomp/test/flattern_order_test.js | 2 +- jscomp/test/flexible_array_test.js | 2 +- jscomp/test/format_regression.js | 2 +- jscomp/test/genlex_test.js | 2 +- jscomp/test/gpr_1698_test.js | 4 +- jscomp/test/gpr_1701_test.js | 4 +- jscomp/test/gpr_1946_test.js | 2 +- jscomp/test/gpr_2642_test.js | 2 +- jscomp/test/gpr_3697_test.js | 4 +- jscomp/test/gpr_405_test.js | 2 +- jscomp/test/gray_code_test.js | 4 +- jscomp/test/inline_edge_cases.js | 8 +- jscomp/test/inline_map2_test.js | 72 ++++++++--------- jscomp/test/inline_map_demo.js | 2 +- jscomp/test/inline_map_test.js | 2 +- jscomp/test/inline_regression_test.js | 4 +- jscomp/test/int64_test.js | 4 +- jscomp/test/int_map.js | 46 +++++------ jscomp/test/loop_regression_test.js | 2 +- jscomp/test/map_find_test.js | 4 +- jscomp/test/map_test.js | 92 ++++++++++----------- jscomp/test/mario_game.js | 18 ++--- jscomp/test/miss_colon_test.js | 4 +- jscomp/test/number_lexer.js | 2 +- jscomp/test/ocaml_re_test.js | 60 +++++++------- jscomp/test/offset.js | 46 +++++------ jscomp/test/queue_402.js | 6 +- jscomp/test/rbset.js | 2 +- jscomp/test/reasonReactRouter.js | 4 +- jscomp/test/rec_module_test.js | 46 +++++------ jscomp/test/set_gen.js | 20 ++--- jscomp/test/sexp.js | 12 +-- jscomp/test/sexpm.js | 12 +-- jscomp/test/small_inline_test.js | 6 +- jscomp/test/stack_test.js | 2 +- jscomp/test/stream_parser_test.js | 4 +- jscomp/test/string_set.js | 6 +- jscomp/test/string_test.js | 2 +- jscomp/test/tailcall_inline_test.js | 2 +- jscomp/test/test_ari.js | 2 +- jscomp/test/test_cps.js | 2 +- jscomp/test/test_fib.js | 4 +- jscomp/test/test_for_map.js | 46 +++++------ jscomp/test/test_list.js | 56 ++++++------- jscomp/test/test_order_tailcall.js | 18 ++--- jscomp/test/test_seq.js | 2 +- jscomp/test/test_set.js | 24 +++--- jscomp/test/test_simple_tailcall.js | 4 +- jscomp/test/test_string_map.js | 2 +- jscomp/test/test_u.js | 2 +- jscomp/test/test_while_closure.js | 2 +- jscomp/test/test_while_side_effect.js | 4 +- jscomp/test/ticker.js | 52 ++++++------ jscomp/test/topsort_test.js | 50 ++++++------ jscomp/test/tramp_fib.js | 2 +- jscomp/test/uncurry_test.js | 2 +- jscomp/test/unsafe_full_apply_primitive.js | 2 +- lib/es6/arg.js | 8 +- lib/es6/array.js | 24 +++--- lib/es6/arrayLabels.js | 24 +++--- lib/es6/belt_Array.js | 16 ++-- lib/es6/belt_HashMap.js | 10 +-- lib/es6/belt_HashMapInt.js | 10 +-- lib/es6/belt_HashMapString.js | 10 +-- lib/es6/belt_HashSet.js | 8 +- lib/es6/belt_HashSetInt.js | 8 +- lib/es6/belt_HashSetString.js | 8 +- lib/es6/belt_List.js | 94 +++++++++++----------- lib/es6/belt_MapDict.js | 2 +- 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_MutableQueue.js | 10 +-- lib/es6/belt_MutableSet.js | 2 +- lib/es6/belt_MutableSetInt.js | 2 +- lib/es6/belt_MutableSetString.js | 2 +- lib/es6/belt_MutableStack.js | 6 +- lib/es6/belt_Range.js | 8 +- lib/es6/belt_SortArray.js | 18 ++--- lib/es6/belt_SortArrayInt.js | 18 ++--- lib/es6/belt_SortArrayString.js | 18 ++--- lib/es6/belt_internalAVLset.js | 36 ++++----- lib/es6/belt_internalAVLtree.js | 42 +++++----- lib/es6/belt_internalBuckets.js | 14 ++-- lib/es6/belt_internalBucketsType.js | 2 +- lib/es6/belt_internalMapInt.js | 14 ++-- lib/es6/belt_internalMapString.js | 14 ++-- lib/es6/belt_internalSetBuckets.js | 10 +-- lib/es6/belt_internalSetInt.js | 12 +-- lib/es6/belt_internalSetString.js | 12 +-- lib/es6/buffer.js | 8 +- lib/es6/bytes.js | 18 ++--- lib/es6/bytesLabels.js | 18 ++--- lib/es6/caml_array.js | 8 +- lib/es6/caml_bytes.js | 4 +- lib/es6/caml_format.js | 20 ++--- lib/es6/caml_hash.js | 2 +- lib/es6/caml_int64.js | 8 +- lib/es6/caml_obj.js | 8 +- lib/es6/curry.js | 2 +- lib/es6/filename.js | 18 ++--- lib/es6/genlex.js | 18 ++--- lib/es6/hashtbl.js | 50 ++++++------ lib/es6/js_dict.js | 2 +- lib/es6/list.js | 70 ++++++++-------- lib/es6/listLabels.js | 70 ++++++++-------- lib/es6/map.js | 46 +++++------ lib/es6/mapLabels.js | 46 +++++------ lib/es6/moreLabels.js | 92 ++++++++++----------- lib/es6/parsing.js | 4 +- lib/es6/pervasives.js | 2 +- lib/es6/queue.js | 6 +- lib/es6/random.js | 6 +- lib/es6/set.js | 46 +++++------ lib/es6/setLabels.js | 46 +++++------ lib/es6/sort.js | 12 +-- lib/es6/stream.js | 8 +- lib/es6/string.js | 10 +-- lib/es6/stringLabels.js | 10 +-- lib/js/arg.js | 8 +- lib/js/array.js | 24 +++--- lib/js/arrayLabels.js | 24 +++--- lib/js/belt_Array.js | 16 ++-- lib/js/belt_HashMap.js | 10 +-- lib/js/belt_HashMapInt.js | 10 +-- lib/js/belt_HashMapString.js | 10 +-- lib/js/belt_HashSet.js | 8 +- lib/js/belt_HashSetInt.js | 8 +- lib/js/belt_HashSetString.js | 8 +- lib/js/belt_List.js | 94 +++++++++++----------- lib/js/belt_MapDict.js | 2 +- 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_MutableQueue.js | 10 +-- lib/js/belt_MutableSet.js | 2 +- lib/js/belt_MutableSetInt.js | 2 +- lib/js/belt_MutableSetString.js | 2 +- lib/js/belt_MutableStack.js | 6 +- lib/js/belt_Range.js | 8 +- lib/js/belt_SortArray.js | 18 ++--- lib/js/belt_SortArrayInt.js | 18 ++--- lib/js/belt_SortArrayString.js | 18 ++--- lib/js/belt_internalAVLset.js | 36 ++++----- lib/js/belt_internalAVLtree.js | 42 +++++----- lib/js/belt_internalBuckets.js | 14 ++-- lib/js/belt_internalBucketsType.js | 2 +- lib/js/belt_internalMapInt.js | 14 ++-- lib/js/belt_internalMapString.js | 14 ++-- lib/js/belt_internalSetBuckets.js | 10 +-- lib/js/belt_internalSetInt.js | 12 +-- lib/js/belt_internalSetString.js | 12 +-- lib/js/buffer.js | 8 +- lib/js/bytes.js | 18 ++--- lib/js/bytesLabels.js | 18 ++--- lib/js/caml_array.js | 8 +- lib/js/caml_bytes.js | 4 +- lib/js/caml_format.js | 20 ++--- lib/js/caml_hash.js | 2 +- lib/js/caml_int64.js | 8 +- lib/js/caml_obj.js | 8 +- lib/js/curry.js | 2 +- lib/js/filename.js | 18 ++--- lib/js/genlex.js | 18 ++--- lib/js/hashtbl.js | 50 ++++++------ lib/js/js_dict.js | 2 +- lib/js/list.js | 70 ++++++++-------- lib/js/listLabels.js | 70 ++++++++-------- lib/js/map.js | 46 +++++------ lib/js/mapLabels.js | 46 +++++------ lib/js/moreLabels.js | 92 ++++++++++----------- lib/js/parsing.js | 4 +- lib/js/pervasives.js | 2 +- lib/js/queue.js | 6 +- lib/js/random.js | 6 +- lib/js/set.js | 46 +++++------ lib/js/setLabels.js | 46 +++++------ lib/js/sort.js | 12 +-- lib/js/stream.js | 8 +- lib/js/string.js | 10 +-- lib/js/stringLabels.js | 10 +-- 203 files changed, 1615 insertions(+), 1615 deletions(-) diff --git a/jscomp/test/a_scope_bug.js b/jscomp/test/a_scope_bug.js index f80dcfef42..0a36a2d18c 100644 --- a/jscomp/test/a_scope_bug.js +++ b/jscomp/test/a_scope_bug.js @@ -3,7 +3,7 @@ function odd(_z) { - while(true) { + while (true) { let z = _z; let even = Math.imul(z, z); let a = (even + 4 | 0) + even | 0; diff --git a/jscomp/test/and_or_tailcall_test.js b/jscomp/test/and_or_tailcall_test.js index dbb2dba54b..fad105c1a9 100644 --- a/jscomp/test/and_or_tailcall_test.js +++ b/jscomp/test/and_or_tailcall_test.js @@ -4,7 +4,7 @@ let Mt = require("./mt.js"); function f(b, x, _n) { - while(true) { + while (true) { let n = _n; if (n > 100000) { return false; @@ -18,7 +18,7 @@ function f(b, x, _n) { } function or_f(b, x, _n) { - while(true) { + while (true) { let n = _n; if (n > 100000) { return false; diff --git a/jscomp/test/arith_lexer.js b/jscomp/test/arith_lexer.js index 7ede8cf05e..e95d4163ab 100644 --- a/jscomp/test/arith_lexer.js +++ b/jscomp/test/arith_lexer.js @@ -119,7 +119,7 @@ let __ocaml_lex_tables = { }; function __ocaml_lex_lexeme_rec(lexbuf, ___ocaml_lex_state) { - while(true) { + while (true) { let __ocaml_lex_state = ___ocaml_lex_state; let __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { diff --git a/jscomp/test/array_subtle_test.js b/jscomp/test/array_subtle_test.js index c978ce2889..20c655d7d5 100644 --- a/jscomp/test/array_subtle_test.js +++ b/jscomp/test/array_subtle_test.js @@ -70,7 +70,7 @@ eq("File \"array_subtle_test.res\", line 22, characters 5-12", [ Caml_array.get(v, 2) ]); -while(v.length > 0) { +while (v.length > 0) { v.pop(); }; diff --git a/jscomp/test/array_test.js b/jscomp/test/array_test.js index 4753259574..0d405cbb5c 100644 --- a/jscomp/test/array_test.js +++ b/jscomp/test/array_test.js @@ -43,7 +43,7 @@ function starts_with(xs, prefix, p) { function is_sorted(x) { let len = x.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= (len - 1 | 0)) { return true; diff --git a/jscomp/test/bal_set_mini.js b/jscomp/test/bal_set_mini.js index efc0a3daa8..3e5ebbf698 100644 --- a/jscomp/test/bal_set_mini.js +++ b/jscomp/test/bal_set_mini.js @@ -98,7 +98,7 @@ function add(x, x_) { } function min_elt(_def, _x) { - while(true) { + while (true) { let x = _x; let def = _def; if (typeof x !== "object") { @@ -151,7 +151,7 @@ function remove(x, tree) { } function mem(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index 830014b283..3d70f70835 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -4,7 +4,7 @@ let Caml_array = require("../../lib/js/caml_array.js"); function $$eval(_bdd, vars) { - while(true) { + while (true) { let bdd = _bdd; if (typeof bdd !== "object") { if (bdd === "One") { @@ -59,7 +59,7 @@ function resize(newSize) { let newSz_1 = newSize - 1 | 0; let newArr = Caml_array.make(newSize, /* [] */0); let copyBucket = function (_bucket) { - while(true) { + while (true) { let bucket = _bucket; if (!bucket) { return; @@ -139,7 +139,7 @@ function mkNode(low, v, high) { let ind = hashVal(idl, idh, v) & sz_1.contents; let bucket = Caml_array.get(htab.contents, ind); let _b = bucket; - while(true) { + while (true) { let b = _b; if (b) { let n = b.hd; diff --git a/jscomp/test/bs_stack_test.js b/jscomp/test/bs_stack_test.js index 4a59183ec0..793432b9f3 100644 --- a/jscomp/test/bs_stack_test.js +++ b/jscomp/test/bs_stack_test.js @@ -29,17 +29,17 @@ function inOrder(v) { first: undefined, last: undefined }; - while(current !== undefined) { + while (current !== undefined) { let v$1 = current; Belt_MutableStack.push(s, v$1); current = v$1.left; }; - while(s.root !== undefined) { + while (s.root !== undefined) { current = Belt_MutableStack.popUndefined(s); let v$2 = current; Belt_MutableQueue.add(q, v$2.value); current = v$2.right; - while(current !== undefined) { + while (current !== undefined) { let v$3 = current; Belt_MutableStack.push(s, v$3); current = v$3.left; @@ -58,7 +58,7 @@ function inOrder3(v) { first: undefined, last: undefined }; - while(current !== undefined) { + while (current !== undefined) { let v$1 = current; Belt_MutableStack.push(s, v$1); current = v$1.left; @@ -66,7 +66,7 @@ function inOrder3(v) { Belt_MutableStack.dynamicPopIter(s, (function (popped) { Belt_MutableQueue.add(q, popped.value); let current = popped.right; - while(current !== undefined) { + while (current !== undefined) { let v = current; Belt_MutableStack.push(s, v); current = v.left; @@ -86,7 +86,7 @@ function inOrder2(v) { first: undefined, last: undefined }; - while(todo) { + while (todo) { if (cursor !== undefined) { let v$1 = cursor; Belt_MutableStack.push(s, v$1); @@ -114,7 +114,7 @@ let test1 = n(Caml_option.some(n(Caml_option.some(n(undefined, undefined, 4)), C function pushAllLeft(st1, s1) { let current = st1; - while(current !== undefined) { + while (current !== undefined) { let v = current; Belt_MutableStack.push(s1, v); current = v.left; diff --git a/jscomp/test/complex_while_loop.js b/jscomp/test/complex_while_loop.js index 5120844c09..89e5f7a681 100644 --- a/jscomp/test/complex_while_loop.js +++ b/jscomp/test/complex_while_loop.js @@ -4,7 +4,7 @@ function f() { let n = 0; - while((function () { + while ((function () { let fib = function (x) { if (x === 0 || x === 1) { return 1; @@ -20,7 +20,7 @@ function f() { } function ff() { - while((function () { + while ((function () { let b = 9; return (3 + b | 0) > 10; })()) { diff --git a/jscomp/test/cps_test.js b/jscomp/test/cps_test.js index 78e5957bf0..31fe97de7a 100644 --- a/jscomp/test/cps_test.js +++ b/jscomp/test/cps_test.js @@ -10,7 +10,7 @@ function test() { contents: 0 }; let f = function (_n, _acc) { - while(true) { + while (true) { let acc = _acc; let n = _n; if (n === 0) { diff --git a/jscomp/test/demo_int_map.js b/jscomp/test/demo_int_map.js index 37009e1015..d568453cd8 100644 --- a/jscomp/test/demo_int_map.js +++ b/jscomp/test/demo_int_map.js @@ -137,7 +137,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/exception_raise_test.js b/jscomp/test/exception_raise_test.js index 7e5c56ec42..6649be392e 100644 --- a/jscomp/test/exception_raise_test.js +++ b/jscomp/test/exception_raise_test.js @@ -210,7 +210,7 @@ function fff0(x, g) { } function input_lines(ic, _acc) { - while(true) { + while (true) { let acc = _acc; let line; try { diff --git a/jscomp/test/ext_array_test.js b/jscomp/test/ext_array_test.js index 9fd4282ea3..804f6bd4cb 100644 --- a/jscomp/test/ext_array_test.js +++ b/jscomp/test/ext_array_test.js @@ -41,7 +41,7 @@ function reverse_of_list(x) { let a = Caml_array.make(len, x.hd); let _i = 0; let _x = x.tl; - while(true) { + while (true) { let x$1 = _x; let i = _i; if (!x$1) { @@ -58,7 +58,7 @@ function filter(f, a) { let arr_len = a.length; let _acc = /* [] */0; let _i = 0; - while(true) { + while (true) { let i = _i; let acc = _acc; if (i === arr_len) { @@ -82,7 +82,7 @@ function filter_map(f, a) { let arr_len = a.length; let _acc = /* [] */0; let _i = 0; - while(true) { + while (true) { let i = _i; let acc = _acc; if (i === arr_len) { @@ -133,7 +133,7 @@ function map2i(f, a, b) { } function tolist_aux(a, f, _i, _res) { - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -168,7 +168,7 @@ function of_list_map(f, a) { let arr = Caml_array.make(len, hd); let _i = 1; let _x = tl; - while(true) { + while (true) { let x = _x; let i = _i; if (!x) { @@ -184,7 +184,7 @@ function of_list_map(f, a) { function rfind_with_index(arr, cmp, v) { let len = arr.length; let _i = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i < 0) { return i; @@ -215,7 +215,7 @@ function rfind_and_split(arr, cmp, v) { function find_with_index(arr, cmp, v) { let len = arr.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= len) { return -1; @@ -246,7 +246,7 @@ function find_and_split(arr, cmp, v) { function exists(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -264,7 +264,7 @@ function is_empty(arr) { } function unsafe_loop(_index, len, p, xs, ys) { - while(true) { + while (true) { let index = _index; if (index >= len) { return true; diff --git a/jscomp/test/ext_filename_test.js b/jscomp/test/ext_filename_test.js index c9e646ae45..dd6afdb17b 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -34,7 +34,7 @@ function path_as_directory(x) { function absolute_path(s) { let s$1 = Filename.is_relative(s) ? Filename.concat(CamlinternalLazy.force(cwd), s) : s; let aux = function (_s) { - while(true) { + while (true) { let s = _s; let base = Filename.basename(s); let dir = Filename.dirname(s); @@ -98,7 +98,7 @@ function relative_path(file_or_dir_1, file_or_dir_2) { let dir1 = Ext_string_test.split(undefined, relevant_dir1, os_path_separator_char); let dir2 = Ext_string_test.split(undefined, relevant_dir2, os_path_separator_char); let go = function (_dir1, _dir2) { - while(true) { + while (true) { let dir2 = _dir2; let dir1 = _dir1; if (dir1 && dir2 && dir1.hd === dir2.hd) { @@ -142,7 +142,7 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { })) + (node_sep + Filename.basename(file2)); } let skip = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= len) { let s = "invalid path: " + file2; @@ -165,7 +165,7 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { } function find_root_filename(_cwd, filename) { - while(true) { + while (true) { let cwd = _cwd; if (Caml_sys.sys_file_exists(Filename.concat(cwd, filename))) { return cwd; @@ -219,7 +219,7 @@ function combine(p1, p2) { function split_aux(p) { let _p = p; let _acc = /* [] */0; - while(true) { + while (true) { let acc = _acc; let p$1 = _p; let dir = Filename.dirname(p$1); @@ -252,7 +252,7 @@ function rel_normalized_absolute_path(from, to_) { } let _xss = match[1]; let _yss = match$1[1]; - while(true) { + while (true) { let yss = _yss; let xss = _xss; if (!xss) { @@ -289,7 +289,7 @@ function normalize_absolute_path(x) { } }; let normalize_list = function (_acc, _paths) { - while(true) { + while (true) { let paths = _paths; let acc = _acc; if (!paths) { @@ -320,7 +320,7 @@ function normalize_absolute_path(x) { if (rev_paths) { let _acc = rev_paths.hd; let _rev_paths = rev_paths.tl; - while(true) { + while (true) { let rev_paths$1 = _rev_paths; let acc = _acc; if (!rev_paths$1) { diff --git a/jscomp/test/ext_list_test.js b/jscomp/test/ext_list_test.js index f502e1c310..85971fa2bc 100644 --- a/jscomp/test/ext_list_test.js +++ b/jscomp/test/ext_list_test.js @@ -7,7 +7,7 @@ let Caml_option = require("../../lib/js/caml_option.js"); let Ext_string_test = require("./ext_string_test.js"); function filter_map(f, _xs) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; @@ -30,7 +30,7 @@ function excludes(p, l) { contents: false }; let aux = function (_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -70,7 +70,7 @@ function exclude_with_fact(p, l) { contents: undefined }; let aux = function (_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -106,7 +106,7 @@ function exclude_with_fact2(p1, p2, l) { contents: undefined }; let aux = function (_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -141,7 +141,7 @@ function exclude_with_fact2(p1, p2, l) { } function same_length(_xs, _ys) { - while(true) { + while (true) { let ys = _ys; let xs = _xs; if (!xs) { @@ -162,7 +162,7 @@ function same_length(_xs, _ys) { function filter_mapi(f, xs) { let aux = function (_i, _xs) { - while(true) { + while (true) { let xs = _xs; let i = _i; if (!xs) { @@ -185,7 +185,7 @@ function filter_mapi(f, xs) { } function filter_map2(f, _xs, _ys) { - while(true) { + while (true) { let ys = _ys; let xs = _xs; if (xs) { @@ -224,7 +224,7 @@ function filter_map2(f, _xs, _ys) { function filter_map2i(f, xs, ys) { let aux = function (_i, _xs, _ys) { - while(true) { + while (true) { let ys = _ys; let xs = _xs; let i = _i; @@ -266,7 +266,7 @@ function filter_map2i(f, xs, ys) { } function rev_map_append(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -285,7 +285,7 @@ function flat_map2(f, lx, ly) { let _acc = /* [] */0; let _lx = lx; let _ly = ly; - while(true) { + while (true) { let ly$1 = _ly; let lx$1 = _lx; let acc = _acc; @@ -316,7 +316,7 @@ function flat_map2(f, lx, ly) { } function flat_map_aux(f, _acc, append, _lx) { - while(true) { + while (true) { let lx = _lx; let acc = _acc; if (!lx) { @@ -482,7 +482,7 @@ function try_take(n, l) { } function length_compare(_l, _n) { - while(true) { + while (true) { let n = _n; let l = _l; if (n < 0) { @@ -502,7 +502,7 @@ function length_compare(_l, _n) { } function length_larger_than_n(n, _xs, _ys) { - while(true) { + while (true) { let ys = _ys; let xs = _xs; if (!ys) { @@ -520,7 +520,7 @@ function length_larger_than_n(n, _xs, _ys) { function exclude_tail(x) { let _acc = /* [] */0; let _x = x; - while(true) { + while (true) { let x$1 = _x; let acc = _acc; if (x$1) { @@ -589,7 +589,7 @@ function stable_group(cmp, lst) { } function drop(_n, _h) { - while(true) { + while (true) { let h = _h; let n = _n; if (n < 0) { @@ -618,7 +618,7 @@ function drop(_n, _h) { } function find_first_not(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -633,7 +633,7 @@ function find_first_not(p, _x) { } function for_all_opt(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -656,7 +656,7 @@ function fold(f, l, init) { function rev_map_acc(acc, f, l) { let _accu = acc; let _x = l; - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -691,7 +691,7 @@ function rev_iter(f, xs) { } function for_all2_no_exn(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -714,7 +714,7 @@ function for_all2_no_exn(p, _l1, _l2) { } function find_no_exn(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -729,7 +729,7 @@ function find_no_exn(p, _x) { } function find_opt(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -747,7 +747,7 @@ function split_map(f, xs) { let _bs = /* [] */0; let _cs = /* [] */0; let _xs = xs; - while(true) { + while (true) { let xs$1 = _xs; let cs = _cs; let bs = _bs; @@ -850,7 +850,7 @@ function ref_pop(refs) { function rev_except_last(xs) { let _acc = /* [] */0; let _xs = xs; - while(true) { + while (true) { let xs$1 = _xs; let acc = _acc; if (xs$1) { @@ -885,7 +885,7 @@ function sort_via_array(cmp, lst) { } function last(_xs) { - while(true) { + while (true) { let xs = _xs; if (xs) { let tl = xs.tl; @@ -905,7 +905,7 @@ function last(_xs) { } function assoc_by_string(def, k, _lst) { - while(true) { + while (true) { let lst = _lst; if (lst) { let match = lst.hd; @@ -932,7 +932,7 @@ function assoc_by_string(def, k, _lst) { } function assoc_by_int(def, k, _lst) { - while(true) { + while (true) { let lst = _lst; if (lst) { let match = lst.hd; diff --git a/jscomp/test/ext_pervasives_test.js b/jscomp/test/ext_pervasives_test.js index 2edf2335ef..b5b80f5580 100644 --- a/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/ext_pervasives_test.js @@ -24,7 +24,7 @@ function is_pos_pow(n) { try { let _c = 0; let _n = n; - while(true) { + while (true) { let n$1 = _n; let c = _c; if (n$1 <= 0) { @@ -60,7 +60,7 @@ function is_pos_pow_2(n) { try { let _c = 0; let _n = n; - while(true) { + while (true) { let n$1 = _n; let c = _c; if (n$1 <= 0) { diff --git a/jscomp/test/ext_string_test.js b/jscomp/test/ext_string_test.js index bc5744ec11..912b1b7849 100644 --- a/jscomp/test/ext_string_test.js +++ b/jscomp/test/ext_string_test.js @@ -16,7 +16,7 @@ function split_by(keep_emptyOpt, is_delim, str) { let _acc = /* [] */0; let _last_pos = len; let _pos = len - 1 | 0; - while(true) { + while (true) { let pos = _pos; let last_pos = _last_pos; let acc = _acc; @@ -54,7 +54,7 @@ function split_by(keep_emptyOpt, is_delim, str) { function trim(s) { let i = 0; let j = s.length; - while((function () { + while ((function () { let tmp = false; if (i < j) { let u = s.codePointAt(i); @@ -65,7 +65,7 @@ function trim(s) { i = i + 1 | 0; }; let k = j - 1 | 0; - while((function () { + while ((function () { let tmp = false; if (k >= i) { let u = s.codePointAt(k); @@ -105,7 +105,7 @@ function starts_with(s, beg) { return false; } let i = 0; - while(i < beg_len && s.codePointAt(i) === beg.codePointAt(i)) { + while (i < beg_len && s.codePointAt(i) === beg.codePointAt(i)) { i = i + 1 | 0; }; return i === beg_len; @@ -119,7 +119,7 @@ function ends_with_index(s, end_) { } let _j = s_finish; let _k = s_beg; - while(true) { + while (true) { let k = _k; let j = _j; if (k < 0) { @@ -154,7 +154,7 @@ function check_any_suffix_case(s, suffixes) { function check_any_suffix_case_then_chop(s, suffixes) { let _suffixes = suffixes; - while(true) { + while (true) { let suffixes$1 = _suffixes; if (!suffixes$1) { return; @@ -170,7 +170,7 @@ function check_any_suffix_case_then_chop(s, suffixes) { function escaped(s) { let needs_escape = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= s.length) { return false; @@ -201,7 +201,7 @@ function escaped(s) { } function unsafe_for_all_range(s, _start, finish, p) { - while(true) { + while (true) { let start = _start; if (start > finish) { return true; @@ -247,7 +247,7 @@ function repeat(n, s) { function unsafe_is_sub(sub, i, s, j, len) { if ((j + len | 0) <= s.length) { let _k = 0; - while(true) { + while (true) { let k = _k; if (k === len) { return true; @@ -271,7 +271,7 @@ function find(startOpt, sub, s) { let s_len = s.length; let i = start; try { - while((i + n | 0) <= s_len) { + while ((i + n | 0) <= s_len) { if (unsafe_is_sub(sub, 0, s, i, n)) { throw new Error(Local_exit, { cause: { @@ -309,7 +309,7 @@ function non_overlap_count(sub, s) { } let _acc = 0; let _off = 0; - while(true) { + while (true) { let off = _off; let acc = _acc; let i = find(off, sub, s); @@ -326,7 +326,7 @@ function rfind(sub, s) { let n = sub.length; let i = s.length - n | 0; try { - while(i >= 0) { + while (i >= 0) { if (unsafe_is_sub(sub, 0, s, i, n)) { throw new Error(Local_exit, { cause: { @@ -365,7 +365,7 @@ function tail_from(s, x) { function digits_of_str(s, offset, x) { let _i = 0; let _acc = 0; - while(true) { + while (true) { let acc = _acc; let i = _i; if (i >= x) { @@ -385,7 +385,7 @@ function starts_with_and_number(s, offset, beg) { return -1; } let i = offset; - while(i < finish_delim && s.codePointAt(i) === beg.codePointAt(i - offset | 0)) { + while (i < finish_delim && s.codePointAt(i) === beg.codePointAt(i - offset | 0)) { i = i + 1 | 0; }; if (i === finish_delim) { @@ -400,7 +400,7 @@ function equal(x, y) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return i; @@ -414,7 +414,7 @@ function rindex_rec(s, _i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; @@ -522,7 +522,7 @@ function is_valid_source_name(name) { } function unsafe_no_char(x, ch, _i, last_idx) { - while(true) { + while (true) { let i = _i; if (i > last_idx) { return true; @@ -536,7 +536,7 @@ function unsafe_no_char(x, ch, _i, last_idx) { } function unsafe_no_char_idx(x, ch, _i, last_idx) { - while(true) { + while (true) { let i = _i; if (i > last_idx) { return -1; diff --git a/jscomp/test/fib.js b/jscomp/test/fib.js index 8219349751..40074bd13e 100644 --- a/jscomp/test/fib.js +++ b/jscomp/test/fib.js @@ -14,7 +14,7 @@ function fib2(n) { let _a = 1; let _b = 1; let _i = 0; - while(true) { + while (true) { let i = _i; let b = _b; let a = _a; diff --git a/jscomp/test/flattern_order_test.js b/jscomp/test/flattern_order_test.js index f2878f47ea..f89f8bd401 100644 --- a/jscomp/test/flattern_order_test.js +++ b/jscomp/test/flattern_order_test.js @@ -3,7 +3,7 @@ function even(_n) { - while(true) { + while (true) { let n = _n; if (n === 0) { return true; diff --git a/jscomp/test/flexible_array_test.js b/jscomp/test/flexible_array_test.js index fe7b0dd111..d2111f2450 100644 --- a/jscomp/test/flexible_array_test.js +++ b/jscomp/test/flexible_array_test.js @@ -6,7 +6,7 @@ let Caml_obj = require("../../lib/js/caml_obj.js"); let Caml_array = require("../../lib/js/caml_array.js"); function sub(_tr, _k) { - while(true) { + while (true) { let k = _k; let tr = _tr; if (typeof tr !== "object") { diff --git a/jscomp/test/format_regression.js b/jscomp/test/format_regression.js index 6af98ac543..096e497d05 100644 --- a/jscomp/test/format_regression.js +++ b/jscomp/test/format_regression.js @@ -55,7 +55,7 @@ function format_pp_token(param, param$1, param$2) { } function advance_loop(state) { - while(true) { + while (true) { let match = peek_queue(state.pp_queue); let size = match.elem_size; let size$1 = int_of_size(size); diff --git a/jscomp/test/genlex_test.js b/jscomp/test/genlex_test.js index 13288327c5..846f6c00a4 100644 --- a/jscomp/test/genlex_test.js +++ b/jscomp/test/genlex_test.js @@ -35,7 +35,7 @@ let lexer = Genlex.make_lexer({ function to_list(s) { let _acc = /* [] */0; - while(true) { + while (true) { let acc = _acc; let v; try { diff --git a/jscomp/test/gpr_1698_test.js b/jscomp/test/gpr_1698_test.js index 65b7394091..74186cc63e 100644 --- a/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/gpr_1698_test.js @@ -3,7 +3,7 @@ function is_number(_expr) { - while(true) { + while (true) { let expr = _expr; switch (expr.TAG) { case "Val" : @@ -26,7 +26,7 @@ function is_number(_expr) { } function compare(context, state, _a, _b) { - while(true) { + while (true) { let b = _b; let a = _a; let exit = 0; diff --git a/jscomp/test/gpr_1701_test.js b/jscomp/test/gpr_1701_test.js index 22cf8d7f3a..e5b7c3048a 100644 --- a/jscomp/test/gpr_1701_test.js +++ b/jscomp/test/gpr_1701_test.js @@ -32,7 +32,7 @@ test(100); function read_lines(inc) { let _acc = /* [] */0; - while(true) { + while (true) { let acc = _acc; let l; try { @@ -60,7 +60,7 @@ function read_lines(inc) { function read_lines2(inc) { let _acc = /* [] */0; - while(true) { + while (true) { let acc = _acc; let l; try { diff --git a/jscomp/test/gpr_1946_test.js b/jscomp/test/gpr_1946_test.js index 69de7169e9..f57d17a937 100644 --- a/jscomp/test/gpr_1946_test.js +++ b/jscomp/test/gpr_1946_test.js @@ -30,7 +30,7 @@ let h = { }; function f(id) { - while(false) { + while (false) { }; return id; diff --git a/jscomp/test/gpr_2642_test.js b/jscomp/test/gpr_2642_test.js index 8ba0039e05..49d50a0e15 100644 --- a/jscomp/test/gpr_2642_test.js +++ b/jscomp/test/gpr_2642_test.js @@ -3,7 +3,7 @@ function isfree(id, _x) { - while(true) { + while (true) { let x = _x; switch (x.TAG) { case "Pident" : diff --git a/jscomp/test/gpr_3697_test.js b/jscomp/test/gpr_3697_test.js index 884b7b1a50..4e52d927dc 100644 --- a/jscomp/test/gpr_3697_test.js +++ b/jscomp/test/gpr_3697_test.js @@ -13,7 +13,7 @@ function fix() { } function unfixLeak(_f) { - while(true) { + while (true) { let f = _f; _f = CamlinternalLazy.force(f._0); continue; @@ -21,7 +21,7 @@ function unfixLeak(_f) { } function unfix(p) { - while(true) { + while (true) { let h = p.contents; p.contents = CamlinternalLazy.force(h._0); }; diff --git a/jscomp/test/gpr_405_test.js b/jscomp/test/gpr_405_test.js index ef4ab4378a..a35295c8e8 100644 --- a/jscomp/test/gpr_405_test.js +++ b/jscomp/test/gpr_405_test.js @@ -68,7 +68,7 @@ function Make(funarg) { let _successors = funarg.succ(gr, top); let _top = top; let _rest_of_stack = rest_of_stack; - while(true) { + while (true) { let rest_of_stack$1 = _rest_of_stack; let top$1 = _top; let successors = _successors; diff --git a/jscomp/test/gray_code_test.js b/jscomp/test/gray_code_test.js index 0a570823d7..1e3a14edcd 100644 --- a/jscomp/test/gray_code_test.js +++ b/jscomp/test/gray_code_test.js @@ -11,7 +11,7 @@ function gray_encode(b) { function gray_decode(n) { let _p = n; let _n = (n >>> 1); - while(true) { + while (true) { let n$1 = _n; let p = _p; if (n$1 === 0) { @@ -27,7 +27,7 @@ function bool_string(len, n) { let s = Bytes.make(len, /* '0' */48); let _i = len - 1 | 0; let _n = n; - while(true) { + while (true) { let n$1 = _n; let i = _i; if ((n$1 & 1) === 1) { diff --git a/jscomp/test/inline_edge_cases.js b/jscomp/test/inline_edge_cases.js index 1f00a2cd36..8631edf009 100644 --- a/jscomp/test/inline_edge_cases.js +++ b/jscomp/test/inline_edge_cases.js @@ -3,7 +3,7 @@ function test3(_n) { - while(true) { + while (true) { let n = _n; if (n === 0) { return (n + 5 | 0) + 4 | 0; @@ -14,7 +14,7 @@ function test3(_n) { } function test2(_n) { - while(true) { + while (true) { let n = _n; if (n === 0) { return test3(n) + 3 | 0; @@ -25,11 +25,11 @@ function test2(_n) { } function test0(_n) { - while(true) { + while (true) { let n = _n; if (n === 0) { let _n$1 = n; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 === 0) { return test2(n$1) + 2 | 0; diff --git a/jscomp/test/inline_map2_test.js b/jscomp/test/inline_map2_test.js index cbf6192f59..8286460ecb 100644 --- a/jscomp/test/inline_map2_test.js +++ b/jscomp/test/inline_map2_test.js @@ -141,7 +141,7 @@ function Make(Ord) { } }; let find = function (x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { @@ -159,7 +159,7 @@ function Make(Ord) { }; }; let mem = function (x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; @@ -173,7 +173,7 @@ function Make(Ord) { }; }; let min_binding = function (_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -194,7 +194,7 @@ function Make(Ord) { }; }; let max_binding = function (_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -255,7 +255,7 @@ function Make(Ord) { } }; let iter = function (f, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return; @@ -300,7 +300,7 @@ function Make(Ord) { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -312,7 +312,7 @@ function Make(Ord) { }; }; let for_all = function (p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return true; @@ -328,7 +328,7 @@ function Make(Ord) { }; }; let exists = function (p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -500,7 +500,7 @@ function Make(Ord) { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -520,7 +520,7 @@ function Make(Ord) { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -549,7 +549,7 @@ function Make(Ord) { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -581,7 +581,7 @@ function Make(Ord) { } }; let bindings_aux = function (_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (typeof x !== "object") { @@ -780,7 +780,7 @@ function add(x, data, x_) { } function find(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { @@ -799,7 +799,7 @@ function find(x, _x_) { } function mem(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; @@ -814,7 +814,7 @@ function mem(x, _x_) { } function min_binding(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -836,7 +836,7 @@ function min_binding(_x) { } function max_binding(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -900,7 +900,7 @@ function remove(x, x_) { } function iter(f, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return; @@ -948,7 +948,7 @@ function mapi(f, x) { } function fold(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -961,7 +961,7 @@ function fold(f, _m, _accu) { } function for_all(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return true; @@ -978,7 +978,7 @@ function for_all(p, _x) { } function exists(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -1160,7 +1160,7 @@ function partition(p, x) { } function cons_enum(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -1181,7 +1181,7 @@ function cons_enum(_m, _e) { function compare(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1211,7 +1211,7 @@ function compare(cmp, m1, m2) { function equal(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1245,7 +1245,7 @@ function cardinal(x) { } function bindings_aux(_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (typeof x !== "object") { @@ -1473,7 +1473,7 @@ function add$1(x, data, x_) { } function find$1(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { @@ -1492,7 +1492,7 @@ function find$1(x, _x_) { } function mem$1(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; @@ -1507,7 +1507,7 @@ function mem$1(x, _x_) { } function min_binding$1(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -1529,7 +1529,7 @@ function min_binding$1(_x) { } function max_binding$1(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -1593,7 +1593,7 @@ function remove$1(x, x_) { } function iter$1(f, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return; @@ -1641,7 +1641,7 @@ function mapi$1(f, x) { } function fold$1(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -1654,7 +1654,7 @@ function fold$1(f, _m, _accu) { } function for_all$1(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return true; @@ -1671,7 +1671,7 @@ function for_all$1(p, _x) { } function exists$1(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -1853,7 +1853,7 @@ function partition$1(p, x) { } function cons_enum$1(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -1874,7 +1874,7 @@ function cons_enum$1(_m, _e) { function compare$1(cmp, m1, m2) { let _e1 = cons_enum$1(m1, "End"); let _e2 = cons_enum$1(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1904,7 +1904,7 @@ function compare$1(cmp, m1, m2) { function equal$1(cmp, m1, m2) { let _e1 = cons_enum$1(m1, "End"); let _e2 = cons_enum$1(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1938,7 +1938,7 @@ function cardinal$1(x) { } function bindings_aux$1(_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (typeof x !== "object") { diff --git a/jscomp/test/inline_map_demo.js b/jscomp/test/inline_map_demo.js index f79ef8e5ea..d844a10d46 100644 --- a/jscomp/test/inline_map_demo.js +++ b/jscomp/test/inline_map_demo.js @@ -170,7 +170,7 @@ let m = List.fold_left((function (acc, param) { }); function find(px, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/inline_map_test.js b/jscomp/test/inline_map_test.js index 8c9c73ae01..ec35b49114 100644 --- a/jscomp/test/inline_map_test.js +++ b/jscomp/test/inline_map_test.js @@ -126,7 +126,7 @@ function add(x, data, x_) { } function find(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/inline_regression_test.js b/jscomp/test/inline_regression_test.js index f67cdb3232..2eefed637f 100644 --- a/jscomp/test/inline_regression_test.js +++ b/jscomp/test/inline_regression_test.js @@ -11,7 +11,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { return current_dir_name; } else { let _n = name.length - 1 | 0; - while(true) { + while (true) { let n = _n; if (n < 0) { return $$String.sub(name, 0, 1); @@ -19,7 +19,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { if (!is_dir_sep(name, n)) { let _n$1 = n; let p = n + 1 | 0; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 < 0) { return $$String.sub(name, 0, p); diff --git a/jscomp/test/int64_test.js b/jscomp/test/int64_test.js index 9106dc41ab..1e80a73778 100644 --- a/jscomp/test/int64_test.js +++ b/jscomp/test/int64_test.js @@ -822,7 +822,7 @@ let shift_right_logical_suites = [ ]; function fib(_n, _a, _b) { - while(true) { + while (true) { let b = _b; let a = _a; let n = _n; @@ -837,7 +837,7 @@ function fib(_n, _a, _b) { } function fac(_n, _acc) { - while(true) { + while (true) { let acc = _acc; let n = _n; if (n === 0) { diff --git a/jscomp/test/int_map.js b/jscomp/test/int_map.js index 4e161c5c06..ea5cd7ac7c 100644 --- a/jscomp/test/int_map.js +++ b/jscomp/test/int_map.js @@ -158,7 +158,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -177,7 +177,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -191,7 +191,7 @@ function find_first(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -218,7 +218,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -228,7 +228,7 @@ function find_first_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -255,7 +255,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -269,7 +269,7 @@ function find_last(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -296,7 +296,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -306,7 +306,7 @@ function find_last_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -333,7 +333,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -348,7 +348,7 @@ function find_opt(x, _param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -363,7 +363,7 @@ function mem(x, _param) { } function min_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -385,7 +385,7 @@ function min_binding(_param) { } function min_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -403,7 +403,7 @@ function min_binding_opt(_param) { } function max_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -425,7 +425,7 @@ function max_binding(_param) { } function max_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -555,7 +555,7 @@ function update(x, f, param) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -603,7 +603,7 @@ function mapi(f, param) { } function fold(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -616,7 +616,7 @@ function fold(f, _m, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -633,7 +633,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -854,7 +854,7 @@ function partition(p, param) { } function cons_enum(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -875,7 +875,7 @@ function cons_enum(_m, _e) { function compare(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -905,7 +905,7 @@ function compare(cmp, m1, m2) { function equal(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -939,7 +939,7 @@ function cardinal(param) { } function bindings_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/jscomp/test/loop_regression_test.js b/jscomp/test/loop_regression_test.js index a797923bc7..a539680a85 100644 --- a/jscomp/test/loop_regression_test.js +++ b/jscomp/test/loop_regression_test.js @@ -11,7 +11,7 @@ function f() { contents: 0 }; let n = 10; - while(true) { + while (true) { if (v.contents > n) { return acc.contents; } diff --git a/jscomp/test/map_find_test.js b/jscomp/test/map_find_test.js index 31ef48ae2c..c6fb6aae20 100644 --- a/jscomp/test/map_find_test.js +++ b/jscomp/test/map_find_test.js @@ -140,7 +140,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -321,7 +321,7 @@ function add$1(x, data, param) { } function find$1(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/map_test.js b/jscomp/test/map_test.js index a3b3e85998..43e3c4670c 100644 --- a/jscomp/test/map_test.js +++ b/jscomp/test/map_test.js @@ -166,7 +166,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -185,7 +185,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -199,7 +199,7 @@ function find_first(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -226,7 +226,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -236,7 +236,7 @@ function find_first_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -263,7 +263,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -277,7 +277,7 @@ function find_last(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -304,7 +304,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -314,7 +314,7 @@ function find_last_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -341,7 +341,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -356,7 +356,7 @@ function find_opt(x, _param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -371,7 +371,7 @@ function mem(x, _param) { } function min_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -393,7 +393,7 @@ function min_binding(_param) { } function min_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -411,7 +411,7 @@ function min_binding_opt(_param) { } function max_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -433,7 +433,7 @@ function max_binding(_param) { } function max_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -563,7 +563,7 @@ function update(x, f, param) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -611,7 +611,7 @@ function mapi(f, param) { } function fold(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -624,7 +624,7 @@ function fold(f, _m, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -641,7 +641,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -862,7 +862,7 @@ function partition(p, param) { } function cons_enum(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -883,7 +883,7 @@ function cons_enum(_m, _e) { function compare$1(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -913,7 +913,7 @@ function compare$1(cmp, m1, m2) { function equal(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -947,7 +947,7 @@ function cardinal(param) { } function bindings_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1160,7 +1160,7 @@ function add$1(x, data, param) { } function find$1(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1179,7 +1179,7 @@ function find$1(x, _param) { } function find_first$1(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1193,7 +1193,7 @@ function find_first$1(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -1220,7 +1220,7 @@ function find_first$1(f, _param) { } function find_first_opt$1(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1230,7 +1230,7 @@ function find_first_opt$1(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -1257,7 +1257,7 @@ function find_first_opt$1(f, _param) { } function find_last$1(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1271,7 +1271,7 @@ function find_last$1(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -1298,7 +1298,7 @@ function find_last$1(f, _param) { } function find_last_opt$1(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1308,7 +1308,7 @@ function find_last_opt$1(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -1335,7 +1335,7 @@ function find_last_opt$1(f, _param) { } function find_opt$1(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1350,7 +1350,7 @@ function find_opt$1(x, _param) { } function mem$1(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1365,7 +1365,7 @@ function mem$1(x, _param) { } function min_binding$1(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1387,7 +1387,7 @@ function min_binding$1(_param) { } function min_binding_opt$1(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1405,7 +1405,7 @@ function min_binding_opt$1(_param) { } function max_binding$1(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1427,7 +1427,7 @@ function max_binding$1(_param) { } function max_binding_opt$1(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1557,7 +1557,7 @@ function update$1(x, f, param) { } function iter$1(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1605,7 +1605,7 @@ function mapi$1(f, param) { } function fold$1(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -1618,7 +1618,7 @@ function fold$1(f, _m, _accu) { } function for_all$1(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1635,7 +1635,7 @@ function for_all$1(p, _param) { } function exists$1(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1856,7 +1856,7 @@ function partition$1(p, param) { } function cons_enum$1(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -1877,7 +1877,7 @@ function cons_enum$1(_m, _e) { function compare$2(cmp, m1, m2) { let _e1 = cons_enum$1(m1, "End"); let _e2 = cons_enum$1(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1907,7 +1907,7 @@ function compare$2(cmp, m1, m2) { function equal$1(cmp, m1, m2) { let _e1 = cons_enum$1(m1, "End"); let _e2 = cons_enum$1(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1941,7 +1941,7 @@ function cardinal$1(param) { } function bindings_aux$1(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/jscomp/test/mario_game.js b/jscomp/test/mario_game.js index 635e2e3132..bc08cb70e6 100644 --- a/jscomp/test/mario_game.js +++ b/jscomp/test/mario_game.js @@ -2129,7 +2129,7 @@ function check_collisions(collid, all_collids, state) { let broad = broad_phase(collid, all_collids, state); let _cs = broad; let _acc = /* [] */0; - while(true) { + while (true) { let acc = _acc; let cs = _cs; if (!cs) { @@ -2459,7 +2459,7 @@ let Director = { }; function mem_loc(checkloc, _loclist) { - while(true) { + while (true) { let loclist = _loclist; if (!loclist) { return false; @@ -2533,7 +2533,7 @@ function choose_sblock_typ(typ) { } function avoid_overlap(_lst, currentLst) { - while(true) { + while (true) { let lst = _lst; if (!lst) { return /* [] */0; @@ -2552,7 +2552,7 @@ function avoid_overlap(_lst, currentLst) { } function trim_edges(_lst, blockw, blockh) { - while(true) { + while (true) { let lst = _lst; if (!lst) { return /* [] */0; @@ -2592,7 +2592,7 @@ function generate_clouds(cbx, cby, typ, num) { } function generate_coins(_block_coord) { - while(true) { + while (true) { let block_coord = _block_coord; let place_coin = Random.int(2); if (!block_coord) { @@ -3049,7 +3049,7 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { } function generate_enemies(blockw, blockh, _cbx, _cby, acc) { - while(true) { + while (true) { let cby = _cby; let cbx = _cbx; if (cbx > blockw - 32) { @@ -3088,7 +3088,7 @@ function generate_enemies(blockw, blockh, _cbx, _cby, acc) { } function generate_block_enemies(_block_coord) { - while(true) { + while (true) { let block_coord = _block_coord; let place_enemy = Random.int(20); let enemy_typ = Random.int(3); @@ -3117,7 +3117,7 @@ function generate_block_enemies(_block_coord) { } function generate_block_locs(blockw, blockh, _cbx, _cby, _acc) { - while(true) { + while (true) { let acc = _acc; let cby = _cby; let cbx = _cbx; @@ -3161,7 +3161,7 @@ function generate_panel(context, blockw, blockh) { } function generate_ground(blockw, blockh, _inc, _acc) { - while(true) { + while (true) { let acc = _acc; let inc = _inc; if (inc > blockw) { diff --git a/jscomp/test/miss_colon_test.js b/jscomp/test/miss_colon_test.js index 8d8658bc50..4291f26c34 100644 --- a/jscomp/test/miss_colon_test.js +++ b/jscomp/test/miss_colon_test.js @@ -3,7 +3,7 @@ function $plus$colon(_f, _g) { - while(true) { + while (true) { let g = _g; let f = _f; if (f.TAG === "Int") { @@ -47,7 +47,7 @@ function $plus$colon(_f, _g) { } function $star$colon(_f, _g) { - while(true) { + while (true) { let g = _g; let f = _f; let exit = 0; diff --git a/jscomp/test/number_lexer.js b/jscomp/test/number_lexer.js index abd9c0a68c..c7fe549086 100644 --- a/jscomp/test/number_lexer.js +++ b/jscomp/test/number_lexer.js @@ -121,7 +121,7 @@ let __ocaml_lex_tables = { }; function __ocaml_lex_token_rec(l, lexbuf, ___ocaml_lex_state) { - while(true) { + while (true) { let __ocaml_lex_state = ___ocaml_lex_state; let __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index cd4df05bc6..cab7e3bbd1 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -44,7 +44,7 @@ function eq(loc, x, y) { } function union(_l, _l$p) { - while(true) { + while (true) { let l$p = _l$p; let l = _l; if (!l$p) { @@ -103,7 +103,7 @@ function union(_l, _l$p) { } function inter(_l, _l$p) { - while(true) { + while (true) { let l$p = _l$p; let l = _l; if (!l$p) { @@ -149,7 +149,7 @@ function inter(_l, _l$p) { } function diff(_l, _l$p) { - while(true) { + while (true) { let l$p = _l$p; let l = _l; if (!l$p) { @@ -246,7 +246,7 @@ function offset(o, l) { } function mem(c, _s) { - while(true) { + while (true) { let s = _s; if (!s) { return false; @@ -623,7 +623,7 @@ let empty = { function hash(m, accu) { let _l = m.marks; let _accu = hash_combine(Hashtbl.hash(m.pmarks), accu); - while(true) { + while (true) { let accu$1 = _accu; let l = _l; if (!l) { @@ -662,7 +662,7 @@ function marks_set_idx$1(marks, idx) { } function first(f, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -814,7 +814,7 @@ function rename(ids, x) { } function equal(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -892,7 +892,7 @@ function equal(_l1, _l2) { } function hash$1(_l, _accu) { - while(true) { + while (true) { let accu = _accu; let l = _l; if (!l) { @@ -1029,7 +1029,7 @@ function mark_used_indices(tbl) { } function find_free(tbl, _idx, len) { - while(true) { + while (true) { let idx = _idx; if (idx === len || !Caml_array.get(tbl, idx)) { return idx; @@ -1065,7 +1065,7 @@ function remove_matches(extra) { } function split_at_match_rec(_l$p, _x) { - while(true) { + while (true) { let x = _x; let l$p = _l$p; if (x) { @@ -1102,7 +1102,7 @@ function split_at_match_rec(_l$p, _x) { } function remove_duplicates(prev, _l, y) { - while(true) { + while (true) { let l = _l; if (!l) { return [ @@ -1483,7 +1483,7 @@ let Re_automata_State = { }; function iter(_n, f, _v) { - while(true) { + while (true) { let v = _v; let n = _n; if (n === 0) { @@ -1571,7 +1571,7 @@ function loop(info, s, pos, st) { let _pos = pos; let _st = st; let _st$p = st$p; - while(true) { + while (true) { let st$p$1 = _st$p; let st$1 = _st; let pos$1 = _pos; @@ -1671,7 +1671,7 @@ function scan_str(info, s, initial_state, groups) { } else { let _pos = pos; let _st = initial_state; - while(true) { + while (true) { let st = _st; let pos$1 = _pos; if (pos$1 >= last) { @@ -1703,7 +1703,7 @@ function scan_str(info, s, initial_state, groups) { return st$1; } else { let pos$2 = last - 1 | 0; - while(true) { + while (true) { let st$p$1 = Caml_array.get(st$1.next, info$1.re.lnl); if (st$p$1.idx >= 0) { if (groups) { @@ -1744,7 +1744,7 @@ function trans_set(cache, cm, s) { ]; try { let _param = cache.contents; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1776,7 +1776,7 @@ function trans_set(cache, cm, s) { } function is_charset(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -1815,7 +1815,7 @@ function split(s, cm) { Caml_bytes.set(cm, i, /* '\001' */1); Caml_bytes.set(cm, j + 1 | 0, /* '\001' */1); }; - while(true) { + while (true) { let t = _t; if (!t) { return; @@ -1865,7 +1865,7 @@ function colorize(c, regexp) { contents: false }; let colorize$1 = function (_regexp) { - while(true) { + while (true) { let regexp = _regexp; if (typeof regexp !== "object") { switch (regexp) { @@ -1950,7 +1950,7 @@ function flatten_cmap(cm) { } function equal$2(_x1, _x2) { - while(true) { + while (true) { let x2 = _x2; let x1 = _x1; if (typeof x1 !== "object") { @@ -2166,7 +2166,7 @@ function equal$2(_x1, _x2) { } function eq_list(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -2200,7 +2200,7 @@ function sequence(x) { } function merge_sequences(_x) { - while(true) { + while (true) { let x = _x; if (!x) { return /* [] */0; @@ -2292,7 +2292,7 @@ function enforce_kind(ids, kind, kind$p, cr) { } function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _x) { - while(true) { + while (true) { let x = _x; let greedy = _greedy; let ign_group = _ign_group; @@ -2602,7 +2602,7 @@ function as_set(x) { } function handle_case(_ign_case, _x) { - while(true) { + while (true) { let x = _x; let ign_case = _ign_case; if (typeof x !== "object") { @@ -2741,7 +2741,7 @@ function handle_case(_ign_case, _x) { } function anchored(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { switch (x) { @@ -3425,7 +3425,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } }; let regexp$p = function (_left) { - while(true) { + while (true) { let left = _left; if (!accept(/* '|' */124)) { return left; @@ -3441,7 +3441,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; }; let branch$p = function (_left) { - while(true) { + while (true) { let left = _left; if (i.contents === l || test(/* '|' */124) || test(/* ')' */41)) { return seq$2(List.rev(left)); @@ -3726,7 +3726,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return; } else { let _i = d - /* '0' */48 | 0; - while(true) { + while (true) { let i$1 = _i; if (i.contents === l) { return i$1; @@ -4091,7 +4091,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } }; let bracket = function (_s) { - while(true) { + while (true) { let s = _s; if (s !== /* [] */0 && accept(/* ']' */93)) { return s; @@ -4175,7 +4175,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return branch$p(/* [] */0); }; let comment = function () { - while(true) { + while (true) { if (accept(/* ')' */41)) { return epsilon; } diff --git a/jscomp/test/offset.js b/jscomp/test/offset.js index efec476040..66015be0c8 100644 --- a/jscomp/test/offset.js +++ b/jscomp/test/offset.js @@ -170,7 +170,7 @@ function join(l, v, r) { } function min_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -189,7 +189,7 @@ function min_elt(_param) { } function min_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -204,7 +204,7 @@ function min_elt_opt(_param) { } function max_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -223,7 +223,7 @@ function max_elt(_param) { } function max_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -308,7 +308,7 @@ function is_empty(param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -419,7 +419,7 @@ function diff(s1, s2) { } function cons_enum(_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -439,7 +439,7 @@ function cons_enum(_s, _e) { function compare(s1, s2) { let _e1 = cons_enum(s1, "End"); let _e2 = cons_enum(s2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -467,7 +467,7 @@ function equal(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -518,7 +518,7 @@ function subset(_s1, _s2) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -531,7 +531,7 @@ function iter(f, _param) { } function fold(f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -544,7 +544,7 @@ function fold(f, _s, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -561,7 +561,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -635,7 +635,7 @@ function cardinal(param) { } function elements_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -655,7 +655,7 @@ function elements(s) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -675,7 +675,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -688,7 +688,7 @@ function find_first(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -710,7 +710,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -719,7 +719,7 @@ function find_first_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -741,7 +741,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -754,7 +754,7 @@ function find_last(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -776,7 +776,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -785,7 +785,7 @@ function find_last_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -807,7 +807,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/jscomp/test/queue_402.js b/jscomp/test/queue_402.js index 9adf63c154..7e3b9bec24 100644 --- a/jscomp/test/queue_402.js +++ b/jscomp/test/queue_402.js @@ -82,7 +82,7 @@ function copy(q) { next: tail$p }); let copy$1 = function (_prev, _cell) { - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (cell === tail) { @@ -119,7 +119,7 @@ function iter(f, q) { } let tail = q.tail; let _cell = tail.next; - while(true) { + while (true) { let cell = _cell; f(cell.content); if (cell === tail) { @@ -137,7 +137,7 @@ function fold(f, accu, q) { let tail = q.tail; let _accu = accu; let _cell = tail.next; - while(true) { + while (true) { let cell = _cell; let accu$1 = _accu; let accu$2 = f(accu$1, cell.content); diff --git a/jscomp/test/rbset.js b/jscomp/test/rbset.js index 0213e644bd..64bb399902 100644 --- a/jscomp/test/rbset.js +++ b/jscomp/test/rbset.js @@ -31,7 +31,7 @@ function is_empty(x) { } function mem(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; diff --git a/jscomp/test/reasonReactRouter.js b/jscomp/test/reasonReactRouter.js index e6d50f29b6..2388be3df0 100644 --- a/jscomp/test/reasonReactRouter.js +++ b/jscomp/test/reasonReactRouter.js @@ -30,7 +30,7 @@ function path() { let a = raw$2.split("/"); let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -104,7 +104,7 @@ function urlNotEqual(a, b) { } else { let _aList = a.path; let _bList = b.path; - while(true) { + while (true) { let bList = _bList; let aList = _aList; if (!aList) { diff --git a/jscomp/test/rec_module_test.js b/jscomp/test/rec_module_test.js index 2e22414f15..6ad6eec524 100644 --- a/jscomp/test/rec_module_test.js +++ b/jscomp/test/rec_module_test.js @@ -349,7 +349,7 @@ function join(l, v, r) { } function min_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -368,7 +368,7 @@ function min_elt(_param) { } function min_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -383,7 +383,7 @@ function min_elt_opt(_param) { } function max_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -402,7 +402,7 @@ function max_elt(_param) { } function max_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -487,7 +487,7 @@ function is_empty(param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -598,7 +598,7 @@ function diff(s1, s2) { } function cons_enum(_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -618,7 +618,7 @@ function cons_enum(_s, _e) { function compare(s1, s2) { let _e1 = cons_enum(s1, "End"); let _e2 = cons_enum(s2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -646,7 +646,7 @@ function equal(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -697,7 +697,7 @@ function subset(_s1, _s2) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -710,7 +710,7 @@ function iter(f, _param) { } function fold(f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -723,7 +723,7 @@ function fold(f, _s, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -740,7 +740,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -814,7 +814,7 @@ function cardinal(param) { } function elements_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -834,7 +834,7 @@ function elements(s) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -854,7 +854,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -867,7 +867,7 @@ function find_first(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -889,7 +889,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -898,7 +898,7 @@ function find_first_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -920,7 +920,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -933,7 +933,7 @@ function find_last(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -955,7 +955,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -964,7 +964,7 @@ function find_last_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -986,7 +986,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/jscomp/test/set_gen.js b/jscomp/test/set_gen.js index 4c211f46ae..0980f7152b 100644 --- a/jscomp/test/set_gen.js +++ b/jscomp/test/set_gen.js @@ -6,7 +6,7 @@ let Pervasives = require("../../lib/js/pervasives.js"); let Caml_exceptions = require("../../lib/js/caml_exceptions.js"); function cons_enum(_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -32,7 +32,7 @@ function height(x) { } function min_elt(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -51,7 +51,7 @@ function min_elt(_x) { } function max_elt(_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -78,7 +78,7 @@ function is_empty(x) { } function cardinal_aux(_acc, _x) { - while(true) { + while (true) { let x = _x; let acc = _acc; if (typeof x !== "object") { @@ -95,7 +95,7 @@ function cardinal(s) { } function elements_aux(_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (typeof x !== "object") { @@ -115,7 +115,7 @@ function elements(s) { } function iter(f, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return; @@ -128,7 +128,7 @@ function iter(f, _x) { } function fold(f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -141,7 +141,7 @@ function fold(f, _s, _accu) { } function for_all(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return true; @@ -158,7 +158,7 @@ function for_all(p, _x) { } function exists(p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -698,7 +698,7 @@ function invariant(cmp, t) { } function compare_aux(cmp, _e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { diff --git a/jscomp/test/sexp.js b/jscomp/test/sexp.js index fbb9417026..8bf7714bb3 100644 --- a/jscomp/test/sexp.js +++ b/jscomp/test/sexp.js @@ -163,7 +163,7 @@ function $great$great$eq(e, f) { function map_opt(f, l) { let _acc = /* [] */0; let _l = l; - while(true) { + while (true) { let l$1 = _l; let acc = _acc; if (!l$1) { @@ -185,7 +185,7 @@ function map_opt(f, l) { function list_any(f, e) { if (e.NAME === "List") { let _l = e.VAL; - while(true) { + while (true) { let l = _l; if (!l) { return; @@ -205,7 +205,7 @@ function list_all(f, e) { if (e.NAME === "List") { let _acc = /* [] */0; let _l = e.VAL; - while(true) { + while (true) { let l = _l; let acc = _acc; if (!l) { @@ -361,7 +361,7 @@ function get_field(name) { return function (e) { if (e.NAME === "List") { let _l = e.VAL; - while(true) { + while (true) { let l = _l; if (!l) { return; @@ -416,7 +416,7 @@ function field(name, f) { } function _get_field_list(name, _l) { - while(true) { + while (true) { let l = _l; if (!l) { return; @@ -462,7 +462,7 @@ function field_list(name, f) { } function _get_variant(s, args, _l) { - while(true) { + while (true) { let l = _l; if (!l) { return; diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 85ee8d9747..4f0e8f24d1 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -202,7 +202,7 @@ function _error_eof(t) { } function expr(k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return expr(k, extra); @@ -281,7 +281,7 @@ function expr_starting_with(c, k, t) { } function expr_list(acc, k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return expr_list(acc, k, extra); @@ -344,7 +344,7 @@ function _return_atom(last, k, t) { } function atom(k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return atom(k, extra); @@ -394,7 +394,7 @@ function atom(k, t) { } function quoted(k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return quoted(k, extra); @@ -501,7 +501,7 @@ function read1int(i, k, t) { } function skip_comment(k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return skip_comment(k, extra); @@ -516,7 +516,7 @@ function skip_comment(k, t) { } function expr_or_end(k, t) { - while(true) { + while (true) { if (t.i === t.len) { return _refill(t, (function (extra) { return expr_or_end(k, extra); diff --git a/jscomp/test/small_inline_test.js b/jscomp/test/small_inline_test.js index 9e13d19432..0654859b97 100644 --- a/jscomp/test/small_inline_test.js +++ b/jscomp/test/small_inline_test.js @@ -27,7 +27,7 @@ function hello5(y, f) { } function f(_x) { - while(true) { + while (true) { let x = _x; _x = x + 1 | 0; continue; @@ -35,7 +35,7 @@ function f(_x) { } function ff(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; _y = x + 1 | 0; @@ -45,7 +45,7 @@ function ff(_x, _y) { } function fff(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; _y = x; diff --git a/jscomp/test/stack_test.js b/jscomp/test/stack_test.js index 462de12883..d6368ae6c8 100644 --- a/jscomp/test/stack_test.js +++ b/jscomp/test/stack_test.js @@ -7,7 +7,7 @@ let Stack = require("../../lib/js/stack.js"); function to_list(v) { let acc = /* [] */0; - while(v.c !== /* [] */0) { + while (v.c !== /* [] */0) { acc = { hd: Stack.pop(v), tl: acc diff --git a/jscomp/test/stream_parser_test.js b/jscomp/test/stream_parser_test.js index 5b700761ed..273c8aa2ab 100644 --- a/jscomp/test/stream_parser_test.js +++ b/jscomp/test/stream_parser_test.js @@ -211,7 +211,7 @@ function l_parse(token) { } }; let parse_f_aux = function (_a) { - while(true) { + while (true) { let a = _a; let t = token$1(); if (t.TAG === "Kwd") { @@ -233,7 +233,7 @@ function l_parse(token) { }; }; let parse_t_aux = function (_a) { - while(true) { + while (true) { let a = _a; let t = token$1(); if (t.TAG === "Kwd") { diff --git a/jscomp/test/string_set.js b/jscomp/test/string_set.js index 7103bdbfba..03f60c3fec 100644 --- a/jscomp/test/string_set.js +++ b/jscomp/test/string_set.js @@ -129,7 +129,7 @@ function diff(s1, s2) { } function mem(x, _tree) { - while(true) { + while (true) { let tree = _tree; if (typeof tree !== "object") { return false; @@ -169,7 +169,7 @@ function equal(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -220,7 +220,7 @@ function subset(_s1, _s2) { } function find(x, _tree) { - while(true) { + while (true) { let tree = _tree; if (typeof tree !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/string_test.js b/jscomp/test/string_test.js index 8e57572e70..61f5e92fe2 100644 --- a/jscomp/test/string_test.js +++ b/jscomp/test/string_test.js @@ -85,7 +85,7 @@ function xsplit(delim, s) { if (len !== 0) { let _l = /* [] */0; let _x = len; - while(true) { + while (true) { let x = _x; let l = _l; if (x === 0) { diff --git a/jscomp/test/tailcall_inline_test.js b/jscomp/test/tailcall_inline_test.js index a226210935..c419a6d6b1 100644 --- a/jscomp/test/tailcall_inline_test.js +++ b/jscomp/test/tailcall_inline_test.js @@ -7,7 +7,7 @@ let Caml_array = require("../../lib/js/caml_array.js"); function f() { let f$1 = function (_acc, _n) { - while(true) { + while (true) { let n = _n; let acc = _acc; if (n <= 0) { diff --git a/jscomp/test/test_ari.js b/jscomp/test/test_ari.js index 32407d6233..8c25d0ec2b 100644 --- a/jscomp/test/test_ari.js +++ b/jscomp/test/test_ari.js @@ -30,7 +30,7 @@ function ff(extra) { let fff = VV.test_primit2(3); function length_aux(_len, _x) { - while(true) { + while (true) { let x = _x; let len = _len; if (!x) { diff --git a/jscomp/test/test_cps.js b/jscomp/test/test_cps.js index 2dcdc18a35..351f2d4edd 100644 --- a/jscomp/test/test_cps.js +++ b/jscomp/test/test_cps.js @@ -4,7 +4,7 @@ let Caml_array = require("../../lib/js/caml_array.js"); function f(_n, _acc) { - while(true) { + while (true) { let acc = _acc; let n = _n; if (n === 0) { diff --git a/jscomp/test/test_fib.js b/jscomp/test/test_fib.js index 8cd78ffca9..935791bd55 100644 --- a/jscomp/test/test_fib.js +++ b/jscomp/test/test_fib.js @@ -65,7 +65,7 @@ function map(f, x) { function f(x) { let v = x; let sum = 0; - while(v > 0) { + while (v > 0) { sum = sum + v | 0; v = v - 1 | 0; }; @@ -76,7 +76,7 @@ function fib3(n) { let _a = 0; let _b = 1; let _n = n; - while(true) { + while (true) { let n$1 = _n; let b = _b; let a = _a; diff --git a/jscomp/test/test_for_map.js b/jscomp/test/test_for_map.js index d1726f5320..c0f6c7aa18 100644 --- a/jscomp/test/test_for_map.js +++ b/jscomp/test/test_for_map.js @@ -158,7 +158,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -177,7 +177,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -191,7 +191,7 @@ function find_first(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -218,7 +218,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -228,7 +228,7 @@ function find_first_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -255,7 +255,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -269,7 +269,7 @@ function find_last(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -296,7 +296,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -306,7 +306,7 @@ function find_last_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -333,7 +333,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -348,7 +348,7 @@ function find_opt(x, _param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -363,7 +363,7 @@ function mem(x, _param) { } function min_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -385,7 +385,7 @@ function min_binding(_param) { } function min_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -403,7 +403,7 @@ function min_binding_opt(_param) { } function max_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -425,7 +425,7 @@ function max_binding(_param) { } function max_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -555,7 +555,7 @@ function update(x, f, param) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -603,7 +603,7 @@ function mapi(f, param) { } function fold(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -616,7 +616,7 @@ function fold(f, _m, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -633,7 +633,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -854,7 +854,7 @@ function partition(p, param) { } function cons_enum(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -875,7 +875,7 @@ function cons_enum(_m, _e) { function compare(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -905,7 +905,7 @@ function compare(cmp, m1, m2) { function equal(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -939,7 +939,7 @@ function cardinal(param) { } function bindings_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/jscomp/test/test_list.js b/jscomp/test/test_list.js index 564d252d74..1be64f069b 100644 --- a/jscomp/test/test_list.js +++ b/jscomp/test/test_list.js @@ -6,7 +6,7 @@ let Caml_obj = require("../../lib/js/caml_obj.js"); let Pervasives = require("../../lib/js/pervasives.js"); function length_aux(_len, _x) { - while(true) { + while (true) { let x = _x; let len = _len; if (!x) { @@ -57,7 +57,7 @@ function nth(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (l$1) { @@ -78,7 +78,7 @@ function nth(l, n) { } function rev_append(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -134,7 +134,7 @@ function mapi$1(f, l) { function rev_map(f, l) { let _accu = /* [] */0; let _x = l; - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -150,7 +150,7 @@ function rev_map(f, l) { } function iter(f, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return; @@ -164,7 +164,7 @@ function iter(f, _x) { function iteri(f, l) { let _i = 0; let _x = l; - while(true) { + while (true) { let x = _x; let i = _i; if (!x) { @@ -178,7 +178,7 @@ function iteri(f, l) { } function fold_left(f, _accu, _l) { - while(true) { + while (true) { let l = _l; let accu = _accu; if (!l) { @@ -229,7 +229,7 @@ function rev_map2(f, l1, l2) { let _accu = /* [] */0; let _l1 = l1; let _l2 = l2; - while(true) { + while (true) { let l2$1 = _l2; let l1$1 = _l1; let accu = _accu; @@ -263,7 +263,7 @@ function rev_map2(f, l1, l2) { } function iter2(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -293,7 +293,7 @@ function iter2(f, _l1, _l2) { } function fold_left2(f, _accu, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; let accu = _accu; @@ -347,7 +347,7 @@ function fold_right2(f, l1, l2, accu) { } function for_all(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return true; @@ -361,7 +361,7 @@ function for_all(p, _x) { } function exists(p, _x) { - while(true) { + while (true) { let x = _x; if (!x) { return false; @@ -375,7 +375,7 @@ function exists(p, _x) { } function for_all2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -407,7 +407,7 @@ function for_all2(p, _l1, _l2) { } function exists2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -439,7 +439,7 @@ function exists2(p, _l1, _l2) { } function mem(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (!x_) { return false; @@ -453,7 +453,7 @@ function mem(x, _x_) { } function memq(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (!x_) { return false; @@ -467,7 +467,7 @@ function memq(x, _x_) { } function assoc(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (x_) { let match = x_.hd; @@ -486,7 +486,7 @@ function assoc(x, _x_) { } function assq(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (x_) { let match = x_.hd; @@ -505,7 +505,7 @@ function assq(x, _x_) { } function mem_assoc(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (!x_) { return false; @@ -519,7 +519,7 @@ function mem_assoc(x, _x_) { } function mem_assq(x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (!x_) { return false; @@ -565,7 +565,7 @@ function remove_assq(x, x_) { } function find(p, _x) { - while(true) { + while (true) { let x = _x; if (x) { let x$1 = x.hd; @@ -587,7 +587,7 @@ function find_all(p) { return function (__x) { let _accu = /* [] */0; let _x = __x; - while(true) { + while (true) { let x = _x; let accu = _accu; if (!x) { @@ -613,7 +613,7 @@ function partition(p, l) { let _yes = /* [] */0; let _no = /* [] */0; let _x = l; - while(true) { + while (true) { let x = _x; let no = _no; let yes = _yes; @@ -715,7 +715,7 @@ function merge(cmp, l1, l2) { } function chop(_k, _l) { - while(true) { + while (true) { let l = _l; let k = _k; if (k === 0) { @@ -858,7 +858,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1004,7 +1004,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1232,7 +1232,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1463,7 +1463,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; diff --git a/jscomp/test/test_order_tailcall.js b/jscomp/test/test_order_tailcall.js index 89884b4dc3..a19ffd551a 100644 --- a/jscomp/test/test_order_tailcall.js +++ b/jscomp/test/test_order_tailcall.js @@ -3,7 +3,7 @@ function f(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; _y = x; @@ -13,7 +13,7 @@ function f(_x, _y) { } function f1(_x, _y, _z) { - while(true) { + while (true) { let z = _z; let y = _y; let x = _x; @@ -26,7 +26,7 @@ function f1(_x, _y, _z) { } function f2(x, _y) { - while(true) { + while (true) { let y = _y; _y = y + 10 | 0; continue; @@ -34,7 +34,7 @@ function f2(x, _y) { } function f3(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; _y = x + 10 | 0; @@ -44,7 +44,7 @@ function f3(_x, _y) { } function f4(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; _y = y + x | 0; @@ -54,7 +54,7 @@ function f4(_x, _y) { } function f5(_x, _y, z) { - while(true) { + while (true) { let y = _y; _y = z + 20 | 0; _x = y + 10 | 0; @@ -63,7 +63,7 @@ function f5(_x, _y, z) { } function f6(b) { - while(true) { + while (true) { if (!b) { return false; } @@ -72,7 +72,7 @@ function f6(b) { } function f7(b) { - while(true) { + while (true) { if (b) { return true; } @@ -81,7 +81,7 @@ function f7(b) { } function f8(_x, _y) { - while(true) { + while (true) { let y = _y; let x = _x; if (x > 10) { diff --git a/jscomp/test/test_seq.js b/jscomp/test/test_seq.js index 6213aced55..523d9be296 100644 --- a/jscomp/test/test_seq.js +++ b/jscomp/test/test_seq.js @@ -13,7 +13,7 @@ let Help = /* @__PURE__ */Caml_exceptions.create("Test_seq.Help"); let Stop = /* @__PURE__ */Caml_exceptions.create("Test_seq.Stop"); function assoc3(x, _l) { - while(true) { + while (true) { let l = _l; if (l) { let match = l.hd; diff --git a/jscomp/test/test_set.js b/jscomp/test/test_set.js index b20f62893c..464f9fcfc6 100644 --- a/jscomp/test/test_set.js +++ b/jscomp/test/test_set.js @@ -150,7 +150,7 @@ function Make(Ord) { } }; let min_elt = function (_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -168,7 +168,7 @@ function Make(Ord) { }; }; let max_elt = function (_x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { @@ -261,7 +261,7 @@ function Make(Ord) { } }; let mem = function (x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return false; @@ -351,7 +351,7 @@ function Make(Ord) { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -368,7 +368,7 @@ function Make(Ord) { }; }; let compare_aux = function (_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -397,7 +397,7 @@ function Make(Ord) { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -447,7 +447,7 @@ function Make(Ord) { }; }; let iter = function (f, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { return; @@ -459,7 +459,7 @@ function Make(Ord) { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -471,7 +471,7 @@ function Make(Ord) { }; }; let for_all = function (p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return true; @@ -487,7 +487,7 @@ function Make(Ord) { }; }; let exists = function (p, _x) { - while(true) { + while (true) { let x = _x; if (typeof x !== "object") { return false; @@ -551,7 +551,7 @@ function Make(Ord) { } }; let elements_aux = function (_accu, _x) { - while(true) { + while (true) { let x = _x; let accu = _accu; if (typeof x !== "object") { @@ -569,7 +569,7 @@ function Make(Ord) { return elements_aux(/* [] */0, s); }; let find = function (x, _x_) { - while(true) { + while (true) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/test_simple_tailcall.js b/jscomp/test/test_simple_tailcall.js index 1fd893e906..016ca54fba 100644 --- a/jscomp/test/test_simple_tailcall.js +++ b/jscomp/test/test_simple_tailcall.js @@ -3,7 +3,7 @@ function tailcall(x) { - while(true) { + while (true) { continue; }; } @@ -17,7 +17,7 @@ function non_length(x) { } function length(_acc, _x) { - while(true) { + while (true) { let x = _x; let acc = _acc; if (!x) { diff --git a/jscomp/test/test_string_map.js b/jscomp/test/test_string_map.js index 7150d2fbf4..010ef18b27 100644 --- a/jscomp/test/test_string_map.js +++ b/jscomp/test/test_string_map.js @@ -138,7 +138,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { diff --git a/jscomp/test/test_u.js b/jscomp/test/test_u.js index 946f386cab..bf3c0112f3 100644 --- a/jscomp/test/test_u.js +++ b/jscomp/test/test_u.js @@ -5,7 +5,7 @@ function f(x) { let v = x; let sum = 0; - while(v > 0) { + while (v > 0) { sum = sum + v | 0; v = v - 1 | 0; }; diff --git a/jscomp/test/test_while_closure.js b/jscomp/test/test_while_closure.js index ebca37f982..0f96e37af2 100644 --- a/jscomp/test/test_while_closure.js +++ b/jscomp/test/test_while_closure.js @@ -14,7 +14,7 @@ let arr = Caml_array.make(10, (function () { function f() { let n = 0; - while(n < 10) { + while (n < 10) { let j = n; Caml_array.set(arr, j, (function () { v.contents = v.contents + j | 0; diff --git a/jscomp/test/test_while_side_effect.js b/jscomp/test/test_while_side_effect.js index c368e122de..10dcf19579 100644 --- a/jscomp/test/test_while_side_effect.js +++ b/jscomp/test/test_while_side_effect.js @@ -6,7 +6,7 @@ let v = { contents: 0 }; -while(console.log(String(v.contents)), v.contents = v.contents + 1 | 0, v.contents < 10) { +while (console.log(String(v.contents)), v.contents = v.contents + 1 | 0, v.contents < 10) { }; @@ -22,7 +22,7 @@ let x = { contents: 3 }; -while((function () { +while ((function () { let y = 3; console.log(String(x.contents)); y = y + 1 | 0; diff --git a/jscomp/test/ticker.js b/jscomp/test/ticker.js index 4d033d62be..0ad4a839d8 100644 --- a/jscomp/test/ticker.js +++ b/jscomp/test/ticker.js @@ -15,7 +15,7 @@ function split(delim, s) { if (len !== 0) { let _l = /* [] */0; let _x = len; - while(true) { + while (true) { let x = _x; let l = _l; if (x === 0) { @@ -249,7 +249,7 @@ function add(x, data, param) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -268,7 +268,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -282,7 +282,7 @@ function find_first(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -309,7 +309,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -319,7 +319,7 @@ function find_first_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -346,7 +346,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -360,7 +360,7 @@ function find_last(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -387,7 +387,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -397,7 +397,7 @@ function find_last_opt(f, _param) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -424,7 +424,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -439,7 +439,7 @@ function find_opt(x, _param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -454,7 +454,7 @@ function mem(x, _param) { } function min_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -476,7 +476,7 @@ function min_binding(_param) { } function min_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -494,7 +494,7 @@ function min_binding_opt(_param) { } function max_binding(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -516,7 +516,7 @@ function max_binding(_param) { } function max_binding_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -646,7 +646,7 @@ function update(x, f, param) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -694,7 +694,7 @@ function mapi(f, param) { } function fold(f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -707,7 +707,7 @@ function fold(f, _m, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -724,7 +724,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -945,7 +945,7 @@ function partition(p, param) { } function cons_enum(_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -966,7 +966,7 @@ function cons_enum(_m, _e) { function compare(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -996,7 +996,7 @@ function compare(cmp, m1, m2) { function equal(cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1030,7 +1030,7 @@ function cardinal(param) { } function bindings_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1130,7 +1130,7 @@ function compute_update_sequences(all_tickers) { }, map); } let loop = function (_up, _map, _ticker) { - while(true) { + while (true) { let ticker = _ticker; let map = _map; let up = _up; @@ -1419,7 +1419,7 @@ function process_input_line(ticker_map, all_tickers, line) { } function loop(_lines, _param) { - while(true) { + while (true) { let param = _param; let lines = _lines; let all_tickers = param[0]; diff --git a/jscomp/test/topsort_test.js b/jscomp/test/topsort_test.js index 6dc24323dc..c7b38c4ffe 100644 --- a/jscomp/test/topsort_test.js +++ b/jscomp/test/topsort_test.js @@ -74,7 +74,7 @@ function nexts(x, g) { } function dfs1(_nodes, graph, _visited) { - while(true) { + while (true) { let visited = _visited; let nodes = _nodes; if (!nodes) { @@ -174,7 +174,7 @@ if (!Caml_obj.equal(dfs1({ function dfs2(nodes, graph, visited) { let aux = function (_nodes, graph, _visited) { - while(true) { + while (true) { let visited = _visited; let nodes = _nodes; if (!nodes) { @@ -621,7 +621,7 @@ function join(l, v, r) { } function min_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -640,7 +640,7 @@ function min_elt(_param) { } function min_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -655,7 +655,7 @@ function min_elt_opt(_param) { } function max_elt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -674,7 +674,7 @@ function max_elt(_param) { } function max_elt_opt(_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -759,7 +759,7 @@ function is_empty(param) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -870,7 +870,7 @@ function diff(s1, s2) { } function cons_enum(_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -890,7 +890,7 @@ function cons_enum(_s, _e) { function compare(s1, s2) { let _e1 = cons_enum(s1, "End"); let _e2 = cons_enum(s2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -918,7 +918,7 @@ function equal(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -969,7 +969,7 @@ function subset(_s1, _s2) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -982,7 +982,7 @@ function iter(f, _param) { } function fold(f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -995,7 +995,7 @@ function fold(f, _s, _accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1012,7 +1012,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1086,7 +1086,7 @@ function cardinal(param) { } function elements_aux(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1106,7 +1106,7 @@ function elements(s) { } function find(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1126,7 +1126,7 @@ function find(x, _param) { } function find_first(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1139,7 +1139,7 @@ function find_first(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -1161,7 +1161,7 @@ function find_first(f, _param) { } function find_first_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1170,7 +1170,7 @@ function find_first_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -1192,7 +1192,7 @@ function find_first_opt(f, _param) { } function find_last(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1205,7 +1205,7 @@ function find_last(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -1227,7 +1227,7 @@ function find_last(f, _param) { } function find_last_opt(f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1236,7 +1236,7 @@ function find_last_opt(f, _param) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -1258,7 +1258,7 @@ function find_last_opt(f, _param) { } function find_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/jscomp/test/tramp_fib.js b/jscomp/test/tramp_fib.js index be13bb677f..1f9cd58ab4 100644 --- a/jscomp/test/tramp_fib.js +++ b/jscomp/test/tramp_fib.js @@ -40,7 +40,7 @@ let u = fib(10, (function (x) { })); function iter(_bounce) { - while(true) { + while (true) { let bounce = _bounce; if (bounce.TAG === "Continue") { return bounce._0; diff --git a/jscomp/test/uncurry_test.js b/jscomp/test/uncurry_test.js index d88d252252..878d77dae1 100644 --- a/jscomp/test/uncurry_test.js +++ b/jscomp/test/uncurry_test.js @@ -27,7 +27,7 @@ console.log([ ]); function xx() { - while(true) { + while (true) { continue; }; } diff --git a/jscomp/test/unsafe_full_apply_primitive.js b/jscomp/test/unsafe_full_apply_primitive.js index c03ed3147e..08bdde1f35 100644 --- a/jscomp/test/unsafe_full_apply_primitive.js +++ b/jscomp/test/unsafe_full_apply_primitive.js @@ -3,7 +3,7 @@ function f(a) { - while(true) { + while (true) { continue; }; } diff --git a/lib/es6/arg.js b/lib/es6/arg.js index 03621c004e..d5ab446481 100644 --- a/lib/es6/arg.js +++ b/lib/es6/arg.js @@ -21,7 +21,7 @@ let Help = /* @__PURE__ */Caml_exceptions.create("Arg.Help"); let Stop = /* @__PURE__ */Caml_exceptions.create("Arg.Stop"); function assoc3(x, _l) { - while(true) { + while (true) { let l = _l; if (l) { let match = l.hd; @@ -242,7 +242,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } }; current.contents = current.contents + 1 | 0; - while(current.contents < argv.contents.length) { + while (current.contents < argv.contents.length) { try { let s = Caml_array.get(argv.contents, current.contents); if (s.length >= 1 && Caml_string.get(s, 0) === /* '-' */45) { @@ -462,7 +462,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist }); case "Rest" : let f$1 = f._0; - while(current.contents < (argv.contents.length - 1 | 0)) { + while (current.contents < (argv.contents.length - 1 | 0)) { f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); consume_arg(); }; @@ -612,7 +612,7 @@ function parse_expand(l, f, msg) { function second_word(s) { let len = s.length; let loop = function (_n) { - while(true) { + while (true) { let n = _n; if (n >= len) { return len; diff --git a/lib/es6/array.js b/lib/es6/array.js index 3bb31443bd..85f8553031 100644 --- a/lib/es6/array.js +++ b/lib/es6/array.js @@ -168,7 +168,7 @@ function mapi(f, a) { function to_list(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -184,7 +184,7 @@ function to_list(a) { } function list_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -203,7 +203,7 @@ function of_list(param) { let a = Caml_array.make(list_length(0, param), param.hd); let _i = 1; let _param = param.tl; - while(true) { + while (true) { let param$1 = _param; let i = _i; if (!param$1) { @@ -235,7 +235,7 @@ function fold_right(f, a, x) { function exists(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -251,7 +251,7 @@ function exists(p, a) { function for_all(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return true; @@ -267,7 +267,7 @@ function for_all(p, a) { function mem(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -283,7 +283,7 @@ function mem(x, a) { function memq(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -327,7 +327,7 @@ function sort(cmp, a) { let trickle = function (l, i, e) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); if (cmp(Caml_array.get(a, j), e) <= 0) { @@ -350,7 +350,7 @@ function sort(cmp, a) { let bubble = function (l, i) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); Caml_array.set(a, i$1, Caml_array.get(a, j)); @@ -368,7 +368,7 @@ function sort(cmp, a) { } }; let trickleup = function (_i, e) { - while(true) { + while (true) { let i = _i; let father = (i - 1 | 0) / 3 | 0; if (i === father) { @@ -420,7 +420,7 @@ function stable_sort(cmp, a) { let _i2 = src2ofs; let _s2 = Caml_array.get(src2, src2ofs); let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -452,7 +452,7 @@ function stable_sort(cmp, a) { for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { + while (j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { Caml_array.set(dst, j + 1 | 0, Caml_array.get(dst, j)); j = j - 1 | 0; }; diff --git a/lib/es6/arrayLabels.js b/lib/es6/arrayLabels.js index c5a54f395b..fdd07f461f 100644 --- a/lib/es6/arrayLabels.js +++ b/lib/es6/arrayLabels.js @@ -168,7 +168,7 @@ function mapi(f, a) { function to_list(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -184,7 +184,7 @@ function to_list(a) { } function list_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -203,7 +203,7 @@ function of_list(param) { let a = Caml_array.make(list_length(0, param), param.hd); let _i = 1; let _param = param.tl; - while(true) { + while (true) { let param$1 = _param; let i = _i; if (!param$1) { @@ -235,7 +235,7 @@ function fold_right(f, a, x) { function exists(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -251,7 +251,7 @@ function exists(p, a) { function for_all(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return true; @@ -267,7 +267,7 @@ function for_all(p, a) { function mem(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -283,7 +283,7 @@ function mem(x, a) { function memq(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -327,7 +327,7 @@ function sort(cmp, a) { let trickle = function (l, i, e) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); if (cmp(Caml_array.get(a, j), e) <= 0) { @@ -350,7 +350,7 @@ function sort(cmp, a) { let bubble = function (l, i) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); Caml_array.set(a, i$1, Caml_array.get(a, j)); @@ -368,7 +368,7 @@ function sort(cmp, a) { } }; let trickleup = function (_i, e) { - while(true) { + while (true) { let i = _i; let father = (i - 1 | 0) / 3 | 0; if (i === father) { @@ -420,7 +420,7 @@ function stable_sort(cmp, a) { let _i2 = src2ofs; let _s2 = Caml_array.get(src2, src2ofs); let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -452,7 +452,7 @@ function stable_sort(cmp, a) { for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { + while (j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { Caml_array.set(dst, j + 1 | 0, Caml_array.get(dst, j)); j = j - 1 | 0; }; diff --git a/lib/es6/belt_Array.js b/lib/es6/belt_Array.js index 260ce68bd9..456978922a 100644 --- a/lib/es6/belt_Array.js +++ b/lib/es6/belt_Array.js @@ -334,7 +334,7 @@ function getByU(a, p) { let l = a.length; let i = 0; let r; - while(r === undefined && i < l) { + while (r === undefined && i < l) { let v = a[i]; if (p(v)) { r = Caml_option.some(v); @@ -354,7 +354,7 @@ function getIndexByU(a, p) { let l = a.length; let i = 0; let r; - while(r === undefined && i < l) { + while (r === undefined && i < l) { let v = a[i]; if (p(v)) { r = i; @@ -524,7 +524,7 @@ function reduceWithIndex(a, x, f) { function everyU(arr, b) { let len = arr.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len) { return true; @@ -546,7 +546,7 @@ function every(arr, f) { function someU(arr, b) { let len = arr.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len) { return false; @@ -566,7 +566,7 @@ function some(arr, f) { } function everyAux2(arr1, arr2, _i, b, len) { - while(true) { + while (true) { let i = _i; if (i === len) { return true; @@ -592,7 +592,7 @@ function every2(a, b, p) { function some2U(a, b, p) { let _i = 0; let len = Caml.int_min(a.length, b.length); - while(true) { + while (true) { let i = _i; if (i === len) { return false; @@ -636,7 +636,7 @@ function cmpU(a, b, p) { return -1; } else { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === lena) { return 0; @@ -710,7 +710,7 @@ function joinWithU(a, sep, toString) { let lastIndex = l - 1 | 0; let _i = 0; let _res = ""; - while(true) { + while (true) { let res = _res; let i = _i; if (i === lastIndex) { diff --git a/lib/es6/belt_HashMap.js b/lib/es6/belt_HashMap.js index b0359e9e22..3305354289 100644 --- a/lib/es6/belt_HashMap.js +++ b/lib/es6/belt_HashMap.js @@ -9,7 +9,7 @@ function size(h) { } function copyBucketReHash(hash, h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -28,7 +28,7 @@ function copyBucketReHash(hash, h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(eq, key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { cell.value = info; @@ -110,7 +110,7 @@ function remove(h, key) { } else { let _prec = bucket; let _bucket = bucket.next; - while(true) { + while (true) { let bucket$1 = _bucket; let prec = _prec; if (bucket$1 === undefined) { @@ -153,7 +153,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -176,7 +176,7 @@ function has(h, key) { if (bucket !== undefined) { let _cell = bucket; let eq = h.eq; - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return true; diff --git a/lib/es6/belt_HashMapInt.js b/lib/es6/belt_HashMapInt.js index 882ad6781f..ade45ca13f 100644 --- a/lib/es6/belt_HashMapInt.js +++ b/lib/es6/belt_HashMapInt.js @@ -6,7 +6,7 @@ import * as Belt_internalBuckets from "./belt_internalBuckets.js"; import * as Belt_internalBucketsType from "./belt_internalBucketsType.js"; function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -25,7 +25,7 @@ function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { cell.value = info; @@ -100,7 +100,7 @@ function remove(h, key) { } else { let _prec = bucket; let _buckets = bucket.next; - while(true) { + while (true) { let buckets = _buckets; let prec = _prec; if (buckets === undefined) { @@ -144,7 +144,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -166,7 +166,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/es6/belt_HashMapString.js b/lib/es6/belt_HashMapString.js index 8c1eb1f8e3..2e873f5140 100644 --- a/lib/es6/belt_HashMapString.js +++ b/lib/es6/belt_HashMapString.js @@ -6,7 +6,7 @@ import * as Belt_internalBuckets from "./belt_internalBuckets.js"; import * as Belt_internalBucketsType from "./belt_internalBucketsType.js"; function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -25,7 +25,7 @@ function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { cell.value = info; @@ -100,7 +100,7 @@ function remove(h, key) { } else { let _prec = bucket; let _buckets = bucket.next; - while(true) { + while (true) { let buckets = _buckets; let prec = _prec; if (buckets === undefined) { @@ -144,7 +144,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -166,7 +166,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/es6/belt_HashSet.js b/lib/es6/belt_HashSet.js index c8d8661f90..491819bec1 100644 --- a/lib/es6/belt_HashSet.js +++ b/lib/es6/belt_HashSet.js @@ -4,7 +4,7 @@ import * as Belt_internalSetBuckets from "./belt_internalSetBuckets.js"; import * as Belt_internalBucketsType from "./belt_internalBucketsType.js"; function copyBucket(hash, h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell, eq) { - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return; @@ -129,7 +129,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return true; diff --git a/lib/es6/belt_HashSetInt.js b/lib/es6/belt_HashSetInt.js index d6b9e87cd7..d98a54f6ec 100644 --- a/lib/es6/belt_HashSetInt.js +++ b/lib/es6/belt_HashSetInt.js @@ -5,7 +5,7 @@ import * as Belt_internalSetBuckets from "./belt_internalSetBuckets.js"; import * as Belt_internalBucketsType from "./belt_internalBucketsType.js"; function copyBucket(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return; @@ -124,7 +124,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/es6/belt_HashSetString.js b/lib/es6/belt_HashSetString.js index 9c16024b37..3660ae441c 100644 --- a/lib/es6/belt_HashSetString.js +++ b/lib/es6/belt_HashSetString.js @@ -5,7 +5,7 @@ import * as Belt_internalSetBuckets from "./belt_internalSetBuckets.js"; import * as Belt_internalBucketsType from "./belt_internalBucketsType.js"; function copyBucket(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return; @@ -124,7 +124,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/es6/belt_List.js b/lib/es6/belt_List.js index b0f0569918..c1cf1af1e9 100644 --- a/lib/es6/belt_List.js +++ b/lib/es6/belt_List.js @@ -53,7 +53,7 @@ function get(x, n) { } else { let _x = x; let _n = n; - while(true) { + while (true) { let n$1 = _n; let x$1 = _x; if (!x$1) { @@ -79,7 +79,7 @@ function getExn(x, n) { } let _x = x; let _n = n; - while(true) { + while (true) { let n$1 = _n; let x$1 = _x; if (x$1) { @@ -99,7 +99,7 @@ function getExn(x, n) { } function partitionAux(p, _cell, _precX, _precY) { - while(true) { + while (true) { let precY = _precY; let precX = _precX; let cell = _cell; @@ -126,7 +126,7 @@ function partitionAux(p, _cell, _precX, _precY) { } function splitAux(_cell, _precX, _precY) { - while(true) { + while (true) { let precY = _precY; let precX = _precX; let cell = _cell; @@ -152,7 +152,7 @@ function splitAux(_cell, _precX, _precY) { } function copyAuxCont(_cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -170,7 +170,7 @@ function copyAuxCont(_cellX, _prec) { } function copyAuxWitFilter(f, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -194,7 +194,7 @@ function copyAuxWitFilter(f, _cellX, _prec) { } function copyAuxWithFilterIndex(f, _cellX, _prec, _i) { - while(true) { + while (true) { let i = _i; let prec = _prec; let cellX = _cellX; @@ -221,7 +221,7 @@ function copyAuxWithFilterIndex(f, _cellX, _prec, _i) { } function copyAuxWitFilterMap(f, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -245,7 +245,7 @@ function copyAuxWitFilterMap(f, _cellX, _prec) { } function removeAssocAuxWithMap(_cellX, x, _prec, f) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -269,7 +269,7 @@ function removeAssocAuxWithMap(_cellX, x, _prec, f) { } function setAssocAuxWithMap(_cellX, x, k, _prec, eq) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -299,7 +299,7 @@ function setAssocAuxWithMap(_cellX, x, k, _prec, eq) { } function copyAuxWithMap(_cellX, _prec, f) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -317,7 +317,7 @@ function copyAuxWithMap(_cellX, _prec, f) { } function zipAux(_cellX, _cellY, _prec) { - while(true) { + while (true) { let prec = _prec; let cellY = _cellY; let cellX = _cellX; @@ -343,7 +343,7 @@ function zipAux(_cellX, _cellY, _prec) { } function copyAuxWithMap2(f, _cellX, _cellY, _prec) { - while(true) { + while (true) { let prec = _prec; let cellY = _cellY; let cellX = _cellX; @@ -366,7 +366,7 @@ function copyAuxWithMap2(f, _cellX, _cellY, _prec) { } function copyAuxWithMapI(f, _i, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; let i = _i; @@ -386,7 +386,7 @@ function copyAuxWithMapI(f, _i, _cellX, _prec) { } function takeAux(_n, _cell, _prec) { - while(true) { + while (true) { let prec = _prec; let cell = _cell; let n = _n; @@ -409,7 +409,7 @@ function takeAux(_n, _cell, _prec) { } function splitAtAux(_n, _cell, _prec) { - while(true) { + while (true) { let prec = _prec; let cell = _cell; let n = _n; @@ -458,7 +458,7 @@ function drop(lst, n) { } else { let _l = lst; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l = _l; if (n$1 === 0) { @@ -580,7 +580,7 @@ function makeByU(n, f) { }; let cur = headX; let i = 1; - while(i < n) { + while (i < n) { let v = { hd: f(i), tl: /* [] */0 @@ -608,7 +608,7 @@ function make(n, v) { }; let cur = headX; let i = 1; - while(i < n) { + while (i < n) { let v$1 = { hd: v, tl: /* [] */0 @@ -623,7 +623,7 @@ function make(n, v) { function length(xs) { let _x = xs; let _acc = 0; - while(true) { + while (true) { let acc = _acc; let x = _x; if (!x) { @@ -636,7 +636,7 @@ function length(xs) { } function fillAux(arr, _i, _x) { - while(true) { + while (true) { let x = _x; let i = _i; if (!x) { @@ -652,7 +652,7 @@ function fillAux(arr, _i, _x) { function fromArray(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -681,7 +681,7 @@ function shuffle(xs) { } function reverseConcat(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -701,7 +701,7 @@ function reverse(l) { } function flattenAux(_prec, _xs) { - while(true) { + while (true) { let xs = _xs; let prec = _prec; if (xs) { @@ -715,7 +715,7 @@ function flattenAux(_prec, _xs) { } function flatten(_xs) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; @@ -753,7 +753,7 @@ function concatMany(xs) { function mapReverseU(l, f) { let _accu = /* [] */0; let _xs = l; - while(true) { + while (true) { let xs = _xs; let accu = _accu; if (!xs) { @@ -775,7 +775,7 @@ function mapReverse(l, f) { } function forEachU(_xs, f) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -795,7 +795,7 @@ function forEach(xs, f) { function forEachWithIndexU(l, f) { let _xs = l; let _i = 0; - while(true) { + while (true) { let i = _i; let xs = _xs; if (!xs) { @@ -815,7 +815,7 @@ function forEachWithIndex(l, f) { } function reduceU(_l, _accu, f) { - while(true) { + while (true) { let accu = _accu; let l = _l; if (!l) { @@ -860,7 +860,7 @@ function reduceWithIndexU(l, acc, f) { let _l = l; let _acc = acc; let _i = 0; - while(true) { + while (true) { let i = _i; let acc$1 = _acc; let l$1 = _l; @@ -884,7 +884,7 @@ function mapReverse2U(l1, l2, f) { let _l1 = l1; let _l2 = l2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1$1 = _l1; @@ -911,7 +911,7 @@ function mapReverse2(l1, l2, f) { } function forEach2U(_l1, _l2, f) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -934,7 +934,7 @@ function forEach2(l1, l2, f) { } function reduce2U(_l1, _l2, _accu, f) { - while(true) { + while (true) { let accu = _accu; let l2 = _l2; let l1 = _l1; @@ -981,7 +981,7 @@ function reduceReverse2(l1, l2, acc, f) { } function everyU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return true; @@ -1001,7 +1001,7 @@ function every(xs, p) { } function someU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1021,7 +1021,7 @@ function some(xs, p) { } function every2U(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1046,7 +1046,7 @@ function every2(l1, l2, p) { } function cmpByLength(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1066,7 +1066,7 @@ function cmpByLength(_l1, _l2) { } function cmpU(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1096,7 +1096,7 @@ function cmp(l1, l2, f) { } function eqU(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1125,7 +1125,7 @@ function eq(l1, l2, f) { } function some2U(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1150,7 +1150,7 @@ function some2(l1, l2, p) { } function hasU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1170,7 +1170,7 @@ function has(xs, x, eq) { } function getAssocU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -1191,7 +1191,7 @@ function getAssoc(xs, x, eq) { } function hasAssocU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1295,7 +1295,7 @@ function sort(xs, cmp) { } function getByU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -1316,7 +1316,7 @@ function getBy(xs, p) { } function keepU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; @@ -1345,7 +1345,7 @@ function keep(xs, p) { function keepWithIndexU(xs, p) { let _xs = xs; let _i = 0; - while(true) { + while (true) { let i = _i; let xs$1 = _xs; if (!xs$1) { @@ -1374,7 +1374,7 @@ function keepWithIndex(xs, p) { } function keepMapU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; diff --git a/lib/es6/belt_MapDict.js b/lib/es6/belt_MapDict.js index 78a58d2eaf..6237bee192 100644 --- a/lib/es6/belt_MapDict.js +++ b/lib/es6/belt_MapDict.js @@ -255,7 +255,7 @@ function removeMany(t, keys, cmp) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/es6/belt_MapInt.js b/lib/es6/belt_MapInt.js index 561faf103c..76f984b312 100644 --- a/lib/es6/belt_MapInt.js +++ b/lib/es6/belt_MapInt.js @@ -127,7 +127,7 @@ function removeMany(t, keys) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/es6/belt_MapString.js b/lib/es6/belt_MapString.js index b1464f7071..a1d539ed41 100644 --- a/lib/es6/belt_MapString.js +++ b/lib/es6/belt_MapString.js @@ -127,7 +127,7 @@ function removeMany(t, keys) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableMap.js b/lib/es6/belt_MutableMap.js index b6032bec32..16204d2d17 100644 --- a/lib/es6/belt_MutableMap.js +++ b/lib/es6/belt_MutableMap.js @@ -54,7 +54,7 @@ function remove(d, k) { } function removeArrayMutateAux(_t, xs, _i, len, cmp) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableMapInt.js b/lib/es6/belt_MutableMapInt.js index f1549c8441..242e5ec17d 100644 --- a/lib/es6/belt_MutableMapInt.js +++ b/lib/es6/belt_MutableMapInt.js @@ -257,7 +257,7 @@ function update(t, x, f) { } function removeArrayMutateAux(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableMapString.js b/lib/es6/belt_MutableMapString.js index 60243c3480..ecaf7f6548 100644 --- a/lib/es6/belt_MutableMapString.js +++ b/lib/es6/belt_MutableMapString.js @@ -257,7 +257,7 @@ function update(t, x, f) { } function removeArrayMutateAux(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableQueue.js b/lib/es6/belt_MutableQueue.js index 3707e80482..9fd5eda359 100644 --- a/lib/es6/belt_MutableQueue.js +++ b/lib/es6/belt_MutableQueue.js @@ -121,7 +121,7 @@ function copy(q) { }; let _prev; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (cell !== undefined) { @@ -152,7 +152,7 @@ function mapU(q, f) { }; let _prev; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (cell !== undefined) { @@ -191,7 +191,7 @@ function size(q) { function forEachU(q, f) { let _cell = q.first; - while(true) { + while (true) { let cell = _cell; if (cell === undefined) { return; @@ -211,7 +211,7 @@ function forEach(q, f) { function reduceU(q, accu, f) { let _accu = accu; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let accu$1 = _accu; if (cell === undefined) { @@ -249,7 +249,7 @@ function transfer(q1, q2) { } function fillAux(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; if (cell === undefined) { diff --git a/lib/es6/belt_MutableSet.js b/lib/es6/belt_MutableSet.js index 52a66f1952..1e62749b0c 100644 --- a/lib/es6/belt_MutableSet.js +++ b/lib/es6/belt_MutableSet.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len, cmp) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableSetInt.js b/lib/es6/belt_MutableSetInt.js index e7fb39eb48..3aba178ebd 100644 --- a/lib/es6/belt_MutableSetInt.js +++ b/lib/es6/belt_MutableSetInt.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableSetString.js b/lib/es6/belt_MutableSetString.js index 1f4c383837..fe8f1abae6 100644 --- a/lib/es6/belt_MutableSetString.js +++ b/lib/es6/belt_MutableSetString.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/es6/belt_MutableStack.js b/lib/es6/belt_MutableStack.js index 1197f56c81..6bac9b981f 100644 --- a/lib/es6/belt_MutableStack.js +++ b/lib/es6/belt_MutableStack.js @@ -68,7 +68,7 @@ function size(s) { if (x !== undefined) { let _x = x; let _acc = 0; - while(true) { + while (true) { let acc = _acc; let x$1 = _x; let x$2 = x$1.tail; @@ -86,7 +86,7 @@ function size(s) { function forEachU(s, f) { let _s = s.root; - while(true) { + while (true) { let s$1 = _s; if (s$1 === undefined) { return; @@ -104,7 +104,7 @@ function forEach(s, f) { } function dynamicPopIterU(s, f) { - while(true) { + while (true) { let match = s.root; if (match === undefined) { return; diff --git a/lib/es6/belt_Range.js b/lib/es6/belt_Range.js index bc5012ac24..da7395500d 100644 --- a/lib/es6/belt_Range.js +++ b/lib/es6/belt_Range.js @@ -14,7 +14,7 @@ function forEach(s, f, action) { } function everyU(_s, f, p) { - while(true) { + while (true) { let s = _s; if (s > f) { return true; @@ -36,7 +36,7 @@ function every(s, f, p) { function everyByU(s, f, step, p) { if (step > 0) { let _s = s; - while(true) { + while (true) { let s$1 = _s; if (s$1 > f) { return true; @@ -59,7 +59,7 @@ function everyBy(s, f, step, p) { } function someU(_s, f, p) { - while(true) { + while (true) { let s = _s; if (s > f) { return false; @@ -81,7 +81,7 @@ function some(s, f, p) { function someByU(s, f, step, p) { if (step > 0) { let _s = s; - while(true) { + while (true) { let s$1 = _s; if (s$1 > f) { return false; diff --git a/lib/es6/belt_SortArray.js b/lib/es6/belt_SortArray.js index 2f5a360b9f..36dee355cd 100644 --- a/lib/es6/belt_SortArray.js +++ b/lib/es6/belt_SortArray.js @@ -3,7 +3,7 @@ import * as Belt_Array from "./belt_Array.js"; function sortedLengthAuxMore(xs, _prec, _acc, len, lt) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLengthU(xs, lt) { if (lt(x0, x1)) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -63,7 +63,7 @@ function isSortedU(a, cmp) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -91,7 +91,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -128,7 +128,7 @@ function unionU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -197,7 +197,7 @@ function intersectU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -252,7 +252,7 @@ function diffU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -309,7 +309,7 @@ function insertionSort(src, srcofs, dst, dstofs, len, cmp) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(dst[j], e) > 0) { + while (j >= dstofs && cmp(dst[j], e) > 0) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -376,7 +376,7 @@ function binarySearchByU(sorted, key, cmp) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/es6/belt_SortArrayInt.js b/lib/es6/belt_SortArrayInt.js index f3bad08b29..efedb6aad0 100644 --- a/lib/es6/belt_SortArrayInt.js +++ b/lib/es6/belt_SortArrayInt.js @@ -3,7 +3,7 @@ import * as Belt_Array from "./belt_Array.js"; function sortedLengthAuxMore(xs, _prec, _acc, len) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLength(xs) { if (x0 < x1) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -57,7 +57,7 @@ function isSorted(a) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -79,7 +79,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -116,7 +116,7 @@ function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -178,7 +178,7 @@ function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -226,7 +226,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -276,7 +276,7 @@ function insertionSort(src, srcofs, dst, dstofs, len) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && dst[j] > e) { + while (j >= dstofs && dst[j] > e) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -329,7 +329,7 @@ function binarySearch(sorted, key) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/es6/belt_SortArrayString.js b/lib/es6/belt_SortArrayString.js index f3bad08b29..efedb6aad0 100644 --- a/lib/es6/belt_SortArrayString.js +++ b/lib/es6/belt_SortArrayString.js @@ -3,7 +3,7 @@ import * as Belt_Array from "./belt_Array.js"; function sortedLengthAuxMore(xs, _prec, _acc, len) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLength(xs) { if (x0 < x1) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -57,7 +57,7 @@ function isSorted(a) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -79,7 +79,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -116,7 +116,7 @@ function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -178,7 +178,7 @@ function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -226,7 +226,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -276,7 +276,7 @@ function insertionSort(src, srcofs, dst, dstofs, len) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && dst[j] > e) { + while (j >= dstofs && dst[j] > e) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -329,7 +329,7 @@ function binarySearch(sorted, key) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index 88ec13801d..8e5a31a21f 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -82,7 +82,7 @@ function bal(l, v, r) { } function min0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -108,7 +108,7 @@ function minUndefined(n) { } function max0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -148,7 +148,7 @@ function isEmpty(n) { } function stackAllLeft(_v, _s) { - while(true) { + while (true) { let s = _s; let v = _v; if (v === undefined) { @@ -164,7 +164,7 @@ function stackAllLeft(_v, _s) { } function forEachU(_n, f) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -183,7 +183,7 @@ function forEach(n, f) { } function reduceU(_s, _accu, f) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (s === undefined) { @@ -202,7 +202,7 @@ function reduce(s, accu, f) { } function everyU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return true; @@ -225,7 +225,7 @@ function every(n, p) { } function someU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -346,7 +346,7 @@ function size(n) { } function toListAux(_n, _accu) { - while(true) { + while (true) { let accu = _accu; let n = _n; if (n === undefined) { @@ -366,7 +366,7 @@ function toList(s) { } function checkInvariantInternal(_v) { - while(true) { + while (true) { let v = _v; if (v === undefined) { return; @@ -397,7 +397,7 @@ function checkInvariantInternal(_v) { } function fillArray(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.v; @@ -416,7 +416,7 @@ function fillArray(_n, _i, arr) { } function fillArrayWithPartition(_n, cursor, arr, p) { - while(true) { + while (true) { let n = _n; let v = n.v; let l = n.l; @@ -442,7 +442,7 @@ function fillArrayWithPartition(_n, cursor, arr, p) { } function fillArrayWithFilter(_n, _i, arr, p) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.v; @@ -613,7 +613,7 @@ function partitionCopy(n, p) { } function has(_t, x, cmp) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -634,7 +634,7 @@ function cmp(s1, s2, cmp$1) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -665,7 +665,7 @@ function eq(s1, s2, c) { } function subset(_s1, _s2, cmp) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -705,7 +705,7 @@ function subset(_s1, _s2, cmp) { } function get(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -721,7 +721,7 @@ function get(_n, x, cmp) { } function getUndefined(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -737,7 +737,7 @@ function getUndefined(_n, x, cmp) { } function getExn(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/es6/belt_internalAVLtree.js b/lib/es6/belt_internalAVLtree.js index 4e3967a4cb..6aae3b7729 100644 --- a/lib/es6/belt_internalAVLtree.js +++ b/lib/es6/belt_internalAVLtree.js @@ -104,7 +104,7 @@ function bal(l, x, d, r) { } function minKey0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -130,7 +130,7 @@ function minKeyUndefined(n) { } function maxKey0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -156,7 +156,7 @@ function maxKeyUndefined(n) { } function minKV0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -185,7 +185,7 @@ function minUndefined(n) { } function maxKV0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -229,7 +229,7 @@ function isEmpty(x) { } function stackAllLeft(_v, _s) { - while(true) { + while (true) { let s = _s; let v = _v; if (v === undefined) { @@ -275,7 +275,7 @@ function findFirstBy(n, p) { } function forEachU(_n, f) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -339,7 +339,7 @@ function mapWithKey(n, f) { } function reduceU(_m, _accu, f) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (m === undefined) { @@ -362,7 +362,7 @@ function reduce(m, accu, f) { } function everyU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return true; @@ -385,7 +385,7 @@ function every(n, p) { } function someU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -570,7 +570,7 @@ function size(n) { } function toListAux(_n, _accu) { - while(true) { + while (true) { let accu = _accu; let n = _n; if (n === undefined) { @@ -597,7 +597,7 @@ function toList(s) { } function checkInvariantInternal(_v) { - while(true) { + while (true) { let v = _v; if (v === undefined) { return; @@ -624,7 +624,7 @@ function checkInvariantInternal(_v) { } function fillArrayKey(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.k; @@ -643,7 +643,7 @@ function fillArrayKey(_n, _i, arr) { } function fillArrayValue(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let l = n.l; @@ -661,7 +661,7 @@ function fillArrayValue(_n, _i, arr) { } function fillArray(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let l = n.l; @@ -806,7 +806,7 @@ function cmpU(s1, s2, kcmp, vcmp) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -848,7 +848,7 @@ function eqU(s1, s2, kcmp, veq) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -878,7 +878,7 @@ function eq(s1, s2, kcmp, veq) { } function get(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -894,7 +894,7 @@ function get(_n, x, cmp) { } function getUndefined(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -910,7 +910,7 @@ function getUndefined(_n, x, cmp) { } function getExn(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -930,7 +930,7 @@ function getExn(_n, x, cmp) { } function getWithDefault(_n, x, def, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -946,7 +946,7 @@ function getWithDefault(_n, x, def, cmp) { } function has(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; diff --git a/lib/es6/belt_internalBuckets.js b/lib/es6/belt_internalBuckets.js index 24333af0d3..94e0ac4419 100644 --- a/lib/es6/belt_internalBuckets.js +++ b/lib/es6/belt_internalBuckets.js @@ -4,7 +4,7 @@ import * as Belt_Array from "./belt_Array.js"; import * as Caml_option from "./caml_option.js"; function copyAuxCont(_c, _prec) { - while(true) { + while (true) { let prec = _prec; let c = _c; if (c === undefined) { @@ -54,7 +54,7 @@ function copy(x) { } function bucketLength(_accu, _buckets) { - while(true) { + while (true) { let buckets = _buckets; let accu = _accu; if (buckets === undefined) { @@ -67,7 +67,7 @@ function bucketLength(_accu, _buckets) { } function do_bucket_iter(f, _buckets) { - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -92,7 +92,7 @@ function forEach(h, f) { } function do_bucket_fold(f, _b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (b === undefined) { @@ -152,7 +152,7 @@ function logStats(h) { } function filterMapInplaceBucket(f, h, i, _prec, _cell) { - while(true) { + while (true) { let cell = _cell; let prec = _prec; let n = cell.next; @@ -204,7 +204,7 @@ function keepMapInPlace(h, f) { } function fillArray(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = [ @@ -222,7 +222,7 @@ function fillArray(_i, arr, _cell) { } function fillArrayMap(_i, arr, _cell, f) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = f(cell); diff --git a/lib/es6/belt_internalBucketsType.js b/lib/es6/belt_internalBucketsType.js index 4655d3b176..d2101f53bf 100644 --- a/lib/es6/belt_internalBucketsType.js +++ b/lib/es6/belt_internalBucketsType.js @@ -2,7 +2,7 @@ function power_2_above(_x, n) { - while(true) { + while (true) { let x = _x; if (x >= n) { return x; diff --git a/lib/es6/belt_internalMapInt.js b/lib/es6/belt_internalMapInt.js index f3258af582..9eafd19789 100644 --- a/lib/es6/belt_internalMapInt.js +++ b/lib/es6/belt_internalMapInt.js @@ -22,7 +22,7 @@ function add(t, x, data) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -37,7 +37,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -52,7 +52,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -71,7 +71,7 @@ function getExn(_n, x) { } function getWithDefault(_n, x, def) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -86,7 +86,7 @@ function getWithDefault(_n, x, def) { } function has(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -215,7 +215,7 @@ function merge(s1, s2, f) { } function compareAux(_e1, _e2, vcmp) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -259,7 +259,7 @@ function cmp(s1, s2, f) { } function eqAux(_e1, _e2, eq) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { diff --git a/lib/es6/belt_internalMapString.js b/lib/es6/belt_internalMapString.js index f390e19aa6..0a859913f3 100644 --- a/lib/es6/belt_internalMapString.js +++ b/lib/es6/belt_internalMapString.js @@ -22,7 +22,7 @@ function add(t, x, data) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -37,7 +37,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -52,7 +52,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -71,7 +71,7 @@ function getExn(_n, x) { } function getWithDefault(_n, x, def) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -86,7 +86,7 @@ function getWithDefault(_n, x, def) { } function has(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -215,7 +215,7 @@ function merge(s1, s2, f) { } function compareAux(_e1, _e2, vcmp) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -259,7 +259,7 @@ function cmp(s1, s2, f) { } function eqAux(_e1, _e2, eq) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { diff --git a/lib/es6/belt_internalSetBuckets.js b/lib/es6/belt_internalSetBuckets.js index 69cb401409..167dc5d38f 100644 --- a/lib/es6/belt_internalSetBuckets.js +++ b/lib/es6/belt_internalSetBuckets.js @@ -3,7 +3,7 @@ import * as Belt_Array from "./belt_Array.js"; function copyAuxCont(_c, _prec) { - while(true) { + while (true) { let prec = _prec; let c = _c; if (c === undefined) { @@ -51,7 +51,7 @@ function copy(x) { } function bucketLength(_accu, _buckets) { - while(true) { + while (true) { let buckets = _buckets; let accu = _accu; if (buckets === undefined) { @@ -64,7 +64,7 @@ function bucketLength(_accu, _buckets) { } function doBucketIter(f, _buckets) { - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -89,7 +89,7 @@ function forEach(h, f) { } function fillArray(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = cell.key; @@ -118,7 +118,7 @@ function toArray(h) { } function doBucketFold(f, _b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (b === undefined) { diff --git a/lib/es6/belt_internalSetInt.js b/lib/es6/belt_internalSetInt.js index 8e6da68c13..fe1298b0cc 100644 --- a/lib/es6/belt_internalSetInt.js +++ b/lib/es6/belt_internalSetInt.js @@ -4,7 +4,7 @@ import * as Belt_SortArrayInt from "./belt_SortArrayInt.js"; import * as Belt_internalAVLset from "./belt_internalAVLset.js"; function has(_t, x) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -19,7 +19,7 @@ function has(_t, x) { } function compareAux(_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -62,7 +62,7 @@ function eq(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -101,7 +101,7 @@ function subset(_s1, _s2) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -116,7 +116,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -131,7 +131,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/es6/belt_internalSetString.js b/lib/es6/belt_internalSetString.js index 9e3c87a349..d1982740ae 100644 --- a/lib/es6/belt_internalSetString.js +++ b/lib/es6/belt_internalSetString.js @@ -4,7 +4,7 @@ import * as Belt_internalAVLset from "./belt_internalAVLset.js"; import * as Belt_SortArrayString from "./belt_SortArrayString.js"; function has(_t, x) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -19,7 +19,7 @@ function has(_t, x) { } function compareAux(_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -62,7 +62,7 @@ function eq(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -101,7 +101,7 @@ function subset(_s1, _s2) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -116,7 +116,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -131,7 +131,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/es6/buffer.js b/lib/es6/buffer.js index a396c734a2..6d94bab7c4 100644 --- a/lib/es6/buffer.js +++ b/lib/es6/buffer.js @@ -77,7 +77,7 @@ function reset(b) { function resize(b, more) { let len = b.length; let new_len = len; - while((b.position + more | 0) > new_len) { + while ((b.position + more | 0) > new_len) { new_len = (new_len << 1); }; let new_buffer = Caml_bytes.create(new_len); @@ -321,7 +321,7 @@ function advance_to_closing(opening, closing, k, s, start) { let _k = k; let _i = start; let lim = s.length; - while(true) { + while (true) { let i = _i; let k$1 = _k; if (i >= lim) { @@ -352,7 +352,7 @@ function advance_to_closing(opening, closing, k, s, start) { function advance_to_non_alpha(s, start) { let _i = start; let lim = s.length; - while(true) { + while (true) { let i = _i; if (i >= lim) { return lim; @@ -409,7 +409,7 @@ function add_substitute(b, f, s) { let lim = s.length; let _previous = /* ' ' */32; let _i = 0; - while(true) { + while (true) { let i = _i; let previous = _previous; if (i >= lim) { diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index 5bb313f976..348c9bac67 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -86,7 +86,7 @@ function to_string(a) { return String.fromCharCode.apply(null, a); } let offset = 0; - while(s_len > 0) { + while (s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); for (let k = 0; k < next; ++k) { @@ -254,7 +254,7 @@ function ensure_ge(x, y) { } function sum_lengths(_acc, seplen, _param) { - while(true) { + while (true) { let param = _param; let acc = _acc; if (!param) { @@ -279,7 +279,7 @@ function concat(sep, param) { let dst = Caml_bytes.create(sum_lengths(0, seplen, param)); let _pos = 0; let _param = param; - while(true) { + while (true) { let param$1 = _param; let pos = _pos; if (!param$1) { @@ -319,11 +319,11 @@ function is_space(param) { function trim(s) { let len = s.length; let i = 0; - while(i < len && is_space(s[i])) { + while (i < len && is_space(s[i])) { i = i + 1 | 0; }; let j = len - 1 | 0; - while(j >= i && is_space(s[j])) { + while (j >= i && is_space(s[j])) { j = j - 1 | 0; }; if (j >= i) { @@ -488,7 +488,7 @@ function uncapitalize_ascii(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -510,7 +510,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -554,7 +554,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -588,7 +588,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index 5bb313f976..348c9bac67 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -86,7 +86,7 @@ function to_string(a) { return String.fromCharCode.apply(null, a); } let offset = 0; - while(s_len > 0) { + while (s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); for (let k = 0; k < next; ++k) { @@ -254,7 +254,7 @@ function ensure_ge(x, y) { } function sum_lengths(_acc, seplen, _param) { - while(true) { + while (true) { let param = _param; let acc = _acc; if (!param) { @@ -279,7 +279,7 @@ function concat(sep, param) { let dst = Caml_bytes.create(sum_lengths(0, seplen, param)); let _pos = 0; let _param = param; - while(true) { + while (true) { let param$1 = _param; let pos = _pos; if (!param$1) { @@ -319,11 +319,11 @@ function is_space(param) { function trim(s) { let len = s.length; let i = 0; - while(i < len && is_space(s[i])) { + while (i < len && is_space(s[i])) { i = i + 1 | 0; }; let j = len - 1 | 0; - while(j >= i && is_space(s[j])) { + while (j >= i && is_space(s[j])) { j = j - 1 | 0; }; if (j >= i) { @@ -488,7 +488,7 @@ function uncapitalize_ascii(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -510,7 +510,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -554,7 +554,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -588,7 +588,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/es6/caml_array.js b/lib/es6/caml_array.js index 794696443c..38a64d8b5d 100644 --- a/lib/es6/caml_array.js +++ b/lib/es6/caml_array.js @@ -5,7 +5,7 @@ function sub(x, offset, len) { let result = new Array(len); let j = 0; let i = offset; - while(j < len) { + while (j < len) { result[j] = x[i]; j = j + 1 | 0; i = i + 1 | 0; @@ -14,7 +14,7 @@ function sub(x, offset, len) { } function len(_acc, _l) { - while(true) { + while (true) { let l = _l; let acc = _acc; if (!l) { @@ -27,7 +27,7 @@ function len(_acc, _l) { } function fill(arr, _i, _l) { - while(true) { + while (true) { let l = _l; let i = _i; if (!l) { @@ -37,7 +37,7 @@ function fill(arr, _i, _l) { let l$1 = x.length; let k = i; let j = 0; - while(j < l$1) { + while (j < l$1) { arr[k] = x[j]; k = k + 1 | 0; j = j + 1 | 0; diff --git a/lib/es6/caml_bytes.js b/lib/es6/caml_bytes.js index a85e4485cb..9d09897839 100644 --- a/lib/es6/caml_bytes.js +++ b/lib/es6/caml_bytes.js @@ -42,7 +42,7 @@ function create(len) { } function bytes_compare_aux(s1, s2, _off, len, def) { - while(true) { + while (true) { let off = _off; if (off >= len) { return def; @@ -77,7 +77,7 @@ function bytes_equal(s1, s2) { let len2 = s2.length; if (len1 === len2) { let _off = 0; - while(true) { + while (true) { let off = _off; if (off === len1) { return true; diff --git a/lib/es6/caml_format.js b/lib/es6/caml_format.js index 1ff7194642..663162682c 100644 --- a/lib/es6/caml_format.js +++ b/lib/es6/caml_format.js @@ -142,7 +142,7 @@ function int_of_string(s) { }); } let aux = function (_acc, _k) { - while(true) { + while (true) { let k = _k; let acc = _acc; if (k === len) { @@ -232,7 +232,7 @@ function int64_of_string(s) { }); } let aux = function (_acc, _k) { - while(true) { + while (true) { let k = _k; let acc = _acc; if (k === len) { @@ -318,7 +318,7 @@ function parse_format(fmt) { conv: "f" }; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= len) { return f; @@ -412,7 +412,7 @@ function parse_format(fmt) { case 46 : f.prec = 0; let j = i + 1 | 0; - while((function () { + while ((function () { let w = fmt.codePointAt(j) - 48 | 0; return w >= 0 && w <= 9; })()) { @@ -451,7 +451,7 @@ function parse_format(fmt) { case 3 : f.width = 0; let j$1 = i; - while((function () { + while ((function () { let w = fmt.codePointAt(j$1) - 48 | 0; return w >= 0 && w <= 9; })()) { @@ -588,7 +588,7 @@ function oct_of_int64(x) { ], match[0]); let modulus = match[1]; s = cvtbl[Caml_int64.to_int32(modulus)] + s; - while(Caml.i64_neq(quotient, Caml_int64.zero)) { + while (Caml.i64_neq(quotient, Caml_int64.zero)) { let match$1 = Caml_int64.div_mod(quotient, wbase); quotient = match$1[0]; modulus = match$1[1]; @@ -599,7 +599,7 @@ function oct_of_int64(x) { let quotient$1 = match$2[0]; let modulus$1 = match$2[1]; s = cvtbl[Caml_int64.to_int32(modulus$1)] + s; - while(Caml.i64_neq(quotient$1, Caml_int64.zero)) { + while (Caml.i64_neq(quotient$1, Caml_int64.zero)) { let match$3 = Caml_int64.div_mod(quotient$1, wbase); quotient$1 = match$3[0]; modulus$1 = match$3[1]; @@ -668,7 +668,7 @@ function format_float(fmt, x) { let exp = Number(s.slice(j + 1 | 0)) | 0; if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { let i$1 = j - 1 | 0; - while(s.codePointAt(i$1) === /* '0' */48) { + while (s.codePointAt(i$1) === /* '0' */48) { i$1 = i$1 - 1 | 0; }; if (s.codePointAt(i$1) === /* '.' */46) { @@ -686,7 +686,7 @@ function format_float(fmt, x) { p = p - (exp + 1 | 0) | 0; s = x$1.toFixed(p); } else { - while((function () { + while ((function () { s = x$1.toFixed(p); return s.length > (prec$1 + 1 | 0); })()) { @@ -695,7 +695,7 @@ function format_float(fmt, x) { } if (p !== 0) { let k = s.length - 1 | 0; - while(s.codePointAt(k) === /* '0' */48) { + while (s.codePointAt(k) === /* '0' */48) { k = k - 1 | 0; }; if (s.codePointAt(k) === /* '.' */46) { diff --git a/lib/es6/caml_hash.js b/lib/es6/caml_hash.js index 7d248134a0..054d821630 100644 --- a/lib/es6/caml_hash.js +++ b/lib/es6/caml_hash.js @@ -52,7 +52,7 @@ function hash(count, _limit, seed, obj) { let num = count; push_back(queue, obj); num = num - 1 | 0; - while(queue.length !== 0 && num > 0) { + while (queue.length !== 0 && num > 0) { let obj$1 = unsafe_pop(queue); if (typeof obj$1 === "number") { let u$1 = obj$1 | 0; diff --git a/lib/es6/caml_int64.js b/lib/es6/caml_int64.js index be9d57507b..9f8026650d 100644 --- a/lib/es6/caml_int64.js +++ b/lib/es6/caml_int64.js @@ -191,7 +191,7 @@ function is_zero(x) { } function mul(_this, _other) { - while(true) { + while (true) { let other = _other; let $$this = _this; let lo; @@ -374,7 +374,7 @@ function to_string(self) { } function div(_self, _other) { - while(true) { + while (true) { let other = _other; let self = _self; let self_hi = self[0]; @@ -455,14 +455,14 @@ function div(_self, _other) { } let res = zero; let rem$1 = self; - while(Caml.i64_ge(rem$1, other)) { + while (Caml.i64_ge(rem$1, other)) { let b = Math.floor(to_float(rem$1) / to_float(other)); let approx$1 = 1 > b ? 1 : b; let log2 = Math.ceil(Math.log(approx$1) / Math.LN2); let delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48); let approxRes = of_float(approx$1); let approxRem = mul(approxRes, other); - while(approxRem[0] < 0 || Caml.i64_gt(approxRem, rem$1)) { + while (approxRem[0] < 0 || Caml.i64_gt(approxRem, rem$1)) { approx$1 = approx$1 - delta; approxRes = of_float(approx$1); approxRem = mul(approxRes, other); diff --git a/lib/es6/caml_obj.js b/lib/es6/caml_obj.js index ac65acfb10..164efea506 100644 --- a/lib/es6/caml_obj.js +++ b/lib/es6/caml_obj.js @@ -157,7 +157,7 @@ function compare(a, b) { if (len_a === len_b) { if (Array.isArray(a)) { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len_a) { return 0; @@ -176,7 +176,7 @@ function compare(a, b) { } } else if (len_a < len_b) { let _i$1 = 0; - while(true) { + while (true) { let i$1 = _i$1; if (i$1 === len_a) { return -1; @@ -190,7 +190,7 @@ function compare(a, b) { }; } else { let _i$2 = 0; - while(true) { + while (true) { let i$2 = _i$2; if (i$2 === len_b) { return 1; @@ -299,7 +299,7 @@ function equal(a, b) { if (len_a === len_b) { if (Array.isArray(a)) { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len_a) { return true; diff --git a/lib/es6/curry.js b/lib/es6/curry.js index 6ce524794b..5b3f1b3810 100644 --- a/lib/es6/curry.js +++ b/lib/es6/curry.js @@ -3,7 +3,7 @@ import * as Caml_array from "./caml_array.js"; function app(_f, _args) { - while(true) { + while (true) { let args = _args; let f = _f; let init_arity = f.length; diff --git a/lib/es6/filename.js b/lib/es6/filename.js index 75bb3806ae..c9f9e90a35 100644 --- a/lib/es6/filename.js +++ b/lib/es6/filename.js @@ -13,7 +13,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { return current_dir_name; } else { let _n = name.length - 1 | 0; - while(true) { + while (true) { let n = _n; if (n < 0) { return $$String.sub(name, 0, 1); @@ -21,7 +21,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { if (!is_dir_sep(name, n)) { let _n$1 = n; let p = n + 1 | 0; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 < 0) { return $$String.sub(name, 0, p); @@ -44,21 +44,21 @@ function generic_dirname(is_dir_sep, current_dir_name, name) { return current_dir_name; } else { let _n = name.length - 1 | 0; - while(true) { + while (true) { let n = _n; if (n < 0) { return $$String.sub(name, 0, 1); } if (!is_dir_sep(name, n)) { let _n$1 = n; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 < 0) { return current_dir_name; } if (is_dir_sep(name, n$1)) { let _n$2 = n$1; - while(true) { + while (true) { let n$2 = _n$2; if (n$2 < 0) { return $$String.sub(name, 0, 1); @@ -216,7 +216,7 @@ function quote$1(s) { let b = Buffer.create(l + 20 | 0); Buffer.add_char(b, /* '"' */34); let loop = function (_i) { - while(true) { + while (true) { let i = _i; if (i === l) { return Buffer.add_char(b, /* '"' */34); @@ -234,7 +234,7 @@ function quote$1(s) { }; }; let loop_bs = function (_n, _i) { - while(true) { + while (true) { let i = _i; let n = _n; if (i === l) { @@ -394,14 +394,14 @@ function chop_suffix(name, suff) { function extension_len(name) { let _i = name.length - 1 | 0; - while(true) { + while (true) { let i = _i; if (i < 0 || is_dir_sep$2(name, i)) { return 0; } if (Caml_string.get(name, i) === /* '.' */46) { let _i$1 = i - 1 | 0; - while(true) { + while (true) { let i$1 = _i$1; if (i$1 < 0 || is_dir_sep$2(name, i$1)) { return 0; diff --git a/lib/es6/genlex.js b/lib/es6/genlex.js index c449e63ae3..2f1d12f4de 100644 --- a/lib/es6/genlex.js +++ b/lib/es6/genlex.js @@ -85,7 +85,7 @@ function make_lexer(keywords) { } }; let next_token = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return; @@ -271,7 +271,7 @@ function make_lexer(keywords) { Stream.junk(strm__); reset_buffer(); store(c); - while(true) { + while (true) { let c$3 = Stream.peek(strm__); if (c$3 === undefined) { return ident_or_keyword(get_string()); @@ -313,7 +313,7 @@ function make_lexer(keywords) { }; }; let ident2 = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return ident_or_keyword(get_string()); @@ -381,7 +381,7 @@ function make_lexer(keywords) { }; }; let number = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c !== undefined) { if (c >= 58) { @@ -401,7 +401,7 @@ function make_lexer(keywords) { } else { Stream.junk(strm__); store(/* '.' */46); - while(true) { + while (true) { let c$1 = Stream.peek(strm__); if (c$1 !== undefined) { if (c$1 > 101 || c$1 < 69) { @@ -442,7 +442,7 @@ function make_lexer(keywords) { } }; let end_exponent_part = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return { @@ -462,7 +462,7 @@ function make_lexer(keywords) { }; }; let string = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c !== undefined) { if (c !== 34) { @@ -605,7 +605,7 @@ function make_lexer(keywords) { } }; let comment = function (strm__) { - while(true) { + while (true) { let match = Stream.peek(strm__); if (match !== undefined) { switch (match) { @@ -629,7 +629,7 @@ function make_lexer(keywords) { }); case 42 : Stream.junk(strm__); - while(true) { + while (true) { let match$2 = Stream.peek(strm__); if (match$2 !== undefined) { if (match$2 !== 41) { diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index f66b4ac321..8a47150ae6 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -43,7 +43,7 @@ let prng = CamlinternalLazy.from_fun(function () { }); function power_2_above(_x, n) { - while(true) { + while (true) { let x = _x; if (x >= n) { return x; @@ -95,7 +95,7 @@ function copy_bucketlist(param) { let data = param.data; let next = param.next; let loop = function (_prec, _param) { - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -163,7 +163,7 @@ function resize(indexfun, h) { let inplace = h.initial_size >= 0; h.data = ndata; let insert_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -228,7 +228,7 @@ function remove(h, key) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -293,7 +293,7 @@ function find(h, key) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -344,7 +344,7 @@ function find_opt(h, key) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -363,7 +363,7 @@ function find_opt(h, key) { function find_all(h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -385,7 +385,7 @@ function find_all(h, key) { } function replace_bucket(key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -424,7 +424,7 @@ function replace(h, key, data) { function mem(h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -441,7 +441,7 @@ function mem(h, key) { function iter(f, h) { let do_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -482,7 +482,7 @@ function iter(f, h) { } function filter_map_inplace_bucket(f, h, i, _prec, _param) { - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -540,7 +540,7 @@ function filter_map_inplace(f, h) { function fold(f, h, init) { let do_bucket = function (_b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (typeof b !== "object") { @@ -582,7 +582,7 @@ function fold(f, h, init) { } function bucket_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -635,7 +635,7 @@ function MakeSeeded(H) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -699,7 +699,7 @@ function MakeSeeded(H) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -749,7 +749,7 @@ function MakeSeeded(H) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -767,7 +767,7 @@ function MakeSeeded(H) { }; let find_all = function (h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -788,7 +788,7 @@ function MakeSeeded(H) { return find_in_bucket(Caml_array.get(h.data, key_index(h, key))); }; let replace_bucket = function (key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -825,7 +825,7 @@ function MakeSeeded(H) { }; let mem = function (h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -883,7 +883,7 @@ function Make(H) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -947,7 +947,7 @@ function Make(H) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -997,7 +997,7 @@ function Make(H) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1015,7 +1015,7 @@ function Make(H) { }; let find_all = function (h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -1036,7 +1036,7 @@ function Make(H) { return find_in_bucket(Caml_array.get(h.data, key_index(h, key))); }; let replace_bucket = function (key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1073,7 +1073,7 @@ function Make(H) { }; let mem = function (h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; diff --git a/lib/es6/js_dict.js b/lib/es6/js_dict.js index 0f7ff2e9d1..3aae438cf0 100644 --- a/lib/es6/js_dict.js +++ b/lib/es6/js_dict.js @@ -40,7 +40,7 @@ function values(dict) { function fromList(entries) { let dict = {}; let _x = entries; - while(true) { + while (true) { let x = _x; if (!x) { return dict; diff --git a/lib/es6/list.js b/lib/es6/list.js index 02a588f97a..cafe8427db 100644 --- a/lib/es6/list.js +++ b/lib/es6/list.js @@ -7,7 +7,7 @@ import * as Caml_option from "./caml_option.js"; function length(l) { let _len = 0; let _param = l; - while(true) { + while (true) { let param = _param; let len = _len; if (!param) { @@ -61,7 +61,7 @@ function nth(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (l$1) { @@ -92,7 +92,7 @@ function nth_opt(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (!l$1) { @@ -108,7 +108,7 @@ function nth_opt(l, n) { } function rev_append(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -128,7 +128,7 @@ function rev(l) { } function init_tailrec_aux(_acc, _i, n, f) { - while(true) { + while (true) { let i = _i; let acc = _acc; if (i >= n) { @@ -207,7 +207,7 @@ function mapi$1(f, l) { function rev_map(f, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -223,7 +223,7 @@ function rev_map(f, l) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -237,7 +237,7 @@ function iter(f, _param) { function iteri(f, l) { let _i = 0; let _param = l; - while(true) { + while (true) { let param = _param; let i = _i; if (!param) { @@ -251,7 +251,7 @@ function iteri(f, l) { } function fold_left(f, _accu, _l) { - while(true) { + while (true) { let l = _l; let accu = _accu; if (!l) { @@ -302,7 +302,7 @@ function rev_map2(f, l1, l2) { let _accu = /* [] */0; let _l1 = l1; let _l2 = l2; - while(true) { + while (true) { let l2$1 = _l2; let l1$1 = _l1; let accu = _accu; @@ -336,7 +336,7 @@ function rev_map2(f, l1, l2) { } function iter2(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -366,7 +366,7 @@ function iter2(f, _l1, _l2) { } function fold_left2(f, _accu, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; let accu = _accu; @@ -420,7 +420,7 @@ function fold_right2(f, l1, l2, accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return true; @@ -434,7 +434,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -448,7 +448,7 @@ function exists(p, _param) { } function for_all2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -480,7 +480,7 @@ function for_all2(p, _l1, _l2) { } function exists2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -512,7 +512,7 @@ function exists2(p, _l1, _l2) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -526,7 +526,7 @@ function mem(x, _param) { } function memq(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -540,7 +540,7 @@ function memq(x, _param) { } function assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -559,7 +559,7 @@ function assoc(x, _param) { } function assoc_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -574,7 +574,7 @@ function assoc_opt(x, _param) { } function assq(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -593,7 +593,7 @@ function assq(x, _param) { } function assq_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -608,7 +608,7 @@ function assq_opt(x, _param) { } function mem_assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -622,7 +622,7 @@ function mem_assoc(x, _param) { } function mem_assq(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -668,7 +668,7 @@ function remove_assq(x, param) { } function find(p, _param) { - while(true) { + while (true) { let param = _param; if (param) { let x = param.hd; @@ -687,7 +687,7 @@ function find(p, _param) { } function find_opt(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -704,7 +704,7 @@ function find_opt(p, _param) { function find_all(p, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -729,7 +729,7 @@ function partition(p, l) { let _yes = /* [] */0; let _no = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let no = _no; let yes = _yes; @@ -831,7 +831,7 @@ function merge(cmp, l1, l2) { } function chop(_k, _l) { - while(true) { + while (true) { let l = _l; let k = _k; if (k === 0) { @@ -974,7 +974,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1120,7 +1120,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1348,7 +1348,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1579,7 +1579,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1628,7 +1628,7 @@ function sort_uniq(cmp, l) { } function compare_lengths(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1648,7 +1648,7 @@ function compare_lengths(_l1, _l2) { } function compare_length_with(_l, _n) { - while(true) { + while (true) { let n = _n; let l = _l; if (!l) { diff --git a/lib/es6/listLabels.js b/lib/es6/listLabels.js index a12d7fcd6d..42017ada06 100644 --- a/lib/es6/listLabels.js +++ b/lib/es6/listLabels.js @@ -7,7 +7,7 @@ import * as Caml_option from "./caml_option.js"; function length(l) { let _len = 0; let _param = l; - while(true) { + while (true) { let param = _param; let len = _len; if (!param) { @@ -61,7 +61,7 @@ function nth(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (l$1) { @@ -92,7 +92,7 @@ function nth_opt(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (!l$1) { @@ -108,7 +108,7 @@ function nth_opt(l, n) { } function rev_append(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -128,7 +128,7 @@ function rev(l) { } function init_tailrec_aux(_acc, _i, n, f) { - while(true) { + while (true) { let i = _i; let acc = _acc; if (i >= n) { @@ -207,7 +207,7 @@ function mapi$1(f, l) { function rev_map(f, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -223,7 +223,7 @@ function rev_map(f, l) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -237,7 +237,7 @@ function iter(f, _param) { function iteri(f, l) { let _i = 0; let _param = l; - while(true) { + while (true) { let param = _param; let i = _i; if (!param) { @@ -251,7 +251,7 @@ function iteri(f, l) { } function fold_left(f, _accu, _l) { - while(true) { + while (true) { let l = _l; let accu = _accu; if (!l) { @@ -302,7 +302,7 @@ function rev_map2(f, l1, l2) { let _accu = /* [] */0; let _l1 = l1; let _l2 = l2; - while(true) { + while (true) { let l2$1 = _l2; let l1$1 = _l1; let accu = _accu; @@ -336,7 +336,7 @@ function rev_map2(f, l1, l2) { } function iter2(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -366,7 +366,7 @@ function iter2(f, _l1, _l2) { } function fold_left2(f, _accu, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; let accu = _accu; @@ -420,7 +420,7 @@ function fold_right2(f, l1, l2, accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return true; @@ -434,7 +434,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -448,7 +448,7 @@ function exists(p, _param) { } function for_all2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -480,7 +480,7 @@ function for_all2(p, _l1, _l2) { } function exists2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -512,7 +512,7 @@ function exists2(p, _l1, _l2) { } function mem(x, _set) { - while(true) { + while (true) { let set = _set; if (!set) { return false; @@ -526,7 +526,7 @@ function mem(x, _set) { } function memq(x, _set) { - while(true) { + while (true) { let set = _set; if (!set) { return false; @@ -540,7 +540,7 @@ function memq(x, _set) { } function assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -559,7 +559,7 @@ function assoc(x, _param) { } function assoc_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -574,7 +574,7 @@ function assoc_opt(x, _param) { } function assq(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -593,7 +593,7 @@ function assq(x, _param) { } function assq_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -608,7 +608,7 @@ function assq_opt(x, _param) { } function mem_assoc(x, _map) { - while(true) { + while (true) { let map = _map; if (!map) { return false; @@ -622,7 +622,7 @@ function mem_assoc(x, _map) { } function mem_assq(x, _map) { - while(true) { + while (true) { let map = _map; if (!map) { return false; @@ -668,7 +668,7 @@ function remove_assq(x, param) { } function find(p, _param) { - while(true) { + while (true) { let param = _param; if (param) { let x = param.hd; @@ -687,7 +687,7 @@ function find(p, _param) { } function find_opt(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -704,7 +704,7 @@ function find_opt(p, _param) { function find_all(p, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -729,7 +729,7 @@ function partition(p, l) { let _yes = /* [] */0; let _no = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let no = _no; let yes = _yes; @@ -831,7 +831,7 @@ function merge(cmp, l1, l2) { } function chop(_k, _l) { - while(true) { + while (true) { let l = _l; let k = _k; if (k === 0) { @@ -974,7 +974,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1120,7 +1120,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1348,7 +1348,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1579,7 +1579,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1628,7 +1628,7 @@ function sort_uniq(cmp, l) { } function compare_lengths(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1648,7 +1648,7 @@ function compare_lengths(_l1, _l2) { } function compare_length_with(_l, _n) { - while(true) { + while (true) { let n = _n; let l = _l; if (!l) { diff --git a/lib/es6/map.js b/lib/es6/map.js index 9add13e742..84d4f73cb9 100644 --- a/lib/es6/map.js +++ b/lib/es6/map.js @@ -151,7 +151,7 @@ function Make(funarg) { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -169,7 +169,7 @@ function Make(funarg) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -183,7 +183,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -209,7 +209,7 @@ function Make(funarg) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -219,7 +219,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -245,7 +245,7 @@ function Make(funarg) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -259,7 +259,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -285,7 +285,7 @@ function Make(funarg) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -295,7 +295,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -321,7 +321,7 @@ function Make(funarg) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -335,7 +335,7 @@ function Make(funarg) { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -349,7 +349,7 @@ function Make(funarg) { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -370,7 +370,7 @@ function Make(funarg) { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -387,7 +387,7 @@ function Make(funarg) { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -408,7 +408,7 @@ function Make(funarg) { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -533,7 +533,7 @@ function Make(funarg) { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -578,7 +578,7 @@ function Make(funarg) { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -590,7 +590,7 @@ function Make(funarg) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -606,7 +606,7 @@ function Make(funarg) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -816,7 +816,7 @@ function Make(funarg) { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -836,7 +836,7 @@ function Make(funarg) { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -865,7 +865,7 @@ function Make(funarg) { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -897,7 +897,7 @@ function Make(funarg) { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/lib/es6/mapLabels.js b/lib/es6/mapLabels.js index d6fe21fdf5..58bcbd2c6f 100644 --- a/lib/es6/mapLabels.js +++ b/lib/es6/mapLabels.js @@ -151,7 +151,7 @@ function Make(Ord) { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -169,7 +169,7 @@ function Make(Ord) { }; }; let find_first_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -191,7 +191,7 @@ function Make(Ord) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -209,7 +209,7 @@ function Make(Ord) { }; }; let find_first_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -231,7 +231,7 @@ function Make(Ord) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -245,7 +245,7 @@ function Make(Ord) { }; }; let find_last_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -267,7 +267,7 @@ function Make(Ord) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -285,7 +285,7 @@ function Make(Ord) { }; }; let find_last_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -307,7 +307,7 @@ function Make(Ord) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -321,7 +321,7 @@ function Make(Ord) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -335,7 +335,7 @@ function Make(Ord) { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -349,7 +349,7 @@ function Make(Ord) { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -370,7 +370,7 @@ function Make(Ord) { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -387,7 +387,7 @@ function Make(Ord) { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -408,7 +408,7 @@ function Make(Ord) { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -533,7 +533,7 @@ function Make(Ord) { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -578,7 +578,7 @@ function Make(Ord) { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -590,7 +590,7 @@ function Make(Ord) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -606,7 +606,7 @@ function Make(Ord) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -816,7 +816,7 @@ function Make(Ord) { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -836,7 +836,7 @@ function Make(Ord) { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -865,7 +865,7 @@ function Make(Ord) { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -897,7 +897,7 @@ function Make(Ord) { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/lib/es6/moreLabels.js b/lib/es6/moreLabels.js index d90e8d2957..988440c243 100644 --- a/lib/es6/moreLabels.js +++ b/lib/es6/moreLabels.js @@ -181,7 +181,7 @@ let $$Map = { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -199,7 +199,7 @@ let $$Map = { }; }; let find_first_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -221,7 +221,7 @@ let $$Map = { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -239,7 +239,7 @@ let $$Map = { }; }; let find_first_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -261,7 +261,7 @@ let $$Map = { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -275,7 +275,7 @@ let $$Map = { }; }; let find_last_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -297,7 +297,7 @@ let $$Map = { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -315,7 +315,7 @@ let $$Map = { }; }; let find_last_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -337,7 +337,7 @@ let $$Map = { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -351,7 +351,7 @@ let $$Map = { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -365,7 +365,7 @@ let $$Map = { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -379,7 +379,7 @@ let $$Map = { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -400,7 +400,7 @@ let $$Map = { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -417,7 +417,7 @@ let $$Map = { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -438,7 +438,7 @@ let $$Map = { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -563,7 +563,7 @@ let $$Map = { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -608,7 +608,7 @@ let $$Map = { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -620,7 +620,7 @@ let $$Map = { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -636,7 +636,7 @@ let $$Map = { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -846,7 +846,7 @@ let $$Map = { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -866,7 +866,7 @@ let $$Map = { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -895,7 +895,7 @@ let $$Map = { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -927,7 +927,7 @@ let $$Map = { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1144,7 +1144,7 @@ let $$Set = { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1162,7 +1162,7 @@ let $$Set = { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1176,7 +1176,7 @@ let $$Set = { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1194,7 +1194,7 @@ let $$Set = { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1283,7 +1283,7 @@ let $$Set = { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1383,7 +1383,7 @@ let $$Set = { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -1400,7 +1400,7 @@ let $$Set = { }; }; let compare_aux = function (_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1429,7 +1429,7 @@ let $$Set = { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -1479,7 +1479,7 @@ let $$Set = { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1491,7 +1491,7 @@ let $$Set = { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -1503,7 +1503,7 @@ let $$Set = { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1519,7 +1519,7 @@ let $$Set = { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1589,7 +1589,7 @@ let $$Set = { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1607,7 +1607,7 @@ let $$Set = { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1626,7 +1626,7 @@ let $$Set = { }; }; let find_first_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1643,7 +1643,7 @@ let $$Set = { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1661,7 +1661,7 @@ let $$Set = { }; }; let find_first_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1678,7 +1678,7 @@ let $$Set = { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1692,7 +1692,7 @@ let $$Set = { }; }; let find_last_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1709,7 +1709,7 @@ let $$Set = { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1727,7 +1727,7 @@ let $$Set = { }; }; let find_last_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1744,7 +1744,7 @@ let $$Set = { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1758,7 +1758,7 @@ let $$Set = { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/es6/parsing.js b/lib/es6/parsing.js index c56d1eb06d..0b30d9b72b 100644 --- a/lib/es6/parsing.js +++ b/lib/es6/parsing.js @@ -74,7 +74,7 @@ function yyparse(tables, start, lexer, lexbuf) { try { let _cmd = "Start"; let _arg; - while(true) { + while (true) { let arg = _arg; let cmd = _cmd; let match = Caml_parser.parse_engine(tables, env, cmd, arg); @@ -165,7 +165,7 @@ function peek_val(env, n) { function symbol_start_pos() { let _i = env.rule_len; - while(true) { + while (true) { let i = _i; if (i <= 0) { return Caml_array.get(env.symb_end_stack, env.asp); diff --git a/lib/es6/pervasives.js b/lib/es6/pervasives.js index fab24da886..80e48dfe4d 100644 --- a/lib/es6/pervasives.js +++ b/lib/es6/pervasives.js @@ -120,7 +120,7 @@ function int_of_string_opt(s) { function valid_float_lexem(s) { let l = s.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= l) { return s + "."; diff --git a/lib/es6/queue.js b/lib/es6/queue.js index 36d67dbb71..3dbfc29c2e 100644 --- a/lib/es6/queue.js +++ b/lib/es6/queue.js @@ -76,7 +76,7 @@ function copy(q) { }; let _prev = "Nil"; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (typeof cell !== "object") { @@ -110,7 +110,7 @@ function length(q) { function iter(f, q) { let _cell = q.first; - while(true) { + while (true) { let cell = _cell; if (typeof cell !== "object") { return; @@ -125,7 +125,7 @@ function iter(f, q) { function fold(f, accu, q) { let _accu = accu; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let accu$1 = _accu; if (typeof cell !== "object") { diff --git a/lib/es6/random.js b/lib/es6/random.js index 2b8046643f..c951357884 100644 --- a/lib/es6/random.js +++ b/lib/es6/random.js @@ -82,7 +82,7 @@ function int(s, bound) { } }); } - while(true) { + while (true) { let r = bits(s); let v = r % bound; if ((r - v | 0) <= ((1073741823 - bound | 0) + 1 | 0)) { @@ -101,7 +101,7 @@ function int32(s, bound) { } }); } - while(true) { + while (true) { let b1 = bits(s); let b2 = ((bits(s) & 1) << 30); let r = b1 | b2; @@ -122,7 +122,7 @@ function int64(s, bound) { } }); } - while(true) { + while (true) { let b1 = Caml_int64.of_int32(bits(s)); let b2 = Caml_int64.lsl_(Caml_int64.of_int32(bits(s)), 30); let b3 = Caml_int64.lsl_(Caml_int64.of_int32(bits(s) & 7), 60); diff --git a/lib/es6/set.js b/lib/es6/set.js index 2808ee5d78..c5aa672494 100644 --- a/lib/es6/set.js +++ b/lib/es6/set.js @@ -160,7 +160,7 @@ function Make(funarg) { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -178,7 +178,7 @@ function Make(funarg) { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -192,7 +192,7 @@ function Make(funarg) { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -210,7 +210,7 @@ function Make(funarg) { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -290,7 +290,7 @@ function Make(funarg) { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -396,7 +396,7 @@ function Make(funarg) { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -415,7 +415,7 @@ function Make(funarg) { let compare = function (s1, s2) { let _e1 = cons_enum(s1, "End"); let _e2 = cons_enum(s2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -441,7 +441,7 @@ function Make(funarg) { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -491,7 +491,7 @@ function Make(funarg) { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -503,7 +503,7 @@ function Make(funarg) { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -515,7 +515,7 @@ function Make(funarg) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -531,7 +531,7 @@ function Make(funarg) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -601,7 +601,7 @@ function Make(funarg) { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -619,7 +619,7 @@ function Make(funarg) { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -638,7 +638,7 @@ function Make(funarg) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -651,7 +651,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -672,7 +672,7 @@ function Make(funarg) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -681,7 +681,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -702,7 +702,7 @@ function Make(funarg) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -715,7 +715,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -736,7 +736,7 @@ function Make(funarg) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -745,7 +745,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -766,7 +766,7 @@ function Make(funarg) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/es6/setLabels.js b/lib/es6/setLabels.js index 3097a1f8f3..f566075aca 100644 --- a/lib/es6/setLabels.js +++ b/lib/es6/setLabels.js @@ -160,7 +160,7 @@ function Make(Ord) { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -178,7 +178,7 @@ function Make(Ord) { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -192,7 +192,7 @@ function Make(Ord) { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -210,7 +210,7 @@ function Make(Ord) { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -299,7 +299,7 @@ function Make(Ord) { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -399,7 +399,7 @@ function Make(Ord) { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -416,7 +416,7 @@ function Make(Ord) { }; }; let compare_aux = function (_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -445,7 +445,7 @@ function Make(Ord) { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -495,7 +495,7 @@ function Make(Ord) { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -507,7 +507,7 @@ function Make(Ord) { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -519,7 +519,7 @@ function Make(Ord) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -535,7 +535,7 @@ function Make(Ord) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -605,7 +605,7 @@ function Make(Ord) { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -623,7 +623,7 @@ function Make(Ord) { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -642,7 +642,7 @@ function Make(Ord) { }; }; let find_first_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -659,7 +659,7 @@ function Make(Ord) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -677,7 +677,7 @@ function Make(Ord) { }; }; let find_first_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -694,7 +694,7 @@ function Make(Ord) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -708,7 +708,7 @@ function Make(Ord) { }; }; let find_last_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -725,7 +725,7 @@ function Make(Ord) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -743,7 +743,7 @@ function Make(Ord) { }; }; let find_last_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -760,7 +760,7 @@ function Make(Ord) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -774,7 +774,7 @@ function Make(Ord) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/es6/sort.js b/lib/es6/sort.js index e9a2386460..edf5cdf0e6 100644 --- a/lib/es6/sort.js +++ b/lib/es6/sort.js @@ -72,7 +72,7 @@ function list(order, l) { } }; let _param = initlist(l); - while(true) { + while (true) { let param = _param; if (!param) { return /* [] */0; @@ -93,7 +93,7 @@ function swap(arr, i, j) { function array(cmp, arr) { let qsort = function (_lo, _hi) { - while(true) { + while (true) { let hi = _hi; let lo = _lo; if ((hi - lo | 0) < 6) { @@ -121,11 +121,11 @@ function array(cmp, arr) { } }); } - while(i < j) { - while(!cmp(pivot, arr[i])) { + while (i < j) { + while (!cmp(pivot, arr[i])) { i = i + 1 | 0; }; - while(!cmp(arr[j], pivot)) { + while (!cmp(arr[j], pivot)) { j = j - 1 | 0; }; if (i < j) { @@ -150,7 +150,7 @@ function array(cmp, arr) { if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; let j = i - 1 | 0; - while(j >= 1 && !cmp(arr[j - 1 | 0], val_i)) { + while (j >= 1 && !cmp(arr[j - 1 | 0], val_i)) { arr[j] = arr[j - 1 | 0]; j = j - 1 | 0; }; diff --git a/lib/es6/stream.js b/lib/es6/stream.js index a6bf804d7b..5d947efd23 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -28,7 +28,7 @@ function data(param) { } function get_data(count, _d) { - while(true) { + while (true) { let d = _d; if (typeof d !== "object") { return d; @@ -100,7 +100,7 @@ function get_data(count, _d) { } function peek_data(s) { - while(true) { + while (true) { let f = s.data; if (typeof f !== "object") { return; @@ -152,7 +152,7 @@ function peek(param) { } function junk_data(s) { - while(true) { + while (true) { let g = s.data; if (typeof g === "object") { switch (g.TAG) { @@ -259,7 +259,7 @@ function empty(s) { function iter(f, strm) { let do_rec = function () { - while(true) { + while (true) { let a = peek(strm); if (a === undefined) { return; diff --git a/lib/es6/string.js b/lib/es6/string.js index 85b6ccb636..3828572bc2 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -56,7 +56,7 @@ function trim(s) { function escaped(s) { let needs_escape = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= s.length) { return false; @@ -87,7 +87,7 @@ function escaped(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -109,7 +109,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -153,7 +153,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -187,7 +187,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index d2bb07e09a..9144be9727 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -58,7 +58,7 @@ function trim(s) { function escaped(s) { let needs_escape = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= s.length) { return false; @@ -89,7 +89,7 @@ function escaped(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -111,7 +111,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -155,7 +155,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -189,7 +189,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/js/arg.js b/lib/js/arg.js index e5205a6cca..6380dcec44 100644 --- a/lib/js/arg.js +++ b/lib/js/arg.js @@ -21,7 +21,7 @@ let Help = /* @__PURE__ */Caml_exceptions.create("Arg.Help"); let Stop = /* @__PURE__ */Caml_exceptions.create("Arg.Stop"); function assoc3(x, _l) { - while(true) { + while (true) { let l = _l; if (l) { let match = l.hd; @@ -242,7 +242,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } }; current.contents = current.contents + 1 | 0; - while(current.contents < argv.contents.length) { + while (current.contents < argv.contents.length) { try { let s = Caml_array.get(argv.contents, current.contents); if (s.length >= 1 && Caml_string.get(s, 0) === /* '-' */45) { @@ -462,7 +462,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist }); case "Rest" : let f$1 = f._0; - while(current.contents < (argv.contents.length - 1 | 0)) { + while (current.contents < (argv.contents.length - 1 | 0)) { f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); consume_arg(); }; @@ -612,7 +612,7 @@ function parse_expand(l, f, msg) { function second_word(s) { let len = s.length; let loop = function (_n) { - while(true) { + while (true) { let n = _n; if (n >= len) { return len; diff --git a/lib/js/array.js b/lib/js/array.js index 415900f6d9..37198d5fea 100644 --- a/lib/js/array.js +++ b/lib/js/array.js @@ -168,7 +168,7 @@ function mapi(f, a) { function to_list(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -184,7 +184,7 @@ function to_list(a) { } function list_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -203,7 +203,7 @@ function of_list(param) { let a = Caml_array.make(list_length(0, param), param.hd); let _i = 1; let _param = param.tl; - while(true) { + while (true) { let param$1 = _param; let i = _i; if (!param$1) { @@ -235,7 +235,7 @@ function fold_right(f, a, x) { function exists(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -251,7 +251,7 @@ function exists(p, a) { function for_all(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return true; @@ -267,7 +267,7 @@ function for_all(p, a) { function mem(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -283,7 +283,7 @@ function mem(x, a) { function memq(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -327,7 +327,7 @@ function sort(cmp, a) { let trickle = function (l, i, e) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); if (cmp(Caml_array.get(a, j), e) <= 0) { @@ -350,7 +350,7 @@ function sort(cmp, a) { let bubble = function (l, i) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); Caml_array.set(a, i$1, Caml_array.get(a, j)); @@ -368,7 +368,7 @@ function sort(cmp, a) { } }; let trickleup = function (_i, e) { - while(true) { + while (true) { let i = _i; let father = (i - 1 | 0) / 3 | 0; if (i === father) { @@ -420,7 +420,7 @@ function stable_sort(cmp, a) { let _i2 = src2ofs; let _s2 = Caml_array.get(src2, src2ofs); let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -452,7 +452,7 @@ function stable_sort(cmp, a) { for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { + while (j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { Caml_array.set(dst, j + 1 | 0, Caml_array.get(dst, j)); j = j - 1 | 0; }; diff --git a/lib/js/arrayLabels.js b/lib/js/arrayLabels.js index 9097f86f13..33ae6dc024 100644 --- a/lib/js/arrayLabels.js +++ b/lib/js/arrayLabels.js @@ -168,7 +168,7 @@ function mapi(f, a) { function to_list(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -184,7 +184,7 @@ function to_list(a) { } function list_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -203,7 +203,7 @@ function of_list(param) { let a = Caml_array.make(list_length(0, param), param.hd); let _i = 1; let _param = param.tl; - while(true) { + while (true) { let param$1 = _param; let i = _i; if (!param$1) { @@ -235,7 +235,7 @@ function fold_right(f, a, x) { function exists(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -251,7 +251,7 @@ function exists(p, a) { function for_all(p, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return true; @@ -267,7 +267,7 @@ function for_all(p, a) { function mem(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -283,7 +283,7 @@ function mem(x, a) { function memq(x, a) { let n = a.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === n) { return false; @@ -327,7 +327,7 @@ function sort(cmp, a) { let trickle = function (l, i, e) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); if (cmp(Caml_array.get(a, j), e) <= 0) { @@ -350,7 +350,7 @@ function sort(cmp, a) { let bubble = function (l, i) { try { let _i = i; - while(true) { + while (true) { let i$1 = _i; let j = maxson(l, i$1); Caml_array.set(a, i$1, Caml_array.get(a, j)); @@ -368,7 +368,7 @@ function sort(cmp, a) { } }; let trickleup = function (_i, e) { - while(true) { + while (true) { let i = _i; let father = (i - 1 | 0) / 3 | 0; if (i === father) { @@ -420,7 +420,7 @@ function stable_sort(cmp, a) { let _i2 = src2ofs; let _s2 = Caml_array.get(src2, src2ofs); let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -452,7 +452,7 @@ function stable_sort(cmp, a) { for (let i = 0; i < len; ++i) { let e = Caml_array.get(a, srcofs + i | 0); let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { + while (j >= dstofs && cmp(Caml_array.get(dst, j), e) > 0) { Caml_array.set(dst, j + 1 | 0, Caml_array.get(dst, j)); j = j - 1 | 0; }; diff --git a/lib/js/belt_Array.js b/lib/js/belt_Array.js index f1b7da9710..999f73a7ff 100644 --- a/lib/js/belt_Array.js +++ b/lib/js/belt_Array.js @@ -334,7 +334,7 @@ function getByU(a, p) { let l = a.length; let i = 0; let r; - while(r === undefined && i < l) { + while (r === undefined && i < l) { let v = a[i]; if (p(v)) { r = Caml_option.some(v); @@ -354,7 +354,7 @@ function getIndexByU(a, p) { let l = a.length; let i = 0; let r; - while(r === undefined && i < l) { + while (r === undefined && i < l) { let v = a[i]; if (p(v)) { r = i; @@ -524,7 +524,7 @@ function reduceWithIndex(a, x, f) { function everyU(arr, b) { let len = arr.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len) { return true; @@ -546,7 +546,7 @@ function every(arr, f) { function someU(arr, b) { let len = arr.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len) { return false; @@ -566,7 +566,7 @@ function some(arr, f) { } function everyAux2(arr1, arr2, _i, b, len) { - while(true) { + while (true) { let i = _i; if (i === len) { return true; @@ -592,7 +592,7 @@ function every2(a, b, p) { function some2U(a, b, p) { let _i = 0; let len = Caml.int_min(a.length, b.length); - while(true) { + while (true) { let i = _i; if (i === len) { return false; @@ -636,7 +636,7 @@ function cmpU(a, b, p) { return -1; } else { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === lena) { return 0; @@ -710,7 +710,7 @@ function joinWithU(a, sep, toString) { let lastIndex = l - 1 | 0; let _i = 0; let _res = ""; - while(true) { + while (true) { let res = _res; let i = _i; if (i === lastIndex) { diff --git a/lib/js/belt_HashMap.js b/lib/js/belt_HashMap.js index f187e2a379..0707a8dbeb 100644 --- a/lib/js/belt_HashMap.js +++ b/lib/js/belt_HashMap.js @@ -9,7 +9,7 @@ function size(h) { } function copyBucketReHash(hash, h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -28,7 +28,7 @@ function copyBucketReHash(hash, h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(eq, key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { cell.value = info; @@ -110,7 +110,7 @@ function remove(h, key) { } else { let _prec = bucket; let _bucket = bucket.next; - while(true) { + while (true) { let bucket$1 = _bucket; let prec = _prec; if (bucket$1 === undefined) { @@ -153,7 +153,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -176,7 +176,7 @@ function has(h, key) { if (bucket !== undefined) { let _cell = bucket; let eq = h.eq; - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return true; diff --git a/lib/js/belt_HashMapInt.js b/lib/js/belt_HashMapInt.js index 0b25109416..fbb185be93 100644 --- a/lib/js/belt_HashMapInt.js +++ b/lib/js/belt_HashMapInt.js @@ -6,7 +6,7 @@ let Belt_internalBuckets = require("./belt_internalBuckets.js"); let Belt_internalBucketsType = require("./belt_internalBucketsType.js"); function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -25,7 +25,7 @@ function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { cell.value = info; @@ -100,7 +100,7 @@ function remove(h, key) { } else { let _prec = bucket; let _buckets = bucket.next; - while(true) { + while (true) { let buckets = _buckets; let prec = _prec; if (buckets === undefined) { @@ -144,7 +144,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -166,7 +166,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/js/belt_HashMapString.js b/lib/js/belt_HashMapString.js index e3e4237c47..56b2025d71 100644 --- a/lib/js/belt_HashMapString.js +++ b/lib/js/belt_HashMapString.js @@ -6,7 +6,7 @@ let Belt_internalBuckets = require("./belt_internalBuckets.js"); let Belt_internalBucketsType = require("./belt_internalBucketsType.js"); function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -25,7 +25,7 @@ function copyBucketReHash(h_buckets, ndata_tail, _old_bucket) { } function replaceInBucket(key, info, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { cell.value = info; @@ -100,7 +100,7 @@ function remove(h, key) { } else { let _prec = bucket; let _buckets = bucket.next; - while(true) { + while (true) { let buckets = _buckets; let prec = _prec; if (buckets === undefined) { @@ -144,7 +144,7 @@ function get(h, key) { return Caml_option.some(cell3.value); } else { let _buckets = cell3.next; - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -166,7 +166,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/js/belt_HashSet.js b/lib/js/belt_HashSet.js index ca695eaee9..8378f577f6 100644 --- a/lib/js/belt_HashSet.js +++ b/lib/js/belt_HashSet.js @@ -4,7 +4,7 @@ let Belt_internalSetBuckets = require("./belt_internalSetBuckets.js"); let Belt_internalBucketsType = require("./belt_internalBucketsType.js"); function copyBucket(hash, h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell, eq) { - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return; @@ -129,7 +129,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (eq(cell.key, key)) { return true; diff --git a/lib/js/belt_HashSetInt.js b/lib/js/belt_HashSetInt.js index a7d7a15954..5889ff81ec 100644 --- a/lib/js/belt_HashSetInt.js +++ b/lib/js/belt_HashSetInt.js @@ -5,7 +5,7 @@ let Belt_internalSetBuckets = require("./belt_internalSetBuckets.js"); let Belt_internalBucketsType = require("./belt_internalBucketsType.js"); function copyBucket(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return; @@ -124,7 +124,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/js/belt_HashSetString.js b/lib/js/belt_HashSetString.js index 800f227c8b..a90cceef71 100644 --- a/lib/js/belt_HashSetString.js +++ b/lib/js/belt_HashSetString.js @@ -5,7 +5,7 @@ let Belt_internalSetBuckets = require("./belt_internalSetBuckets.js"); let Belt_internalBucketsType = require("./belt_internalBucketsType.js"); function copyBucket(h_buckets, ndata_tail, _old_bucket) { - while(true) { + while (true) { let old_bucket = _old_bucket; if (old_bucket === undefined) { return; @@ -38,7 +38,7 @@ function remove(h, key) { } else if (next_cell !== undefined) { let _prec = l; let _cell = next_cell; - while(true) { + while (true) { let cell = _cell; let prec = _prec; let cell_next = cell.next; @@ -60,7 +60,7 @@ function remove(h, key) { } function addBucket(h, key, _cell) { - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return; @@ -124,7 +124,7 @@ function has(h, key) { let bucket = h_buckets[nid]; if (bucket !== undefined) { let _cell = bucket; - while(true) { + while (true) { let cell = _cell; if (cell.key === key) { return true; diff --git a/lib/js/belt_List.js b/lib/js/belt_List.js index b3a867dd21..e5ef0119ec 100644 --- a/lib/js/belt_List.js +++ b/lib/js/belt_List.js @@ -53,7 +53,7 @@ function get(x, n) { } else { let _x = x; let _n = n; - while(true) { + while (true) { let n$1 = _n; let x$1 = _x; if (!x$1) { @@ -79,7 +79,7 @@ function getExn(x, n) { } let _x = x; let _n = n; - while(true) { + while (true) { let n$1 = _n; let x$1 = _x; if (x$1) { @@ -99,7 +99,7 @@ function getExn(x, n) { } function partitionAux(p, _cell, _precX, _precY) { - while(true) { + while (true) { let precY = _precY; let precX = _precX; let cell = _cell; @@ -126,7 +126,7 @@ function partitionAux(p, _cell, _precX, _precY) { } function splitAux(_cell, _precX, _precY) { - while(true) { + while (true) { let precY = _precY; let precX = _precX; let cell = _cell; @@ -152,7 +152,7 @@ function splitAux(_cell, _precX, _precY) { } function copyAuxCont(_cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -170,7 +170,7 @@ function copyAuxCont(_cellX, _prec) { } function copyAuxWitFilter(f, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -194,7 +194,7 @@ function copyAuxWitFilter(f, _cellX, _prec) { } function copyAuxWithFilterIndex(f, _cellX, _prec, _i) { - while(true) { + while (true) { let i = _i; let prec = _prec; let cellX = _cellX; @@ -221,7 +221,7 @@ function copyAuxWithFilterIndex(f, _cellX, _prec, _i) { } function copyAuxWitFilterMap(f, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -245,7 +245,7 @@ function copyAuxWitFilterMap(f, _cellX, _prec) { } function removeAssocAuxWithMap(_cellX, x, _prec, f) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -269,7 +269,7 @@ function removeAssocAuxWithMap(_cellX, x, _prec, f) { } function setAssocAuxWithMap(_cellX, x, k, _prec, eq) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -299,7 +299,7 @@ function setAssocAuxWithMap(_cellX, x, k, _prec, eq) { } function copyAuxWithMap(_cellX, _prec, f) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; if (!cellX) { @@ -317,7 +317,7 @@ function copyAuxWithMap(_cellX, _prec, f) { } function zipAux(_cellX, _cellY, _prec) { - while(true) { + while (true) { let prec = _prec; let cellY = _cellY; let cellX = _cellX; @@ -343,7 +343,7 @@ function zipAux(_cellX, _cellY, _prec) { } function copyAuxWithMap2(f, _cellX, _cellY, _prec) { - while(true) { + while (true) { let prec = _prec; let cellY = _cellY; let cellX = _cellX; @@ -366,7 +366,7 @@ function copyAuxWithMap2(f, _cellX, _cellY, _prec) { } function copyAuxWithMapI(f, _i, _cellX, _prec) { - while(true) { + while (true) { let prec = _prec; let cellX = _cellX; let i = _i; @@ -386,7 +386,7 @@ function copyAuxWithMapI(f, _i, _cellX, _prec) { } function takeAux(_n, _cell, _prec) { - while(true) { + while (true) { let prec = _prec; let cell = _cell; let n = _n; @@ -409,7 +409,7 @@ function takeAux(_n, _cell, _prec) { } function splitAtAux(_n, _cell, _prec) { - while(true) { + while (true) { let prec = _prec; let cell = _cell; let n = _n; @@ -458,7 +458,7 @@ function drop(lst, n) { } else { let _l = lst; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l = _l; if (n$1 === 0) { @@ -580,7 +580,7 @@ function makeByU(n, f) { }; let cur = headX; let i = 1; - while(i < n) { + while (i < n) { let v = { hd: f(i), tl: /* [] */0 @@ -608,7 +608,7 @@ function make(n, v) { }; let cur = headX; let i = 1; - while(i < n) { + while (i < n) { let v$1 = { hd: v, tl: /* [] */0 @@ -623,7 +623,7 @@ function make(n, v) { function length(xs) { let _x = xs; let _acc = 0; - while(true) { + while (true) { let acc = _acc; let x = _x; if (!x) { @@ -636,7 +636,7 @@ function length(xs) { } function fillAux(arr, _i, _x) { - while(true) { + while (true) { let x = _x; let i = _i; if (!x) { @@ -652,7 +652,7 @@ function fillAux(arr, _i, _x) { function fromArray(a) { let _i = a.length - 1 | 0; let _res = /* [] */0; - while(true) { + while (true) { let res = _res; let i = _i; if (i < 0) { @@ -681,7 +681,7 @@ function shuffle(xs) { } function reverseConcat(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -701,7 +701,7 @@ function reverse(l) { } function flattenAux(_prec, _xs) { - while(true) { + while (true) { let xs = _xs; let prec = _prec; if (xs) { @@ -715,7 +715,7 @@ function flattenAux(_prec, _xs) { } function flatten(_xs) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; @@ -753,7 +753,7 @@ function concatMany(xs) { function mapReverseU(l, f) { let _accu = /* [] */0; let _xs = l; - while(true) { + while (true) { let xs = _xs; let accu = _accu; if (!xs) { @@ -775,7 +775,7 @@ function mapReverse(l, f) { } function forEachU(_xs, f) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -795,7 +795,7 @@ function forEach(xs, f) { function forEachWithIndexU(l, f) { let _xs = l; let _i = 0; - while(true) { + while (true) { let i = _i; let xs = _xs; if (!xs) { @@ -815,7 +815,7 @@ function forEachWithIndex(l, f) { } function reduceU(_l, _accu, f) { - while(true) { + while (true) { let accu = _accu; let l = _l; if (!l) { @@ -860,7 +860,7 @@ function reduceWithIndexU(l, acc, f) { let _l = l; let _acc = acc; let _i = 0; - while(true) { + while (true) { let i = _i; let acc$1 = _acc; let l$1 = _l; @@ -884,7 +884,7 @@ function mapReverse2U(l1, l2, f) { let _l1 = l1; let _l2 = l2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1$1 = _l1; @@ -911,7 +911,7 @@ function mapReverse2(l1, l2, f) { } function forEach2U(_l1, _l2, f) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -934,7 +934,7 @@ function forEach2(l1, l2, f) { } function reduce2U(_l1, _l2, _accu, f) { - while(true) { + while (true) { let accu = _accu; let l2 = _l2; let l1 = _l1; @@ -981,7 +981,7 @@ function reduceReverse2(l1, l2, acc, f) { } function everyU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return true; @@ -1001,7 +1001,7 @@ function every(xs, p) { } function someU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1021,7 +1021,7 @@ function some(xs, p) { } function every2U(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1046,7 +1046,7 @@ function every2(l1, l2, p) { } function cmpByLength(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1066,7 +1066,7 @@ function cmpByLength(_l1, _l2) { } function cmpU(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1096,7 +1096,7 @@ function cmp(l1, l2, f) { } function eqU(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1125,7 +1125,7 @@ function eq(l1, l2, f) { } function some2U(_l1, _l2, p) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1150,7 +1150,7 @@ function some2(l1, l2, p) { } function hasU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1170,7 +1170,7 @@ function has(xs, x, eq) { } function getAssocU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -1191,7 +1191,7 @@ function getAssoc(xs, x, eq) { } function hasAssocU(_xs, x, eq) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return false; @@ -1295,7 +1295,7 @@ function sort(xs, cmp) { } function getByU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return; @@ -1316,7 +1316,7 @@ function getBy(xs, p) { } function keepU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; @@ -1345,7 +1345,7 @@ function keep(xs, p) { function keepWithIndexU(xs, p) { let _xs = xs; let _i = 0; - while(true) { + while (true) { let i = _i; let xs$1 = _xs; if (!xs$1) { @@ -1374,7 +1374,7 @@ function keepWithIndex(xs, p) { } function keepMapU(_xs, p) { - while(true) { + while (true) { let xs = _xs; if (!xs) { return /* [] */0; diff --git a/lib/js/belt_MapDict.js b/lib/js/belt_MapDict.js index 026b3c744a..a1d89be3d7 100644 --- a/lib/js/belt_MapDict.js +++ b/lib/js/belt_MapDict.js @@ -255,7 +255,7 @@ function removeMany(t, keys, cmp) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/js/belt_MapInt.js b/lib/js/belt_MapInt.js index 26b49d60ec..ceec88c59a 100644 --- a/lib/js/belt_MapInt.js +++ b/lib/js/belt_MapInt.js @@ -127,7 +127,7 @@ function removeMany(t, keys) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/js/belt_MapString.js b/lib/js/belt_MapString.js index 92cfbf4485..27f8b4715f 100644 --- a/lib/js/belt_MapString.js +++ b/lib/js/belt_MapString.js @@ -127,7 +127,7 @@ function removeMany(t, keys) { if (t !== undefined) { let _t = t; let _i = 0; - while(true) { + while (true) { let i = _i; let t$1 = _t; if (i >= len) { diff --git a/lib/js/belt_MutableMap.js b/lib/js/belt_MutableMap.js index 244d07bba8..bca2a858d7 100644 --- a/lib/js/belt_MutableMap.js +++ b/lib/js/belt_MutableMap.js @@ -54,7 +54,7 @@ function remove(d, k) { } function removeArrayMutateAux(_t, xs, _i, len, cmp) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableMapInt.js b/lib/js/belt_MutableMapInt.js index fed12a58e2..16c3b6e468 100644 --- a/lib/js/belt_MutableMapInt.js +++ b/lib/js/belt_MutableMapInt.js @@ -257,7 +257,7 @@ function update(t, x, f) { } function removeArrayMutateAux(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableMapString.js b/lib/js/belt_MutableMapString.js index 50346ce2ce..2dc101173e 100644 --- a/lib/js/belt_MutableMapString.js +++ b/lib/js/belt_MutableMapString.js @@ -257,7 +257,7 @@ function update(t, x, f) { } function removeArrayMutateAux(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableQueue.js b/lib/js/belt_MutableQueue.js index da732e3ff8..4cf2358fb1 100644 --- a/lib/js/belt_MutableQueue.js +++ b/lib/js/belt_MutableQueue.js @@ -121,7 +121,7 @@ function copy(q) { }; let _prev; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (cell !== undefined) { @@ -152,7 +152,7 @@ function mapU(q, f) { }; let _prev; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (cell !== undefined) { @@ -191,7 +191,7 @@ function size(q) { function forEachU(q, f) { let _cell = q.first; - while(true) { + while (true) { let cell = _cell; if (cell === undefined) { return; @@ -211,7 +211,7 @@ function forEach(q, f) { function reduceU(q, accu, f) { let _accu = accu; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let accu$1 = _accu; if (cell === undefined) { @@ -249,7 +249,7 @@ function transfer(q1, q2) { } function fillAux(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; if (cell === undefined) { diff --git a/lib/js/belt_MutableSet.js b/lib/js/belt_MutableSet.js index eacc4238d5..51527d9924 100644 --- a/lib/js/belt_MutableSet.js +++ b/lib/js/belt_MutableSet.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len, cmp) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableSetInt.js b/lib/js/belt_MutableSetInt.js index 3ea3ee2eb9..3384bc69c6 100644 --- a/lib/js/belt_MutableSetInt.js +++ b/lib/js/belt_MutableSetInt.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableSetString.js b/lib/js/belt_MutableSetString.js index 20a6807c98..1ff837464f 100644 --- a/lib/js/belt_MutableSetString.js +++ b/lib/js/belt_MutableSetString.js @@ -52,7 +52,7 @@ function remove(d, v) { } function removeMany0(_t, xs, _i, len) { - while(true) { + while (true) { let i = _i; let t = _t; if (i >= len) { diff --git a/lib/js/belt_MutableStack.js b/lib/js/belt_MutableStack.js index aa95d97032..cfc6971efc 100644 --- a/lib/js/belt_MutableStack.js +++ b/lib/js/belt_MutableStack.js @@ -68,7 +68,7 @@ function size(s) { if (x !== undefined) { let _x = x; let _acc = 0; - while(true) { + while (true) { let acc = _acc; let x$1 = _x; let x$2 = x$1.tail; @@ -86,7 +86,7 @@ function size(s) { function forEachU(s, f) { let _s = s.root; - while(true) { + while (true) { let s$1 = _s; if (s$1 === undefined) { return; @@ -104,7 +104,7 @@ function forEach(s, f) { } function dynamicPopIterU(s, f) { - while(true) { + while (true) { let match = s.root; if (match === undefined) { return; diff --git a/lib/js/belt_Range.js b/lib/js/belt_Range.js index b8d9b91a7d..f169171631 100644 --- a/lib/js/belt_Range.js +++ b/lib/js/belt_Range.js @@ -14,7 +14,7 @@ function forEach(s, f, action) { } function everyU(_s, f, p) { - while(true) { + while (true) { let s = _s; if (s > f) { return true; @@ -36,7 +36,7 @@ function every(s, f, p) { function everyByU(s, f, step, p) { if (step > 0) { let _s = s; - while(true) { + while (true) { let s$1 = _s; if (s$1 > f) { return true; @@ -59,7 +59,7 @@ function everyBy(s, f, step, p) { } function someU(_s, f, p) { - while(true) { + while (true) { let s = _s; if (s > f) { return false; @@ -81,7 +81,7 @@ function some(s, f, p) { function someByU(s, f, step, p) { if (step > 0) { let _s = s; - while(true) { + while (true) { let s$1 = _s; if (s$1 > f) { return false; diff --git a/lib/js/belt_SortArray.js b/lib/js/belt_SortArray.js index 4e7077e05f..e331099e77 100644 --- a/lib/js/belt_SortArray.js +++ b/lib/js/belt_SortArray.js @@ -3,7 +3,7 @@ let Belt_Array = require("./belt_Array.js"); function sortedLengthAuxMore(xs, _prec, _acc, len, lt) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLengthU(xs, lt) { if (lt(x0, x1)) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -63,7 +63,7 @@ function isSortedU(a, cmp) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -91,7 +91,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -128,7 +128,7 @@ function unionU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -197,7 +197,7 @@ function intersectU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -252,7 +252,7 @@ function diffU(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs, cmp) let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -309,7 +309,7 @@ function insertionSort(src, srcofs, dst, dstofs, len, cmp) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && cmp(dst[j], e) > 0) { + while (j >= dstofs && cmp(dst[j], e) > 0) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -376,7 +376,7 @@ function binarySearchByU(sorted, key, cmp) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/js/belt_SortArrayInt.js b/lib/js/belt_SortArrayInt.js index b953e44a9b..32605fb67f 100644 --- a/lib/js/belt_SortArrayInt.js +++ b/lib/js/belt_SortArrayInt.js @@ -3,7 +3,7 @@ let Belt_Array = require("./belt_Array.js"); function sortedLengthAuxMore(xs, _prec, _acc, len) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLength(xs) { if (x0 < x1) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -57,7 +57,7 @@ function isSorted(a) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -79,7 +79,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -116,7 +116,7 @@ function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -178,7 +178,7 @@ function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -226,7 +226,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -276,7 +276,7 @@ function insertionSort(src, srcofs, dst, dstofs, len) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && dst[j] > e) { + while (j >= dstofs && dst[j] > e) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -329,7 +329,7 @@ function binarySearch(sorted, key) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/js/belt_SortArrayString.js b/lib/js/belt_SortArrayString.js index b953e44a9b..32605fb67f 100644 --- a/lib/js/belt_SortArrayString.js +++ b/lib/js/belt_SortArrayString.js @@ -3,7 +3,7 @@ let Belt_Array = require("./belt_Array.js"); function sortedLengthAuxMore(xs, _prec, _acc, len) { - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -29,7 +29,7 @@ function strictlySortedLength(xs) { if (x0 < x1) { let _prec = x1; let _acc = 2; - while(true) { + while (true) { let acc = _acc; let prec = _prec; if (acc >= len) { @@ -57,7 +57,7 @@ function isSorted(a) { } else { let _i = 0; let last_bound = len - 1 | 0; - while(true) { + while (true) { let i = _i; if (i === last_bound) { return true; @@ -79,7 +79,7 @@ function merge(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -116,7 +116,7 @@ function union(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -178,7 +178,7 @@ function intersect(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -226,7 +226,7 @@ function diff(src, src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs) { let _i2 = src2ofs; let _s2 = src2[src2ofs]; let _d = dstofs; - while(true) { + while (true) { let d = _d; let s2 = _s2; let i2 = _i2; @@ -276,7 +276,7 @@ function insertionSort(src, srcofs, dst, dstofs, len) { for (let i = 0; i < len; ++i) { let e = src[srcofs + i | 0]; let j = (dstofs + i | 0) - 1 | 0; - while(j >= dstofs && dst[j] > e) { + while (j >= dstofs && dst[j] > e) { dst[j + 1 | 0] = dst[j]; j = j - 1 | 0; }; @@ -329,7 +329,7 @@ function binarySearch(sorted, key) { } else { let _lo = 0; let _hi = len - 1 | 0; - while(true) { + while (true) { let hi$1 = _hi; let lo$1 = _lo; let mid = (lo$1 + hi$1 | 0) / 2 | 0; diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index 2d2cef3e81..4daf108b78 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -82,7 +82,7 @@ function bal(l, v, r) { } function min0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -108,7 +108,7 @@ function minUndefined(n) { } function max0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -148,7 +148,7 @@ function isEmpty(n) { } function stackAllLeft(_v, _s) { - while(true) { + while (true) { let s = _s; let v = _v; if (v === undefined) { @@ -164,7 +164,7 @@ function stackAllLeft(_v, _s) { } function forEachU(_n, f) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -183,7 +183,7 @@ function forEach(n, f) { } function reduceU(_s, _accu, f) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (s === undefined) { @@ -202,7 +202,7 @@ function reduce(s, accu, f) { } function everyU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return true; @@ -225,7 +225,7 @@ function every(n, p) { } function someU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -346,7 +346,7 @@ function size(n) { } function toListAux(_n, _accu) { - while(true) { + while (true) { let accu = _accu; let n = _n; if (n === undefined) { @@ -366,7 +366,7 @@ function toList(s) { } function checkInvariantInternal(_v) { - while(true) { + while (true) { let v = _v; if (v === undefined) { return; @@ -397,7 +397,7 @@ function checkInvariantInternal(_v) { } function fillArray(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.v; @@ -416,7 +416,7 @@ function fillArray(_n, _i, arr) { } function fillArrayWithPartition(_n, cursor, arr, p) { - while(true) { + while (true) { let n = _n; let v = n.v; let l = n.l; @@ -442,7 +442,7 @@ function fillArrayWithPartition(_n, cursor, arr, p) { } function fillArrayWithFilter(_n, _i, arr, p) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.v; @@ -613,7 +613,7 @@ function partitionCopy(n, p) { } function has(_t, x, cmp) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -634,7 +634,7 @@ function cmp(s1, s2, cmp$1) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -665,7 +665,7 @@ function eq(s1, s2, c) { } function subset(_s1, _s2, cmp) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -705,7 +705,7 @@ function subset(_s1, _s2, cmp) { } function get(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -721,7 +721,7 @@ function get(_n, x, cmp) { } function getUndefined(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -737,7 +737,7 @@ function getUndefined(_n, x, cmp) { } function getExn(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/js/belt_internalAVLtree.js b/lib/js/belt_internalAVLtree.js index fa0fc376ef..b99dd39242 100644 --- a/lib/js/belt_internalAVLtree.js +++ b/lib/js/belt_internalAVLtree.js @@ -104,7 +104,7 @@ function bal(l, x, d, r) { } function minKey0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -130,7 +130,7 @@ function minKeyUndefined(n) { } function maxKey0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -156,7 +156,7 @@ function maxKeyUndefined(n) { } function minKV0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.l; if (n$1 === undefined) { @@ -185,7 +185,7 @@ function minUndefined(n) { } function maxKV0Aux(_n) { - while(true) { + while (true) { let n = _n; let n$1 = n.r; if (n$1 === undefined) { @@ -229,7 +229,7 @@ function isEmpty(x) { } function stackAllLeft(_v, _s) { - while(true) { + while (true) { let s = _s; let v = _v; if (v === undefined) { @@ -275,7 +275,7 @@ function findFirstBy(n, p) { } function forEachU(_n, f) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -339,7 +339,7 @@ function mapWithKey(n, f) { } function reduceU(_m, _accu, f) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (m === undefined) { @@ -362,7 +362,7 @@ function reduce(m, accu, f) { } function everyU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return true; @@ -385,7 +385,7 @@ function every(n, p) { } function someU(_n, p) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -570,7 +570,7 @@ function size(n) { } function toListAux(_n, _accu) { - while(true) { + while (true) { let accu = _accu; let n = _n; if (n === undefined) { @@ -597,7 +597,7 @@ function toList(s) { } function checkInvariantInternal(_v) { - while(true) { + while (true) { let v = _v; if (v === undefined) { return; @@ -624,7 +624,7 @@ function checkInvariantInternal(_v) { } function fillArrayKey(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let v = n.k; @@ -643,7 +643,7 @@ function fillArrayKey(_n, _i, arr) { } function fillArrayValue(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let l = n.l; @@ -661,7 +661,7 @@ function fillArrayValue(_n, _i, arr) { } function fillArray(_n, _i, arr) { - while(true) { + while (true) { let i = _i; let n = _n; let l = n.l; @@ -806,7 +806,7 @@ function cmpU(s1, s2, kcmp, vcmp) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -848,7 +848,7 @@ function eqU(s1, s2, kcmp, veq) { if (len1 === len2) { let _e1 = stackAllLeft(s1, /* [] */0); let _e2 = stackAllLeft(s2, /* [] */0); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -878,7 +878,7 @@ function eq(s1, s2, kcmp, veq) { } function get(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -894,7 +894,7 @@ function get(_n, x, cmp) { } function getUndefined(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -910,7 +910,7 @@ function getUndefined(_n, x, cmp) { } function getExn(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -930,7 +930,7 @@ function getExn(_n, x, cmp) { } function getWithDefault(_n, x, def, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -946,7 +946,7 @@ function getWithDefault(_n, x, def, cmp) { } function has(_n, x, cmp) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; diff --git a/lib/js/belt_internalBuckets.js b/lib/js/belt_internalBuckets.js index 3737fb2ea6..d852fabb9b 100644 --- a/lib/js/belt_internalBuckets.js +++ b/lib/js/belt_internalBuckets.js @@ -4,7 +4,7 @@ let Belt_Array = require("./belt_Array.js"); let Caml_option = require("./caml_option.js"); function copyAuxCont(_c, _prec) { - while(true) { + while (true) { let prec = _prec; let c = _c; if (c === undefined) { @@ -54,7 +54,7 @@ function copy(x) { } function bucketLength(_accu, _buckets) { - while(true) { + while (true) { let buckets = _buckets; let accu = _accu; if (buckets === undefined) { @@ -67,7 +67,7 @@ function bucketLength(_accu, _buckets) { } function do_bucket_iter(f, _buckets) { - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -92,7 +92,7 @@ function forEach(h, f) { } function do_bucket_fold(f, _b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (b === undefined) { @@ -152,7 +152,7 @@ function logStats(h) { } function filterMapInplaceBucket(f, h, i, _prec, _cell) { - while(true) { + while (true) { let cell = _cell; let prec = _prec; let n = cell.next; @@ -204,7 +204,7 @@ function keepMapInPlace(h, f) { } function fillArray(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = [ @@ -222,7 +222,7 @@ function fillArray(_i, arr, _cell) { } function fillArrayMap(_i, arr, _cell, f) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = f(cell); diff --git a/lib/js/belt_internalBucketsType.js b/lib/js/belt_internalBucketsType.js index c71749141e..afd6d07891 100644 --- a/lib/js/belt_internalBucketsType.js +++ b/lib/js/belt_internalBucketsType.js @@ -2,7 +2,7 @@ function power_2_above(_x, n) { - while(true) { + while (true) { let x = _x; if (x >= n) { return x; diff --git a/lib/js/belt_internalMapInt.js b/lib/js/belt_internalMapInt.js index aebb05085e..f9527c89e5 100644 --- a/lib/js/belt_internalMapInt.js +++ b/lib/js/belt_internalMapInt.js @@ -22,7 +22,7 @@ function add(t, x, data) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -37,7 +37,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -52,7 +52,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -71,7 +71,7 @@ function getExn(_n, x) { } function getWithDefault(_n, x, def) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -86,7 +86,7 @@ function getWithDefault(_n, x, def) { } function has(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -215,7 +215,7 @@ function merge(s1, s2, f) { } function compareAux(_e1, _e2, vcmp) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -259,7 +259,7 @@ function cmp(s1, s2, f) { } function eqAux(_e1, _e2, eq) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { diff --git a/lib/js/belt_internalMapString.js b/lib/js/belt_internalMapString.js index 1c831cc587..4a797c0e76 100644 --- a/lib/js/belt_internalMapString.js +++ b/lib/js/belt_internalMapString.js @@ -22,7 +22,7 @@ function add(t, x, data) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -37,7 +37,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -52,7 +52,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.k; @@ -71,7 +71,7 @@ function getExn(_n, x) { } function getWithDefault(_n, x, def) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return def; @@ -86,7 +86,7 @@ function getWithDefault(_n, x, def) { } function has(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return false; @@ -215,7 +215,7 @@ function merge(s1, s2, f) { } function compareAux(_e1, _e2, vcmp) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -259,7 +259,7 @@ function cmp(s1, s2, f) { } function eqAux(_e1, _e2, eq) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { diff --git a/lib/js/belt_internalSetBuckets.js b/lib/js/belt_internalSetBuckets.js index fb38312c31..ca1846abb0 100644 --- a/lib/js/belt_internalSetBuckets.js +++ b/lib/js/belt_internalSetBuckets.js @@ -3,7 +3,7 @@ let Belt_Array = require("./belt_Array.js"); function copyAuxCont(_c, _prec) { - while(true) { + while (true) { let prec = _prec; let c = _c; if (c === undefined) { @@ -51,7 +51,7 @@ function copy(x) { } function bucketLength(_accu, _buckets) { - while(true) { + while (true) { let buckets = _buckets; let accu = _accu; if (buckets === undefined) { @@ -64,7 +64,7 @@ function bucketLength(_accu, _buckets) { } function doBucketIter(f, _buckets) { - while(true) { + while (true) { let buckets = _buckets; if (buckets === undefined) { return; @@ -89,7 +89,7 @@ function forEach(h, f) { } function fillArray(_i, arr, _cell) { - while(true) { + while (true) { let cell = _cell; let i = _i; arr[i] = cell.key; @@ -118,7 +118,7 @@ function toArray(h) { } function doBucketFold(f, _b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (b === undefined) { diff --git a/lib/js/belt_internalSetInt.js b/lib/js/belt_internalSetInt.js index f09d7ef232..d3f2032fe4 100644 --- a/lib/js/belt_internalSetInt.js +++ b/lib/js/belt_internalSetInt.js @@ -4,7 +4,7 @@ let Belt_SortArrayInt = require("./belt_SortArrayInt.js"); let Belt_internalAVLset = require("./belt_internalAVLset.js"); function has(_t, x) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -19,7 +19,7 @@ function has(_t, x) { } function compareAux(_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -62,7 +62,7 @@ function eq(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -101,7 +101,7 @@ function subset(_s1, _s2) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -116,7 +116,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -131,7 +131,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/js/belt_internalSetString.js b/lib/js/belt_internalSetString.js index dd13567a83..c6eee9cb8d 100644 --- a/lib/js/belt_internalSetString.js +++ b/lib/js/belt_internalSetString.js @@ -4,7 +4,7 @@ let Belt_internalAVLset = require("./belt_internalAVLset.js"); let Belt_SortArrayString = require("./belt_SortArrayString.js"); function has(_t, x) { - while(true) { + while (true) { let t = _t; if (t === undefined) { return false; @@ -19,7 +19,7 @@ function has(_t, x) { } function compareAux(_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (!e1) { @@ -62,7 +62,7 @@ function eq(s1, s2) { } function subset(_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (s1 === undefined) { @@ -101,7 +101,7 @@ function subset(_s1, _s2) { } function get(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -116,7 +116,7 @@ function get(_n, x) { } function getUndefined(_n, x) { - while(true) { + while (true) { let n = _n; if (n === undefined) { return; @@ -131,7 +131,7 @@ function getUndefined(_n, x) { } function getExn(_n, x) { - while(true) { + while (true) { let n = _n; if (n !== undefined) { let v = n.v; diff --git a/lib/js/buffer.js b/lib/js/buffer.js index 1841872741..2c3532cb5e 100644 --- a/lib/js/buffer.js +++ b/lib/js/buffer.js @@ -77,7 +77,7 @@ function reset(b) { function resize(b, more) { let len = b.length; let new_len = len; - while((b.position + more | 0) > new_len) { + while ((b.position + more | 0) > new_len) { new_len = (new_len << 1); }; let new_buffer = Caml_bytes.create(new_len); @@ -321,7 +321,7 @@ function advance_to_closing(opening, closing, k, s, start) { let _k = k; let _i = start; let lim = s.length; - while(true) { + while (true) { let i = _i; let k$1 = _k; if (i >= lim) { @@ -352,7 +352,7 @@ function advance_to_closing(opening, closing, k, s, start) { function advance_to_non_alpha(s, start) { let _i = start; let lim = s.length; - while(true) { + while (true) { let i = _i; if (i >= lim) { return lim; @@ -409,7 +409,7 @@ function add_substitute(b, f, s) { let lim = s.length; let _previous = /* ' ' */32; let _i = 0; - while(true) { + while (true) { let i = _i; let previous = _previous; if (i >= lim) { diff --git a/lib/js/bytes.js b/lib/js/bytes.js index 85daca5292..a530134631 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -86,7 +86,7 @@ function to_string(a) { return String.fromCharCode.apply(null, a); } let offset = 0; - while(s_len > 0) { + while (s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); for (let k = 0; k < next; ++k) { @@ -254,7 +254,7 @@ function ensure_ge(x, y) { } function sum_lengths(_acc, seplen, _param) { - while(true) { + while (true) { let param = _param; let acc = _acc; if (!param) { @@ -279,7 +279,7 @@ function concat(sep, param) { let dst = Caml_bytes.create(sum_lengths(0, seplen, param)); let _pos = 0; let _param = param; - while(true) { + while (true) { let param$1 = _param; let pos = _pos; if (!param$1) { @@ -319,11 +319,11 @@ function is_space(param) { function trim(s) { let len = s.length; let i = 0; - while(i < len && is_space(s[i])) { + while (i < len && is_space(s[i])) { i = i + 1 | 0; }; let j = len - 1 | 0; - while(j >= i && is_space(s[j])) { + while (j >= i && is_space(s[j])) { j = j - 1 | 0; }; if (j >= i) { @@ -488,7 +488,7 @@ function uncapitalize_ascii(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -510,7 +510,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -554,7 +554,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -588,7 +588,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index 85daca5292..a530134631 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -86,7 +86,7 @@ function to_string(a) { return String.fromCharCode.apply(null, a); } let offset = 0; - while(s_len > 0) { + while (s_len > 0) { let next = s_len < 1024 ? s_len : 1024; let tmp_bytes = new Array(next); for (let k = 0; k < next; ++k) { @@ -254,7 +254,7 @@ function ensure_ge(x, y) { } function sum_lengths(_acc, seplen, _param) { - while(true) { + while (true) { let param = _param; let acc = _acc; if (!param) { @@ -279,7 +279,7 @@ function concat(sep, param) { let dst = Caml_bytes.create(sum_lengths(0, seplen, param)); let _pos = 0; let _param = param; - while(true) { + while (true) { let param$1 = _param; let pos = _pos; if (!param$1) { @@ -319,11 +319,11 @@ function is_space(param) { function trim(s) { let len = s.length; let i = 0; - while(i < len && is_space(s[i])) { + while (i < len && is_space(s[i])) { i = i + 1 | 0; }; let j = len - 1 | 0; - while(j >= i && is_space(s[j])) { + while (j >= i && is_space(s[j])) { j = j - 1 | 0; }; if (j >= i) { @@ -488,7 +488,7 @@ function uncapitalize_ascii(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -510,7 +510,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -554,7 +554,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -588,7 +588,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/js/caml_array.js b/lib/js/caml_array.js index b2d67ce758..f8d009fc63 100644 --- a/lib/js/caml_array.js +++ b/lib/js/caml_array.js @@ -5,7 +5,7 @@ function sub(x, offset, len) { let result = new Array(len); let j = 0; let i = offset; - while(j < len) { + while (j < len) { result[j] = x[i]; j = j + 1 | 0; i = i + 1 | 0; @@ -14,7 +14,7 @@ function sub(x, offset, len) { } function len(_acc, _l) { - while(true) { + while (true) { let l = _l; let acc = _acc; if (!l) { @@ -27,7 +27,7 @@ function len(_acc, _l) { } function fill(arr, _i, _l) { - while(true) { + while (true) { let l = _l; let i = _i; if (!l) { @@ -37,7 +37,7 @@ function fill(arr, _i, _l) { let l$1 = x.length; let k = i; let j = 0; - while(j < l$1) { + while (j < l$1) { arr[k] = x[j]; k = k + 1 | 0; j = j + 1 | 0; diff --git a/lib/js/caml_bytes.js b/lib/js/caml_bytes.js index f4f17d1252..7c3abca3cc 100644 --- a/lib/js/caml_bytes.js +++ b/lib/js/caml_bytes.js @@ -42,7 +42,7 @@ function create(len) { } function bytes_compare_aux(s1, s2, _off, len, def) { - while(true) { + while (true) { let off = _off; if (off >= len) { return def; @@ -77,7 +77,7 @@ function bytes_equal(s1, s2) { let len2 = s2.length; if (len1 === len2) { let _off = 0; - while(true) { + while (true) { let off = _off; if (off === len1) { return true; diff --git a/lib/js/caml_format.js b/lib/js/caml_format.js index a83b12debb..e6af1c7f6e 100644 --- a/lib/js/caml_format.js +++ b/lib/js/caml_format.js @@ -142,7 +142,7 @@ function int_of_string(s) { }); } let aux = function (_acc, _k) { - while(true) { + while (true) { let k = _k; let acc = _acc; if (k === len) { @@ -232,7 +232,7 @@ function int64_of_string(s) { }); } let aux = function (_acc, _k) { - while(true) { + while (true) { let k = _k; let acc = _acc; if (k === len) { @@ -318,7 +318,7 @@ function parse_format(fmt) { conv: "f" }; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= len) { return f; @@ -412,7 +412,7 @@ function parse_format(fmt) { case 46 : f.prec = 0; let j = i + 1 | 0; - while((function () { + while ((function () { let w = fmt.codePointAt(j) - 48 | 0; return w >= 0 && w <= 9; })()) { @@ -451,7 +451,7 @@ function parse_format(fmt) { case 3 : f.width = 0; let j$1 = i; - while((function () { + while ((function () { let w = fmt.codePointAt(j$1) - 48 | 0; return w >= 0 && w <= 9; })()) { @@ -588,7 +588,7 @@ function oct_of_int64(x) { ], match[0]); let modulus = match[1]; s = cvtbl[Caml_int64.to_int32(modulus)] + s; - while(Caml.i64_neq(quotient, Caml_int64.zero)) { + while (Caml.i64_neq(quotient, Caml_int64.zero)) { let match$1 = Caml_int64.div_mod(quotient, wbase); quotient = match$1[0]; modulus = match$1[1]; @@ -599,7 +599,7 @@ function oct_of_int64(x) { let quotient$1 = match$2[0]; let modulus$1 = match$2[1]; s = cvtbl[Caml_int64.to_int32(modulus$1)] + s; - while(Caml.i64_neq(quotient$1, Caml_int64.zero)) { + while (Caml.i64_neq(quotient$1, Caml_int64.zero)) { let match$3 = Caml_int64.div_mod(quotient$1, wbase); quotient$1 = match$3[0]; modulus$1 = match$3[1]; @@ -668,7 +668,7 @@ function format_float(fmt, x) { let exp = Number(s.slice(j + 1 | 0)) | 0; if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { let i$1 = j - 1 | 0; - while(s.codePointAt(i$1) === /* '0' */48) { + while (s.codePointAt(i$1) === /* '0' */48) { i$1 = i$1 - 1 | 0; }; if (s.codePointAt(i$1) === /* '.' */46) { @@ -686,7 +686,7 @@ function format_float(fmt, x) { p = p - (exp + 1 | 0) | 0; s = x$1.toFixed(p); } else { - while((function () { + while ((function () { s = x$1.toFixed(p); return s.length > (prec$1 + 1 | 0); })()) { @@ -695,7 +695,7 @@ function format_float(fmt, x) { } if (p !== 0) { let k = s.length - 1 | 0; - while(s.codePointAt(k) === /* '0' */48) { + while (s.codePointAt(k) === /* '0' */48) { k = k - 1 | 0; }; if (s.codePointAt(k) === /* '.' */46) { diff --git a/lib/js/caml_hash.js b/lib/js/caml_hash.js index cf5d7ab1f2..0fbd07cb73 100644 --- a/lib/js/caml_hash.js +++ b/lib/js/caml_hash.js @@ -52,7 +52,7 @@ function hash(count, _limit, seed, obj) { let num = count; push_back(queue, obj); num = num - 1 | 0; - while(queue.length !== 0 && num > 0) { + while (queue.length !== 0 && num > 0) { let obj$1 = unsafe_pop(queue); if (typeof obj$1 === "number") { let u$1 = obj$1 | 0; diff --git a/lib/js/caml_int64.js b/lib/js/caml_int64.js index cd9c2c79b5..0c6b709be2 100644 --- a/lib/js/caml_int64.js +++ b/lib/js/caml_int64.js @@ -191,7 +191,7 @@ function is_zero(x) { } function mul(_this, _other) { - while(true) { + while (true) { let other = _other; let $$this = _this; let lo; @@ -374,7 +374,7 @@ function to_string(self) { } function div(_self, _other) { - while(true) { + while (true) { let other = _other; let self = _self; let self_hi = self[0]; @@ -455,14 +455,14 @@ function div(_self, _other) { } let res = zero; let rem$1 = self; - while(Caml.i64_ge(rem$1, other)) { + while (Caml.i64_ge(rem$1, other)) { let b = Math.floor(to_float(rem$1) / to_float(other)); let approx$1 = 1 > b ? 1 : b; let log2 = Math.ceil(Math.log(approx$1) / Math.LN2); let delta = log2 <= 48 ? 1 : Math.pow(2, log2 - 48); let approxRes = of_float(approx$1); let approxRem = mul(approxRes, other); - while(approxRem[0] < 0 || Caml.i64_gt(approxRem, rem$1)) { + while (approxRem[0] < 0 || Caml.i64_gt(approxRem, rem$1)) { approx$1 = approx$1 - delta; approxRes = of_float(approx$1); approxRem = mul(approxRes, other); diff --git a/lib/js/caml_obj.js b/lib/js/caml_obj.js index 7b027da14f..b63986fe90 100644 --- a/lib/js/caml_obj.js +++ b/lib/js/caml_obj.js @@ -157,7 +157,7 @@ function compare(a, b) { if (len_a === len_b) { if (Array.isArray(a)) { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len_a) { return 0; @@ -176,7 +176,7 @@ function compare(a, b) { } } else if (len_a < len_b) { let _i$1 = 0; - while(true) { + while (true) { let i$1 = _i$1; if (i$1 === len_a) { return -1; @@ -190,7 +190,7 @@ function compare(a, b) { }; } else { let _i$2 = 0; - while(true) { + while (true) { let i$2 = _i$2; if (i$2 === len_b) { return 1; @@ -299,7 +299,7 @@ function equal(a, b) { if (len_a === len_b) { if (Array.isArray(a)) { let _i = 0; - while(true) { + while (true) { let i = _i; if (i === len_a) { return true; diff --git a/lib/js/curry.js b/lib/js/curry.js index df8a8980c4..9344a34a72 100644 --- a/lib/js/curry.js +++ b/lib/js/curry.js @@ -3,7 +3,7 @@ let Caml_array = require("./caml_array.js"); function app(_f, _args) { - while(true) { + while (true) { let args = _args; let f = _f; let init_arity = f.length; diff --git a/lib/js/filename.js b/lib/js/filename.js index 13c43a6b24..fffc114c71 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -13,7 +13,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { return current_dir_name; } else { let _n = name.length - 1 | 0; - while(true) { + while (true) { let n = _n; if (n < 0) { return $$String.sub(name, 0, 1); @@ -21,7 +21,7 @@ function generic_basename(is_dir_sep, current_dir_name, name) { if (!is_dir_sep(name, n)) { let _n$1 = n; let p = n + 1 | 0; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 < 0) { return $$String.sub(name, 0, p); @@ -44,21 +44,21 @@ function generic_dirname(is_dir_sep, current_dir_name, name) { return current_dir_name; } else { let _n = name.length - 1 | 0; - while(true) { + while (true) { let n = _n; if (n < 0) { return $$String.sub(name, 0, 1); } if (!is_dir_sep(name, n)) { let _n$1 = n; - while(true) { + while (true) { let n$1 = _n$1; if (n$1 < 0) { return current_dir_name; } if (is_dir_sep(name, n$1)) { let _n$2 = n$1; - while(true) { + while (true) { let n$2 = _n$2; if (n$2 < 0) { return $$String.sub(name, 0, 1); @@ -216,7 +216,7 @@ function quote$1(s) { let b = Buffer.create(l + 20 | 0); Buffer.add_char(b, /* '"' */34); let loop = function (_i) { - while(true) { + while (true) { let i = _i; if (i === l) { return Buffer.add_char(b, /* '"' */34); @@ -234,7 +234,7 @@ function quote$1(s) { }; }; let loop_bs = function (_n, _i) { - while(true) { + while (true) { let i = _i; let n = _n; if (i === l) { @@ -394,14 +394,14 @@ function chop_suffix(name, suff) { function extension_len(name) { let _i = name.length - 1 | 0; - while(true) { + while (true) { let i = _i; if (i < 0 || is_dir_sep$2(name, i)) { return 0; } if (Caml_string.get(name, i) === /* '.' */46) { let _i$1 = i - 1 | 0; - while(true) { + while (true) { let i$1 = _i$1; if (i$1 < 0 || is_dir_sep$2(name, i$1)) { return 0; diff --git a/lib/js/genlex.js b/lib/js/genlex.js index c1da97a6d6..29a5181539 100644 --- a/lib/js/genlex.js +++ b/lib/js/genlex.js @@ -85,7 +85,7 @@ function make_lexer(keywords) { } }; let next_token = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return; @@ -271,7 +271,7 @@ function make_lexer(keywords) { Stream.junk(strm__); reset_buffer(); store(c); - while(true) { + while (true) { let c$3 = Stream.peek(strm__); if (c$3 === undefined) { return ident_or_keyword(get_string()); @@ -313,7 +313,7 @@ function make_lexer(keywords) { }; }; let ident2 = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return ident_or_keyword(get_string()); @@ -381,7 +381,7 @@ function make_lexer(keywords) { }; }; let number = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c !== undefined) { if (c >= 58) { @@ -401,7 +401,7 @@ function make_lexer(keywords) { } else { Stream.junk(strm__); store(/* '.' */46); - while(true) { + while (true) { let c$1 = Stream.peek(strm__); if (c$1 !== undefined) { if (c$1 > 101 || c$1 < 69) { @@ -442,7 +442,7 @@ function make_lexer(keywords) { } }; let end_exponent_part = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c === undefined) { return { @@ -462,7 +462,7 @@ function make_lexer(keywords) { }; }; let string = function (strm__) { - while(true) { + while (true) { let c = Stream.peek(strm__); if (c !== undefined) { if (c !== 34) { @@ -605,7 +605,7 @@ function make_lexer(keywords) { } }; let comment = function (strm__) { - while(true) { + while (true) { let match = Stream.peek(strm__); if (match !== undefined) { switch (match) { @@ -629,7 +629,7 @@ function make_lexer(keywords) { }); case 42 : Stream.junk(strm__); - while(true) { + while (true) { let match$2 = Stream.peek(strm__); if (match$2 !== undefined) { if (match$2 !== 41) { diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index 1673b9df8c..2f3ef459b2 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -43,7 +43,7 @@ let prng = CamlinternalLazy.from_fun(function () { }); function power_2_above(_x, n) { - while(true) { + while (true) { let x = _x; if (x >= n) { return x; @@ -95,7 +95,7 @@ function copy_bucketlist(param) { let data = param.data; let next = param.next; let loop = function (_prec, _param) { - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -163,7 +163,7 @@ function resize(indexfun, h) { let inplace = h.initial_size >= 0; h.data = ndata; let insert_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -228,7 +228,7 @@ function remove(h, key) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -293,7 +293,7 @@ function find(h, key) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -344,7 +344,7 @@ function find_opt(h, key) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -363,7 +363,7 @@ function find_opt(h, key) { function find_all(h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -385,7 +385,7 @@ function find_all(h, key) { } function replace_bucket(key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -424,7 +424,7 @@ function replace(h, key, data) { function mem(h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -441,7 +441,7 @@ function mem(h, key) { function iter(f, h) { let do_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -482,7 +482,7 @@ function iter(f, h) { } function filter_map_inplace_bucket(f, h, i, _prec, _param) { - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -540,7 +540,7 @@ function filter_map_inplace(f, h) { function fold(f, h, init) { let do_bucket = function (_b, _accu) { - while(true) { + while (true) { let accu = _accu; let b = _b; if (typeof b !== "object") { @@ -582,7 +582,7 @@ function fold(f, h, init) { } function bucket_length(_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -635,7 +635,7 @@ function MakeSeeded(H) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -699,7 +699,7 @@ function MakeSeeded(H) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -749,7 +749,7 @@ function MakeSeeded(H) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -767,7 +767,7 @@ function MakeSeeded(H) { }; let find_all = function (h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -788,7 +788,7 @@ function MakeSeeded(H) { return find_in_bucket(Caml_array.get(h.data, key_index(h, key))); }; let replace_bucket = function (key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -825,7 +825,7 @@ function MakeSeeded(H) { }; let mem = function (h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -883,7 +883,7 @@ function Make(H) { let i = key_index(h, key); let _prec = "Empty"; let _param = Caml_array.get(h.data, i); - while(true) { + while (true) { let param = _param; let prec = _prec; if (typeof param !== "object") { @@ -947,7 +947,7 @@ function Make(H) { return d3; } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -997,7 +997,7 @@ function Make(H) { return Caml_option.some(d3); } else { let _param = next3; - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1015,7 +1015,7 @@ function Make(H) { }; let find_all = function (h, key) { let find_in_bucket = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return /* [] */0; @@ -1036,7 +1036,7 @@ function Make(H) { return find_in_bucket(Caml_array.get(h.data, key_index(h, key))); }; let replace_bucket = function (key, data, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1073,7 +1073,7 @@ function Make(H) { }; let mem = function (h, key) { let _param = Caml_array.get(h.data, key_index(h, key)); - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; diff --git a/lib/js/js_dict.js b/lib/js/js_dict.js index 574683fc13..00f8ce1321 100644 --- a/lib/js/js_dict.js +++ b/lib/js/js_dict.js @@ -40,7 +40,7 @@ function values(dict) { function fromList(entries) { let dict = {}; let _x = entries; - while(true) { + while (true) { let x = _x; if (!x) { return dict; diff --git a/lib/js/list.js b/lib/js/list.js index 033c5376c2..382f7a802d 100644 --- a/lib/js/list.js +++ b/lib/js/list.js @@ -7,7 +7,7 @@ let Caml_option = require("./caml_option.js"); function length(l) { let _len = 0; let _param = l; - while(true) { + while (true) { let param = _param; let len = _len; if (!param) { @@ -61,7 +61,7 @@ function nth(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (l$1) { @@ -92,7 +92,7 @@ function nth_opt(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (!l$1) { @@ -108,7 +108,7 @@ function nth_opt(l, n) { } function rev_append(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -128,7 +128,7 @@ function rev(l) { } function init_tailrec_aux(_acc, _i, n, f) { - while(true) { + while (true) { let i = _i; let acc = _acc; if (i >= n) { @@ -207,7 +207,7 @@ function mapi$1(f, l) { function rev_map(f, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -223,7 +223,7 @@ function rev_map(f, l) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -237,7 +237,7 @@ function iter(f, _param) { function iteri(f, l) { let _i = 0; let _param = l; - while(true) { + while (true) { let param = _param; let i = _i; if (!param) { @@ -251,7 +251,7 @@ function iteri(f, l) { } function fold_left(f, _accu, _l) { - while(true) { + while (true) { let l = _l; let accu = _accu; if (!l) { @@ -302,7 +302,7 @@ function rev_map2(f, l1, l2) { let _accu = /* [] */0; let _l1 = l1; let _l2 = l2; - while(true) { + while (true) { let l2$1 = _l2; let l1$1 = _l1; let accu = _accu; @@ -336,7 +336,7 @@ function rev_map2(f, l1, l2) { } function iter2(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -366,7 +366,7 @@ function iter2(f, _l1, _l2) { } function fold_left2(f, _accu, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; let accu = _accu; @@ -420,7 +420,7 @@ function fold_right2(f, l1, l2, accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return true; @@ -434,7 +434,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -448,7 +448,7 @@ function exists(p, _param) { } function for_all2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -480,7 +480,7 @@ function for_all2(p, _l1, _l2) { } function exists2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -512,7 +512,7 @@ function exists2(p, _l1, _l2) { } function mem(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -526,7 +526,7 @@ function mem(x, _param) { } function memq(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -540,7 +540,7 @@ function memq(x, _param) { } function assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -559,7 +559,7 @@ function assoc(x, _param) { } function assoc_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -574,7 +574,7 @@ function assoc_opt(x, _param) { } function assq(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -593,7 +593,7 @@ function assq(x, _param) { } function assq_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -608,7 +608,7 @@ function assq_opt(x, _param) { } function mem_assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -622,7 +622,7 @@ function mem_assoc(x, _param) { } function mem_assq(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -668,7 +668,7 @@ function remove_assq(x, param) { } function find(p, _param) { - while(true) { + while (true) { let param = _param; if (param) { let x = param.hd; @@ -687,7 +687,7 @@ function find(p, _param) { } function find_opt(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -704,7 +704,7 @@ function find_opt(p, _param) { function find_all(p, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -729,7 +729,7 @@ function partition(p, l) { let _yes = /* [] */0; let _no = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let no = _no; let yes = _yes; @@ -831,7 +831,7 @@ function merge(cmp, l1, l2) { } function chop(_k, _l) { - while(true) { + while (true) { let l = _l; let k = _k; if (k === 0) { @@ -974,7 +974,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1120,7 +1120,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1348,7 +1348,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1579,7 +1579,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1628,7 +1628,7 @@ function sort_uniq(cmp, l) { } function compare_lengths(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1648,7 +1648,7 @@ function compare_lengths(_l1, _l2) { } function compare_length_with(_l, _n) { - while(true) { + while (true) { let n = _n; let l = _l; if (!l) { diff --git a/lib/js/listLabels.js b/lib/js/listLabels.js index 287a2c0f3a..e70418f020 100644 --- a/lib/js/listLabels.js +++ b/lib/js/listLabels.js @@ -7,7 +7,7 @@ let Caml_option = require("./caml_option.js"); function length(l) { let _len = 0; let _param = l; - while(true) { + while (true) { let param = _param; let len = _len; if (!param) { @@ -61,7 +61,7 @@ function nth(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (l$1) { @@ -92,7 +92,7 @@ function nth_opt(l, n) { } let _l = l; let _n = n; - while(true) { + while (true) { let n$1 = _n; let l$1 = _l; if (!l$1) { @@ -108,7 +108,7 @@ function nth_opt(l, n) { } function rev_append(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -128,7 +128,7 @@ function rev(l) { } function init_tailrec_aux(_acc, _i, n, f) { - while(true) { + while (true) { let i = _i; let acc = _acc; if (i >= n) { @@ -207,7 +207,7 @@ function mapi$1(f, l) { function rev_map(f, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -223,7 +223,7 @@ function rev_map(f, l) { } function iter(f, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -237,7 +237,7 @@ function iter(f, _param) { function iteri(f, l) { let _i = 0; let _param = l; - while(true) { + while (true) { let param = _param; let i = _i; if (!param) { @@ -251,7 +251,7 @@ function iteri(f, l) { } function fold_left(f, _accu, _l) { - while(true) { + while (true) { let l = _l; let accu = _accu; if (!l) { @@ -302,7 +302,7 @@ function rev_map2(f, l1, l2) { let _accu = /* [] */0; let _l1 = l1; let _l2 = l2; - while(true) { + while (true) { let l2$1 = _l2; let l1$1 = _l1; let accu = _accu; @@ -336,7 +336,7 @@ function rev_map2(f, l1, l2) { } function iter2(f, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -366,7 +366,7 @@ function iter2(f, _l1, _l2) { } function fold_left2(f, _accu, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; let accu = _accu; @@ -420,7 +420,7 @@ function fold_right2(f, l1, l2, accu) { } function for_all(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return true; @@ -434,7 +434,7 @@ function for_all(p, _param) { } function exists(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return false; @@ -448,7 +448,7 @@ function exists(p, _param) { } function for_all2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -480,7 +480,7 @@ function for_all2(p, _l1, _l2) { } function exists2(p, _l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (l1) { @@ -512,7 +512,7 @@ function exists2(p, _l1, _l2) { } function mem(x, _set) { - while(true) { + while (true) { let set = _set; if (!set) { return false; @@ -526,7 +526,7 @@ function mem(x, _set) { } function memq(x, _set) { - while(true) { + while (true) { let set = _set; if (!set) { return false; @@ -540,7 +540,7 @@ function memq(x, _set) { } function assoc(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -559,7 +559,7 @@ function assoc(x, _param) { } function assoc_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -574,7 +574,7 @@ function assoc_opt(x, _param) { } function assq(x, _param) { - while(true) { + while (true) { let param = _param; if (param) { let match = param.hd; @@ -593,7 +593,7 @@ function assq(x, _param) { } function assq_opt(x, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -608,7 +608,7 @@ function assq_opt(x, _param) { } function mem_assoc(x, _map) { - while(true) { + while (true) { let map = _map; if (!map) { return false; @@ -622,7 +622,7 @@ function mem_assoc(x, _map) { } function mem_assq(x, _map) { - while(true) { + while (true) { let map = _map; if (!map) { return false; @@ -668,7 +668,7 @@ function remove_assq(x, param) { } function find(p, _param) { - while(true) { + while (true) { let param = _param; if (param) { let x = param.hd; @@ -687,7 +687,7 @@ function find(p, _param) { } function find_opt(p, _param) { - while(true) { + while (true) { let param = _param; if (!param) { return; @@ -704,7 +704,7 @@ function find_opt(p, _param) { function find_all(p, l) { let _accu = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let accu = _accu; if (!param) { @@ -729,7 +729,7 @@ function partition(p, l) { let _yes = /* [] */0; let _no = /* [] */0; let _param = l; - while(true) { + while (true) { let param = _param; let no = _no; let yes = _yes; @@ -831,7 +831,7 @@ function merge(cmp, l1, l2) { } function chop(_k, _l) { - while(true) { + while (true) { let l = _l; let k = _k; if (k === 0) { @@ -974,7 +974,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1120,7 +1120,7 @@ function stable_sort(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1348,7 +1348,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1579,7 +1579,7 @@ function sort_uniq(cmp, l) { let _l1 = s1; let _l2 = s2; let _accu = /* [] */0; - while(true) { + while (true) { let accu = _accu; let l2$1 = _l2; let l1 = _l1; @@ -1628,7 +1628,7 @@ function sort_uniq(cmp, l) { } function compare_lengths(_l1, _l2) { - while(true) { + while (true) { let l2 = _l2; let l1 = _l1; if (!l1) { @@ -1648,7 +1648,7 @@ function compare_lengths(_l1, _l2) { } function compare_length_with(_l, _n) { - while(true) { + while (true) { let n = _n; let l = _l; if (!l) { diff --git a/lib/js/map.js b/lib/js/map.js index cd35da063b..2699f8f726 100644 --- a/lib/js/map.js +++ b/lib/js/map.js @@ -151,7 +151,7 @@ function Make(funarg) { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -169,7 +169,7 @@ function Make(funarg) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -183,7 +183,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -209,7 +209,7 @@ function Make(funarg) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -219,7 +219,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -245,7 +245,7 @@ function Make(funarg) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -259,7 +259,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -285,7 +285,7 @@ function Make(funarg) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -295,7 +295,7 @@ function Make(funarg) { let _v0 = v; let _d0 = param.d; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let d0 = _d0; let v0 = _v0; @@ -321,7 +321,7 @@ function Make(funarg) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -335,7 +335,7 @@ function Make(funarg) { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -349,7 +349,7 @@ function Make(funarg) { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -370,7 +370,7 @@ function Make(funarg) { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -387,7 +387,7 @@ function Make(funarg) { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -408,7 +408,7 @@ function Make(funarg) { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -533,7 +533,7 @@ function Make(funarg) { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -578,7 +578,7 @@ function Make(funarg) { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -590,7 +590,7 @@ function Make(funarg) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -606,7 +606,7 @@ function Make(funarg) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -816,7 +816,7 @@ function Make(funarg) { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -836,7 +836,7 @@ function Make(funarg) { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -865,7 +865,7 @@ function Make(funarg) { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -897,7 +897,7 @@ function Make(funarg) { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/lib/js/mapLabels.js b/lib/js/mapLabels.js index 466d54c7fa..2c62802bc7 100644 --- a/lib/js/mapLabels.js +++ b/lib/js/mapLabels.js @@ -151,7 +151,7 @@ function Make(Ord) { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -169,7 +169,7 @@ function Make(Ord) { }; }; let find_first_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -191,7 +191,7 @@ function Make(Ord) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -209,7 +209,7 @@ function Make(Ord) { }; }; let find_first_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -231,7 +231,7 @@ function Make(Ord) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -245,7 +245,7 @@ function Make(Ord) { }; }; let find_last_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -267,7 +267,7 @@ function Make(Ord) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -285,7 +285,7 @@ function Make(Ord) { }; }; let find_last_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -307,7 +307,7 @@ function Make(Ord) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -321,7 +321,7 @@ function Make(Ord) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -335,7 +335,7 @@ function Make(Ord) { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -349,7 +349,7 @@ function Make(Ord) { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -370,7 +370,7 @@ function Make(Ord) { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -387,7 +387,7 @@ function Make(Ord) { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -408,7 +408,7 @@ function Make(Ord) { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -533,7 +533,7 @@ function Make(Ord) { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -578,7 +578,7 @@ function Make(Ord) { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -590,7 +590,7 @@ function Make(Ord) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -606,7 +606,7 @@ function Make(Ord) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -816,7 +816,7 @@ function Make(Ord) { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -836,7 +836,7 @@ function Make(Ord) { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -865,7 +865,7 @@ function Make(Ord) { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -897,7 +897,7 @@ function Make(Ord) { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { diff --git a/lib/js/moreLabels.js b/lib/js/moreLabels.js index baee384c01..48346f2288 100644 --- a/lib/js/moreLabels.js +++ b/lib/js/moreLabels.js @@ -181,7 +181,7 @@ let $$Map = { } }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -199,7 +199,7 @@ let $$Map = { }; }; let find_first_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -221,7 +221,7 @@ let $$Map = { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -239,7 +239,7 @@ let $$Map = { }; }; let find_first_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -261,7 +261,7 @@ let $$Map = { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -275,7 +275,7 @@ let $$Map = { }; }; let find_last_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -297,7 +297,7 @@ let $$Map = { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -315,7 +315,7 @@ let $$Map = { }; }; let find_last_opt_aux = function (_v0, _d0, f, _param) { - while(true) { + while (true) { let param = _param; let d0 = _d0; let v0 = _v0; @@ -337,7 +337,7 @@ let $$Map = { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -351,7 +351,7 @@ let $$Map = { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -365,7 +365,7 @@ let $$Map = { }; }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -379,7 +379,7 @@ let $$Map = { }; }; let min_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -400,7 +400,7 @@ let $$Map = { }; }; let min_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -417,7 +417,7 @@ let $$Map = { }; }; let max_binding = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -438,7 +438,7 @@ let $$Map = { }; }; let max_binding_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -563,7 +563,7 @@ let $$Map = { } }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -608,7 +608,7 @@ let $$Map = { }; }; let fold = function (f, _m, _accu) { - while(true) { + while (true) { let accu = _accu; let m = _m; if (typeof m !== "object") { @@ -620,7 +620,7 @@ let $$Map = { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -636,7 +636,7 @@ let $$Map = { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -846,7 +846,7 @@ let $$Map = { } }; let cons_enum = function (_m, _e) { - while(true) { + while (true) { let e = _e; let m = _m; if (typeof m !== "object") { @@ -866,7 +866,7 @@ let $$Map = { let compare = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -895,7 +895,7 @@ let $$Map = { let equal = function (cmp, m1, m2) { let _e1 = cons_enum(m1, "End"); let _e2 = cons_enum(m2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -927,7 +927,7 @@ let $$Map = { } }; let bindings_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1144,7 +1144,7 @@ let $$Set = { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1162,7 +1162,7 @@ let $$Set = { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1176,7 +1176,7 @@ let $$Set = { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1194,7 +1194,7 @@ let $$Set = { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1283,7 +1283,7 @@ let $$Set = { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1383,7 +1383,7 @@ let $$Set = { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -1400,7 +1400,7 @@ let $$Set = { }; }; let compare_aux = function (_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -1429,7 +1429,7 @@ let $$Set = { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -1479,7 +1479,7 @@ let $$Set = { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1491,7 +1491,7 @@ let $$Set = { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -1503,7 +1503,7 @@ let $$Set = { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -1519,7 +1519,7 @@ let $$Set = { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -1589,7 +1589,7 @@ let $$Set = { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -1607,7 +1607,7 @@ let $$Set = { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1626,7 +1626,7 @@ let $$Set = { }; }; let find_first_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1643,7 +1643,7 @@ let $$Set = { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1661,7 +1661,7 @@ let $$Set = { }; }; let find_first_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1678,7 +1678,7 @@ let $$Set = { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1692,7 +1692,7 @@ let $$Set = { }; }; let find_last_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1709,7 +1709,7 @@ let $$Set = { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -1727,7 +1727,7 @@ let $$Set = { }; }; let find_last_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -1744,7 +1744,7 @@ let $$Set = { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -1758,7 +1758,7 @@ let $$Set = { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/js/parsing.js b/lib/js/parsing.js index 7196d6756f..81fe0e8f05 100644 --- a/lib/js/parsing.js +++ b/lib/js/parsing.js @@ -74,7 +74,7 @@ function yyparse(tables, start, lexer, lexbuf) { try { let _cmd = "Start"; let _arg; - while(true) { + while (true) { let arg = _arg; let cmd = _cmd; let match = Caml_parser.parse_engine(tables, env, cmd, arg); @@ -165,7 +165,7 @@ function peek_val(env, n) { function symbol_start_pos() { let _i = env.rule_len; - while(true) { + while (true) { let i = _i; if (i <= 0) { return Caml_array.get(env.symb_end_stack, env.asp); diff --git a/lib/js/pervasives.js b/lib/js/pervasives.js index 376bea7a60..0b2da39ac6 100644 --- a/lib/js/pervasives.js +++ b/lib/js/pervasives.js @@ -120,7 +120,7 @@ function int_of_string_opt(s) { function valid_float_lexem(s) { let l = s.length; let _i = 0; - while(true) { + while (true) { let i = _i; if (i >= l) { return s + "."; diff --git a/lib/js/queue.js b/lib/js/queue.js index ca975f36f1..d61c7884b7 100644 --- a/lib/js/queue.js +++ b/lib/js/queue.js @@ -76,7 +76,7 @@ function copy(q) { }; let _prev = "Nil"; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let prev = _prev; if (typeof cell !== "object") { @@ -110,7 +110,7 @@ function length(q) { function iter(f, q) { let _cell = q.first; - while(true) { + while (true) { let cell = _cell; if (typeof cell !== "object") { return; @@ -125,7 +125,7 @@ function iter(f, q) { function fold(f, accu, q) { let _accu = accu; let _cell = q.first; - while(true) { + while (true) { let cell = _cell; let accu$1 = _accu; if (typeof cell !== "object") { diff --git a/lib/js/random.js b/lib/js/random.js index d8909c2f6a..4206c66b3d 100644 --- a/lib/js/random.js +++ b/lib/js/random.js @@ -82,7 +82,7 @@ function int(s, bound) { } }); } - while(true) { + while (true) { let r = bits(s); let v = r % bound; if ((r - v | 0) <= ((1073741823 - bound | 0) + 1 | 0)) { @@ -101,7 +101,7 @@ function int32(s, bound) { } }); } - while(true) { + while (true) { let b1 = bits(s); let b2 = ((bits(s) & 1) << 30); let r = b1 | b2; @@ -122,7 +122,7 @@ function int64(s, bound) { } }); } - while(true) { + while (true) { let b1 = Caml_int64.of_int32(bits(s)); let b2 = Caml_int64.lsl_(Caml_int64.of_int32(bits(s)), 30); let b3 = Caml_int64.lsl_(Caml_int64.of_int32(bits(s) & 7), 60); diff --git a/lib/js/set.js b/lib/js/set.js index de2d6b2629..a2ff33a255 100644 --- a/lib/js/set.js +++ b/lib/js/set.js @@ -160,7 +160,7 @@ function Make(funarg) { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -178,7 +178,7 @@ function Make(funarg) { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -192,7 +192,7 @@ function Make(funarg) { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -210,7 +210,7 @@ function Make(funarg) { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -290,7 +290,7 @@ function Make(funarg) { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -396,7 +396,7 @@ function Make(funarg) { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -415,7 +415,7 @@ function Make(funarg) { let compare = function (s1, s2) { let _e1 = cons_enum(s1, "End"); let _e2 = cons_enum(s2, "End"); - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -441,7 +441,7 @@ function Make(funarg) { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -491,7 +491,7 @@ function Make(funarg) { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -503,7 +503,7 @@ function Make(funarg) { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -515,7 +515,7 @@ function Make(funarg) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -531,7 +531,7 @@ function Make(funarg) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -601,7 +601,7 @@ function Make(funarg) { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -619,7 +619,7 @@ function Make(funarg) { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -638,7 +638,7 @@ function Make(funarg) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -651,7 +651,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -672,7 +672,7 @@ function Make(funarg) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -681,7 +681,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.l; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -702,7 +702,7 @@ function Make(funarg) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -715,7 +715,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -736,7 +736,7 @@ function Make(funarg) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -745,7 +745,7 @@ function Make(funarg) { if (f(v)) { let _v0 = v; let _param$1 = param.r; - while(true) { + while (true) { let param$1 = _param$1; let v0 = _v0; if (typeof param$1 !== "object") { @@ -766,7 +766,7 @@ function Make(funarg) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/js/setLabels.js b/lib/js/setLabels.js index 9cbf5ee04b..92134ee0be 100644 --- a/lib/js/setLabels.js +++ b/lib/js/setLabels.js @@ -160,7 +160,7 @@ function Make(Ord) { } }; let min_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -178,7 +178,7 @@ function Make(Ord) { }; }; let min_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -192,7 +192,7 @@ function Make(Ord) { }; }; let max_elt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -210,7 +210,7 @@ function Make(Ord) { }; }; let max_elt_opt = function (_param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -299,7 +299,7 @@ function Make(Ord) { } }; let mem = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -399,7 +399,7 @@ function Make(Ord) { } }; let cons_enum = function (_s, _e) { - while(true) { + while (true) { let e = _e; let s = _s; if (typeof s !== "object") { @@ -416,7 +416,7 @@ function Make(Ord) { }; }; let compare_aux = function (_e1, _e2) { - while(true) { + while (true) { let e2 = _e2; let e1 = _e1; if (typeof e1 !== "object") { @@ -445,7 +445,7 @@ function Make(Ord) { return compare(s1, s2) === 0; }; let subset = function (_s1, _s2) { - while(true) { + while (true) { let s2 = _s2; let s1 = _s1; if (typeof s1 !== "object") { @@ -495,7 +495,7 @@ function Make(Ord) { }; }; let iter = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -507,7 +507,7 @@ function Make(Ord) { }; }; let fold = function (f, _s, _accu) { - while(true) { + while (true) { let accu = _accu; let s = _s; if (typeof s !== "object") { @@ -519,7 +519,7 @@ function Make(Ord) { }; }; let for_all = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return true; @@ -535,7 +535,7 @@ function Make(Ord) { }; }; let exists = function (p, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return false; @@ -605,7 +605,7 @@ function Make(Ord) { } }; let elements_aux = function (_accu, _param) { - while(true) { + while (true) { let param = _param; let accu = _accu; if (typeof param !== "object") { @@ -623,7 +623,7 @@ function Make(Ord) { return elements_aux(/* [] */0, s); }; let find = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -642,7 +642,7 @@ function Make(Ord) { }; }; let find_first_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -659,7 +659,7 @@ function Make(Ord) { }; }; let find_first = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -677,7 +677,7 @@ function Make(Ord) { }; }; let find_first_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -694,7 +694,7 @@ function Make(Ord) { }; }; let find_first_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -708,7 +708,7 @@ function Make(Ord) { }; }; let find_last_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -725,7 +725,7 @@ function Make(Ord) { }; }; let find_last = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { @@ -743,7 +743,7 @@ function Make(Ord) { }; }; let find_last_opt_aux = function (_v0, f, _param) { - while(true) { + while (true) { let param = _param; let v0 = _v0; if (typeof param !== "object") { @@ -760,7 +760,7 @@ function Make(Ord) { }; }; let find_last_opt = function (f, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; @@ -774,7 +774,7 @@ function Make(Ord) { }; }; let find_opt = function (x, _param) { - while(true) { + while (true) { let param = _param; if (typeof param !== "object") { return; diff --git a/lib/js/sort.js b/lib/js/sort.js index 09f4fcf718..27a30f77e2 100644 --- a/lib/js/sort.js +++ b/lib/js/sort.js @@ -72,7 +72,7 @@ function list(order, l) { } }; let _param = initlist(l); - while(true) { + while (true) { let param = _param; if (!param) { return /* [] */0; @@ -93,7 +93,7 @@ function swap(arr, i, j) { function array(cmp, arr) { let qsort = function (_lo, _hi) { - while(true) { + while (true) { let hi = _hi; let lo = _lo; if ((hi - lo | 0) < 6) { @@ -121,11 +121,11 @@ function array(cmp, arr) { } }); } - while(i < j) { - while(!cmp(pivot, arr[i])) { + while (i < j) { + while (!cmp(pivot, arr[i])) { i = i + 1 | 0; }; - while(!cmp(arr[j], pivot)) { + while (!cmp(arr[j], pivot)) { j = j - 1 | 0; }; if (i < j) { @@ -150,7 +150,7 @@ function array(cmp, arr) { if (!cmp(arr[i - 1 | 0], val_i)) { arr[i] = arr[i - 1 | 0]; let j = i - 1 | 0; - while(j >= 1 && !cmp(arr[j - 1 | 0], val_i)) { + while (j >= 1 && !cmp(arr[j - 1 | 0], val_i)) { arr[j] = arr[j - 1 | 0]; j = j - 1 | 0; }; diff --git a/lib/js/stream.js b/lib/js/stream.js index c8db66eb78..add189353e 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -28,7 +28,7 @@ function data(param) { } function get_data(count, _d) { - while(true) { + while (true) { let d = _d; if (typeof d !== "object") { return d; @@ -100,7 +100,7 @@ function get_data(count, _d) { } function peek_data(s) { - while(true) { + while (true) { let f = s.data; if (typeof f !== "object") { return; @@ -152,7 +152,7 @@ function peek(param) { } function junk_data(s) { - while(true) { + while (true) { let g = s.data; if (typeof g === "object") { switch (g.TAG) { @@ -259,7 +259,7 @@ function empty(s) { function iter(f, strm) { let do_rec = function () { - while(true) { + while (true) { let a = peek(strm); if (a === undefined) { return; diff --git a/lib/js/string.js b/lib/js/string.js index 205f91ce08..4a51be4c0e 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -56,7 +56,7 @@ function trim(s) { function escaped(s) { let needs_escape = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= s.length) { return false; @@ -87,7 +87,7 @@ function escaped(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -109,7 +109,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -153,7 +153,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -187,7 +187,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index 41296e6022..52d2761851 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -58,7 +58,7 @@ function trim(s) { function escaped(s) { let needs_escape = function (_i) { - while(true) { + while (true) { let i = _i; if (i >= s.length) { return false; @@ -89,7 +89,7 @@ function escaped(s) { } function index_rec(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { throw new Error("Not_found", { @@ -111,7 +111,7 @@ function index(s, c) { } function index_rec_opt(s, lim, _i, c) { - while(true) { + while (true) { let i = _i; if (i >= lim) { return; @@ -155,7 +155,7 @@ function index_from_opt(s, i, c) { } function rindex_rec(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { throw new Error("Not_found", { @@ -189,7 +189,7 @@ function rindex_from(s, i, c) { } function rindex_rec_opt(s, _i, c) { - while(true) { + while (true) { let i = _i; if (i < 0) { return; From 82ee6e93ece33b1cef2d26df077b338c3f5a2db3 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:10:36 +0400 Subject: [PATCH 10/18] Reduce tabulation of switch case items --- jscomp/core/js_dump.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 843133f378..df026fb3e4 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -248,7 +248,6 @@ let debugger_nl f = let break_nl f = P.string f L.break; - P.space f; semi f; P.newline f @@ -432,7 +431,7 @@ and pp_one_case_clause : (switch_case, ({ switch_body; should_break; comment } : J.case_clause)) -> let cxt = P.group f 1 (fun _ -> - P.group f 1 (fun _ -> + P.group f 0 (fun _ -> P.string f L.case; P.space f; pp_comment_option f comment; @@ -440,7 +439,7 @@ and pp_one_case_clause : (* could be integer or string *) P.space f; P.string f L.colon); - P.group f 1 (fun _ -> + P.group f 0 (fun _ -> let cxt = match switch_body with | [] -> cxt From 789992c8f26630d509fec40910ba37a7918a0492 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:10:44 +0400 Subject: [PATCH 11/18] Commit tests output --- jscomp/test/UntaggedVariants.js | 112 +- jscomp/test/adt_optimize_test.js | 74 +- jscomp/test/arith_lexer.js | 48 +- jscomp/test/arith_syntax.js | 14 +- jscomp/test/arity_infer.js | 32 +- jscomp/test/bb.js | 18 +- jscomp/test/bdd.js | 24 +- jscomp/test/big_enum.js | 1200 ++++----- jscomp/test/compare_test.js | 54 +- jscomp/test/complete_parmatch_test.js | 6 +- jscomp/test/complex_if_test.js | 60 +- jscomp/test/const_test.js | 6 +- jscomp/test/ext_bytes_test.js | 60 +- jscomp/test/gpr_1438.js | 10 +- jscomp/test/gpr_1698_test.js | 212 +- jscomp/test/gpr_2413_test.js | 16 +- jscomp/test/gpr_2642_test.js | 16 +- jscomp/test/gpr_2931_test.js | 12 +- jscomp/test/gpr_3209_test.js | 4 +- jscomp/test/gpr_4069_test.js | 6 +- jscomp/test/gpr_4639_test.js | 12 +- jscomp/test/int_switch_test.js | 20 +- jscomp/test/js_json_test.js | 196 +- jscomp/test/mario_game.js | 2858 +++++++++++----------- jscomp/test/miss_colon_test.js | 64 +- jscomp/test/mock_mt.js | 112 +- jscomp/test/mt.js | 60 +- jscomp/test/number_lexer.js | 60 +- jscomp/test/ocaml_re_test.js | 2046 ++++++++-------- jscomp/test/offset.js | 102 +- jscomp/test/rbset.js | 96 +- jscomp/test/reasonReactRouter.js | 6 +- jscomp/test/rec_module_test.js | 102 +- jscomp/test/record_regression.js | 40 +- jscomp/test/set_gen.js | 102 +- jscomp/test/sexpm.js | 70 +- jscomp/test/simplify_lambda_632o.js | 16 +- jscomp/test/stream_parser_test.js | 86 +- jscomp/test/string_test.js | 32 +- jscomp/test/stringmatch_test.js | 282 +-- jscomp/test/switch_case_test.js | 8 +- jscomp/test/switch_string.js | 4 +- jscomp/test/test_bug.js | 36 +- jscomp/test/test_incomplete.js | 4 +- jscomp/test/test_ramification.js | 16 +- jscomp/test/test_set.js | 102 +- jscomp/test/test_simple_pattern_match.js | 10 +- jscomp/test/test_string.js | 4 +- jscomp/test/test_string_case.js | 4 +- jscomp/test/test_string_switch.js | 8 +- jscomp/test/test_switch.js | 8 +- jscomp/test/ticker.js | 214 +- jscomp/test/topsort_test.js | 102 +- jscomp/test/typeof_test.js | 16 +- jscomp/test/variant.js | 18 +- jscomp/test/variantsMatching.js | 70 +- lib/es6/arg.js | 304 +-- lib/es6/belt_internalAVLset.js | 76 +- lib/es6/belt_internalAVLtree.js | 108 +- lib/es6/bytes.js | 60 +- lib/es6/bytesLabels.js | 60 +- lib/es6/caml_format.js | 338 +-- lib/es6/caml_module.js | 24 +- lib/es6/caml_obj.js | 58 +- lib/es6/char.js | 40 +- lib/es6/curry.js | 392 +-- lib/es6/filename.js | 56 +- lib/es6/genlex.js | 298 +-- lib/es6/js_json.js | 20 +- lib/es6/js_types.js | 18 +- lib/es6/moreLabels.js | 102 +- lib/es6/parsing.js | 84 +- lib/es6/pervasives.js | 8 +- lib/es6/set.js | 102 +- lib/es6/setLabels.js | 102 +- lib/es6/stream.js | 206 +- lib/js/arg.js | 304 +-- lib/js/belt_internalAVLset.js | 76 +- lib/js/belt_internalAVLtree.js | 108 +- lib/js/bytes.js | 60 +- lib/js/bytesLabels.js | 60 +- lib/js/caml_format.js | 338 +-- lib/js/caml_module.js | 24 +- lib/js/caml_obj.js | 58 +- lib/js/char.js | 40 +- lib/js/curry.js | 392 +-- lib/js/filename.js | 56 +- lib/js/genlex.js | 298 +-- lib/js/js_json.js | 20 +- lib/js/js_types.js | 18 +- lib/js/moreLabels.js | 102 +- lib/js/parsing.js | 84 +- lib/js/pervasives.js | 8 +- lib/js/set.js | 102 +- lib/js/setLabels.js | 102 +- lib/js/stream.js | 206 +- 96 files changed, 6941 insertions(+), 6941 deletions(-) diff --git a/jscomp/test/UntaggedVariants.js b/jscomp/test/UntaggedVariants.js index fc4bad2165..784dea0d4c 100644 --- a/jscomp/test/UntaggedVariants.js +++ b/jscomp/test/UntaggedVariants.js @@ -116,23 +116,23 @@ function classify$3(x) { if (typeof x !== "object" && typeof x !== "number" && (x === "C" || x === "B" || x === "A" || x === "D")) { switch (x) { case "A" : - return "a"; + return "a"; case "B" : - return "b"; + return "b"; case "C" : - return "c"; + return "c"; case "D" : - return "d"; + return "d"; } } else { switch (typeof x) { case "string" : - return "string"; + return "string"; case "number" : - return "int"; + return "int"; case "object" : - return "Object" + x.name; + return "Object" + x.name; } } @@ -145,11 +145,11 @@ let MultipleBlocks = { function classify$4(x) { switch (typeof x) { case "string" : - return "string"; + return "string"; case "number" : - return "int"; + return "int"; case "object" : - return "Object" + x.name; + return "Object" + x.name; } } @@ -164,11 +164,11 @@ function classify$5(x) { } switch (typeof x) { case "string" : - return "string"; + return "string"; case "number" : - return "int"; + return "int"; case "object" : - return "Object" + x.name; + return "Object" + x.name; } } @@ -181,11 +181,11 @@ function classify$6(x) { if (!Array.isArray(x) && (x === null || typeof x !== "object") && typeof x !== "number" && typeof x !== "string") { switch (x) { case false : - return "JSONFalse"; + return "JSONFalse"; case true : - return "JSONTrue"; + return "JSONTrue"; case null : - return "JSONNull"; + return "JSONNull"; } } else { @@ -197,20 +197,20 @@ function classify$6(x) { } switch (typeof x) { case "string" : - return { - TAG: "JSONString", - _0: x - }; + return { + TAG: "JSONString", + _0: x + }; case "number" : - return { - TAG: "JSONNumber", - _0: x - }; + return { + TAG: "JSONNumber", + _0: x + }; case "object" : - return { - TAG: "JSONObject", - _0: x - }; + return { + TAG: "JSONObject", + _0: x + }; } } @@ -246,11 +246,11 @@ function checkEnum(e) { } switch (e) { case "One" : - return "One!"; + return "One!"; case "Two" : - return "Two"; + return "Two"; case "Three" : - return "Threeeee"; + return "Threeeee"; } } @@ -265,11 +265,11 @@ function checkEnum$1(e) { } switch (e) { case 1.0 : - return "One!"; + return "One!"; case "Two" : - return "Two"; + return "Two"; case "Three" : - return "Threeeee"; + return "Threeeee"; } } @@ -284,11 +284,11 @@ function checkEnum$2(e) { } switch (e) { case null : - return "One!"; + return "One!"; case "Two" : - return "Two"; + return "Two"; case "Three" : - return "Threeeee"; + return "Threeeee"; } } @@ -370,9 +370,9 @@ function classify$9(v) { } switch (typeof v) { case "object" : - return v.x; + return v.x; case "function" : - return v(3); + return v(3); } } @@ -466,9 +466,9 @@ async function getUserName(u) { } switch (typeof u) { case "object" : - return u.name; + return u.name; case "string" : - return u; + return u; } } @@ -480,7 +480,7 @@ async function awaitUser(u) { switch (typeof u) { case "object" : case "string" : - return "dummy"; + return "dummy"; } } @@ -511,11 +511,11 @@ async function classify$10(a) { } switch (typeof a) { case "string" : - console.log(a); - return; + console.log(a); + return; case "object" : - console.log(a.userName); - return; + console.log(a.userName); + return; } } @@ -554,11 +554,11 @@ async function classifyAll(t) { } switch (typeof t) { case "string" : - console.log(t); - return; + console.log(t); + return; case "object" : - console.log(t.userName); - return; + console.log(t.userName); + return; } } @@ -570,11 +570,11 @@ let AllInstanceofTypes = { function test(t) { switch (typeof t) { case "object" : - return Js_dict.get(t, "Hello"); + return Js_dict.get(t, "Hello"); case "string" : - return t; + return t; case "function" : - return t(); + return t(); } } @@ -596,9 +596,9 @@ function should_not_merge(x) { } switch (typeof x) { case "boolean" : - return "boolean"; + return "boolean"; case "object" : - return "do not merge"; + return "do not merge"; } } @@ -613,7 +613,7 @@ function can_merge(x) { switch (typeof x) { case "boolean" : case "object" : - return "merge"; + return "merge"; } } diff --git a/jscomp/test/adt_optimize_test.js b/jscomp/test/adt_optimize_test.js index 6d6f16665b..09e9ce06ac 100644 --- a/jscomp/test/adt_optimize_test.js +++ b/jscomp/test/adt_optimize_test.js @@ -5,11 +5,11 @@ function f(x) { switch (x) { case "A" : - return 1; + return 1; case "B" : - return 2; + return 2; case "C" : - return 3; + return 3; } } @@ -17,11 +17,11 @@ function f(x) { function f_0(x) { switch (x) { case "A" : - return -1; + return -1; case "B" : - return 0; + return 0; case "C" : - return 1; + return 1; } } @@ -32,11 +32,11 @@ function f2(x) { } switch (x) { case 0 : - return "T000"; + return "T000"; case 1 : - return "T001"; + return "T001"; case 2 : - return "T002"; + return "T002"; } } @@ -44,15 +44,15 @@ function f2(x) { function f3(x) { switch (x) { case "X0" : - return "Y0"; + return "Y0"; case "X1" : - return "Y1"; + return "Y1"; case "X2" : - return "Y2"; + return "Y2"; case "X3" : - return "Y3"; + return "Y3"; case "X4" : - return "Y4"; + return "Y4"; } } @@ -65,20 +65,20 @@ function f5(x) { if (typeof x !== "object") { switch (x) { case "A" : - return 1; + return 1; case "B" : - return 3; + return 3; case "F" : - return 4; + return 4; } } else { switch (x.TAG) { case "C" : case "D" : - return 1; + return 1; case "E" : - return 2; + return 2; } } @@ -91,9 +91,9 @@ function f6(x) { switch (x) { case "A" : case "B" : - return 0; + return 0; case "F" : - return 2; + return 2; } } @@ -102,21 +102,21 @@ function f7(x) { if (typeof x !== "object") { switch (x) { case "A" : - return 1; + return 1; case "B" : - return 2; + return 2; case "F" : - return -1; + return -1; } } else { switch (x.TAG) { case "C" : - return 3; + return 3; case "D" : - return 4; + return 4; case "E" : - return -1; + return -1; } } @@ -127,7 +127,7 @@ function f8(x) { switch (x) { case "T60" : case "T61" : - return 1; + return 1; default: return 3; } @@ -135,7 +135,7 @@ function f8(x) { switch (x.TAG) { case "T64" : case "T65" : - return 2; + return 2; default: return 3; } @@ -153,10 +153,10 @@ function f9(x) { switch (x.TAG) { case "T64" : case "T65" : - return 2; + return 2; case "T66" : case "T68" : - return 3; + return 3; } } @@ -165,23 +165,23 @@ function f10(x) { if (typeof x !== "object") { switch (x) { case "T60" : - return 0; + return 0; case "T61" : - return 2; + return 2; case "T62" : - return 4; + return 4; case "T63" : - return 1; + return 1; } } else { switch (x.TAG) { case "T64" : case "T65" : - return 2; + return 2; case "T66" : case "T68" : - return 3; + return 3; } } diff --git a/jscomp/test/arith_lexer.js b/jscomp/test/arith_lexer.js index e95d4163ab..2ad17d1058 100644 --- a/jscomp/test/arith_lexer.js +++ b/jscomp/test/arith_lexer.js @@ -124,32 +124,32 @@ function __ocaml_lex_lexeme_rec(lexbuf, ___ocaml_lex_state) { let __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - ___ocaml_lex_state = 0; - continue; + ___ocaml_lex_state = 0; + continue; case 1 : - return { - TAG: "NUMERAL", - _0: Caml_format.int_of_string(Lexing.lexeme(lexbuf)) - }; + return { + TAG: "NUMERAL", + _0: Caml_format.int_of_string(Lexing.lexeme(lexbuf)) + }; case 2 : - return { - TAG: "IDENT", - _0: Lexing.lexeme(lexbuf) - }; + return { + TAG: "IDENT", + _0: Lexing.lexeme(lexbuf) + }; case 3 : - return "PLUS"; + return "PLUS"; case 4 : - return "MINUS"; + return "MINUS"; case 5 : - return "TIMES"; + return "TIMES"; case 6 : - return "DIVIDE"; + return "DIVIDE"; case 7 : - return "LPAREN"; + return "LPAREN"; case 8 : - return "RPAREN"; + return "RPAREN"; case 9 : - return "EOF"; + return "EOF"; default: lexbuf.refill_buff(lexbuf); ___ocaml_lex_state = __ocaml_lex_state$1; @@ -165,19 +165,19 @@ function lexeme(lexbuf) { function str(e) { switch (e.TAG) { case "Numeral" : - return Pervasives.string_of_float(e._0); + return Pervasives.string_of_float(e._0); case "Plus" : - return str(e._0) + ("+" + str(e._1)); + return str(e._0) + ("+" + str(e._1)); case "Minus" : - return str(e._0) + ("-" + str(e._1)); + return str(e._0) + ("-" + str(e._1)); case "Times" : - return str(e._0) + ("*" + str(e._1)); + return str(e._0) + ("*" + str(e._1)); case "Divide" : - return str(e._0) + ("/" + str(e._1)); + return str(e._0) + ("/" + str(e._1)); case "Negate" : - return "-" + str(e._0); + return "-" + str(e._0); case "Variable" : - return e._0; + return e._0; } } diff --git a/jscomp/test/arith_syntax.js b/jscomp/test/arith_syntax.js index 1847109dfd..84b5dea5dc 100644 --- a/jscomp/test/arith_syntax.js +++ b/jscomp/test/arith_syntax.js @@ -6,19 +6,19 @@ let Pervasives = require("../../lib/js/pervasives.js"); function str(e) { switch (e.TAG) { case "Numeral" : - return Pervasives.string_of_float(e._0); + return Pervasives.string_of_float(e._0); case "Plus" : - return str(e._0) + ("+" + str(e._1)); + return str(e._0) + ("+" + str(e._1)); case "Minus" : - return str(e._0) + ("-" + str(e._1)); + return str(e._0) + ("-" + str(e._1)); case "Times" : - return str(e._0) + ("*" + str(e._1)); + return str(e._0) + ("*" + str(e._1)); case "Divide" : - return str(e._0) + ("/" + str(e._1)); + return str(e._0) + ("/" + str(e._1)); case "Negate" : - return "-" + str(e._0); + return "-" + str(e._0); case "Variable" : - return e._0; + return e._0; } } diff --git a/jscomp/test/arity_infer.js b/jscomp/test/arity_infer.js index e79d4a0c52..da4b18233c 100644 --- a/jscomp/test/arity_infer.js +++ b/jscomp/test/arity_infer.js @@ -31,25 +31,25 @@ function f3(x) { let tmp; switch (x) { case 0 : - tmp = (function (x) { - return x + 1 | 0; - }); - break; + tmp = (function (x) { + return x + 1 | 0; + }); + break; case 1 : - tmp = (function (x) { - return x + 2 | 0; - }); - break; + tmp = (function (x) { + return x + 2 | 0; + }); + break; case 2 : - tmp = (function (x) { - return x + 3 | 0; - }); - break; + tmp = (function (x) { + return x + 3 | 0; + }); + break; case 3 : - tmp = (function (x) { - return x + 4 | 0; - }); - break; + tmp = (function (x) { + return x + 4 | 0; + }); + break; default: throw new Error("Not_found", { cause: { diff --git a/jscomp/test/bb.js b/jscomp/test/bb.js index 0ad98406be..7986a2505d 100644 --- a/jscomp/test/bb.js +++ b/jscomp/test/bb.js @@ -15,11 +15,11 @@ function f(x) { function ff(x) { switch (x) { case "a" : - return "a"; + return "a"; case "b" : - return "b"; + return "b"; case "c" : - return "c"; + return "c"; default: throw new Error("Assert_failure", { cause: { @@ -38,14 +38,14 @@ function test(x) { let match; switch (x) { case "a" : - match = "a"; - break; + match = "a"; + break; case "b" : - match = "b"; - break; + match = "b"; + break; case "c" : - match = "c"; - break; + match = "c"; + break; default: throw new Error("Assert_failure", { cause: { diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index 3d70f70835..59e4d5c833 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -272,14 +272,14 @@ function and2(n1, n2) { let f; switch (match) { case "LESS" : - f = mkNode(and2(l1, n2), v1, and2(r1, n2)); - break; + f = mkNode(and2(l1, n2), v1, and2(r1, n2)); + break; case "EQUAL" : - f = mkNode(and2(l1, l2), v1, and2(r1, r2)); - break; + f = mkNode(and2(l1, l2), v1, and2(r1, r2)); + break; case "GREATER" : - f = mkNode(and2(n1, l2), v2, and2(n1, r2)); - break; + f = mkNode(and2(n1, l2), v2, and2(n1, r2)); + break; } Caml_array.set(andslot1, h, i1); @@ -319,14 +319,14 @@ function xor(n1, n2) { let f; switch (match) { case "LESS" : - f = mkNode(xor(l1, n2), v1, xor(r1, n2)); - break; + f = mkNode(xor(l1, n2), v1, xor(r1, n2)); + break; case "EQUAL" : - f = mkNode(xor(l1, l2), v1, xor(r1, r2)); - break; + f = mkNode(xor(l1, l2), v1, xor(r1, r2)); + break; case "GREATER" : - f = mkNode(xor(n1, l2), v2, xor(n1, r2)); - break; + f = mkNode(xor(n1, l2), v2, xor(n1, r2)); + break; } Caml_array.set(andslot1, h, i1); diff --git a/jscomp/test/big_enum.js b/jscomp/test/big_enum.js index c1d5ed7922..a51c5d164b 100644 --- a/jscomp/test/big_enum.js +++ b/jscomp/test/big_enum.js @@ -5,605 +5,605 @@ function to_enum(x) { switch (x) { case "A0" : - return 0; + return 0; case "A1" : - return 1; + return 1; case "A2" : - return 2; + return 2; case "A3" : - return 3; + return 3; case "A4" : - return 4; + return 4; case "A5" : - return 5; + return 5; case "A6" : - return 6; + return 6; case "A7" : - return 7; + return 7; case "A8" : - return 8; + return 8; case "A9" : - return 9; + return 9; case "A10" : - return 10; + return 10; case "A11" : - return 11; + return 11; case "A12" : - return 12; + return 12; case "A13" : - return 13; + return 13; case "A14" : - return 14; + return 14; case "A15" : - return 15; + return 15; case "A16" : - return 16; + return 16; case "A17" : - return 17; + return 17; case "A18" : - return 18; + return 18; case "A19" : - return 19; + return 19; case "A20" : - return 20; + return 20; case "A21" : - return 21; + return 21; case "A22" : - return 22; + return 22; case "A23" : - return 23; + return 23; case "A24" : - return 24; + return 24; case "A25" : - return 25; + return 25; case "A26" : - return 26; + return 26; case "A27" : - return 27; + return 27; case "A28" : - return 28; + return 28; case "A29" : - return 29; + return 29; case "A30" : - return 30; + return 30; case "A31" : - return 31; + return 31; case "A32" : - return 32; + return 32; case "A33" : - return 33; + return 33; case "A34" : - return 34; + return 34; case "A35" : - return 35; + return 35; case "A36" : - return 36; + return 36; case "A37" : - return 37; + return 37; case "A38" : - return 38; + return 38; case "A39" : - return 39; + return 39; case "A40" : - return 40; + return 40; case "A41" : - return 41; + return 41; case "A42" : - return 42; + return 42; case "A43" : - return 43; + return 43; case "A44" : - return 44; + return 44; case "A45" : - return 45; + return 45; case "A46" : - return 46; + return 46; case "A47" : - return 47; + return 47; case "A48" : - return 48; + return 48; case "A49" : - return 49; + return 49; case "A50" : - return 50; + return 50; case "A51" : - return 51; + return 51; case "A52" : - return 52; + return 52; case "A53" : - return 53; + return 53; case "A54" : - return 54; + return 54; case "A55" : - return 55; + return 55; case "A56" : - return 56; + return 56; case "A57" : - return 57; + return 57; case "A58" : - return 58; + return 58; case "A59" : - return 59; + return 59; case "A60" : - return 60; + return 60; case "A61" : - return 61; + return 61; case "A62" : - return 62; + return 62; case "A63" : - return 63; + return 63; case "A64" : - return 64; + return 64; case "A65" : - return 65; + return 65; case "A66" : - return 66; + return 66; case "A67" : - return 67; + return 67; case "A68" : - return 68; + return 68; case "A69" : - return 69; + return 69; case "A70" : - return 70; + return 70; case "A71" : - return 71; + return 71; case "A72" : - return 72; + return 72; case "A73" : - return 73; + return 73; case "A74" : - return 74; + return 74; case "A75" : - return 75; + return 75; case "A76" : - return 76; + return 76; case "A77" : - return 77; + return 77; case "A78" : - return 78; + return 78; case "A79" : - return 79; + return 79; case "A80" : - return 80; + return 80; case "A81" : - return 81; + return 81; case "A82" : - return 82; + return 82; case "A83" : - return 83; + return 83; case "A84" : - return 84; + return 84; case "A85" : - return 85; + return 85; case "A86" : - return 86; + return 86; case "A87" : - return 87; + return 87; case "A88" : - return 88; + return 88; case "A89" : - return 89; + return 89; case "A90" : - return 90; + return 90; case "A91" : - return 91; + return 91; case "A92" : - return 92; + return 92; case "A93" : - return 93; + return 93; case "A94" : - return 94; + return 94; case "A95" : - return 95; + return 95; case "A96" : - return 96; + return 96; case "A97" : - return 97; + return 97; case "A98" : - return 98; + return 98; case "A99" : - return 99; + return 99; case "A100" : - return 100; + return 100; case "A101" : - return 101; + return 101; case "A102" : - return 102; + return 102; case "A103" : - return 103; + return 103; case "A104" : - return 104; + return 104; case "A105" : - return 105; + return 105; case "A106" : - return 106; + return 106; case "A107" : - return 107; + return 107; case "A108" : - return 108; + return 108; case "A109" : - return 109; + return 109; case "A110" : - return 110; + return 110; case "A111" : - return 111; + return 111; case "A112" : - return 112; + return 112; case "A113" : - return 113; + return 113; case "A114" : - return 114; + return 114; case "A115" : - return 115; + return 115; case "A116" : - return 116; + return 116; case "A117" : - return 117; + return 117; case "A118" : - return 118; + return 118; case "A119" : - return 119; + return 119; case "A120" : - return 120; + return 120; case "A121" : - return 121; + return 121; case "A122" : - return 122; + return 122; case "A123" : - return 123; + return 123; case "A124" : - return 124; + return 124; case "A125" : - return 125; + return 125; case "A126" : - return 126; + return 126; case "A127" : - return 127; + return 127; case "A128" : - return 128; + return 128; case "A129" : - return 129; + return 129; case "A130" : - return 130; + return 130; case "A131" : - return 131; + return 131; case "A132" : - return 132; + return 132; case "A133" : - return 133; + return 133; case "A134" : - return 134; + return 134; case "A135" : - return 135; + return 135; case "A136" : - return 136; + return 136; case "A137" : - return 137; + return 137; case "A138" : - return 138; + return 138; case "A139" : - return 139; + return 139; case "A140" : - return 140; + return 140; case "A141" : - return 141; + return 141; case "A142" : - return 142; + return 142; case "A143" : - return 143; + return 143; case "A144" : - return 144; + return 144; case "A145" : - return 145; + return 145; case "A146" : - return 146; + return 146; case "A147" : - return 147; + return 147; case "A148" : - return 148; + return 148; case "A149" : - return 149; + return 149; case "A150" : - return 150; + return 150; case "A151" : - return 151; + return 151; case "A152" : - return 152; + return 152; case "A153" : - return 153; + return 153; case "A154" : - return 154; + return 154; case "A155" : - return 155; + return 155; case "A156" : - return 156; + return 156; case "A157" : - return 157; + return 157; case "A158" : - return 158; + return 158; case "A159" : - return 159; + return 159; case "A160" : - return 160; + return 160; case "A161" : - return 161; + return 161; case "A162" : - return 162; + return 162; case "A163" : - return 163; + return 163; case "A164" : - return 164; + return 164; case "A165" : - return 165; + return 165; case "A166" : - return 166; + return 166; case "A167" : - return 167; + return 167; case "A168" : - return 168; + return 168; case "A169" : - return 169; + return 169; case "A170" : - return 170; + return 170; case "A171" : - return 171; + return 171; case "A172" : - return 172; + return 172; case "A173" : - return 173; + return 173; case "A174" : - return 174; + return 174; case "A175" : - return 175; + return 175; case "A176" : - return 176; + return 176; case "A177" : - return 177; + return 177; case "A178" : - return 178; + return 178; case "A179" : - return 179; + return 179; case "A180" : - return 180; + return 180; case "A181" : - return 181; + return 181; case "A182" : - return 182; + return 182; case "A183" : - return 183; + return 183; case "A184" : - return 184; + return 184; case "A185" : - return 185; + return 185; case "A186" : - return 186; + return 186; case "A187" : - return 187; + return 187; case "A188" : - return 188; + return 188; case "A189" : - return 189; + return 189; case "A190" : - return 190; + return 190; case "A191" : - return 191; + return 191; case "A192" : - return 192; + return 192; case "A193" : - return 193; + return 193; case "A194" : - return 194; + return 194; case "A195" : - return 195; + return 195; case "A196" : - return 196; + return 196; case "A197" : - return 197; + return 197; case "A198" : - return 198; + return 198; case "A199" : - return 199; + return 199; case "A200" : - return 200; + return 200; case "A201" : - return 201; + return 201; case "A202" : - return 202; + return 202; case "A203" : - return 203; + return 203; case "A204" : - return 204; + return 204; case "A205" : - return 205; + return 205; case "A206" : - return 206; + return 206; case "A207" : - return 207; + return 207; case "A208" : - return 208; + return 208; case "A209" : - return 209; + return 209; case "A210" : - return 210; + return 210; case "A211" : - return 211; + return 211; case "A212" : - return 212; + return 212; case "A213" : - return 213; + return 213; case "A214" : - return 214; + return 214; case "A215" : - return 215; + return 215; case "A216" : - return 216; + return 216; case "A217" : - return 217; + return 217; case "A218" : - return 218; + return 218; case "A219" : - return 219; + return 219; case "A220" : - return 220; + return 220; case "A221" : - return 221; + return 221; case "A222" : - return 222; + return 222; case "A223" : - return 223; + return 223; case "A224" : - return 224; + return 224; case "A225" : - return 225; + return 225; case "A226" : - return 226; + return 226; case "A227" : - return 227; + return 227; case "A228" : - return 228; + return 228; case "A229" : - return 229; + return 229; case "A230" : - return 230; + return 230; case "A231" : - return 231; + return 231; case "A232" : - return 232; + return 232; case "A233" : - return 233; + return 233; case "A234" : - return 234; + return 234; case "A235" : - return 235; + return 235; case "A236" : - return 236; + return 236; case "A237" : - return 237; + return 237; case "A238" : - return 238; + return 238; case "A239" : - return 239; + return 239; case "A240" : - return 240; + return 240; case "A241" : - return 241; + return 241; case "A242" : - return 242; + return 242; case "A243" : - return 243; + return 243; case "A244" : - return 244; + return 244; case "A245" : - return 245; + return 245; case "A246" : - return 246; + return 246; case "A247" : - return 247; + return 247; case "A248" : - return 248; + return 248; case "A249" : - return 249; + return 249; case "A250" : - return 250; + return 250; case "A251" : - return 251; + return 251; case "A252" : - return 252; + return 252; case "A253" : - return 253; + return 253; case "A254" : - return 254; + return 254; case "A255" : - return 255; + return 255; case "A256" : - return 256; + return 256; case "A257" : - return 257; + return 257; case "A258" : - return 258; + return 258; case "A259" : - return 259; + return 259; case "A260" : - return 260; + return 260; case "A261" : - return 261; + return 261; case "A262" : - return 262; + return 262; case "A263" : - return 263; + return 263; case "A264" : - return 264; + return 264; case "A265" : - return 265; + return 265; case "A266" : - return 266; + return 266; case "A267" : - return 267; + return 267; case "A268" : - return 268; + return 268; case "A269" : - return 269; + return 269; case "A270" : - return 270; + return 270; case "A271" : - return 271; + return 271; case "A272" : - return 272; + return 272; case "A273" : - return 273; + return 273; case "A274" : - return 274; + return 274; case "A275" : - return 275; + return 275; case "A276" : - return 276; + return 276; case "A277" : - return 277; + return 277; case "A278" : - return 278; + return 278; case "A279" : - return 279; + return 279; case "A280" : - return 280; + return 280; case "A281" : - return 281; + return 281; case "A282" : - return 282; + return 282; case "A283" : - return 283; + return 283; case "A284" : - return 284; + return 284; case "A285" : - return 285; + return 285; case "A286" : - return 286; + return 286; case "A287" : - return 287; + return 287; case "A288" : - return 288; + return 288; case "A289" : - return 289; + return 289; case "A290" : - return 290; + return 290; case "A291" : - return 291; + return 291; case "A292" : - return 292; + return 292; case "A293" : - return 293; + return 293; case "A294" : - return 294; + return 294; case "A295" : - return 295; + return 295; case "A296" : - return 296; + return 296; case "A297" : - return 297; + return 297; case "A298" : - return 298; + return 298; case "A299" : - return 299; + return 299; } } @@ -611,605 +611,605 @@ function to_enum(x) { function to_string(x) { switch (x) { case "A0" : - return "A0"; + return "A0"; case "A1" : - return "A1"; + return "A1"; case "A2" : - return "A2"; + return "A2"; case "A3" : - return "A3"; + return "A3"; case "A4" : - return "A4"; + return "A4"; case "A5" : - return "A5"; + return "A5"; case "A6" : - return "A6"; + return "A6"; case "A7" : - return "A7"; + return "A7"; case "A8" : - return "A8"; + return "A8"; case "A9" : - return "A9"; + return "A9"; case "A10" : - return "A10"; + return "A10"; case "A11" : - return "A11"; + return "A11"; case "A12" : - return "A12"; + return "A12"; case "A13" : - return "A13"; + return "A13"; case "A14" : - return "A14"; + return "A14"; case "A15" : - return "A15"; + return "A15"; case "A16" : - return "A16"; + return "A16"; case "A17" : - return "A17"; + return "A17"; case "A18" : - return "A18"; + return "A18"; case "A19" : - return "A19"; + return "A19"; case "A20" : - return "A20"; + return "A20"; case "A21" : - return "A21"; + return "A21"; case "A22" : - return "A22"; + return "A22"; case "A23" : - return "A23"; + return "A23"; case "A24" : - return "A24"; + return "A24"; case "A25" : - return "A25"; + return "A25"; case "A26" : - return "A26"; + return "A26"; case "A27" : - return "A27"; + return "A27"; case "A28" : - return "A28"; + return "A28"; case "A29" : - return "A29"; + return "A29"; case "A30" : - return "A30"; + return "A30"; case "A31" : - return "A31"; + return "A31"; case "A32" : - return "A32"; + return "A32"; case "A33" : - return "A33"; + return "A33"; case "A34" : - return "A34"; + return "A34"; case "A35" : - return "A35"; + return "A35"; case "A36" : - return "A36"; + return "A36"; case "A37" : - return "A37"; + return "A37"; case "A38" : - return "A38"; + return "A38"; case "A39" : - return "A39"; + return "A39"; case "A40" : - return "A40"; + return "A40"; case "A41" : - return "A41"; + return "A41"; case "A42" : - return "A42"; + return "A42"; case "A43" : - return "A43"; + return "A43"; case "A44" : - return "A44"; + return "A44"; case "A45" : - return "A45"; + return "A45"; case "A46" : - return "A46"; + return "A46"; case "A47" : - return "A47"; + return "A47"; case "A48" : - return "A48"; + return "A48"; case "A49" : - return "A49"; + return "A49"; case "A50" : - return "A50"; + return "A50"; case "A51" : - return "A51"; + return "A51"; case "A52" : - return "A52"; + return "A52"; case "A53" : - return "A53"; + return "A53"; case "A54" : - return "A54"; + return "A54"; case "A55" : - return "A55"; + return "A55"; case "A56" : - return "A56"; + return "A56"; case "A57" : - return "A57"; + return "A57"; case "A58" : - return "A58"; + return "A58"; case "A59" : - return "A59"; + return "A59"; case "A60" : - return "A60"; + return "A60"; case "A61" : - return "A61"; + return "A61"; case "A62" : - return "A62"; + return "A62"; case "A63" : - return "A63"; + return "A63"; case "A64" : - return "A64"; + return "A64"; case "A65" : - return "A65"; + return "A65"; case "A66" : - return "A66"; + return "A66"; case "A67" : - return "A67"; + return "A67"; case "A68" : - return "A68"; + return "A68"; case "A69" : - return "A69"; + return "A69"; case "A70" : - return "A70"; + return "A70"; case "A71" : - return "A71"; + return "A71"; case "A72" : - return "A72"; + return "A72"; case "A73" : - return "A73"; + return "A73"; case "A74" : - return "A74"; + return "A74"; case "A75" : - return "A75"; + return "A75"; case "A76" : - return "A76"; + return "A76"; case "A77" : - return "A77"; + return "A77"; case "A78" : - return "A78"; + return "A78"; case "A79" : - return "A79"; + return "A79"; case "A80" : - return "A80"; + return "A80"; case "A81" : - return "A81"; + return "A81"; case "A82" : - return "A82"; + return "A82"; case "A83" : - return "A83"; + return "A83"; case "A84" : - return "A84"; + return "A84"; case "A85" : - return "A85"; + return "A85"; case "A86" : - return "A86"; + return "A86"; case "A87" : - return "A87"; + return "A87"; case "A88" : - return "A88"; + return "A88"; case "A89" : - return "A89"; + return "A89"; case "A90" : - return "A90"; + return "A90"; case "A91" : - return "A91"; + return "A91"; case "A92" : - return "A92"; + return "A92"; case "A93" : - return "A93"; + return "A93"; case "A94" : - return "A94"; + return "A94"; case "A95" : - return "A95"; + return "A95"; case "A96" : - return "A96"; + return "A96"; case "A97" : - return "A97"; + return "A97"; case "A98" : - return "A98"; + return "A98"; case "A99" : - return "A99"; + return "A99"; case "A100" : - return "A100"; + return "A100"; case "A101" : - return "A101"; + return "A101"; case "A102" : - return "A102"; + return "A102"; case "A103" : - return "A103"; + return "A103"; case "A104" : - return "A104"; + return "A104"; case "A105" : - return "A105"; + return "A105"; case "A106" : - return "A106"; + return "A106"; case "A107" : - return "A107"; + return "A107"; case "A108" : - return "A108"; + return "A108"; case "A109" : - return "A109"; + return "A109"; case "A110" : - return "A110"; + return "A110"; case "A111" : - return "A111"; + return "A111"; case "A112" : - return "A112"; + return "A112"; case "A113" : - return "A113"; + return "A113"; case "A114" : - return "A114"; + return "A114"; case "A115" : - return "A115"; + return "A115"; case "A116" : - return "A116"; + return "A116"; case "A117" : - return "A117"; + return "A117"; case "A118" : - return "A118"; + return "A118"; case "A119" : - return "A119"; + return "A119"; case "A120" : - return "A120"; + return "A120"; case "A121" : - return "A121"; + return "A121"; case "A122" : - return "A122"; + return "A122"; case "A123" : - return "A123"; + return "A123"; case "A124" : - return "A124"; + return "A124"; case "A125" : - return "A125"; + return "A125"; case "A126" : - return "A126"; + return "A126"; case "A127" : - return "A127"; + return "A127"; case "A128" : - return "A128"; + return "A128"; case "A129" : - return "A129"; + return "A129"; case "A130" : - return "A130"; + return "A130"; case "A131" : - return "A131"; + return "A131"; case "A132" : - return "A132"; + return "A132"; case "A133" : - return "A133"; + return "A133"; case "A134" : - return "A134"; + return "A134"; case "A135" : - return "A135"; + return "A135"; case "A136" : - return "A136"; + return "A136"; case "A137" : - return "A137"; + return "A137"; case "A138" : - return "A138"; + return "A138"; case "A139" : - return "A139"; + return "A139"; case "A140" : - return "A140"; + return "A140"; case "A141" : - return "A141"; + return "A141"; case "A142" : - return "A142"; + return "A142"; case "A143" : - return "A143"; + return "A143"; case "A144" : - return "A144"; + return "A144"; case "A145" : - return "A145"; + return "A145"; case "A146" : - return "A146"; + return "A146"; case "A147" : - return "A147"; + return "A147"; case "A148" : - return "A148"; + return "A148"; case "A149" : - return "A149"; + return "A149"; case "A150" : - return "A150"; + return "A150"; case "A151" : - return "A151"; + return "A151"; case "A152" : - return "A152"; + return "A152"; case "A153" : - return "A153"; + return "A153"; case "A154" : - return "A154"; + return "A154"; case "A155" : - return "A155"; + return "A155"; case "A156" : - return "A156"; + return "A156"; case "A157" : - return "A157"; + return "A157"; case "A158" : - return "A158"; + return "A158"; case "A159" : - return "A159"; + return "A159"; case "A160" : - return "A160"; + return "A160"; case "A161" : - return "A161"; + return "A161"; case "A162" : - return "A162"; + return "A162"; case "A163" : - return "A163"; + return "A163"; case "A164" : - return "A164"; + return "A164"; case "A165" : - return "A165"; + return "A165"; case "A166" : - return "A166"; + return "A166"; case "A167" : - return "A167"; + return "A167"; case "A168" : - return "A168"; + return "A168"; case "A169" : - return "A169"; + return "A169"; case "A170" : - return "A170"; + return "A170"; case "A171" : - return "A171"; + return "A171"; case "A172" : - return "A172"; + return "A172"; case "A173" : - return "A173"; + return "A173"; case "A174" : - return "A174"; + return "A174"; case "A175" : - return "A175"; + return "A175"; case "A176" : - return "A176"; + return "A176"; case "A177" : - return "A177"; + return "A177"; case "A178" : - return "A178"; + return "A178"; case "A179" : - return "A179"; + return "A179"; case "A180" : - return "A180"; + return "A180"; case "A181" : - return "A181"; + return "A181"; case "A182" : - return "A182"; + return "A182"; case "A183" : - return "A183"; + return "A183"; case "A184" : - return "A184"; + return "A184"; case "A185" : - return "A185"; + return "A185"; case "A186" : - return "A186"; + return "A186"; case "A187" : - return "A187"; + return "A187"; case "A188" : - return "A188"; + return "A188"; case "A189" : - return "A189"; + return "A189"; case "A190" : - return "A190"; + return "A190"; case "A191" : - return "A191"; + return "A191"; case "A192" : - return "A192"; + return "A192"; case "A193" : - return "A193"; + return "A193"; case "A194" : - return "A194"; + return "A194"; case "A195" : - return "A195"; + return "A195"; case "A196" : - return "A196"; + return "A196"; case "A197" : - return "A197"; + return "A197"; case "A198" : - return "A198"; + return "A198"; case "A199" : - return "A199"; + return "A199"; case "A200" : - return "A200"; + return "A200"; case "A201" : - return "A201"; + return "A201"; case "A202" : - return "A202"; + return "A202"; case "A203" : - return "A203"; + return "A203"; case "A204" : - return "A204"; + return "A204"; case "A205" : - return "A205"; + return "A205"; case "A206" : - return "A206"; + return "A206"; case "A207" : - return "A207"; + return "A207"; case "A208" : - return "A208"; + return "A208"; case "A209" : - return "A209"; + return "A209"; case "A210" : - return "A210"; + return "A210"; case "A211" : - return "A211"; + return "A211"; case "A212" : - return "A212"; + return "A212"; case "A213" : - return "A213"; + return "A213"; case "A214" : - return "A214"; + return "A214"; case "A215" : - return "A215"; + return "A215"; case "A216" : - return "A216"; + return "A216"; case "A217" : - return "A217"; + return "A217"; case "A218" : - return "A218"; + return "A218"; case "A219" : - return "A219"; + return "A219"; case "A220" : - return "A220"; + return "A220"; case "A221" : - return "A221"; + return "A221"; case "A222" : - return "A222"; + return "A222"; case "A223" : - return "A223"; + return "A223"; case "A224" : - return "A224"; + return "A224"; case "A225" : - return "A225"; + return "A225"; case "A226" : - return "A226"; + return "A226"; case "A227" : - return "A227"; + return "A227"; case "A228" : - return "A228"; + return "A228"; case "A229" : - return "A229"; + return "A229"; case "A230" : - return "A230"; + return "A230"; case "A231" : - return "A231"; + return "A231"; case "A232" : - return "A232"; + return "A232"; case "A233" : - return "A233"; + return "A233"; case "A234" : - return "A234"; + return "A234"; case "A235" : - return "A235"; + return "A235"; case "A236" : - return "A236"; + return "A236"; case "A237" : - return "A237"; + return "A237"; case "A238" : - return "A238"; + return "A238"; case "A239" : - return "A239"; + return "A239"; case "A240" : - return "A240"; + return "A240"; case "A241" : - return "A241"; + return "A241"; case "A242" : - return "A242"; + return "A242"; case "A243" : - return "A243"; + return "A243"; case "A244" : - return "A244"; + return "A244"; case "A245" : - return "A245"; + return "A245"; case "A246" : - return "A246"; + return "A246"; case "A247" : - return "A247"; + return "A247"; case "A248" : - return "A248"; + return "A248"; case "A249" : - return "A249"; + return "A249"; case "A250" : - return "A250"; + return "A250"; case "A251" : - return "A251"; + return "A251"; case "A252" : - return "A252"; + return "A252"; case "A253" : - return "A253"; + return "A253"; case "A254" : - return "A254"; + return "A254"; case "A255" : - return "A255"; + return "A255"; case "A256" : - return "A256"; + return "A256"; case "A257" : - return "A257"; + return "A257"; case "A258" : - return "A258"; + return "A258"; case "A259" : - return "A259"; + return "A259"; case "A260" : - return "A260"; + return "A260"; case "A261" : - return "A261"; + return "A261"; case "A262" : - return "A262"; + return "A262"; case "A263" : - return "A263"; + return "A263"; case "A264" : - return "A264"; + return "A264"; case "A265" : - return "A265"; + return "A265"; case "A266" : - return "A266"; + return "A266"; case "A267" : - return "A267"; + return "A267"; case "A268" : - return "A268"; + return "A268"; case "A269" : - return "A269"; + return "A269"; case "A270" : - return "A270"; + return "A270"; case "A271" : - return "A271"; + return "A271"; case "A272" : - return "A272"; + return "A272"; case "A273" : - return "A273"; + return "A273"; case "A274" : - return "A274"; + return "A274"; case "A275" : - return "A275"; + return "A275"; case "A276" : - return "A276"; + return "A276"; case "A277" : - return "A277"; + return "A277"; case "A278" : - return "A278"; + return "A278"; case "A279" : - return "A279"; + return "A279"; case "A280" : - return "A280"; + return "A280"; case "A281" : - return "A281"; + return "A281"; case "A282" : - return "A282"; + return "A282"; case "A283" : - return "A283"; + return "A283"; case "A284" : - return "A284"; + return "A284"; case "A285" : - return "A285"; + return "A285"; case "A286" : - return "A286"; + return "A286"; case "A287" : - return "A287"; + return "A287"; case "A288" : - return "A288"; + return "A288"; case "A289" : - return "A289"; + return "A289"; case "A290" : - return "A290"; + return "A290"; case "A291" : - return "A291"; + return "A291"; case "A292" : - return "A292"; + return "A292"; case "A293" : - return "A293"; + return "A293"; case "A294" : - return "A294"; + return "A294"; case "A295" : - return "A295"; + return "A295"; case "A296" : - return "A296"; + return "A296"; case "A297" : - return "A297"; + return "A297"; case "A298" : - return "A298"; + return "A298"; case "A299" : - return "A299"; + return "A299"; } } diff --git a/jscomp/test/compare_test.js b/jscomp/test/compare_test.js index 723dc38139..d3f8d01df2 100644 --- a/jscomp/test/compare_test.js +++ b/jscomp/test/compare_test.js @@ -5,11 +5,11 @@ function compare(x, y) { switch (x) { case "A" : - return y === "A"; + return y === "A"; case "B" : - return y === "B"; + return y === "B"; case "C" : - return y === "C"; + return y === "C"; } } @@ -17,32 +17,32 @@ function compare(x, y) { function compare2(x, y) { switch (x) { case "A" : - switch (y) { - case "A" : - return true; - case "B" : - case "C" : - return false; - - } + switch (y) { + case "A" : + return true; + case "B" : + case "C" : + return false; + + } case "B" : - switch (y) { - case "B" : - return true; - case "A" : - case "C" : - return false; - - } + switch (y) { + case "B" : + return true; + case "A" : + case "C" : + return false; + + } case "C" : - switch (y) { - case "A" : - case "B" : - return false; - case "C" : - return true; - - } + switch (y) { + case "A" : + case "B" : + return false; + case "C" : + return true; + + } } } diff --git a/jscomp/test/complete_parmatch_test.js b/jscomp/test/complete_parmatch_test.js index 1801659e00..6abcb4081f 100644 --- a/jscomp/test/complete_parmatch_test.js +++ b/jscomp/test/complete_parmatch_test.js @@ -5,11 +5,11 @@ function f(x) { switch (x) { case 1 : - return /* 'a' */97; + return /* 'a' */97; case 2 : - return /* 'b' */98; + return /* 'b' */98; case 3 : - return /* 'c' */99; + return /* 'c' */99; default: return /* 'x' */120; } diff --git a/jscomp/test/complex_if_test.js b/jscomp/test/complex_if_test.js index 62d5240e6a..4a016d5977 100644 --- a/jscomp/test/complex_if_test.js +++ b/jscomp/test/complex_if_test.js @@ -62,20 +62,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -86,31 +86,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/jscomp/test/const_test.js b/jscomp/test/const_test.js index f0116628ce..34b4d8223e 100644 --- a/jscomp/test/const_test.js +++ b/jscomp/test/const_test.js @@ -17,11 +17,11 @@ function fff(x) { }; switch (x$1.TAG) { case "A" : - return x; + return x; case "B" : - return 1; + return 1; case "C" : - return 2; + return 2; } } diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index c5d9b7d860..a09d87721d 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -70,20 +70,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -94,31 +94,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/jscomp/test/gpr_1438.js b/jscomp/test/gpr_1438.js index 1007c0d56d..3c54884a27 100644 --- a/jscomp/test/gpr_1438.js +++ b/jscomp/test/gpr_1438.js @@ -5,16 +5,16 @@ function actionKey(key, a, b, c, d, e) { switch (key) { case 98 : - return c; + return c; case 106 : - return d; + return d; case 107 : - return e; + return e; case 116 : - return b; + return b; case 99 : case 118 : - return a; + return a; default: } diff --git a/jscomp/test/gpr_1698_test.js b/jscomp/test/gpr_1698_test.js index 74186cc63e..142602df80 100644 --- a/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/gpr_1698_test.js @@ -7,19 +7,19 @@ function is_number(_expr) { let expr = _expr; switch (expr.TAG) { case "Val" : - if (expr._0.TAG === "Natural") { - return true; - } else { - return false; - } + if (expr._0.TAG === "Natural") { + return true; + } else { + return false; + } case "Neg" : - _expr = expr._0; - continue; + _expr = expr._0; + continue; case "Sum" : case "Pow" : case "Frac" : case "Gcd" : - return false; + return false; } }; @@ -39,92 +39,92 @@ function compare(context, state, _a, _b) { let exit$3 = 0; switch (a.TAG) { case "Val" : - switch (b.TAG) { - case "Val" : - return 111; - case "Neg" : - exit$3 = 5; - break; - case "Sum" : - exit$2 = 4; - break; - case "Frac" : - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_1698_test.res", - 41, - 9 - ] - } - }); - case "Pow" : - case "Gcd" : - exit = 1; - break; - - } - break; + switch (b.TAG) { + case "Val" : + return 111; + case "Neg" : + exit$3 = 5; + break; + case "Sum" : + exit$2 = 4; + break; + case "Frac" : + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_1698_test.res", + 41, + 9 + ] + } + }); + case "Pow" : + case "Gcd" : + exit = 1; + break; + + } + break; case "Neg" : - _a = a._0; - continue; + _a = a._0; + continue; case "Sum" : case "Pow" : - exit$3 = 5; - break; + exit$3 = 5; + break; case "Frac" : - switch (b.TAG) { - case "Val" : - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_1698_test.res", - 41, - 9 - ] - } - }); - case "Neg" : - exit$3 = 5; - break; - case "Sum" : - exit$2 = 4; - break; - case "Frac" : - na = a._0; - da = a._1; - nb = b._0; - db = b._1; - exit = 2; - break; - case "Pow" : - case "Gcd" : - exit = 1; - break; - - } - break; + switch (b.TAG) { + case "Val" : + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_1698_test.res", + 41, + 9 + ] + } + }); + case "Neg" : + exit$3 = 5; + break; + case "Sum" : + exit$2 = 4; + break; + case "Frac" : + na = a._0; + da = a._1; + nb = b._0; + db = b._1; + exit = 2; + break; + case "Pow" : + case "Gcd" : + exit = 1; + break; + + } + break; case "Gcd" : - switch (b.TAG) { - case "Neg" : - exit$3 = 5; - break; - case "Sum" : - exit$2 = 4; - break; - case "Gcd" : - na = a._0; - da = a._1; - nb = b._0; - db = b._1; - exit = 2; - break; - default: - exit$1 = 3; - } - break; + switch (b.TAG) { + case "Neg" : + exit$3 = 5; + break; + case "Sum" : + exit$2 = 4; + break; + case "Gcd" : + na = a._0; + da = a._1; + nb = b._0; + db = b._1; + exit = 2; + break; + default: + exit$1 = 3; + } + break; } if (exit$3 === 5) { @@ -154,33 +154,33 @@ function compare(context, state, _a, _b) { if (exit$1 === 3) { switch (a.TAG) { case "Sum" : - exit = 1; - break; + exit = 1; + break; case "Pow" : - return -1; + return -1; case "Val" : case "Frac" : case "Gcd" : - return 1; + return 1; } } switch (exit) { case 1 : - switch (b.TAG) { - case "Pow" : - return 1; - default: - return -1; - } + switch (b.TAG) { + case "Pow" : + return 1; + default: + return -1; + } case 2 : - let denom = compare(context, state, da, db); - if (denom !== 0) { - return denom; - } - _b = nb; - _a = na; - continue; + let denom = compare(context, state, da, db); + if (denom !== 0) { + return denom; + } + _b = nb; + _a = na; + continue; } }; diff --git a/jscomp/test/gpr_2413_test.js b/jscomp/test/gpr_2413_test.js index bd7a3f24c9..f3c4e67b86 100644 --- a/jscomp/test/gpr_2413_test.js +++ b/jscomp/test/gpr_2413_test.js @@ -5,16 +5,16 @@ function f(x) { switch (x.TAG) { case "A" : - let a = x._0; - if (a.TAG === "P") { - let a$1 = a._0; - return a$1 + a$1 | 0; - } - let a$2 = a._0; - return a$2 - a$2 | 0; + let a = x._0; + if (a.TAG === "P") { + let a$1 = a._0; + return a$1 + a$1 | 0; + } + let a$2 = a._0; + return a$2 - a$2 | 0; case "B" : case "C" : - break; + break; } let a$3 = x._0._0; diff --git a/jscomp/test/gpr_2642_test.js b/jscomp/test/gpr_2642_test.js index 49d50a0e15..1135ce05ab 100644 --- a/jscomp/test/gpr_2642_test.js +++ b/jscomp/test/gpr_2642_test.js @@ -7,16 +7,16 @@ function isfree(id, _x) { let x = _x; switch (x.TAG) { case "Pident" : - return id === x._0; + return id === x._0; case "Pdot" : - _x = x._0; - continue; + _x = x._0; + continue; case "Papply" : - if (isfree(id, x._0)) { - return true; - } - _x = x._1; - continue; + if (isfree(id, x._0)) { + return true; + } + _x = x._1; + continue; } }; diff --git a/jscomp/test/gpr_2931_test.js b/jscomp/test/gpr_2931_test.js index 4061622889..2faa43da5c 100644 --- a/jscomp/test/gpr_2931_test.js +++ b/jscomp/test/gpr_2931_test.js @@ -18,14 +18,14 @@ function eq(loc, x, y) { function fake_c2(a_type, b_type) { switch (a_type) { case "number" : - if (b_type === "number") { - return 33; - } - break; + if (b_type === "number") { + return 33; + } + break; case "string" : - return 1; + return 1; case "undefined" : - return -1; + return -1; default: } diff --git a/jscomp/test/gpr_3209_test.js b/jscomp/test/gpr_3209_test.js index 170f470e27..8351c2e193 100644 --- a/jscomp/test/gpr_3209_test.js +++ b/jscomp/test/gpr_3209_test.js @@ -8,7 +8,7 @@ function f9(x) { case "T60" : case "T61" : case "T62" : - return 1; + return 1; default: return 3; } @@ -16,7 +16,7 @@ function f9(x) { switch (x.TAG) { case "T64" : case "T65" : - return 2; + return 2; default: return 3; } diff --git a/jscomp/test/gpr_4069_test.js b/jscomp/test/gpr_4069_test.js index 6f99c9ae1b..2bfd0e23e8 100644 --- a/jscomp/test/gpr_4069_test.js +++ b/jscomp/test/gpr_4069_test.js @@ -14,11 +14,11 @@ function fxx(v) { let match = v(); switch (match) { case 1 : - return /* 'a' */97; + return /* 'a' */97; case 2 : - return /* 'b' */98; + return /* 'b' */98; case 3 : - return /* 'c' */99; + return /* 'c' */99; default: return /* 'd' */100; } diff --git a/jscomp/test/gpr_4639_test.js b/jscomp/test/gpr_4639_test.js index 410c13daeb..881fe37bf2 100644 --- a/jscomp/test/gpr_4639_test.js +++ b/jscomp/test/gpr_4639_test.js @@ -8,13 +8,13 @@ function x(url) { } switch (url.hd) { case "login" : - if (url.tl) { - return "start"; - } else { - return "login"; - } - case "start" : + if (url.tl) { return "start"; + } else { + return "login"; + } + case "start" : + return "start"; default: return "start"; } diff --git a/jscomp/test/int_switch_test.js b/jscomp/test/int_switch_test.js index caff715926..8c21aafd3c 100644 --- a/jscomp/test/int_switch_test.js +++ b/jscomp/test/int_switch_test.js @@ -23,11 +23,11 @@ function f(x) { let match = x(); switch (match) { case 1 : - return /* 'a' */97; + return /* 'a' */97; case 2 : - return /* 'b' */98; + return /* 'b' */98; case 3 : - return /* 'c' */99; + return /* 'c' */99; default: return /* 'x' */120; } @@ -37,11 +37,11 @@ function f22(x) { let match = x(); switch (match) { case 1 : - return /* 'a' */97; + return /* 'a' */97; case 2 : - return /* 'b' */98; + return /* 'b' */98; case 3 : - return /* 'c' */99; + return /* 'c' */99; default: return /* 'x' */120; } @@ -51,13 +51,13 @@ function f33(x) { let match = x(); switch (match) { case "A" : - return /* 'a' */97; + return /* 'a' */97; case "B" : - return /* 'b' */98; + return /* 'b' */98; case "C" : - return /* 'c' */99; + return /* 'c' */99; case "D" : - return /* 'x' */120; + return /* 'x' */120; } } diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index d51afc4088..83f540d2a0 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -238,9 +238,9 @@ function test(v) { } switch (ty) { case "JSONFalse" : - return eq("File \"js_json_test.res\", line 99, characters 24-31", false, v); + return eq("File \"js_json_test.res\", line 99, characters 24-31", false, v); case "JSONTrue" : - return eq("File \"js_json_test.res\", line 98, characters 23-30", true, v); + return eq("File \"js_json_test.res\", line 98, characters 23-30", true, v); default: return add_test("File \"js_json_test.res\", line 100, characters 18-25", (function () { return { @@ -371,116 +371,108 @@ function eq_at_i(loc, json, i, kind, expected) { let ty$1 = Js_json.classify(Caml_array.get(ty._0, i)); switch (kind) { case "String" : - if (typeof ty$1 !== "object") { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } else if (ty$1.TAG === "JSONString") { - return eq(loc, ty$1._0, expected); - } else { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } + if (typeof ty$1 !== "object") { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } else if (ty$1.TAG === "JSONString") { + return eq(loc, ty$1._0, expected); + } else { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } case "Number" : - if (typeof ty$1 !== "object") { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } else if (ty$1.TAG === "JSONNumber") { - return eq(loc, ty$1._0, expected); - } else { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } + if (typeof ty$1 !== "object") { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } else if (ty$1.TAG === "JSONNumber") { + return eq(loc, ty$1._0, expected); + } else { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } case "Object" : - if (typeof ty$1 !== "object") { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } else if (ty$1.TAG === "JSONObject") { - return eq(loc, ty$1._0, expected); - } else { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } + if (typeof ty$1 !== "object") { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } else if (ty$1.TAG === "JSONObject") { + return eq(loc, ty$1._0, expected); + } else { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } case "Array" : - if (typeof ty$1 !== "object") { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } else if (ty$1.TAG === "JSONArray") { - return eq(loc, ty$1._0, expected); - } else { + if (typeof ty$1 !== "object") { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } else if (ty$1.TAG === "JSONArray") { + return eq(loc, ty$1._0, expected); + } else { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } + case "Boolean" : + if (typeof ty$1 === "object") { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } + switch (ty$1) { + case "JSONFalse" : + return eq(loc, false, expected); + case "JSONTrue" : + return eq(loc, true, expected); + default: return add_test(loc, (function () { return { TAG: "Ok", _0: false }; })); - } - case "Boolean" : - if (typeof ty$1 === "object") { + } + case "Null" : + if (typeof ty$1 !== "object") { + if (ty$1 === "JSONNull") { return add_test(loc, (function () { return { TAG: "Ok", - _0: false + _0: true }; })); - } - switch (ty$1) { - case "JSONFalse" : - return eq(loc, false, expected); - case "JSONTrue" : - return eq(loc, true, expected); - default: - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } - case "Null" : - if (typeof ty$1 !== "object") { - if (ty$1 === "JSONNull") { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: true - }; - })); - } else { - return add_test(loc, (function () { - return { - TAG: "Ok", - _0: false - }; - })); - } } else { return add_test(loc, (function () { return { @@ -489,6 +481,14 @@ function eq_at_i(loc, json, i, kind, expected) { }; })); } + } else { + return add_test(loc, (function () { + return { + TAG: "Ok", + _0: false + }; + })); + } } } diff --git a/jscomp/test/mario_game.js b/jscomp/test/mario_game.js index bc08cb70e6..b95feca00f 100644 --- a/jscomp/test/mario_game.js +++ b/jscomp/test/mario_game.js @@ -44,107 +44,107 @@ function make_enemy(param) { let dir = param[1]; switch (param[0]) { case "Goomba" : + return setup_sprite(undefined, [ + 1, + 1 + ], [ + 14, + 14 + ], "enemies.png", 2, 10, [ + 16, + 16 + ], [ + 0, + 128 + ]); + case "GKoopa" : + if (dir === "Left") { return setup_sprite(undefined, [ - 1, - 1 + 4, + 10 ], [ - 14, - 14 + 11, + 16 ], "enemies.png", 2, 10, [ 16, - 16 + 27 ], [ 0, - 128 + 69 ]); - case "GKoopa" : - if (dir === "Left") { - return setup_sprite(undefined, [ - 4, - 10 - ], [ - 11, - 16 - ], "enemies.png", 2, 10, [ - 16, - 27 - ], [ - 0, - 69 - ]); - } else { - return setup_sprite(undefined, [ - 1, - 10 - ], [ - 11, - 16 - ], "enemies.png", 2, 10, [ - 16, - 27 - ], [ - 32, - 69 - ]); - } - case "RKoopa" : - if (dir === "Left") { - return setup_sprite(undefined, [ - 4, - 10 - ], [ - 11, - 16 - ], "enemies.png", 2, 10, [ - 16, - 27 - ], [ - 0, - 5 - ]); - } else { - return setup_sprite(undefined, [ - 1, - 10 - ], [ - 11, - 16 - ], "enemies.png", 2, 10, [ - 16, - 27 - ], [ - 32, - 5 - ]); - } - case "GKoopaShell" : + } else { return setup_sprite(undefined, [ - 2, - 2 + 1, + 10 ], [ - 12, - 13 - ], "enemies.png", 4, 10, [ + 11, + 16 + ], "enemies.png", 2, 10, [ 16, + 27 + ], [ + 32, + 69 + ]); + } + case "RKoopa" : + if (dir === "Left") { + return setup_sprite(undefined, [ + 4, + 10 + ], [ + 11, 16 + ], "enemies.png", 2, 10, [ + 16, + 27 ], [ 0, - 96 + 5 ]); - case "RKoopaShell" : + } else { return setup_sprite(undefined, [ - 2, - 2 + 1, + 10 ], [ - 12, - 13 - ], "enemies.png", 4, 10, [ - 16, + 11, 16 + ], "enemies.png", 2, 10, [ + 16, + 27 ], [ - 0, - 32 + 32, + 5 ]); + } + case "GKoopaShell" : + return setup_sprite(undefined, [ + 2, + 2 + ], [ + 12, + 13 + ], "enemies.png", 4, 10, [ + 16, + 16 + ], [ + 0, + 96 + ]); + case "RKoopaShell" : + return setup_sprite(undefined, [ + 2, + 2 + ], [ + 12, + 13 + ], "enemies.png", 4, 10, [ + 16, + 16 + ], [ + 0, + 32 + ]); } } @@ -152,93 +152,93 @@ function make_enemy(param) { function make_particle(x) { switch (x) { case "GoombaSquish" : - return setup_sprite(undefined, undefined, undefined, "enemies.png", 1, 0, [ - 16, - 16 - ], [ - 0, - 144 - ]); + return setup_sprite(undefined, undefined, undefined, "enemies.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 144 + ]); case "BrickChunkL" : - return setup_sprite(undefined, undefined, undefined, "chunks.png", 1, 0, [ - 8, - 8 - ], [ - 0, - 0 - ]); + return setup_sprite(undefined, undefined, undefined, "chunks.png", 1, 0, [ + 8, + 8 + ], [ + 0, + 0 + ]); case "BrickChunkR" : - return setup_sprite(undefined, undefined, undefined, "chunks.png", 1, 0, [ - 8, - 8 - ], [ - 8, - 0 - ]); + return setup_sprite(undefined, undefined, undefined, "chunks.png", 1, 0, [ + 8, + 8 + ], [ + 8, + 0 + ]); case "Score100" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 12, - 8 - ], [ - 0, - 0 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 12, + 8 + ], [ + 0, + 0 + ]); case "Score200" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 12, - 9 - ], [ - 0, - 9 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 12, + 9 + ], [ + 0, + 9 + ]); case "Score400" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 12, - 9 - ], [ - 0, - 18 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 12, + 9 + ], [ + 0, + 18 + ]); case "Score800" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 12, - 9 - ], [ - 0, - 27 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 12, + 9 + ], [ + 0, + 27 + ]); case "Score1000" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 14, - 9 - ], [ - 13, - 0 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 14, + 9 + ], [ + 13, + 0 + ]); case "Score2000" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 14, - 9 - ], [ - 13, - 9 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 14, + 9 + ], [ + 13, + 9 + ]); case "Score4000" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 14, - 9 - ], [ - 13, - 18 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 14, + 9 + ], [ + 13, + 18 + ]); case "Score8000" : - return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ - 14, - 9 - ], [ - 13, - 27 - ]); + return setup_sprite(undefined, undefined, undefined, "score.png", 1, 0, [ + 14, + 9 + ], [ + 13, + 27 + ]); } } @@ -246,389 +246,389 @@ function make_particle(x) { function make_type(typ, dir) { switch (typ.TAG) { case "SPlayer" : - let pt = typ._0; - let spr_type = [ - typ._1, - dir - ]; - if (pt === "BigM") { - let typ$1 = spr_type[0]; - if (spr_type[1] === "Left") { - switch (typ$1) { - case "Standing" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 13, - 25 - ], "mario-big.png", 1, 0, [ - 16, - 27 - ], [ - 16, - 5 - ]); - case "Jumping" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 12, - 25 - ], "mario-big.png", 1, 0, [ - 16, - 26 - ], [ - 48, - 6 - ]); - case "Running" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 13, - 25 - ], "mario-big.png", 4, 10, [ - 16, - 27 - ], [ - 0, - 37 - ]); - case "Crouching" : - return setup_sprite(undefined, [ - 2, - 10 - ], [ - 13, - 17 - ], "mario-big.png", 1, 0, [ - 16, - 27 - ], [ - 32, - 5 - ]); - - } - } else { - switch (typ$1) { - case "Standing" : - return setup_sprite(undefined, [ - 1, - 1 - ], [ - 13, - 25 - ], "mario-big.png", 1, 0, [ - 16, - 26 - ], [ - 16, - 69 - ]); - case "Jumping" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 12, - 25 - ], "mario-big.png", 1, 0, [ - 16, - 26 - ], [ - 48, - 70 - ]); - case "Running" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 13, - 25 - ], "mario-big.png", 4, 10, [ - 16, - 27 - ], [ - 0, - 101 - ]); - case "Crouching" : - return setup_sprite(undefined, [ - 2, - 10 - ], [ - 13, - 17 - ], "mario-big.png", 1, 0, [ - 16, - 27 - ], [ - 32, - 69 - ]); - - } + let pt = typ._0; + let spr_type = [ + typ._1, + dir + ]; + if (pt === "BigM") { + let typ$1 = spr_type[0]; + if (spr_type[1] === "Left") { + switch (typ$1) { + case "Standing" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 13, + 25 + ], "mario-big.png", 1, 0, [ + 16, + 27 + ], [ + 16, + 5 + ]); + case "Jumping" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 12, + 25 + ], "mario-big.png", 1, 0, [ + 16, + 26 + ], [ + 48, + 6 + ]); + case "Running" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 13, + 25 + ], "mario-big.png", 4, 10, [ + 16, + 27 + ], [ + 0, + 37 + ]); + case "Crouching" : + return setup_sprite(undefined, [ + 2, + 10 + ], [ + 13, + 17 + ], "mario-big.png", 1, 0, [ + 16, + 27 + ], [ + 32, + 5 + ]); + } } else { - let typ$2 = spr_type[0]; - if (spr_type[1] === "Left") { - switch (typ$2) { - case "Standing" : - return setup_sprite(undefined, [ - 3, - 1 - ], [ - 11, - 15 - ], "mario-small.png", 1, 0, [ - 16, - 16 - ], [ - 0, - 0 - ]); - case "Jumping" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 13, - 15 - ], "mario-small.png", 2, 10, [ - 16, - 16 - ], [ - 16, - 16 - ]); - case "Running" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 12, - 15 - ], "mario-small.png", 3, 5, [ - 16, - 16 - ], [ - 16, - 0 - ]); - case "Crouching" : - return setup_sprite(undefined, [ - 1, - 5 - ], [ - 14, - 10 - ], "mario-small.png", 1, 0, [ - 16, - 16 - ], [ - 0, - 64 - ]); - - } - } else { - switch (typ$2) { - case "Standing" : - return setup_sprite(undefined, [ - 1, - 1 - ], [ - 11, - 15 - ], "mario-small.png", 1, 0, [ - 16, - 16 - ], [ - 0, - 32 - ]); - case "Jumping" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 13, - 15 - ], "mario-small.png", 2, 10, [ - 16, - 16 - ], [ - 16, - 48 - ]); - case "Running" : - return setup_sprite(undefined, [ - 2, - 1 - ], [ - 12, - 15 - ], "mario-small.png", 3, 5, [ - 16, - 16 - ], [ - 16, - 32 - ]); - case "Crouching" : - return setup_sprite(undefined, [ - 1, - 5 - ], [ - 14, - 10 - ], "mario-small.png", 1, 0, [ - 16, - 16 - ], [ - 0, - 64 - ]); - - } - } - } - case "SEnemy" : - return make_enemy([ - typ._0, - dir - ]); - case "SItem" : - let x = typ._0; - switch (x) { - case "Mushroom" : + switch (typ$1) { + case "Standing" : + return setup_sprite(undefined, [ + 1, + 1 + ], [ + 13, + 25 + ], "mario-big.png", 1, 0, [ + 16, + 26 + ], [ + 16, + 69 + ]); + case "Jumping" : return setup_sprite(undefined, [ 2, - 0 + 1 ], [ 12, - 16 - ], "items.png", 1, 0, [ + 25 + ], "mario-big.png", 1, 0, [ 16, - 16 + 26 + ], [ + 48, + 70 + ]); + case "Running" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 13, + 25 + ], "mario-big.png", 4, 10, [ + 16, + 27 ], [ 0, - 0 + 101 + ]); + case "Crouching" : + return setup_sprite(undefined, [ + 2, + 10 + ], [ + 13, + 17 + ], "mario-big.png", 1, 0, [ + 16, + 27 + ], [ + 32, + 69 ]); - case "FireFlower" : - return setup_sprite(undefined, undefined, undefined, "items.png", 1, 0, [ + + } + } + } else { + let typ$2 = spr_type[0]; + if (spr_type[1] === "Left") { + switch (typ$2) { + case "Standing" : + return setup_sprite(undefined, [ + 3, + 1 + ], [ + 11, + 15 + ], "mario-small.png", 1, 0, [ 16, 16 ], [ 0, - 188 + 0 ]); - case "Star" : - return setup_sprite(undefined, undefined, undefined, "items.png", 1, 0, [ + case "Jumping" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 13, + 15 + ], "mario-small.png", 2, 10, [ 16, 16 ], [ 16, - 48 + 16 ]); - case "Coin" : + case "Running" : return setup_sprite(undefined, [ - 3, - 0 + 2, + 1 ], [ 12, - 16 - ], "items.png", 3, 15, [ + 15 + ], "mario-small.png", 3, 5, [ 16, 16 ], [ - 0, - 80 + 16, + 0 ]); - - } - case "SBlock" : - let x$1 = typ._0; - if (typeof x$1 === "object") { - return setup_sprite(undefined, undefined, undefined, "blocks.png", 4, 15, [ - 16, - 16 - ], [ - 0, - 16 - ]); - } - switch (x$1) { - case "QBlockUsed" : - return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + case "Crouching" : + return setup_sprite(undefined, [ + 1, + 5 + ], [ + 14, + 10 + ], "mario-small.png", 1, 0, [ 16, 16 ], [ 0, - 32 + 64 ]); - case "Brick" : - return setup_sprite(undefined, undefined, undefined, "blocks.png", 5, 10, [ + + } + } else { + switch (typ$2) { + case "Standing" : + return setup_sprite(undefined, [ + 1, + 1 + ], [ + 11, + 15 + ], "mario-small.png", 1, 0, [ 16, 16 ], [ 0, - 0 + 32 ]); - case "UnBBlock" : - return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + case "Jumping" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 13, + 15 + ], "mario-small.png", 2, 10, [ 16, 16 ], [ - 0, + 16, 48 ]); - case "Cloud" : - return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + case "Running" : + return setup_sprite(undefined, [ + 2, + 1 + ], [ + 12, + 15 + ], "mario-small.png", 3, 5, [ 16, 16 ], [ - 0, - 64 + 16, + 32 ]); - case "Panel" : - return setup_sprite(undefined, undefined, undefined, "panel.png", 3, 15, [ - 26, - 26 + case "Crouching" : + return setup_sprite(undefined, [ + 1, + 5 ], [ - 0, - 0 - ]); - case "Ground" : - return setup_sprite(undefined, undefined, undefined, "ground.png", 1, 0, [ + 14, + 10 + ], "mario-small.png", 1, 0, [ 16, 16 ], [ 0, - 32 + 64 ]); - + + } } - - } -} - -function make_from_params(params, context) { - let img = document.createElement("img"); - img.src = params.img_src; - return { - params: params, - context: context, - frame: { - contents: 0 - }, - ticks: { - contents: 0 + } + case "SEnemy" : + return make_enemy([ + typ._0, + dir + ]); + case "SItem" : + let x = typ._0; + switch (x) { + case "Mushroom" : + return setup_sprite(undefined, [ + 2, + 0 + ], [ + 12, + 16 + ], "items.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 0 + ]); + case "FireFlower" : + return setup_sprite(undefined, undefined, undefined, "items.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 188 + ]); + case "Star" : + return setup_sprite(undefined, undefined, undefined, "items.png", 1, 0, [ + 16, + 16 + ], [ + 16, + 48 + ]); + case "Coin" : + return setup_sprite(undefined, [ + 3, + 0 + ], [ + 12, + 16 + ], "items.png", 3, 15, [ + 16, + 16 + ], [ + 0, + 80 + ]); + + } + case "SBlock" : + let x$1 = typ._0; + if (typeof x$1 === "object") { + return setup_sprite(undefined, undefined, undefined, "blocks.png", 4, 15, [ + 16, + 16 + ], [ + 0, + 16 + ]); + } + switch (x$1) { + case "QBlockUsed" : + return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 32 + ]); + case "Brick" : + return setup_sprite(undefined, undefined, undefined, "blocks.png", 5, 10, [ + 16, + 16 + ], [ + 0, + 0 + ]); + case "UnBBlock" : + return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 48 + ]); + case "Cloud" : + return setup_sprite(undefined, undefined, undefined, "blocks.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 64 + ]); + case "Panel" : + return setup_sprite(undefined, undefined, undefined, "panel.png", 3, 15, [ + 26, + 26 + ], [ + 0, + 0 + ]); + case "Ground" : + return setup_sprite(undefined, undefined, undefined, "ground.png", 1, 0, [ + 16, + 16 + ], [ + 0, + 32 + ]); + + } + + } +} + +function make_from_params(params, context) { + let img = document.createElement("img"); + img.src = params.img_src; + return { + params: params, + context: context, + frame: { + contents: 0 + }, + ticks: { + contents: 0 }, img: img }; @@ -702,11 +702,11 @@ function make_type$1(typ, ctx) { switch (typ) { case "BrickChunkL" : case "BrickChunkR" : - return { - sprite: make_particle$1(typ, ctx), - rot: 0, - lifetime: 300 - }; + return { + sprite: make_particle$1(typ, ctx), + rot: 0, + lifetime: 300 + }; default: return { sprite: make_particle$1(typ, ctx), @@ -817,25 +817,25 @@ function make_player() { function make_type$2(x) { switch (x.TAG) { case "SPlayer" : - return make_player(); + return make_player(); case "SEnemy" : - let x$1 = x._0; - switch (x$1) { - case "GKoopaShell" : - case "RKoopaShell" : - return setup_obj(undefined, 3, undefined); - default: - return setup_obj(undefined, undefined, undefined); - } - case "SItem" : - let x$2 = x._0; - if (x$2 === "Coin") { - return setup_obj(false, undefined, undefined); - } else { + let x$1 = x._0; + switch (x$1) { + case "GKoopaShell" : + case "RKoopaShell" : + return setup_obj(undefined, 3, undefined); + default: return setup_obj(undefined, undefined, undefined); - } - case "SBlock" : + } + case "SItem" : + let x$2 = x._0; + if (x$2 === "Coin") { return setup_obj(false, undefined, undefined); + } else { + return setup_obj(undefined, undefined, undefined); + } + case "SBlock" : + return setup_obj(false, undefined, undefined); } } @@ -886,34 +886,34 @@ function spawn(spawnable, context, param) { let spr = match[0]; switch (spawnable.TAG) { case "SPlayer" : - return { - TAG: "Player", - _0: spawnable._0, - _1: spr, - _2: obj - }; + return { + TAG: "Player", + _0: spawnable._0, + _1: spr, + _2: obj + }; case "SEnemy" : - set_vel_to_speed(obj); - return { - TAG: "Enemy", - _0: spawnable._0, - _1: spr, - _2: obj - }; + set_vel_to_speed(obj); + return { + TAG: "Enemy", + _0: spawnable._0, + _1: spr, + _2: obj + }; case "SItem" : - return { - TAG: "Item", - _0: spawnable._0, - _1: spr, - _2: obj - }; + return { + TAG: "Item", + _0: spawnable._0, + _1: spr, + _2: obj + }; case "SBlock" : - return { - TAG: "Block", - _0: spawnable._0, - _1: spr, - _2: obj - }; + return { + TAG: "Block", + _0: spawnable._0, + _1: spr, + _2: obj + }; } } @@ -963,41 +963,41 @@ function update_player(player, keys, context) { let lr_acc = player.vel.x * 0.2; switch (extra) { case "CLeft" : - if (!player.crouch) { - if (player.vel.x > - player.params.speed) { - player.vel.x = player.vel.x - (0.4 - lr_acc); - } - player.dir = "Left"; - return; - } else { - return; + if (!player.crouch) { + if (player.vel.x > - player.params.speed) { + player.vel.x = player.vel.x - (0.4 - lr_acc); } + player.dir = "Left"; + return; + } else { + return; + } case "CRight" : - if (!player.crouch) { - if (player.vel.x < player.params.speed) { - player.vel.x = player.vel.x + (0.4 + lr_acc); - } - player.dir = "Right"; - return; - } else { - return; + if (!player.crouch) { + if (player.vel.x < player.params.speed) { + player.vel.x = player.vel.x + (0.4 + lr_acc); } + player.dir = "Right"; + return; + } else { + return; + } case "CUp" : - if (!player.jumping && player.grounded) { - player.jumping = true; - player.grounded = false; - player.vel.y = Caml.float_max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6); - return; - } else { - return; - } + if (!player.jumping && player.grounded) { + player.jumping = true; + player.grounded = false; + player.vel.y = Caml.float_max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6); + return; + } else { + return; + } case "CDown" : - if (!player.jumping && player.grounded) { - player.crouch = true; - return; - } else { - return; - } + if (!player.jumping && player.grounded) { + player.crouch = true; + return; + } else { + return; + } } }), keys); @@ -1098,16 +1098,16 @@ function collide_block(check_xOpt, dir, obj) { let check_x = check_xOpt !== undefined ? check_xOpt : true; switch (dir) { case "North" : - obj.vel.y = -0.001; - return; + obj.vel.y = -0.001; + return; case "South" : - obj.vel.y = 0; - obj.grounded = true; - obj.jumping = false; - return; + obj.vel.y = 0; + obj.grounded = true; + obj.jumping = false; + return; case "East" : case "West" : - break; + break; } if (check_x) { @@ -1133,45 +1133,45 @@ function reverse_left_right(obj) { function evolve_enemy(player_dir, typ, spr, obj, context) { switch (typ) { case "Goomba" : - obj.kill = true; - return; + obj.kill = true; + return; case "GKoopa" : - let match = make$2(undefined, obj.dir, { - TAG: "SEnemy", - _0: "GKoopaShell" - }, context, [ - obj.pos.x, - obj.pos.y - ]); - let new_obj = match[1]; - let new_spr = match[0]; - normalize_pos(new_obj.pos, spr.params, new_spr.params); - return { - TAG: "Enemy", - _0: "GKoopaShell", - _1: new_spr, - _2: new_obj - }; + let match = make$2(undefined, obj.dir, { + TAG: "SEnemy", + _0: "GKoopaShell" + }, context, [ + obj.pos.x, + obj.pos.y + ]); + let new_obj = match[1]; + let new_spr = match[0]; + normalize_pos(new_obj.pos, spr.params, new_spr.params); + return { + TAG: "Enemy", + _0: "GKoopaShell", + _1: new_spr, + _2: new_obj + }; case "RKoopa" : - let match$1 = make$2(undefined, obj.dir, { - TAG: "SEnemy", - _0: "RKoopaShell" - }, context, [ - obj.pos.x, - obj.pos.y - ]); - let new_obj$1 = match$1[1]; - let new_spr$1 = match$1[0]; - normalize_pos(new_obj$1.pos, spr.params, new_spr$1.params); - return { - TAG: "Enemy", - _0: "RKoopaShell", - _1: new_spr$1, - _2: new_obj$1 - }; + let match$1 = make$2(undefined, obj.dir, { + TAG: "SEnemy", + _0: "RKoopaShell" + }, context, [ + obj.pos.x, + obj.pos.y + ]); + let new_obj$1 = match$1[1]; + let new_spr$1 = match$1[0]; + normalize_pos(new_obj$1.pos, spr.params, new_spr$1.params); + return { + TAG: "Enemy", + _0: "RKoopaShell", + _1: new_spr$1, + _2: new_obj$1 + }; case "GKoopaShell" : case "RKoopaShell" : - break; + break; } obj.dir = player_dir; @@ -1261,27 +1261,27 @@ function col_bypass(c1, c2) { let ctypes; switch (c1.TAG) { case "Player" : - ctypes = c2.TAG === "Enemy" ? c1._2.invuln > 0 : false; - break; + ctypes = c2.TAG === "Enemy" ? c1._2.invuln > 0 : false; + break; case "Enemy" : - ctypes = c2.TAG === "Item" ? true : false; - break; + ctypes = c2.TAG === "Item" ? true : false; + break; case "Item" : - switch (c2.TAG) { - case "Enemy" : - case "Item" : - ctypes = true; - break; - case "Player" : - case "Block" : - ctypes = false; - break; - - } - break; + switch (c2.TAG) { + case "Enemy" : + case "Item" : + ctypes = true; + break; + case "Player" : + case "Block" : + ctypes = false; + break; + + } + break; case "Block" : - ctypes = false; - break; + ctypes = false; + break; } if (o1.kill || o2.kill) { @@ -1327,94 +1327,94 @@ function check_collision(c1, c2) { function kill(collid, ctx) { switch (collid.TAG) { case "Player" : - return /* [] */0; + return /* [] */0; case "Enemy" : - let o = collid._2; - let pos_0 = o.pos.x; - let pos_1 = o.pos.y; - let pos = [ - pos_0, - pos_1 - ]; - let score = o.score > 0 ? ({ - hd: make_score(o.score, pos, ctx), - tl: /* [] */0 - }) : /* [] */0; - let remains; - remains = collid._0 === "Goomba" ? ({ - hd: make$1(undefined, undefined, "GoombaSquish", pos, ctx), - tl: /* [] */0 - }) : /* [] */0; - return Pervasives.$at(score, remains); + let o = collid._2; + let pos_0 = o.pos.x; + let pos_1 = o.pos.y; + let pos = [ + pos_0, + pos_1 + ]; + let score = o.score > 0 ? ({ + hd: make_score(o.score, pos, ctx), + tl: /* [] */0 + }) : /* [] */0; + let remains; + remains = collid._0 === "Goomba" ? ({ + hd: make$1(undefined, undefined, "GoombaSquish", pos, ctx), + tl: /* [] */0 + }) : /* [] */0; + return Pervasives.$at(score, remains); case "Item" : - let o$1 = collid._2; - if (collid._0 === "Mushroom") { - return { - hd: make_score(o$1.score, [ - o$1.pos.x, - o$1.pos.y - ], ctx), - tl: /* [] */0 - }; - } else { - return /* [] */0; - } - case "Block" : - let o$2 = collid._2; - let tmp = collid._0; - if (typeof tmp === "object") { - return /* [] */0; - } - if (tmp !== "Brick") { - return /* [] */0; - } - let pos_0$1 = o$2.pos.x; - let pos_1$1 = o$2.pos.y; - let pos$1 = [ - pos_0$1, - pos_1$1 - ]; - let p1 = make$1([ - -5, - -5 - ], [ - 0, - 0.2 - ], "BrickChunkL", pos$1, ctx); - let p2 = make$1([ - -3, - -4 - ], [ - 0, - 0.2 - ], "BrickChunkL", pos$1, ctx); - let p3 = make$1([ - 3, - -4 - ], [ - 0, - 0.2 - ], "BrickChunkR", pos$1, ctx); - let p4 = make$1([ - 5, - -5 - ], [ - 0, - 0.2 - ], "BrickChunkR", pos$1, ctx); + let o$1 = collid._2; + if (collid._0 === "Mushroom") { return { - hd: p1, + hd: make_score(o$1.score, [ + o$1.pos.x, + o$1.pos.y + ], ctx), + tl: /* [] */0 + }; + } else { + return /* [] */0; + } + case "Block" : + let o$2 = collid._2; + let tmp = collid._0; + if (typeof tmp === "object") { + return /* [] */0; + } + if (tmp !== "Brick") { + return /* [] */0; + } + let pos_0$1 = o$2.pos.x; + let pos_1$1 = o$2.pos.y; + let pos$1 = [ + pos_0$1, + pos_1$1 + ]; + let p1 = make$1([ + -5, + -5 + ], [ + 0, + 0.2 + ], "BrickChunkL", pos$1, ctx); + let p2 = make$1([ + -3, + -4 + ], [ + 0, + 0.2 + ], "BrickChunkL", pos$1, ctx); + let p3 = make$1([ + 3, + -4 + ], [ + 0, + 0.2 + ], "BrickChunkR", pos$1, ctx); + let p4 = make$1([ + 5, + -5 + ], [ + 0, + 0.2 + ], "BrickChunkR", pos$1, ctx); + return { + hd: p1, + tl: { + hd: p2, tl: { - hd: p2, + hd: p3, tl: { - hd: p3, - tl: { - hd: p4, - tl: /* [] */0 - } + hd: p4, + tl: /* [] */0 } } - }; + } + }; } } @@ -1653,460 +1653,460 @@ function process_collision(dir, c1, c2, state) { let o2$2; switch (c1.TAG) { case "Player" : - let o1$3 = c1._2; - let s1$2 = c1._1; - switch (c2.TAG) { - case "Player" : - return [ - undefined, - undefined - ]; - case "Enemy" : - let o2$3 = c2._2; - let s2$2 = c2._1; - let typ$1 = c2._0; - if (dir === "South") { - s1 = s1$2; - o1 = o1$3; - typ = typ$1; - s2 = s2$2; - o2 = o2$3; - exit = 1; - } else { - s1$1 = s1$2; - o1$1 = o1$3; - t2 = typ$1; - s2$1 = s2$2; - o2$1 = o2$3; - exit = 2; - } - break; - case "Item" : - o1$2 = o1$3; - t2$1 = c2._0; - o2$2 = c2._2; - exit = 3; - break; - case "Block" : - let o2$4 = c2._2; - let t = c2._0; - if (dir === "North") { - if (typeof t !== "object") { - switch (t) { - case "Brick" : - if (c1._0 === "BigM") { - collide_block(undefined, dir, o1$3); - dec_health(o2$4); - return [ - undefined, - undefined - ]; - } else { - collide_block(undefined, dir, o1$3); - return [ - undefined, - undefined - ]; - } - case "Panel" : - game_win(state.ctx); - return [ - undefined, - undefined - ]; - default: - collide_block(undefined, dir, o1$3); - return [ - undefined, - undefined - ]; - } - } else { - let updated_block = evolve_block(o2$4, context); - let spawned_item = spawn_above(o1$3.dir, o2$4, t._0, context); - collide_block(undefined, dir, o1$3); - return [ - spawned_item, - updated_block - ]; - } - } else { - let exit$1 = 0; - if (typeof t !== "object") { - if (t === "Panel") { - game_win(state.ctx); + let o1$3 = c1._2; + let s1$2 = c1._1; + switch (c2.TAG) { + case "Player" : + return [ + undefined, + undefined + ]; + case "Enemy" : + let o2$3 = c2._2; + let s2$2 = c2._1; + let typ$1 = c2._0; + if (dir === "South") { + s1 = s1$2; + o1 = o1$3; + typ = typ$1; + s2 = s2$2; + o2 = o2$3; + exit = 1; + } else { + s1$1 = s1$2; + o1$1 = o1$3; + t2 = typ$1; + s2$1 = s2$2; + o2$1 = o2$3; + exit = 2; + } + break; + case "Item" : + o1$2 = o1$3; + t2$1 = c2._0; + o2$2 = c2._2; + exit = 3; + break; + case "Block" : + let o2$4 = c2._2; + let t = c2._0; + if (dir === "North") { + if (typeof t !== "object") { + switch (t) { + case "Brick" : + if (c1._0 === "BigM") { + collide_block(undefined, dir, o1$3); + dec_health(o2$4); return [ undefined, undefined ]; - } - exit$1 = 4; - } else { - exit$1 = 4; - } - if (exit$1 === 4) { - if (dir === "South") { - state.multiplier = 1; + } else { collide_block(undefined, dir, o1$3); return [ undefined, undefined ]; } + case "Panel" : + game_win(state.ctx); + return [ + undefined, + undefined + ]; + default: collide_block(undefined, dir, o1$3); return [ undefined, undefined ]; - } - } - break; - - } - break; - case "Enemy" : - let o1$4 = c1._2; - let s1$3 = c1._1; - let t1 = c1._0; - switch (c2.TAG) { - case "Player" : - let o1$5 = c2._2; - let s1$4 = c2._1; - if (dir === "North") { - s1 = s1$4; - o1 = o1$5; - typ = t1; - s2 = s1$3; - o2 = o1$4; - exit = 1; - } else { - s1$1 = s1$4; - o1$1 = o1$5; - t2 = t1; - s2$1 = s1$3; - o2$1 = o1$4; - exit = 2; - } - break; - case "Enemy" : - let t2$2 = c2._0; - let s2$3 = c2._1; - let o2$5 = c2._2; - let exit$2 = 0; - switch (t1) { + } else { + let updated_block = evolve_block(o2$4, context); + let spawned_item = spawn_above(o1$3.dir, o2$4, t._0, context); + collide_block(undefined, dir, o1$3); + return [ + spawned_item, + updated_block + ]; + } + } else { + let exit$1 = 0; + if (typeof t !== "object") { + if (t === "Panel") { + game_win(state.ctx); + return [ + undefined, + undefined + ]; + } + exit$1 = 4; + } else { + exit$1 = 4; + } + if (exit$1 === 4) { + if (dir === "South") { + state.multiplier = 1; + collide_block(undefined, dir, o1$3); + return [ + undefined, + undefined + ]; + } + collide_block(undefined, dir, o1$3); + return [ + undefined, + undefined + ]; + } + + } + break; + + } + break; + case "Enemy" : + let o1$4 = c1._2; + let s1$3 = c1._1; + let t1 = c1._0; + switch (c2.TAG) { + case "Player" : + let o1$5 = c2._2; + let s1$4 = c2._1; + if (dir === "North") { + s1 = s1$4; + o1 = o1$5; + typ = t1; + s2 = s1$3; + o2 = o1$4; + exit = 1; + } else { + s1$1 = s1$4; + o1$1 = o1$5; + t2 = t1; + s2$1 = s1$3; + o2$1 = o1$4; + exit = 2; + } + break; + case "Enemy" : + let t2$2 = c2._0; + let s2$3 = c2._1; + let o2$5 = c2._2; + let exit$2 = 0; + switch (t1) { + case "GKoopaShell" : + switch (t2$2) { case "GKoopaShell" : - switch (t2$2) { - case "GKoopaShell" : - case "RKoopaShell" : - exit$2 = 1; - break; - default: - exit$2 = 2; - } - break; case "RKoopaShell" : - switch (t2$2) { - case "GKoopaShell" : - case "RKoopaShell" : - exit$2 = 1; - break; - default: - exit$2 = 2; - } - break; + exit$2 = 1; + break; default: - switch (t2$2) { - case "GKoopaShell" : - case "RKoopaShell" : - exit$2 = 3; - break; - default: - let exit$3 = 0; - switch (dir) { - case "North" : - case "South" : - return [ - undefined, - undefined - ]; - case "East" : - case "West" : - exit$3 = 4; - break; - - } - if (exit$3 === 4) { - rev_dir(o1$4, t1, s1$3); - rev_dir(o2$5, t2$2, s2$3); - return [ - undefined, - undefined - ]; - } - - } + exit$2 = 2; } - switch (exit$2) { - case 1 : - dec_health(o1$4); - dec_health(o2$5); - return [ - undefined, - undefined - ]; - case 2 : - if (o1$4.vel.x === 0) { - rev_dir(o2$5, t2$2, s2$3); - return [ - undefined, - undefined - ]; - } else { - dec_health(o2$5); - return [ - undefined, - undefined - ]; - } - case 3 : - if (o2$5.vel.x === 0) { - rev_dir(o1$4, t1, s1$3); - return [ - undefined, - undefined - ]; - } else { - dec_health(o1$4); + break; + case "RKoopaShell" : + switch (t2$2) { + case "GKoopaShell" : + case "RKoopaShell" : + exit$2 = 1; + break; + default: + exit$2 = 2; + } + break; + default: + switch (t2$2) { + case "GKoopaShell" : + case "RKoopaShell" : + exit$2 = 3; + break; + default: + let exit$3 = 0; + switch (dir) { + case "North" : + case "South" : return [ undefined, undefined ]; - } - + case "East" : + case "West" : + exit$3 = 4; + break; + + } + if (exit$3 === 4) { + rev_dir(o1$4, t1, s1$3); + rev_dir(o2$5, t2$2, s2$3); + return [ + undefined, + undefined + ]; + } + } - case "Item" : + } + switch (exit$2) { + case 1 : + dec_health(o1$4); + dec_health(o2$5); return [ undefined, undefined ]; - case "Block" : - let o2$6 = c2._2; - let t2$3 = c2._0; - let exit$4 = 0; - switch (dir) { - case "North" : - case "South" : - collide_block(undefined, dir, o1$4); - return [ - undefined, - undefined - ]; - case "East" : - case "West" : - exit$4 = 4; - break; - + case 2 : + if (o1$4.vel.x === 0) { + rev_dir(o2$5, t2$2, s2$3); + return [ + undefined, + undefined + ]; + } else { + dec_health(o2$5); + return [ + undefined, + undefined + ]; } - if (exit$4 === 4) { - let exit$5 = 0; - let typ$2; - switch (t1) { - case "GKoopaShell" : - if (typeof t2$3 !== "object") { - if (t2$3 === "Brick") { - dec_health(o2$6); - reverse_left_right(o1$4); - return [ - undefined, - undefined - ]; - } - exit$5 = 5; - } else { - typ$2 = t2$3._0; - exit$5 = 6; - } - break; - case "RKoopaShell" : - if (typeof t2$3 !== "object") { - if (t2$3 === "Brick") { - dec_health(o2$6); - reverse_left_right(o1$4); - return [ - undefined, - undefined - ]; - } - exit$5 = 5; - } else { - typ$2 = t2$3._0; - exit$5 = 6; - } - break; - default: - exit$5 = 5; - } - switch (exit$5) { - case 5 : - rev_dir(o1$4, t1, s1$3); - return [ - undefined, - undefined - ]; - case 6 : - let updated_block$1 = evolve_block(o2$6, context); - let spawned_item$1 = spawn_above(o1$4.dir, o2$6, typ$2, context); - rev_dir(o1$4, t1, s1$3); - return [ - updated_block$1, - spawned_item$1 - ]; - - } + case 3 : + if (o2$5.vel.x === 0) { + rev_dir(o1$4, t1, s1$3); + return [ + undefined, + undefined + ]; + } else { + dec_health(o1$4); + return [ + undefined, + undefined + ]; } - break; - - } - break; - case "Item" : - let o2$7 = c1._2; - switch (c2.TAG) { - case "Player" : - o1$2 = c2._2; - t2$1 = c1._0; - o2$2 = o2$7; - exit = 3; - break; - case "Enemy" : - case "Item" : + + } + case "Item" : + return [ + undefined, + undefined + ]; + case "Block" : + let o2$6 = c2._2; + let t2$3 = c2._0; + let exit$4 = 0; + switch (dir) { + case "North" : + case "South" : + collide_block(undefined, dir, o1$4); return [ undefined, undefined ]; - case "Block" : - switch (dir) { - case "North" : - case "South" : - collide_block(undefined, dir, o2$7); + case "East" : + case "West" : + exit$4 = 4; + break; + + } + if (exit$4 === 4) { + let exit$5 = 0; + let typ$2; + switch (t1) { + case "GKoopaShell" : + if (typeof t2$3 !== "object") { + if (t2$3 === "Brick") { + dec_health(o2$6); + reverse_left_right(o1$4); return [ undefined, undefined ]; - case "East" : - case "West" : - reverse_left_right(o2$7); + } + exit$5 = 5; + } else { + typ$2 = t2$3._0; + exit$5 = 6; + } + break; + case "RKoopaShell" : + if (typeof t2$3 !== "object") { + if (t2$3 === "Brick") { + dec_health(o2$6); + reverse_left_right(o1$4); return [ undefined, undefined ]; - - } - - } - break; + } + exit$5 = 5; + } else { + typ$2 = t2$3._0; + exit$5 = 6; + } + break; + default: + exit$5 = 5; + } + switch (exit$5) { + case 5 : + rev_dir(o1$4, t1, s1$3); + return [ + undefined, + undefined + ]; + case 6 : + let updated_block$1 = evolve_block(o2$6, context); + let spawned_item$1 = spawn_above(o1$4.dir, o2$6, typ$2, context); + rev_dir(o1$4, t1, s1$3); + return [ + updated_block$1, + spawned_item$1 + ]; + + } + } + break; + + } + break; + case "Item" : + let o2$7 = c1._2; + switch (c2.TAG) { + case "Player" : + o1$2 = c2._2; + t2$1 = c1._0; + o2$2 = o2$7; + exit = 3; + break; + case "Enemy" : + case "Item" : + return [ + undefined, + undefined + ]; + case "Block" : + switch (dir) { + case "North" : + case "South" : + collide_block(undefined, dir, o2$7); + return [ + undefined, + undefined + ]; + case "East" : + case "West" : + reverse_left_right(o2$7); + return [ + undefined, + undefined + ]; + + } + + } + break; case "Block" : - return [ - undefined, - undefined - ]; + return [ + undefined, + undefined + ]; } switch (exit) { case 1 : - o1.invuln = 10; - o1.jumping = false; - o1.grounded = true; - switch (typ) { - case "GKoopaShell" : - case "RKoopaShell" : - break; - default: - dec_health(o2); - o1.vel.y = - 4; - if (state.multiplier === 8) { - update_score(state, 800); - o2.score = 800; - return [ - undefined, - evolve_enemy(o1.dir, typ, s2, o2, context) - ]; - } - let score = Math.imul(100, state.multiplier); - update_score(state, score); - o2.score = score; - state.multiplier = (state.multiplier << 1); + o1.invuln = 10; + o1.jumping = false; + o1.grounded = true; + switch (typ) { + case "GKoopaShell" : + case "RKoopaShell" : + break; + default: + dec_health(o2); + o1.vel.y = - 4; + if (state.multiplier === 8) { + update_score(state, 800); + o2.score = 800; return [ undefined, evolve_enemy(o1.dir, typ, s2, o2, context) ]; - } - let r2 = evolve_enemy(o1.dir, typ, s2, o2, context); - o1.vel.y = - 4; - o1.pos.y = o1.pos.y - 5; - return [ - undefined, - r2 - ]; + } + let score = Math.imul(100, state.multiplier); + update_score(state, score); + o2.score = score; + state.multiplier = (state.multiplier << 1); + return [ + undefined, + evolve_enemy(o1.dir, typ, s2, o2, context) + ]; + } + let r2 = evolve_enemy(o1.dir, typ, s2, o2, context); + o1.vel.y = - 4; + o1.pos.y = o1.pos.y - 5; + return [ + undefined, + r2 + ]; case 2 : - switch (t2) { - case "GKoopaShell" : - case "RKoopaShell" : - break; - default: - dec_health(o1$1); - o1$1.invuln = 60; - return [ - undefined, - undefined - ]; - } - let r2$1 = o2$1.vel.x === 0 ? evolve_enemy(o1$1.dir, t2, s2$1, o2$1, context) : (dec_health(o1$1), o1$1.invuln = 60, undefined); - return [ - undefined, - r2$1 - ]; + switch (t2) { + case "GKoopaShell" : + case "RKoopaShell" : + break; + default: + dec_health(o1$1); + o1$1.invuln = 60; + return [ + undefined, + undefined + ]; + } + let r2$1 = o2$1.vel.x === 0 ? evolve_enemy(o1$1.dir, t2, s2$1, o2$1, context) : (dec_health(o1$1), o1$1.invuln = 60, undefined); + return [ + undefined, + r2$1 + ]; case 3 : - let exit$6 = 0; - switch (t2$1) { - case "Mushroom" : - dec_health(o2$2); - if (o1$2.health === 2) { - - } else { - o1$2.health = o1$2.health + 1 | 0; - } - o1$2.vel.x = 0; - o1$2.vel.y = 0; - update_score(state, 1000); - o2$2.score = 1000; - return [ - undefined, - undefined - ]; - case "FireFlower" : - case "Star" : - exit$6 = 4; - break; - case "Coin" : - state.coins = state.coins + 1 | 0; - dec_health(o2$2); - update_score(state, 100); - return [ - undefined, - undefined - ]; - - } - if (exit$6 === 4) { + let exit$6 = 0; + switch (t2$1) { + case "Mushroom" : dec_health(o2$2); + if (o1$2.health === 2) { + + } else { + o1$2.health = o1$2.health + 1 | 0; + } + o1$2.vel.x = 0; + o1$2.vel.y = 0; update_score(state, 1000); + o2$2.score = 1000; return [ undefined, undefined ]; - } - break; + case "FireFlower" : + case "Star" : + exit$6 = 4; + break; + case "Coin" : + state.coins = state.coins + 1 | 0; + dec_health(o2$2); + update_score(state, 100); + return [ + undefined, + undefined + ]; + + } + if (exit$6 === 4) { + dec_health(o2$2); + update_score(state, 1000); + return [ + undefined, + undefined + ]; + } + break; } } @@ -2361,20 +2361,20 @@ function keydown(evt) { if (match >= 41) { switch (match) { case 65 : - pressed_keys.left = true; - break; + pressed_keys.left = true; + break; case 66 : - pressed_keys.bbox = (pressed_keys.bbox + 1 | 0) % 2; - break; + pressed_keys.bbox = (pressed_keys.bbox + 1 | 0) % 2; + break; case 68 : - pressed_keys.right = true; - break; + pressed_keys.right = true; + break; case 83 : - pressed_keys.down = true; - break; + pressed_keys.down = true; + break; case 87 : - pressed_keys.up = true; - break; + pressed_keys.up = true; + break; default: } @@ -2384,20 +2384,20 @@ function keydown(evt) { case 34 : case 35 : case 36 : - break; + break; case 37 : - pressed_keys.left = true; - break; + pressed_keys.left = true; + break; case 32 : case 38 : - pressed_keys.up = true; - break; + pressed_keys.up = true; + break; case 39 : - pressed_keys.right = true; - break; + pressed_keys.right = true; + break; case 40 : - pressed_keys.down = true; - break; + pressed_keys.down = true; + break; } } @@ -2432,20 +2432,20 @@ function keyup(evt) { case 34 : case 35 : case 36 : - break; + break; case 37 : - pressed_keys.left = false; - break; + pressed_keys.left = false; + break; case 32 : case 38 : - pressed_keys.up = false; - break; + pressed_keys.up = false; + break; case 39 : - pressed_keys.right = false; - break; + pressed_keys.right = false; + break; case 40 : - pressed_keys.down = false; - break; + pressed_keys.down = false; + break; } } @@ -2492,11 +2492,11 @@ function convert_list(lst) { function choose_enemy_typ(typ) { switch (typ) { case 0 : - return "RKoopa"; + return "RKoopa"; case 1 : - return "GKoopa"; + return "GKoopa"; case 2 : - return "Goomba"; + return "Goomba"; default: throw new Error("Failure", { cause: { @@ -2510,18 +2510,18 @@ function choose_enemy_typ(typ) { function choose_sblock_typ(typ) { switch (typ) { case 0 : - return "Brick"; + return "Brick"; case 1 : - return "UnBBlock"; + return "UnBBlock"; case 2 : - return "Cloud"; + return "Cloud"; case 3 : - return { - TAG: "QBlock", - _0: "Mushroom" - }; + return { + TAG: "QBlock", + _0: "Mushroom" + }; case 4 : - return "Ground"; + return "Ground"; default: throw new Error("Failure", { cause: { @@ -2629,128 +2629,97 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { let middle_block = life_block_chance === 0 ? 3 : stair_typ; switch (prob) { case 0 : - if (blockw - cbx > 2) { - return { + if (blockw - cbx > 2) { + return { + hd: [ + stair_typ, + [ + cbx, + cby + ] + ], + tl: { hd: [ - stair_typ, + middle_block, [ - cbx, + cbx + 1, cby ] ], tl: { hd: [ - middle_block, + stair_typ, [ - cbx + 1, + cbx + 2, cby ] ], - tl: { - hd: [ - stair_typ, - [ - cbx + 2, - cby - ] - ], - tl: /* [] */0 - } + tl: /* [] */0 } - }; - } else if (blockw - cbx > 1) { - return { + } + }; + } else if (blockw - cbx > 1) { + return { + hd: [ + block_typ, + [ + cbx, + cby + ] + ], + tl: { hd: [ block_typ, [ - cbx, - cby - ] - ], - tl: { - hd: [ - block_typ, - [ - cbx + 1, - cby - ] - ], - tl: /* [] */0 - } - }; - } else { - return { - hd: [ - block_typ, - [ - cbx, + cbx + 1, cby ] ], tl: /* [] */0 - }; - } - case 1 : - let num_clouds = Random.int(5) + 5 | 0; - if (cby < 5) { - return generate_clouds(cbx, cby, 2, num_clouds); - } else { - return /* [] */0; - } - case 2 : - if (blockh - cby === 1) { - let four_0 = [ - stair_typ, + } + }; + } else { + return { + hd: [ + block_typ, [ cbx, cby ] - ]; - let four_1 = { - hd: [ - stair_typ, - [ - cbx + 1, - cby - ] - ], - tl: { - hd: [ - stair_typ, - [ - cbx + 2, - cby - ] - ], - tl: { - hd: [ - stair_typ, - [ - cbx + 3, - cby - ] - ], - tl: /* [] */0 - } - } - }; - let four = { - hd: four_0, - tl: four_1 - }; - let three_0 = [ + ], + tl: /* [] */0 + }; + } + case 1 : + let num_clouds = Random.int(5) + 5 | 0; + if (cby < 5) { + return generate_clouds(cbx, cby, 2, num_clouds); + } else { + return /* [] */0; + } + case 2 : + if (blockh - cby === 1) { + let four_0 = [ + stair_typ, + [ + cbx, + cby + ] + ]; + let four_1 = { + hd: [ stair_typ, [ cbx + 1, - cby - 1 + cby ] - ]; - let three_1 = { + ], + tl: { hd: [ stair_typ, [ cbx + 2, - cby - 1 + cby ] ], tl: { @@ -2758,232 +2727,291 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { stair_typ, [ cbx + 3, - cby - 1 + cby ] ], tl: /* [] */0 } - }; - let three = { - hd: three_0, - tl: three_1 - }; - let two_0 = [ + } + }; + let four = { + hd: four_0, + tl: four_1 + }; + let three_0 = [ + stair_typ, + [ + cbx + 1, + cby - 1 + ] + ]; + let three_1 = { + hd: [ stair_typ, [ cbx + 2, - cby - 2 + cby - 1 ] - ]; - let two_1 = { + ], + tl: { hd: [ stair_typ, [ cbx + 3, - cby - 2 + cby - 1 ] ], tl: /* [] */0 - }; - let two = { - hd: two_0, - tl: two_1 - }; - let one_0 = [ + } + }; + let three = { + hd: three_0, + tl: three_1 + }; + let two_0 = [ + stair_typ, + [ + cbx + 2, + cby - 2 + ] + ]; + let two_1 = { + hd: [ stair_typ, [ cbx + 3, - cby - 3 + cby - 2 ] - ]; - let one = { - hd: one_0, - tl: /* [] */0 - }; - return Pervasives.$at(four, Pervasives.$at(three, Pervasives.$at(two, one))); - } else { - return /* [] */0; - } + ], + tl: /* [] */0 + }; + let two = { + hd: two_0, + tl: two_1 + }; + let one_0 = [ + stair_typ, + [ + cbx + 3, + cby - 3 + ] + ]; + let one = { + hd: one_0, + tl: /* [] */0 + }; + return Pervasives.$at(four, Pervasives.$at(three, Pervasives.$at(two, one))); + } else { + return /* [] */0; + } case 3 : - if (stair_typ === 0 && blockh - cby > 3) { - let three_0$1 = [ + if (stair_typ === 0 && blockh - cby > 3) { + let three_0$1 = [ + stair_typ, + [ + cbx, + cby + ] + ]; + let three_1$1 = { + hd: [ stair_typ, [ - cbx, + cbx + 1, cby ] - ]; - let three_1$1 = { + ], + tl: { hd: [ stair_typ, [ - cbx + 1, + cbx + 2, cby ] ], - tl: { - hd: [ - stair_typ, - [ - cbx + 2, - cby - ] - ], - tl: /* [] */0 - } - }; - let three$1 = { - hd: three_0$1, - tl: three_1$1 - }; - let two_0$1 = [ + tl: /* [] */0 + } + }; + let three$1 = { + hd: three_0$1, + tl: three_1$1 + }; + let two_0$1 = [ + stair_typ, + [ + cbx + 2, + cby + 1 + ] + ]; + let two_1$1 = { + hd: [ stair_typ, [ - cbx + 2, + cbx + 3, cby + 1 ] - ]; - let two_1$1 = { - hd: [ - stair_typ, - [ - cbx + 3, - cby + 1 - ] - ], - tl: /* [] */0 - }; - let two$1 = { - hd: two_0$1, - tl: two_1$1 - }; - let one_0$1 = [ + ], + tl: /* [] */0 + }; + let two$1 = { + hd: two_0$1, + tl: two_1$1 + }; + let one_0$1 = [ + stair_typ, + [ + cbx + 5, + cby + 2 + ] + ]; + let one_1 = { + hd: [ stair_typ, [ - cbx + 5, + cbx + 6, cby + 2 ] - ]; - let one_1 = { - hd: [ - stair_typ, - [ - cbx + 6, - cby + 2 - ] - ], - tl: /* [] */0 - }; - let one$1 = { - hd: one_0$1, - tl: one_1 - }; - return Pervasives.$at(three$1, Pervasives.$at(two$1, one$1)); - } else if (blockh - cby > 2) { - let one_0$2 = [ + ], + tl: /* [] */0 + }; + let one$1 = { + hd: one_0$1, + tl: one_1 + }; + return Pervasives.$at(three$1, Pervasives.$at(two$1, one$1)); + } else if (blockh - cby > 2) { + let one_0$2 = [ + stair_typ, + [ + cbx, + cby + ] + ]; + let one_1$1 = { + hd: [ stair_typ, [ - cbx, + cbx + 1, cby ] - ]; - let one_1$1 = { - hd: [ - stair_typ, - [ - cbx + 1, - cby - ] - ], - tl: /* [] */0 - }; - let one$2 = { - hd: one_0$2, - tl: one_1$1 - }; - let two_0$2 = [ + ], + tl: /* [] */0 + }; + let one$2 = { + hd: one_0$2, + tl: one_1$1 + }; + let two_0$2 = [ + stair_typ, + [ + cbx + 3, + cby - 1 + ] + ]; + let two_1$2 = { + hd: [ stair_typ, [ - cbx + 3, + cbx + 4, cby - 1 ] - ]; - let two_1$2 = { - hd: [ - stair_typ, - [ - cbx + 4, - cby - 1 - ] - ], - tl: /* [] */0 - }; - let two$2 = { - hd: two_0$2, - tl: two_1$2 - }; - let three_0$2 = [ + ], + tl: /* [] */0 + }; + let two$2 = { + hd: two_0$2, + tl: two_1$2 + }; + let three_0$2 = [ + stair_typ, + [ + cbx + 4, + cby - 2 + ] + ]; + let three_1$2 = { + hd: [ stair_typ, [ - cbx + 4, + cbx + 5, cby - 2 ] - ]; - let three_1$2 = { + ], + tl: { hd: [ stair_typ, [ - cbx + 5, + cbx + 6, cby - 2 ] ], - tl: { - hd: [ - stair_typ, - [ - cbx + 6, - cby - 2 - ] - ], - tl: /* [] */0 - } - }; - let three$2 = { - hd: three_0$2, - tl: three_1$2 - }; - return Pervasives.$at(one$2, Pervasives.$at(two$2, three$2)); - } else { - return { - hd: [ - stair_typ, - [ - cbx, - cby - ] - ], tl: /* [] */0 - }; - } + } + }; + let three$2 = { + hd: three_0$2, + tl: three_1$2 + }; + return Pervasives.$at(one$2, Pervasives.$at(two$2, three$2)); + } else { + return { + hd: [ + stair_typ, + [ + cbx, + cby + ] + ], + tl: /* [] */0 + }; + } case 4 : - if (cby + 3 - blockh === 2) { - return { + if (cby + 3 - blockh === 2) { + return { + hd: [ + stair_typ, + [ + cbx, + cby + ] + ], + tl: /* [] */0 + }; + } else if (cby + 3 - blockh === 1) { + return { + hd: [ + stair_typ, + [ + cbx, + cby + ] + ], + tl: { hd: [ stair_typ, [ cbx, - cby + cby + 1 ] ], tl: /* [] */0 - }; - } else if (cby + 3 - blockh === 1) { - return { + } + }; + } else { + return { + hd: [ + stair_typ, + [ + cbx, + cby + ] + ], + tl: { hd: [ stair_typ, [ cbx, - cby + cby + 1 ] ], tl: { @@ -2991,53 +3019,25 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { stair_typ, [ cbx, - cby + 1 + cby + 2 ] ], tl: /* [] */0 } - }; - } else { - return { - hd: [ - stair_typ, - [ - cbx, - cby - ] - ], - tl: { - hd: [ - stair_typ, - [ - cbx, - cby + 1 - ] - ], - tl: { - hd: [ - stair_typ, - [ - cbx, - cby + 2 - ] - ], - tl: /* [] */0 - } - } - }; - } - case 5 : - return { - hd: [ - 3, - [ - cbx, - cby - ] - ], - tl: /* [] */0 + } }; + } + case 5 : + return { + hd: [ + 3, + [ + cbx, + cby + ] + ], + tl: /* [] */0 + }; default: throw new Error("Failure", { cause: { diff --git a/jscomp/test/miss_colon_test.js b/jscomp/test/miss_colon_test.js index 4291f26c34..afc589ffb1 100644 --- a/jscomp/test/miss_colon_test.js +++ b/jscomp/test/miss_colon_test.js @@ -21,26 +21,26 @@ function $plus$colon(_f, _g) { } switch (g.TAG) { case "Int" : - if (g._0 !== 0) { - return { - TAG: "Add", - _0: f, - _1: g - }; - } else { - return f; - } - case "Add" : - _g = g._1; - _f = $plus$colon(f, g._0); - continue; - case "Var" : - case "Mul" : + if (g._0 !== 0) { return { TAG: "Add", _0: f, _1: g }; + } else { + return f; + } + case "Add" : + _g = g._1; + _f = $plus$colon(f, g._0); + continue; + case "Var" : + case "Mul" : + return { + TAG: "Add", + _0: f, + _1: g + }; } }; @@ -88,26 +88,26 @@ function $star$colon(_f, _g) { } switch (g.TAG) { case "Int" : - if (g._0 !== 1) { - return { - TAG: "Mul", - _0: f, - _1: g - }; - } else { - return f; - } - case "Var" : - case "Add" : + if (g._0 !== 1) { return { TAG: "Mul", _0: f, _1: g }; + } else { + return f; + } + case "Var" : + case "Add" : + return { + TAG: "Mul", + _0: f, + _1: g + }; case "Mul" : - _g = g._1; - _f = $star$colon(f, g._0); - continue; + _g = g._1; + _f = $star$colon(f, g._0); + continue; } }; @@ -117,11 +117,11 @@ function simplify(x) { switch (x.TAG) { case "Int" : case "Var" : - return x; + return x; case "Add" : - return $plus$colon(simplify(x._0), simplify(x._1)); + return $plus$colon(simplify(x._0), simplify(x._1)); case "Mul" : - return $star$colon(simplify(x._0), simplify(x._1)); + return $star$colon(simplify(x._0), simplify(x._1)); } } diff --git a/jscomp/test/mock_mt.js b/jscomp/test/mock_mt.js index 70eea7c7fc..4283855e47 100644 --- a/jscomp/test/mock_mt.js +++ b/jscomp/test/mock_mt.js @@ -13,71 +13,71 @@ function from_pair_suites(name, suites) { let fn = param[1](); switch (fn.TAG) { case "Eq" : - console.log([ - name, - fn._0, - "eq?", - fn._1 - ]); - return; + console.log([ + name, + fn._0, + "eq?", + fn._1 + ]); + return; case "Neq" : - console.log([ - name, - fn._0, - "neq?", - fn._1 - ]); - return; + console.log([ + name, + fn._0, + "neq?", + fn._1 + ]); + return; case "StrictEq" : - console.log([ - name, - fn._0, - "strict_eq?", - fn._1 - ]); - return; + console.log([ + name, + fn._0, + "strict_eq?", + fn._1 + ]); + return; case "StrictNeq" : - console.log([ - name, - fn._0, - "strict_neq?", - fn._1 - ]); - return; + console.log([ + name, + fn._0, + "strict_neq?", + fn._1 + ]); + return; case "Ok" : - console.log([ - name, - fn._0, - "ok?" - ]); - return; + console.log([ + name, + fn._0, + "ok?" + ]); + return; case "Approx" : - console.log([ - name, - fn._0, - "~", - fn._1 - ]); - return; + console.log([ + name, + fn._0, + "~", + fn._1 + ]); + return; case "ApproxThreshold" : - console.log([ - name, - fn._1, - "~", - fn._2, - " (", - fn._0, - ")" - ]); - return; + console.log([ + name, + fn._1, + "~", + fn._2, + " (", + fn._0, + ")" + ]); + return; case "ThrowAny" : - return; + return; case "Fail" : - console.log("failed"); - return; + console.log("failed"); + return; case "FailWith" : - console.log("failed: " + fn._0); - return; + console.log("failed: " + fn._0); + return; } }), suites); diff --git a/jscomp/test/mt.js b/jscomp/test/mt.js index 19b896e753..1f4d8aaed3 100644 --- a/jscomp/test/mt.js +++ b/jscomp/test/mt.js @@ -52,45 +52,45 @@ function close_enough(thresholdOpt, a, b) { function handleCode(spec) { switch (spec.TAG) { case "Eq" : - Assert.deepEqual(spec._0, spec._1); - return; + Assert.deepEqual(spec._0, spec._1); + return; case "Neq" : - Assert.notDeepEqual(spec._0, spec._1); - return; + Assert.notDeepEqual(spec._0, spec._1); + return; case "StrictEq" : - Assert.strictEqual(spec._0, spec._1); - return; + Assert.strictEqual(spec._0, spec._1); + return; case "StrictNeq" : - Assert.notStrictEqual(spec._0, spec._1); - return; + Assert.notStrictEqual(spec._0, spec._1); + return; case "Ok" : - Assert.ok(spec._0); - return; + Assert.ok(spec._0); + return; case "Approx" : - let b = spec._1; - let a = spec._0; - if (!close_enough(undefined, a, b)) { - Assert.deepEqual(a, b); - return; - } else { - return; - } + let b = spec._1; + let a = spec._0; + if (!close_enough(undefined, a, b)) { + Assert.deepEqual(a, b); + return; + } else { + return; + } case "ApproxThreshold" : - let b$1 = spec._2; - let a$1 = spec._1; - if (!close_enough(spec._0, a$1, b$1)) { - Assert.deepEqual(a$1, b$1); - return; - } else { - return; - } - case "ThrowAny" : - Assert.throws(spec._0); + let b$1 = spec._2; + let a$1 = spec._1; + if (!close_enough(spec._0, a$1, b$1)) { + Assert.deepEqual(a$1, b$1); return; + } else { + return; + } + case "ThrowAny" : + Assert.throws(spec._0); + return; case "Fail" : - return assert_fail("failed"); + return assert_fail("failed"); case "FailWith" : - return assert_fail(spec._0); + return assert_fail(spec._0); } } diff --git a/jscomp/test/number_lexer.js b/jscomp/test/number_lexer.js index c7fe549086..3d5a297fb1 100644 --- a/jscomp/test/number_lexer.js +++ b/jscomp/test/number_lexer.js @@ -126,45 +126,45 @@ function __ocaml_lex_token_rec(l, lexbuf, ___ocaml_lex_state) { let __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - l("new line"); - ___ocaml_lex_state = 0; - continue; + l("new line"); + ___ocaml_lex_state = 0; + continue; case 1 : - l("number"); - l(Lexing.lexeme(lexbuf)); - ___ocaml_lex_state = 0; - continue; + l("number"); + l(Lexing.lexeme(lexbuf)); + ___ocaml_lex_state = 0; + continue; case 2 : - l("ident"); - l(Lexing.lexeme(lexbuf)); - ___ocaml_lex_state = 0; - continue; + l("ident"); + l(Lexing.lexeme(lexbuf)); + ___ocaml_lex_state = 0; + continue; case 3 : - l("+"); - ___ocaml_lex_state = 0; - continue; + l("+"); + ___ocaml_lex_state = 0; + continue; case 4 : - l("-"); - ___ocaml_lex_state = 0; - continue; + l("-"); + ___ocaml_lex_state = 0; + continue; case 5 : - l("*"); - ___ocaml_lex_state = 0; - continue; + l("*"); + ___ocaml_lex_state = 0; + continue; case 6 : - l("/"); - ___ocaml_lex_state = 0; - continue; + l("/"); + ___ocaml_lex_state = 0; + continue; case 7 : - l("("); - ___ocaml_lex_state = 0; - continue; + l("("); + ___ocaml_lex_state = 0; + continue; case 8 : - l(")"); - ___ocaml_lex_state = 0; - continue; + l(")"); + ___ocaml_lex_state = 0; + continue; case 9 : - return l("eof"); + return l("eof"); default: lexbuf.refill_buff(lexbuf); ___ocaml_lex_state = __ocaml_lex_state$1; diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index cab7e3bbd1..146cd214c3 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -788,26 +788,26 @@ function rename(ids, x) { } switch (l.TAG) { case "Alt" : - return mk_expr(ids, { - TAG: "Alt", - _0: List.map((function (extra) { - return rename(ids, extra); - }), l._0) - }); + return mk_expr(ids, { + TAG: "Alt", + _0: List.map((function (extra) { + return rename(ids, extra); + }), l._0) + }); case "Seq" : - return mk_expr(ids, { - TAG: "Seq", - _0: l._0, - _1: rename(ids, l._1), - _2: rename(ids, l._2) - }); + return mk_expr(ids, { + TAG: "Seq", + _0: l._0, + _1: rename(ids, l._1), + _2: rename(ids, l._2) + }); case "Rep" : - return mk_expr(ids, { - TAG: "Rep", - _0: l._0, - _1: l._1, - _2: rename(ids, l._2) - }); + return mk_expr(ids, { + TAG: "Rep", + _0: l._0, + _1: l._1, + _2: rename(ids, l._2) + }); default: return mk_expr(ids, x.def); } @@ -827,65 +827,65 @@ function equal(_l1, _l2) { let marks1 = l1.hd; switch (marks1.TAG) { case "TSeq" : - if (!l2) { + if (!l2) { + return false; + } + let match = l2.hd; + switch (match.TAG) { + case "TSeq" : + if (marks1._1.id !== match._1.id) { + return false; + } + if (!equal(marks1._0, match._0)) { + return false; + } + _l2 = l2.tl; + _l1 = l1.tl; + continue; + case "TExp" : + case "TMatch" : return false; - } - let match = l2.hd; - switch (match.TAG) { - case "TSeq" : - if (marks1._1.id !== match._1.id) { - return false; - } - if (!equal(marks1._0, match._0)) { - return false; - } - _l2 = l2.tl; - _l1 = l1.tl; - continue; - case "TExp" : - case "TMatch" : - return false; - - } + + } case "TExp" : - if (!l2) { + if (!l2) { + return false; + } + let match$1 = l2.hd; + switch (match$1.TAG) { + case "TExp" : + if (marks1._1.id !== match$1._1.id) { + return false; + } + if (!Caml_obj.equal(marks1._0, match$1._0)) { + return false; + } + _l2 = l2.tl; + _l1 = l1.tl; + continue; + case "TSeq" : + case "TMatch" : return false; - } - let match$1 = l2.hd; - switch (match$1.TAG) { - case "TExp" : - if (marks1._1.id !== match$1._1.id) { - return false; - } - if (!Caml_obj.equal(marks1._0, match$1._0)) { - return false; - } - _l2 = l2.tl; - _l1 = l1.tl; - continue; - case "TSeq" : - case "TMatch" : - return false; - - } + + } case "TMatch" : - if (!l2) { + if (!l2) { + return false; + } + let marks2 = l2.hd; + switch (marks2.TAG) { + case "TSeq" : + case "TExp" : return false; - } - let marks2 = l2.hd; - switch (marks2.TAG) { - case "TSeq" : - case "TExp" : - return false; - case "TMatch" : - if (!Caml_obj.equal(marks1._0, marks2._0)) { - return false; - } - _l2 = l2.tl; - _l1 = l1.tl; - continue; - - } + case "TMatch" : + if (!Caml_obj.equal(marks1._0, marks2._0)) { + return false; + } + _l2 = l2.tl; + _l1 = l1.tl; + continue; + + } } }; @@ -901,17 +901,17 @@ function hash$1(_l, _accu) { let marks = l.hd; switch (marks.TAG) { case "TSeq" : - _accu = hash_combine(388635598, hash_combine(marks._1.id, hash$1(marks._0, accu))); - _l = l.tl; - continue; + _accu = hash_combine(388635598, hash_combine(marks._1.id, hash$1(marks._0, accu))); + _l = l.tl; + continue; case "TExp" : - _accu = hash_combine(726404471, hash_combine(marks._1.id, hash(marks._0, accu))); - _l = l.tl; - continue; + _accu = hash_combine(726404471, hash_combine(marks._1.id, hash(marks._0, accu))); + _l = l.tl; + continue; case "TMatch" : - _accu = hash_combine(471882453, hash(marks._0, accu)); - _l = l.tl; - continue; + _accu = hash_combine(471882453, hash(marks._0, accu)); + _l = l.tl; + continue; } }; @@ -924,21 +924,21 @@ function tseq(kind, x, y, rem) { let match = x.hd; switch (match.TAG) { case "TExp" : - let tmp = match._1.def; - if (typeof tmp !== "object" && !x.tl) { - return { - hd: { - TAG: "TExp", - _0: match._0, - _1: y - }, - tl: rem - }; - } - break; + let tmp = match._1.def; + if (typeof tmp !== "object" && !x.tl) { + return { + hd: { + TAG: "TExp", + _0: match._0, + _1: y + }, + tl: rem + }; + } + break; case "TSeq" : case "TMatch" : - break; + break; } return { @@ -1011,10 +1011,10 @@ function mark_used_indices(tbl) { return List.iter((function (x) { switch (x.TAG) { case "TSeq" : - return mark_used_indices(tbl)(x._0); + return mark_used_indices(tbl)(x._0); case "TExp" : case "TMatch" : - break; + break; } List.iter((function (param) { @@ -1056,9 +1056,9 @@ function remove_matches(extra) { switch (x.TAG) { case "TSeq" : case "TExp" : - return true; + return true; case "TMatch" : - return false; + return false; } }), extra); @@ -1073,17 +1073,17 @@ function split_at_match_rec(_l$p, _x) { switch (x$1.TAG) { case "TSeq" : case "TExp" : - _x = x.tl; - _l$p = { - hd: x$1, - tl: l$p - }; - continue; + _x = x.tl; + _l$p = { + hd: x$1, + tl: l$p + }; + continue; case "TMatch" : - return [ - List.rev(l$p), - remove_matches(x.tl) - ]; + return [ + List.rev(l$p), + remove_matches(x.tl) + ]; } } else { @@ -1113,58 +1113,58 @@ function remove_duplicates(prev, _l, y) { let x = l.hd; switch (x.TAG) { case "TSeq" : - let x$1 = x._1; - let match = remove_duplicates(prev, x._0, x$1); - let match$1 = remove_duplicates(match[1], l.tl, y); - return [ - tseq(x._2, match[0], x$1, match$1[0]), - match$1[1] - ]; + let x$1 = x._1; + let match = remove_duplicates(prev, x._0, x$1); + let match$1 = remove_duplicates(match[1], l.tl, y); + return [ + tseq(x._2, match[0], x$1, match$1[0]), + match$1[1] + ]; case "TExp" : - let x$2 = x._1; - let tmp = x$2.def; - if (typeof tmp !== "object") { - let r = l.tl; - if (List.memq(y.id, prev)) { - _l = r; - continue; - } - let match$2 = remove_duplicates({ - hd: y.id, - tl: prev - }, r, y); - return [ - { - hd: x, - tl: match$2[0] - }, - match$2[1] - ]; - } - let r$1 = l.tl; - if (List.memq(x$2.id, prev)) { - _l = r$1; + let x$2 = x._1; + let tmp = x$2.def; + if (typeof tmp !== "object") { + let r = l.tl; + if (List.memq(y.id, prev)) { + _l = r; continue; } - let match$3 = remove_duplicates({ - hd: x$2.id, + let match$2 = remove_duplicates({ + hd: y.id, tl: prev - }, r$1, y); + }, r, y); return [ { hd: x, - tl: match$3[0] + tl: match$2[0] }, - match$3[1] + match$2[1] ]; + } + let r$1 = l.tl; + if (List.memq(x$2.id, prev)) { + _l = r$1; + continue; + } + let match$3 = remove_duplicates({ + hd: x$2.id, + tl: prev + }, r$1, y); + return [ + { + hd: x, + tl: match$3[0] + }, + match$3[1] + ]; case "TMatch" : - return [ - { - hd: x, - tl: /* [] */0 - }, - prev - ]; + return [ + { + hd: x, + tl: /* [] */0 + }, + prev + ]; } }; @@ -1177,32 +1177,32 @@ function set_idx(idx, x) { let marks = x.hd; switch (marks.TAG) { case "TSeq" : - return { - hd: { - TAG: "TSeq", - _0: set_idx(idx, marks._0), - _1: marks._1, - _2: marks._2 - }, - tl: set_idx(idx, x.tl) - }; + return { + hd: { + TAG: "TSeq", + _0: set_idx(idx, marks._0), + _1: marks._1, + _2: marks._2 + }, + tl: set_idx(idx, x.tl) + }; case "TExp" : - return { - hd: { - TAG: "TExp", - _0: marks_set_idx$1(marks._0, idx), - _1: marks._1 - }, - tl: set_idx(idx, x.tl) - }; + return { + hd: { + TAG: "TExp", + _0: marks_set_idx$1(marks._0, idx), + _1: marks._1 + }, + tl: set_idx(idx, x.tl) + }; case "TMatch" : - return { - hd: { - TAG: "TMatch", - _0: marks_set_idx$1(marks._0, idx) - }, - tl: set_idx(idx, x.tl) - }; + return { + hd: { + TAG: "TMatch", + _0: marks_set_idx$1(marks._0, idx) + }, + tl: set_idx(idx, x.tl) + }; } } @@ -1234,128 +1234,128 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { } switch (s.TAG) { case "Cst" : - if (mem(c, s._0)) { - return { - hd: { - TAG: "TExp", - _0: marks, - _1: eps_expr - }, - tl: rem - }; - } else { - return rem; - } + if (mem(c, s._0)) { + return { + hd: { + TAG: "TExp", + _0: marks, + _1: eps_expr + }, + tl: rem + }; + } else { + return rem; + } case "Alt" : - return delta_2(marks, c, next_cat, prev_cat, s._0, rem); + return delta_2(marks, c, next_cat, prev_cat, s._0, rem); case "Seq" : - let y$p = delta_1(marks, c, next_cat, prev_cat, s._1, /* [] */0); - return delta_seq(c, next_cat, prev_cat, s._0, y$p, s._2, rem); + let y$p = delta_1(marks, c, next_cat, prev_cat, s._1, /* [] */0); + return delta_seq(c, next_cat, prev_cat, s._0, y$p, s._2, rem); case "Rep" : - let kind = s._1; - let y$p$1 = delta_1(marks, c, next_cat, prev_cat, s._2, /* [] */0); - let marks$p = first((function (x) { - switch (x.TAG) { - case "TSeq" : - case "TExp" : - return; - case "TMatch" : - return x._0; - - } - }), y$p$1); - let match = marks$p !== undefined ? [ - remove_matches(y$p$1), - marks$p - ] : [ - y$p$1, - marks - ]; - let y$p$p = match[0]; - if (s._0 === "Non_greedy") { - return { - hd: { - TAG: "TMatch", - _0: marks - }, - tl: tseq(kind, y$p$p, x, rem) - }; - } else { - return tseq(kind, y$p$p, x, { - hd: { - TAG: "TMatch", - _0: match[1] - }, - tl: rem - }); + let kind = s._1; + let y$p$1 = delta_1(marks, c, next_cat, prev_cat, s._2, /* [] */0); + let marks$p = first((function (x) { + switch (x.TAG) { + case "TSeq" : + case "TExp" : + return; + case "TMatch" : + return x._0; + } - case "Mark" : - let i = s._0; - let marks_marks = { - hd: [ - i, - -1 - ], - tl: List.remove_assq(i, marks.marks) - }; - let marks_pmarks = marks.pmarks; - let marks$1 = { - marks: marks_marks, - pmarks: marks_pmarks - }; + }), y$p$1); + let match = marks$p !== undefined ? [ + remove_matches(y$p$1), + marks$p + ] : [ + y$p$1, + marks + ]; + let y$p$p = match[0]; + if (s._0 === "Non_greedy") { return { hd: { TAG: "TMatch", - _0: marks$1 + _0: marks }, - tl: rem + tl: tseq(kind, y$p$p, x, rem) }; + } else { + return tseq(kind, y$p$p, x, { + hd: { + TAG: "TMatch", + _0: match[1] + }, + tl: rem + }); + } + case "Mark" : + let i = s._0; + let marks_marks = { + hd: [ + i, + -1 + ], + tl: List.remove_assq(i, marks.marks) + }; + let marks_pmarks = marks.pmarks; + let marks$1 = { + marks: marks_marks, + pmarks: marks_pmarks + }; + return { + hd: { + TAG: "TMatch", + _0: marks$1 + }, + tl: rem + }; case "Erase" : + return { + hd: { + TAG: "TMatch", + _0: filter_marks(s._0, s._1, marks) + }, + tl: rem + }; + case "Before" : + if (intersect(next_cat, s._0)) { return { hd: { TAG: "TMatch", - _0: filter_marks(s._0, s._1, marks) + _0: marks }, tl: rem }; - case "Before" : - if (intersect(next_cat, s._0)) { - return { - hd: { - TAG: "TMatch", - _0: marks - }, - tl: rem - }; - } else { - return rem; - } + } else { + return rem; + } case "After" : - if (intersect(prev_cat, s._0)) { - return { - hd: { - TAG: "TMatch", - _0: marks - }, - tl: rem - }; - } else { - return rem; - } - case "Pmark" : - let marks_marks$1 = marks.marks; - let marks_pmarks$1 = add$1(s._0, marks.pmarks); - let marks$2 = { - marks: marks_marks$1, - pmarks: marks_pmarks$1 - }; + if (intersect(prev_cat, s._0)) { return { hd: { TAG: "TMatch", - _0: marks$2 + _0: marks }, tl: rem }; + } else { + return rem; + } + case "Pmark" : + let marks_marks$1 = marks.marks; + let marks_pmarks$1 = add$1(s._0, marks.pmarks); + let marks$2 = { + marks: marks_marks$1, + pmarks: marks_pmarks$1 + }; + return { + hd: { + TAG: "TMatch", + _0: marks$2 + }, + tl: rem + }; } } @@ -1373,9 +1373,9 @@ function delta_seq(c, next_cat, prev_cat, kind, y, z, rem) { switch (x.TAG) { case "TSeq" : case "TExp" : - return; + return; case "TMatch" : - return x._0; + return x._0; } }), y); @@ -1398,15 +1398,15 @@ function delta_4(c, next_cat, prev_cat, l, rem) { let rem$1 = delta_4(c, next_cat, prev_cat, l.tl, rem); switch (x.TAG) { case "TSeq" : - let y$p = delta_4(c, next_cat, prev_cat, x._0, /* [] */0); - return delta_seq(c, next_cat, prev_cat, x._2, y$p, x._1, rem$1); + let y$p = delta_4(c, next_cat, prev_cat, x._0, /* [] */0); + return delta_seq(c, next_cat, prev_cat, x._2, y$p, x._1, rem$1); case "TExp" : - return delta_1(x._0, c, next_cat, prev_cat, x._1, rem$1); + return delta_1(x._0, c, next_cat, prev_cat, x._1, rem$1); case "TMatch" : - return { - hd: x, - tl: rem$1 - }; + return { + hd: x, + tl: rem$1 + }; } } else { @@ -1446,16 +1446,16 @@ function status(s) { switch (m.TAG) { case "TSeq" : case "TExp" : - st$1 = "Running"; - break; + st$1 = "Running"; + break; case "TMatch" : - let m$1 = m._0; - st$1 = { - TAG: "Match", - _0: flatten_match(m$1.marks), - _1: m$1.pmarks - }; - break; + let m$1 = m._0; + st$1 = { + TAG: "Match", + _0: flatten_match(m$1.marks), + _1: m$1.pmarks + }; + break; } } else { @@ -1783,26 +1783,26 @@ function is_charset(_x) { } switch (x.TAG) { case "Set" : - return true; + return true; case "Sem" : case "Sem_greedy" : - _x = x._1; - continue; + _x = x._1; + continue; case "No_group" : case "Case" : case "No_case" : - _x = x._0; - continue; + _x = x._0; + continue; case "Alternative" : case "Intersection" : case "Complement" : - return List.for_all(is_charset, x._0); + return List.for_all(is_charset, x._0); case "Difference" : - if (!is_charset(x._0)) { - return false; - } - _x = x._1; - continue; + if (!is_charset(x._0)) { + return false; + } + _x = x._1; + continue; default: return false; } @@ -1871,45 +1871,45 @@ function colorize(c, regexp) { switch (regexp) { case "Beg_of_line" : case "End_of_line" : - return split({ - hd: [ - /* '\n' */10, - /* '\n' */10 - ], - tl: /* [] */0 - }, c); + return split({ + hd: [ + /* '\n' */10, + /* '\n' */10 + ], + tl: /* [] */0 + }, c); case "Beg_of_word" : case "End_of_word" : case "Not_bound" : - return split(cword, c); + return split(cword, c); case "Last_end_of_line" : - lnl.contents = true; - return; + lnl.contents = true; + return; case "Beg_of_str" : case "End_of_str" : case "Start" : case "Stop" : - return; + return; } } else { switch (regexp.TAG) { case "Set" : - return split(regexp._0, c); + return split(regexp._0, c); case "Sequence" : case "Alternative" : - return List.iter(colorize$1, regexp._0); + return List.iter(colorize$1, regexp._0); case "Repeat" : case "Group" : case "No_group" : case "Nest" : - _regexp = regexp._0; - continue; + _regexp = regexp._0; + continue; case "Sem" : case "Sem_greedy" : case "Pmark" : - _regexp = regexp._1; - continue; + _regexp = regexp._1; + continue; default: throw new Error("Assert_failure", { cause: { @@ -1956,209 +1956,209 @@ function equal$2(_x1, _x2) { if (typeof x1 !== "object") { switch (x1) { case "Beg_of_line" : - if (typeof x2 !== "object" && x2 === "Beg_of_line") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Beg_of_line") { + return true; + } else { + return false; + } case "End_of_line" : - if (typeof x2 !== "object" && x2 === "End_of_line") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "End_of_line") { + return true; + } else { + return false; + } case "Beg_of_word" : - if (typeof x2 !== "object" && x2 === "Beg_of_word") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Beg_of_word") { + return true; + } else { + return false; + } case "End_of_word" : - if (typeof x2 !== "object" && x2 === "End_of_word") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "End_of_word") { + return true; + } else { + return false; + } case "Not_bound" : - if (typeof x2 !== "object" && x2 === "Not_bound") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Not_bound") { + return true; + } else { + return false; + } case "Beg_of_str" : - if (typeof x2 !== "object" && x2 === "Beg_of_str") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Beg_of_str") { + return true; + } else { + return false; + } case "End_of_str" : - if (typeof x2 !== "object" && x2 === "End_of_str") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "End_of_str") { + return true; + } else { + return false; + } case "Last_end_of_line" : - if (typeof x2 !== "object" && x2 === "Last_end_of_line") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Last_end_of_line") { + return true; + } else { + return false; + } case "Start" : - if (typeof x2 !== "object" && x2 === "Start") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Start") { + return true; + } else { + return false; + } case "Stop" : - if (typeof x2 !== "object" && x2 === "Stop") { - return true; - } else { - return false; - } + if (typeof x2 !== "object" && x2 === "Stop") { + return true; + } else { + return false; + } } } else { switch (x1.TAG) { case "Set" : - if (typeof x2 !== "object" || x2.TAG !== "Set") { - return false; - } else { - return Caml_obj.equal(x1._0, x2._0); - } + if (typeof x2 !== "object" || x2.TAG !== "Set") { + return false; + } else { + return Caml_obj.equal(x1._0, x2._0); + } case "Sequence" : - if (typeof x2 !== "object" || x2.TAG !== "Sequence") { - return false; - } else { - return eq_list(x1._0, x2._0); - } + if (typeof x2 !== "object" || x2.TAG !== "Sequence") { + return false; + } else { + return eq_list(x1._0, x2._0); + } case "Alternative" : - if (typeof x2 !== "object" || x2.TAG !== "Alternative") { - return false; - } else { - return eq_list(x1._0, x2._0); - } + if (typeof x2 !== "object" || x2.TAG !== "Alternative") { + return false; + } else { + return eq_list(x1._0, x2._0); + } case "Repeat" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Repeat") { - return false; - } - if (x1._1 !== x2._1) { - return false; - } - if (!Caml_obj.equal(x1._2, x2._2)) { - return false; - } - _x2 = x2._0; - _x1 = x1._0; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Repeat") { + return false; + } + if (x1._1 !== x2._1) { + return false; + } + if (!Caml_obj.equal(x1._2, x2._2)) { + return false; + } + _x2 = x2._0; + _x1 = x1._0; + continue; case "Sem" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Sem") { - return false; - } - if (x1._0 !== x2._0) { - return false; - } - _x2 = x2._1; - _x1 = x1._1; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Sem") { + return false; + } + if (x1._0 !== x2._0) { + return false; + } + _x2 = x2._1; + _x1 = x1._1; + continue; case "Sem_greedy" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Sem_greedy") { - return false; - } - if (x1._0 !== x2._0) { - return false; - } - _x2 = x2._1; - _x1 = x1._1; - continue; - case "Group" : + if (typeof x2 !== "object") { return false; + } + if (x2.TAG !== "Sem_greedy") { + return false; + } + if (x1._0 !== x2._0) { + return false; + } + _x2 = x2._1; + _x1 = x1._1; + continue; + case "Group" : + return false; case "No_group" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "No_group") { - return false; - } - _x2 = x2._0; - _x1 = x1._0; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "No_group") { + return false; + } + _x2 = x2._0; + _x1 = x1._0; + continue; case "Nest" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Nest") { - return false; - } - _x2 = x2._0; - _x1 = x1._0; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Nest") { + return false; + } + _x2 = x2._0; + _x1 = x1._0; + continue; case "Case" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Case") { - return false; - } - _x2 = x2._0; - _x1 = x1._0; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Case") { + return false; + } + _x2 = x2._0; + _x1 = x1._0; + continue; case "No_case" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "No_case") { - return false; - } - _x2 = x2._0; - _x1 = x1._0; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "No_case") { + return false; + } + _x2 = x2._0; + _x1 = x1._0; + continue; case "Intersection" : - if (typeof x2 !== "object" || x2.TAG !== "Intersection") { - return false; - } else { - return eq_list(x1._0, x2._0); - } + if (typeof x2 !== "object" || x2.TAG !== "Intersection") { + return false; + } else { + return eq_list(x1._0, x2._0); + } case "Complement" : - if (typeof x2 !== "object" || x2.TAG !== "Complement") { - return false; - } else { - return eq_list(x1._0, x2._0); - } + if (typeof x2 !== "object" || x2.TAG !== "Complement") { + return false; + } else { + return eq_list(x1._0, x2._0); + } case "Difference" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Difference") { - return false; - } - if (!equal$2(x1._0, x2._0)) { - return false; - } - _x2 = x2._1; - _x1 = x1._1; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Difference") { + return false; + } + if (!equal$2(x1._0, x2._0)) { + return false; + } + _x2 = x2._1; + _x1 = x1._1; + continue; case "Pmark" : - if (typeof x2 !== "object") { - return false; - } - if (x2.TAG !== "Pmark") { - return false; - } - if (x1._0 !== x2._0) { - return false; - } - _x2 = x2._1; - _x1 = x1._1; - continue; + if (typeof x2 !== "object") { + return false; + } + if (x2.TAG !== "Pmark") { + return false; + } + if (x1._0 !== x2._0) { + return false; + } + _x2 = x2._1; + _x1 = x1._1; + continue; } } @@ -2209,69 +2209,69 @@ function merge_sequences(_x) { if (typeof l$p === "object") { switch (l$p.TAG) { case "Sequence" : - let match = l$p._0; - if (match) { - let y = match.tl; - let x$1 = match.hd; - let r$p = merge_sequences(x.tl); - let exit = 0; - if (r$p) { - let match$1 = r$p.hd; - if (typeof match$1 !== "object" || match$1.TAG !== "Sequence") { - exit = 2; - } else { - let match$2 = match$1._0; - if (match$2) { - if (equal$2(x$1, match$2.hd)) { - return { - hd: { - TAG: "Sequence", - _0: { - hd: x$1, - tl: { - hd: { - TAG: "Alternative", - _0: { - hd: sequence(y), - tl: { - hd: sequence(match$2.tl), - tl: /* [] */0 - } + let match = l$p._0; + if (match) { + let y = match.tl; + let x$1 = match.hd; + let r$p = merge_sequences(x.tl); + let exit = 0; + if (r$p) { + let match$1 = r$p.hd; + if (typeof match$1 !== "object" || match$1.TAG !== "Sequence") { + exit = 2; + } else { + let match$2 = match$1._0; + if (match$2) { + if (equal$2(x$1, match$2.hd)) { + return { + hd: { + TAG: "Sequence", + _0: { + hd: x$1, + tl: { + hd: { + TAG: "Alternative", + _0: { + hd: sequence(y), + tl: { + hd: sequence(match$2.tl), + tl: /* [] */0 } - }, - tl: /* [] */0 - } + } + }, + tl: /* [] */0 } - }, - tl: r$p.tl - }; - } - exit = 2; - } else { - exit = 2; + } + }, + tl: r$p.tl + }; } + exit = 2; + } else { + exit = 2; } - } else { - exit = 2; - } - if (exit === 2) { - return { - hd: { - TAG: "Sequence", - _0: { - hd: x$1, - tl: y - } - }, - tl: r$p - }; } - + } else { + exit = 2; } - break; + if (exit === 2) { + return { + hd: { + TAG: "Sequence", + _0: { + hd: x$1, + tl: y + } + }, + tl: r$p + }; + } + + } + break; case "Alternative" : - _x = Pervasives.$at(l$p._0, x.tl); - continue; + _x = Pervasives.$at(l$p._0, x.tl); + continue; default: } @@ -2299,52 +2299,60 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _x) if (typeof x !== "object") { switch (x) { case "Beg_of_line" : - let c$1 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.newline); - return [ - mk_expr(ids, { - TAG: "After", - _0: c$1 - }), - kind - ]; + let c$1 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.newline); + return [ + mk_expr(ids, { + TAG: "After", + _0: c$1 + }), + kind + ]; case "End_of_line" : - let c$2 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.newline); - return [ - mk_expr(ids, { - TAG: "Before", - _0: c$2 - }), - kind - ]; + let c$2 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.newline); + return [ + mk_expr(ids, { + TAG: "Before", + _0: c$2 + }), + kind + ]; case "Beg_of_word" : - let c$3 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.not_letter); - let c$4 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.letter); - return [ - seq$1(ids, "First", mk_expr(ids, { - TAG: "After", - _0: c$3 - }), mk_expr(ids, { - TAG: "Before", - _0: c$4 - })), - kind - ]; + let c$3 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.not_letter); + let c$4 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.letter); + return [ + seq$1(ids, "First", mk_expr(ids, { + TAG: "After", + _0: c$3 + }), mk_expr(ids, { + TAG: "Before", + _0: c$4 + })), + kind + ]; case "End_of_word" : - let c$5 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.letter); - let c$6 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.not_letter); - return [ - seq$1(ids, "First", mk_expr(ids, { + let c$5 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.letter); + let c$6 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.not_letter); + return [ + seq$1(ids, "First", mk_expr(ids, { + TAG: "After", + _0: c$5 + }), mk_expr(ids, { + TAG: "Before", + _0: c$6 + })), + kind + ]; + case "Not_bound" : + return [ + alt(ids, { + hd: seq$1(ids, "First", mk_expr(ids, { TAG: "After", - _0: c$5 + _0: Re_automata_Category.letter }), mk_expr(ids, { TAG: "Before", - _0: c$6 + _0: Re_automata_Category.letter })), - kind - ]; - case "Not_bound" : - return [ - alt(ids, { + tl: { hd: seq$1(ids, "First", mk_expr(ids, { TAG: "After", _0: Re_automata_Category.letter @@ -2352,185 +2360,177 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _x) TAG: "Before", _0: Re_automata_Category.letter })), - tl: { - hd: seq$1(ids, "First", mk_expr(ids, { - TAG: "After", - _0: Re_automata_Category.letter - }), mk_expr(ids, { - TAG: "Before", - _0: Re_automata_Category.letter - })), - tl: /* [] */0 - } - }), - kind - ]; + tl: /* [] */0 + } + }), + kind + ]; case "Beg_of_str" : - return [ - mk_expr(ids, { - TAG: "After", - _0: Re_automata_Category.inexistant - }), - kind - ]; + return [ + mk_expr(ids, { + TAG: "After", + _0: Re_automata_Category.inexistant + }), + kind + ]; case "End_of_str" : - return [ - mk_expr(ids, { - TAG: "Before", - _0: Re_automata_Category.inexistant - }), - kind - ]; + return [ + mk_expr(ids, { + TAG: "Before", + _0: Re_automata_Category.inexistant + }), + kind + ]; case "Last_end_of_line" : - let c$7 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.lastnewline); - return [ - mk_expr(ids, { - TAG: "Before", - _0: c$7 - }), - kind - ]; + let c$7 = Re_automata_Category.$plus$plus(Re_automata_Category.inexistant, Re_automata_Category.lastnewline); + return [ + mk_expr(ids, { + TAG: "Before", + _0: c$7 + }), + kind + ]; case "Start" : - return [ - mk_expr(ids, { - TAG: "After", - _0: Re_automata_Category.search_boundary - }), - kind - ]; + return [ + mk_expr(ids, { + TAG: "After", + _0: Re_automata_Category.search_boundary + }), + kind + ]; case "Stop" : - return [ - mk_expr(ids, { - TAG: "Before", - _0: Re_automata_Category.search_boundary - }), - kind - ]; + return [ + mk_expr(ids, { + TAG: "Before", + _0: Re_automata_Category.search_boundary + }), + kind + ]; } } else { switch (x.TAG) { case "Set" : - return [ - cst(ids, trans_set(cache, c, x._0)), - kind - ]; + return [ + cst(ids, trans_set(cache, c, x._0)), + kind + ]; case "Sequence" : - return [ - trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0), - kind - ]; + return [ + trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0), + kind + ]; case "Alternative" : - let merged_sequences = merge_sequences(x._0); - if (merged_sequences && !merged_sequences.tl) { - let match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, merged_sequences.hd); - return [ - enforce_kind(ids, kind, match[1], match[0]), - kind - ]; - } + let merged_sequences = merge_sequences(x._0); + if (merged_sequences && !merged_sequences.tl) { + let match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, merged_sequences.hd); return [ - alt(ids, List.map((function (r$p) { - let match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); - return enforce_kind(ids, kind, match[1], match[0]); - }), merged_sequences)), + enforce_kind(ids, kind, match[1], match[0]), kind ]; + } + return [ + alt(ids, List.map((function (r$p) { + let match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); + return enforce_kind(ids, kind, match[1], match[0]); + }), merged_sequences)), + kind + ]; case "Repeat" : - let j = x._2; - let i = x._1; - let match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0); - let kind$p = match$1[1]; - let cr = match$1[0]; - let rem; - if (j !== undefined) { - let f = greedy === "Non_greedy" ? (function (rem) { - return alt(ids, { - hd: mk_expr(ids, "Eps"), - tl: { - hd: seq$1(ids, kind$p, rename(ids, cr), rem), - tl: /* [] */0 - } - }); - }) : (function (rem) { - return alt(ids, { + let j = x._2; + let i = x._1; + let match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0); + let kind$p = match$1[1]; + let cr = match$1[0]; + let rem; + if (j !== undefined) { + let f = greedy === "Non_greedy" ? (function (rem) { + return alt(ids, { + hd: mk_expr(ids, "Eps"), + tl: { hd: seq$1(ids, kind$p, rename(ids, cr), rem), - tl: { - hd: mk_expr(ids, "Eps"), - tl: /* [] */0 - } - }); + tl: /* [] */0 + } }); - rem = iter(j - i | 0, f, mk_expr(ids, "Eps")); - } else { - rem = rep(ids, greedy, kind$p, cr); - } - return [ - iter(i, (function (rem) { - return seq$1(ids, kind$p, rename(ids, cr), rem); - }), rem), - kind - ]; + }) : (function (rem) { + return alt(ids, { + hd: seq$1(ids, kind$p, rename(ids, cr), rem), + tl: { + hd: mk_expr(ids, "Eps"), + tl: /* [] */0 + } + }); + }); + rem = iter(j - i | 0, f, mk_expr(ids, "Eps")); + } else { + rem = rep(ids, greedy, kind$p, cr); + } + return [ + iter(i, (function (rem) { + return seq$1(ids, kind$p, rename(ids, cr), rem); + }), rem), + kind + ]; case "Sem" : - let kind$p$1 = x._0; - let match$2 = translate(ids, kind$p$1, ign_group, ign_case, greedy, pos, cache, c, x._1); - return [ - enforce_kind(ids, kind$p$1, match$2[1], match$2[0]), - kind$p$1 - ]; + let kind$p$1 = x._0; + let match$2 = translate(ids, kind$p$1, ign_group, ign_case, greedy, pos, cache, c, x._1); + return [ + enforce_kind(ids, kind$p$1, match$2[1], match$2[0]), + kind$p$1 + ]; case "Sem_greedy" : - _x = x._1; - _greedy = x._0; - continue; + _x = x._1; + _greedy = x._0; + continue; case "Group" : - let r$p = x._0; - if (ign_group) { - _x = r$p; - continue; - } - let p = pos.contents; - pos.contents = pos.contents + 2 | 0; - let match$3 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); - return [ - seq$1(ids, "First", mk_expr(ids, { - TAG: "Mark", - _0: p - }), seq$1(ids, "First", match$3[0], mk_expr(ids, { - TAG: "Mark", - _0: p + 1 | 0 - }))), - match$3[1] - ]; - case "No_group" : - _x = x._0; - _ign_group = true; + let r$p = x._0; + if (ign_group) { + _x = r$p; continue; + } + let p = pos.contents; + pos.contents = pos.contents + 2 | 0; + let match$3 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); + return [ + seq$1(ids, "First", mk_expr(ids, { + TAG: "Mark", + _0: p + }), seq$1(ids, "First", match$3[0], mk_expr(ids, { + TAG: "Mark", + _0: p + 1 | 0 + }))), + match$3[1] + ]; + case "No_group" : + _x = x._0; + _ign_group = true; + continue; case "Nest" : - let b = pos.contents; - let match$4 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0); - let kind$p$2 = match$4[1]; - let cr$1 = match$4[0]; - let e = pos.contents - 1 | 0; - if (e < b) { - return [ - cr$1, - kind$p$2 - ]; - } else { - return [ - seq$1(ids, "First", erase(ids, b, e), cr$1), - kind$p$2 - ]; - } - case "Pmark" : - let match$5 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._1); + let b = pos.contents; + let match$4 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._0); + let kind$p$2 = match$4[1]; + let cr$1 = match$4[0]; + let e = pos.contents - 1 | 0; + if (e < b) { return [ - seq$1(ids, "First", mk_expr(ids, { - TAG: "Pmark", - _0: x._0 - }), match$5[0]), - match$5[1] + cr$1, + kind$p$2 ]; + } else { + return [ + seq$1(ids, "First", erase(ids, b, e), cr$1), + kind$p$2 + ]; + } + case "Pmark" : + let match$5 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, x._1); + return [ + seq$1(ids, "First", mk_expr(ids, { + TAG: "Pmark", + _0: x._0 + }), match$5[0]), + match$5[1] + ]; default: throw new Error("Assert_failure", { cause: { @@ -2610,131 +2610,131 @@ function handle_case(_ign_case, _x) { } switch (x.TAG) { case "Set" : - let s = x._0; + let s = x._0; + return { + TAG: "Set", + _0: ign_case ? case_insens(s) : s + }; + case "Sequence" : + return { + TAG: "Sequence", + _0: List.map((function (extra) { + return handle_case(ign_case, extra); + }), x._0) + }; + case "Alternative" : + let l$p = List.map((function (extra) { + return handle_case(ign_case, extra); + }), x._0); + if (is_charset({ + TAG: "Alternative", + _0: l$p + })) { return { TAG: "Set", - _0: ign_case ? case_insens(s) : s + _0: List.fold_left((function (s, r) { + return union(s, as_set(r)); + }), /* [] */0, l$p) }; - case "Sequence" : + } else { return { - TAG: "Sequence", - _0: List.map((function (extra) { - return handle_case(ign_case, extra); - }), x._0) + TAG: "Alternative", + _0: l$p }; - case "Alternative" : - let l$p = List.map((function (extra) { - return handle_case(ign_case, extra); - }), x._0); - if (is_charset({ - TAG: "Alternative", - _0: l$p - })) { - return { - TAG: "Set", - _0: List.fold_left((function (s, r) { - return union(s, as_set(r)); - }), /* [] */0, l$p) - }; - } else { - return { - TAG: "Alternative", - _0: l$p - }; - } + } case "Repeat" : + return { + TAG: "Repeat", + _0: handle_case(ign_case, x._0), + _1: x._1, + _2: x._2 + }; + case "Sem" : + let r$p = handle_case(ign_case, x._1); + if (is_charset(r$p)) { + return r$p; + } else { return { - TAG: "Repeat", - _0: handle_case(ign_case, x._0), - _1: x._1, - _2: x._2 + TAG: "Sem", + _0: x._0, + _1: r$p }; - case "Sem" : - let r$p = handle_case(ign_case, x._1); - if (is_charset(r$p)) { - return r$p; - } else { - return { - TAG: "Sem", - _0: x._0, - _1: r$p - }; - } + } case "Sem_greedy" : - let r$p$1 = handle_case(ign_case, x._1); - if (is_charset(r$p$1)) { - return r$p$1; - } else { - return { - TAG: "Sem_greedy", - _0: x._0, - _1: r$p$1 - }; - } + let r$p$1 = handle_case(ign_case, x._1); + if (is_charset(r$p$1)) { + return r$p$1; + } else { + return { + TAG: "Sem_greedy", + _0: x._0, + _1: r$p$1 + }; + } case "Group" : + return { + TAG: "Group", + _0: handle_case(ign_case, x._0) + }; + case "No_group" : + let r$p$2 = handle_case(ign_case, x._0); + if (is_charset(r$p$2)) { + return r$p$2; + } else { return { - TAG: "Group", - _0: handle_case(ign_case, x._0) + TAG: "No_group", + _0: r$p$2 }; - case "No_group" : - let r$p$2 = handle_case(ign_case, x._0); - if (is_charset(r$p$2)) { - return r$p$2; - } else { - return { - TAG: "No_group", - _0: r$p$2 - }; - } + } case "Nest" : - let r$p$3 = handle_case(ign_case, x._0); - if (is_charset(r$p$3)) { - return r$p$3; - } else { - return { - TAG: "Nest", - _0: r$p$3 - }; - } + let r$p$3 = handle_case(ign_case, x._0); + if (is_charset(r$p$3)) { + return r$p$3; + } else { + return { + TAG: "Nest", + _0: r$p$3 + }; + } case "Case" : - _x = x._0; - _ign_case = false; - continue; + _x = x._0; + _ign_case = false; + continue; case "No_case" : - _x = x._0; - _ign_case = true; - continue; + _x = x._0; + _ign_case = true; + continue; case "Intersection" : - let l$p$1 = List.map((function (r) { - return handle_case(ign_case, r); - }), x._0); - return { - TAG: "Set", - _0: List.fold_left((function (s, r) { - return inter(s, as_set(r)); - }), cany, l$p$1) - }; + let l$p$1 = List.map((function (r) { + return handle_case(ign_case, r); + }), x._0); + return { + TAG: "Set", + _0: List.fold_left((function (s, r) { + return inter(s, as_set(r)); + }), cany, l$p$1) + }; case "Complement" : - let l$p$2 = List.map((function (r) { - return handle_case(ign_case, r); - }), x._0); - return { - TAG: "Set", - _0: diff(cany, List.fold_left((function (s, r) { - return union(s, as_set(r)); - }), /* [] */0, l$p$2)) - }; + let l$p$2 = List.map((function (r) { + return handle_case(ign_case, r); + }), x._0); + return { + TAG: "Set", + _0: diff(cany, List.fold_left((function (s, r) { + return union(s, as_set(r)); + }), /* [] */0, l$p$2)) + }; case "Difference" : - return { - TAG: "Set", - _0: inter(as_set(handle_case(ign_case, x._0)), diff(cany, as_set(handle_case(ign_case, x._1)))) - }; + return { + TAG: "Set", + _0: inter(as_set(handle_case(ign_case, x._0)), diff(cany, as_set(handle_case(ign_case, x._1)))) + }; case "Pmark" : - return { - TAG: "Pmark", - _0: x._0, - _1: handle_case(ign_case, x._1) - }; + return { + TAG: "Pmark", + _0: x._0, + _1: handle_case(ign_case, x._1) + }; } }; @@ -2747,34 +2747,34 @@ function anchored(_x) { switch (x) { case "Beg_of_str" : case "Start" : - return true; + return true; default: return false; } } else { switch (x.TAG) { case "Sequence" : - return List.exists(anchored, x._0); + return List.exists(anchored, x._0); case "Alternative" : - return List.for_all(anchored, x._0); + return List.for_all(anchored, x._0); case "Repeat" : - if (x._1 <= 0) { - return false; - } - _x = x._0; - continue; + if (x._1 <= 0) { + return false; + } + _x = x._0; + continue; case "Group" : case "No_group" : case "Nest" : case "Case" : case "No_case" : - _x = x._0; - continue; + _x = x._0; + continue; case "Sem" : case "Sem_greedy" : case "Pmark" : - _x = x._1; - continue; + _x = x._1; + continue; default: return false; } @@ -3314,31 +3314,31 @@ let Not_supported = /* @__PURE__ */Caml_exceptions.create("Not_supported"); function posix_class_of_string(x) { switch (x) { case "alnum" : - return alnum; + return alnum; case "ascii" : - return ascii; + return ascii; case "blank" : - return blank; + return blank; case "cntrl" : - return cntrl; + return cntrl; case "digit" : - return digit; + return digit; case "graph" : - return graph; + return graph; case "lower" : - return lower; + return lower; case "print" : - return print; + return print; case "punct" : - return punct; + return punct; case "space" : - return space; + return space; case "upper" : - return upper; + return upper; case "word" : - return wordc; + return wordc; case "xdigit" : - return xdigit; + return xdigit; default: let s = "Invalid pcre class: " + x; throw new Error("Invalid_argument", { @@ -3539,75 +3539,75 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 55 : case 56 : case 57 : - throw new Error(Not_supported, { - cause: { - RE_EXN_ID: Not_supported - } - }); + throw new Error(Not_supported, { + cause: { + RE_EXN_ID: Not_supported + } + }); case 65 : - return "Beg_of_str"; + return "Beg_of_str"; case 66 : - return "Not_bound"; + return "Not_bound"; case 68 : - return compl({ - hd: digit, - tl: /* [] */0 - }); + return compl({ + hd: digit, + tl: /* [] */0 + }); case 71 : - return "Start"; + return "Start"; case 83 : - return compl({ - hd: space, - tl: /* [] */0 - }); + return compl({ + hd: space, + tl: /* [] */0 + }); case 87 : - return compl({ - hd: alnum, - tl: { - hd: { - TAG: "Set", - _0: { - hd: [ - /* '_' */95, - /* '_' */95 - ], - tl: /* [] */0 - } - }, - tl: /* [] */0 - } - }); + return compl({ + hd: alnum, + tl: { + hd: { + TAG: "Set", + _0: { + hd: [ + /* '_' */95, + /* '_' */95 + ], + tl: /* [] */0 + } + }, + tl: /* [] */0 + } + }); case 90 : - return "Last_end_of_line"; + return "Last_end_of_line"; case 98 : - return alt$1({ - hd: "Beg_of_word", - tl: { - hd: "End_of_word", - tl: /* [] */0 - } - }); + return alt$1({ + hd: "Beg_of_word", + tl: { + hd: "End_of_word", + tl: /* [] */0 + } + }); case 100 : - return digit; + return digit; case 115 : - return space; + return space; case 119 : - return alt$1({ - hd: alnum, - tl: { - hd: { - TAG: "Set", - _0: { - hd: [ - /* '_' */95, - /* '_' */95 - ], - tl: /* [] */0 - } - }, - tl: /* [] */0 - } - }); + return alt$1({ + hd: alnum, + tl: { + hd: { + TAG: "Set", + _0: { + hd: [ + /* '_' */95, + /* '_' */95 + ], + tl: /* [] */0 + } + }, + tl: /* [] */0 + } + }); case 67 : case 69 : case 70 : @@ -3648,13 +3648,13 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 118 : case 120 : case 121 : - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error + } + }); case 122 : - return "End_of_str"; + return "End_of_str"; default: return { TAG: "Set", @@ -3925,41 +3925,41 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } switch (c$2) { case 68 : - return { - NAME: "Set", - VAL: compl({ - hd: digit, - tl: /* [] */0 - }) - }; + return { + NAME: "Set", + VAL: compl({ + hd: digit, + tl: /* [] */0 + }) + }; case 83 : - return { - NAME: "Set", - VAL: compl({ - hd: space, - tl: /* [] */0 - }) - }; + return { + NAME: "Set", + VAL: compl({ + hd: space, + tl: /* [] */0 + }) + }; case 87 : - return { - NAME: "Set", - VAL: compl({ - hd: alnum, - tl: { - hd: { - TAG: "Set", - _0: { - hd: [ - /* '_' */95, - /* '_' */95 - ], - tl: /* [] */0 - } - }, - tl: /* [] */0 - } - }) - }; + return { + NAME: "Set", + VAL: compl({ + hd: alnum, + tl: { + hd: { + TAG: "Set", + _0: { + hd: [ + /* '_' */95, + /* '_' */95 + ], + tl: /* [] */0 + } + }, + tl: /* [] */0 + } + }) + }; case 58 : case 59 : case 60 : @@ -3973,60 +3973,60 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 94 : case 95 : case 96 : - return { - NAME: "Char", - VAL: c$2 - }; + return { + NAME: "Char", + VAL: c$2 + }; case 98 : - return { - NAME: "Char", - VAL: /* '\b' */8 - }; + return { + NAME: "Char", + VAL: /* '\b' */8 + }; case 100 : - return { - NAME: "Set", - VAL: digit - }; + return { + NAME: "Set", + VAL: digit + }; case 110 : - return { - NAME: "Char", - VAL: /* '\n' */10 - }; + return { + NAME: "Char", + VAL: /* '\n' */10 + }; case 114 : - return { - NAME: "Char", - VAL: /* '\r' */13 - }; + return { + NAME: "Char", + VAL: /* '\r' */13 + }; case 115 : - return { - NAME: "Set", - VAL: space - }; + return { + NAME: "Set", + VAL: space + }; case 116 : - return { - NAME: "Char", - VAL: /* '\t' */9 - }; + return { + NAME: "Char", + VAL: /* '\t' */9 + }; case 119 : - return { - NAME: "Set", - VAL: alt$1({ - hd: alnum, - tl: { - hd: { - TAG: "Set", - _0: { - hd: [ - /* '_' */95, - /* '_' */95 - ], - tl: /* [] */0 - } - }, - tl: /* [] */0 - } - }) - }; + return { + NAME: "Set", + VAL: alt$1({ + hd: alnum, + tl: { + hd: { + TAG: "Set", + _0: { + hd: [ + /* '_' */95, + /* '_' */95 + ], + tl: /* [] */0 + } + }, + tl: /* [] */0 + } + }) + }; case 65 : case 66 : case 67 : @@ -4069,11 +4069,11 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 120 : case 121 : case 122 : - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error + } + }); } } else { diff --git a/jscomp/test/offset.js b/jscomp/test/offset.js index 66015be0c8..4195120626 100644 --- a/jscomp/test/offset.js +++ b/jscomp/test/offset.js @@ -868,28 +868,54 @@ function of_list(l) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -900,50 +926,24 @@ function of_list(l) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/jscomp/test/rbset.js b/jscomp/test/rbset.js index 64bb399902..3cad89006f 100644 --- a/jscomp/test/rbset.js +++ b/jscomp/test/rbset.js @@ -94,33 +94,33 @@ function balance_left(l, x, r) { } switch (exit) { case 1 : - return { + return { + TAG: "Node", + _0: "Black", + _1: l, + _2: x, + _3: r + }; + case 2 : + return { + TAG: "Node", + _0: "Red", + _1: { TAG: "Node", _0: "Black", - _1: l, - _2: x, - _3: r - }; - case 2 : - return { + _1: a, + _2: x$1, + _3: b + }, + _2: y, + _3: { TAG: "Node", - _0: "Red", - _1: { - TAG: "Node", - _0: "Black", - _1: a, - _2: x$1, - _3: b - }, - _2: y, - _3: { - TAG: "Node", - _0: "Black", - _1: c, - _2: z, - _3: d - } - }; + _0: "Black", + _1: c, + _2: z, + _3: d + } + }; } } @@ -170,33 +170,33 @@ function balance_right(l, x, r) { } switch (exit) { case 1 : - return { + return { + TAG: "Node", + _0: "Black", + _1: l, + _2: x, + _3: r + }; + case 2 : + return { + TAG: "Node", + _0: "Red", + _1: { TAG: "Node", _0: "Black", - _1: l, - _2: x, - _3: r - }; - case 2 : - return { + _1: a, + _2: x$1, + _3: b + }, + _2: y, + _3: { TAG: "Node", - _0: "Red", - _1: { - TAG: "Node", - _0: "Black", - _1: a, - _2: x$1, - _3: b - }, - _2: y, - _3: { - TAG: "Node", - _0: "Black", - _1: c, - _2: z, - _3: d - } - }; + _0: "Black", + _1: c, + _2: z, + _3: d + } + }; } } diff --git a/jscomp/test/reasonReactRouter.js b/jscomp/test/reasonReactRouter.js index 2388be3df0..bc95545c7d 100644 --- a/jscomp/test/reasonReactRouter.js +++ b/jscomp/test/reasonReactRouter.js @@ -22,7 +22,7 @@ function path() { switch (raw) { case "" : case "/" : - return /* [] */0; + return /* [] */0; default: let raw$1 = raw.slice(1); let match = raw$1[raw$1.length - 1 | 0]; @@ -55,7 +55,7 @@ function hash() { switch (raw) { case "" : case "#" : - return ""; + return ""; default: return raw.slice(1); } @@ -70,7 +70,7 @@ function search() { switch (raw) { case "" : case "?" : - return ""; + return ""; default: return raw.slice(1); } diff --git a/jscomp/test/rec_module_test.js b/jscomp/test/rec_module_test.js index 6ad6eec524..0538099f02 100644 --- a/jscomp/test/rec_module_test.js +++ b/jscomp/test/rec_module_test.js @@ -1047,28 +1047,54 @@ function of_list(l) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -1079,50 +1105,24 @@ function of_list(l) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/jscomp/test/record_regression.js b/jscomp/test/record_regression.js index bc1e9d736e..8c0d31c6f1 100644 --- a/jscomp/test/record_regression.js +++ b/jscomp/test/record_regression.js @@ -175,27 +175,27 @@ function inlinedRecord(ir) { if (x1 !== undefined) { switch (x1) { case "x1" : - let x2 = ir.x2; - if (x2 !== undefined) { - return [ - x0, - "x1", - x2, - ir.x3 - ]; - } - break; + let x2 = ir.x2; + if (x2 !== undefined) { + return [ + x0, + "x1", + x2, + ir.x3 + ]; + } + break; case "xx1" : - let x2$1 = ir.x2; - if (x2$1 !== undefined) { - return [ - x0, - "xx1", - x2$1, - ir.x3 - ]; - } - break; + let x2$1 = ir.x2; + if (x2$1 !== undefined) { + return [ + x0, + "xx1", + x2$1, + ir.x3 + ]; + } + break; default: } diff --git a/jscomp/test/set_gen.js b/jscomp/test/set_gen.js index 0980f7152b..cabcafefad 100644 --- a/jscomp/test/set_gen.js +++ b/jscomp/test/set_gen.js @@ -451,28 +451,54 @@ function of_sorted_list(l) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + _0: "Empty", + _1: l.hd, + _2: "Empty", + _3: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - _0: "Empty", - _1: l.hd, + _0: { + TAG: "Node", + _0: "Empty", + _1: l.hd, + _2: "Empty", + _3: 1 + }, + _1: match.hd, _2: "Empty", - _3: 1 + _3: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -483,50 +509,24 @@ function of_sorted_list(l) { _2: "Empty", _3: 1 }, - _1: match.hd, - _2: "Empty", + _1: match$1.hd, + _2: { + TAG: "Node", + _0: "Empty", + _1: match$2.hd, + _2: "Empty", + _3: 1 + }, _3: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - _0: { - TAG: "Node", - _0: "Empty", - _1: l.hd, - _2: "Empty", - _3: 1 - }, - _1: match$1.hd, - _2: { - TAG: "Node", - _0: "Empty", - _1: match$2.hd, - _2: "Empty", - _3: 1 - }, - _3: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 4f0e8f24d1..2404985c67 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -44,17 +44,17 @@ function _must_escape(s) { case 37 : case 38 : case 39 : - exit = 1; - break; + exit = 1; + break; case 32 : case 34 : case 40 : case 41 : - throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + throw new Error(Pervasives.Exit, { + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } else { @@ -237,29 +237,29 @@ function expr_starting_with(c, k, t) { if (c >= 32) { switch (c) { case 32 : - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "sexpm.res", - 152, - 27 - ] - } - }); + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "sexpm.res", + 152, + 27 + ] + } + }); case 34 : - return quoted(k, t); + return quoted(k, t); case 33 : case 35 : case 36 : case 37 : case 38 : case 39 : - break; + break; case 40 : - return expr_list(/* [] */0, k, t); + return expr_list(/* [] */0, k, t); case 41 : - return _error(t, "unexpected ')'"); + return _error(t, "unexpected ')'"); } } @@ -367,13 +367,13 @@ function atom(k, t) { if (c >= 32) { switch (c) { case 32 : - exit = 2; - break; + exit = 2; + break; case 33 : - exit = 1; - break; + exit = 1; + break; case 34 : - return _error(t, "unexpected '\"' in the middle of an atom"); + return _error(t, "unexpected '\"' in the middle of an atom"); } } else { @@ -384,10 +384,10 @@ function atom(k, t) { } switch (exit) { case 1 : - Buffer.add_char(t.atom, c); - continue; + Buffer.add_char(t.atom, c); + continue; case 2 : - return _return_atom(c, k, t); + return _return_atom(c, k, t); } }; @@ -426,13 +426,13 @@ function escaped(k, t) { if (c < 117) { switch (c) { case 92 : - return k(/* '\\' */92); + return k(/* '\\' */92); case 98 : - return k(/* '\b' */8); + return k(/* '\b' */8); case 110 : - return k(/* '\n' */10); + return k(/* '\n' */10); case 114 : - return k(/* '\r' */13); + return k(/* '\r' */13); case 93 : case 94 : case 95 : @@ -453,9 +453,9 @@ function escaped(k, t) { case 112 : case 113 : case 115 : - break; + break; case 116 : - return k(/* '\t' */9); + return k(/* '\t' */9); } } diff --git a/jscomp/test/simplify_lambda_632o.js b/jscomp/test/simplify_lambda_632o.js index 4324b08b2c..0dab095990 100644 --- a/jscomp/test/simplify_lambda_632o.js +++ b/jscomp/test/simplify_lambda_632o.js @@ -5,13 +5,13 @@ function f(x) { switch (x) { case "X1" : - return "X1"; + return "X1"; case "X2" : - return "X2"; + return "X2"; case "X3" : - return "X3"; + return "X3"; case "X4" : - return "X4"; + return "X4"; } } @@ -19,13 +19,13 @@ function f(x) { function f2(x) { switch (x) { case "X1" : - return "X1"; + return "X1"; case "X2" : - return "X2"; + return "X2"; case "X3" : - return "X3"; + return "X3"; case "X4" : - return "X4"; + return "X4"; } } diff --git a/jscomp/test/stream_parser_test.js b/jscomp/test/stream_parser_test.js index 273c8aa2ab..fc90603a8d 100644 --- a/jscomp/test/stream_parser_test.js +++ b/jscomp/test/stream_parser_test.js @@ -33,19 +33,12 @@ function parse(token) { let n = token$1(); switch (n.TAG) { case "Kwd" : - if (n._0 === "(") { - let v = parse_expr_aux(parse_term()); - let match = token$1(); - if (match.TAG === "Kwd") { - if (match._0 === ")") { - return v; - } - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced parens" - } - }); + if (n._0 === "(") { + let v = parse_expr_aux(parse_term()); + let match = token$1(); + if (match.TAG === "Kwd") { + if (match._0 === ")") { + return v; } throw new Error(Parse_error, { cause: { @@ -54,15 +47,22 @@ function parse(token) { } }); } - Queue.push(n, look_ahead); throw new Error(Parse_error, { cause: { RE_EXN_ID: Parse_error, - _1: "unexpected token" + _1: "Unbalanced parens" } }); + } + Queue.push(n, look_ahead); + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error, + _1: "unexpected token" + } + }); case "Int" : - return n._0; + return n._0; default: Queue.push(n, look_ahead); throw new Error(Parse_error, { @@ -81,9 +81,9 @@ function parse(token) { if (e.TAG === "Kwd") { switch (e._0) { case "+" : - return e1 + parse_expr_aux(parse_term()) | 0; + return e1 + parse_expr_aux(parse_term()) | 0; case "-" : - return e1 - parse_expr_aux(parse_term()) | 0; + return e1 - parse_expr_aux(parse_term()) | 0; default: Queue.push(e, look_ahead); return e1; @@ -98,9 +98,9 @@ function parse(token) { if (e.TAG === "Kwd") { switch (e._0) { case "*" : - return Math.imul(e1, parse_term_aux(parse_atom())); + return Math.imul(e1, parse_term_aux(parse_atom())); case "/" : - return Caml_int32.div(e1, parse_term_aux(parse_atom())); + return Caml_int32.div(e1, parse_term_aux(parse_atom())); default: Queue.push(e, look_ahead); return e1; @@ -172,19 +172,12 @@ function l_parse(token) { let i = token$1(); switch (i.TAG) { case "Kwd" : - if (i._0 === "(") { - let v = parse_t_aux(parse_t()); - let t = token$1(); - if (t.TAG === "Kwd") { - if (t._0 === ")") { - return v; - } - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced )" - } - }); + if (i._0 === "(") { + let v = parse_t_aux(parse_t()); + let t = token$1(); + if (t.TAG === "Kwd") { + if (t._0 === ")") { + return v; } throw new Error(Parse_error, { cause: { @@ -196,11 +189,18 @@ function l_parse(token) { throw new Error(Parse_error, { cause: { RE_EXN_ID: Parse_error, - _1: "Unexpected token" + _1: "Unbalanced )" } }); + } + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error, + _1: "Unexpected token" + } + }); case "Int" : - return i._0; + return i._0; default: throw new Error(Parse_error, { cause: { @@ -217,11 +217,11 @@ function l_parse(token) { if (t.TAG === "Kwd") { switch (t._0) { case "*" : - _a = Math.imul(a, parse_f()); - continue; + _a = Math.imul(a, parse_f()); + continue; case "/" : - _a = Caml_int32.div(a, parse_f()); - continue; + _a = Caml_int32.div(a, parse_f()); + continue; default: Queue.push(t, look_ahead); return a; @@ -239,11 +239,11 @@ function l_parse(token) { if (t.TAG === "Kwd") { switch (t._0) { case "+" : - _a = a + parse_f_aux(parse_f()) | 0; - continue; + _a = a + parse_f_aux(parse_f()) | 0; + continue; case "-" : - _a = a - parse_f_aux(parse_f()) | 0; - continue; + _a = a - parse_f_aux(parse_f()) | 0; + continue; default: Queue.push(t, look_ahead); return a; diff --git a/jscomp/test/string_test.js b/jscomp/test/string_test.js index 61f5e92fe2..b12c5207ff 100644 --- a/jscomp/test/string_test.js +++ b/jscomp/test/string_test.js @@ -15,17 +15,17 @@ function ff(x) { case "0" : case "1" : case "2" : - a = 3; - break; + a = 3; + break; case "3" : - a = 4; - break; + a = 4; + break; case "4" : - a = 6; - break; + a = 6; + break; case "7" : - a = 7; - break; + a = 7; + break; default: a = 8; } @@ -38,17 +38,17 @@ function gg(x) { case 0 : case 1 : case 2 : - a = 3; - break; + a = 3; + break; case 3 : - a = 4; - break; + a = 4; + break; case 4 : - a = 6; - break; + a = 6; + break; case 8 : - a = 7; - break; + a = 7; + break; default: a = 8; } diff --git a/jscomp/test/stringmatch_test.js b/jscomp/test/stringmatch_test.js index 69510ced77..3531091eb7 100644 --- a/jscomp/test/stringmatch_test.js +++ b/jscomp/test/stringmatch_test.js @@ -153,53 +153,53 @@ if (tst02("\x00\x00\x00\x03") !== 3) { function tst03(s) { switch (s) { case "app_const" : - return 5; + return 5; case "app_const_const" : - return 9; + return 9; case "app_const_env" : - return 11; + return 11; case "app_const_meth" : - return 12; + return 12; case "app_const_var" : - return 10; + return 10; case "app_env" : - return 7; + return 7; case "app_env_const" : - return 14; + return 14; case "app_meth" : - return 8; + return 8; case "app_meth_const" : - return 15; + return 15; case "app_var" : - return 6; + return 6; case "app_var_const" : - return 13; + return 13; case "get_const" : - return 0; + return 0; case "get_env" : - return 2; + return 2; case "get_meth" : - return 3; + return 3; case "get_var" : - return 1; + return 1; case "meth_app_const" : - return 16; + return 16; case "meth_app_env" : - return 18; + return 18; case "meth_app_meth" : - return 19; + return 19; case "meth_app_var" : - return 17; + return 17; case "send_const" : - return 20; + return 20; case "send_env" : - return 22; + return 22; case "send_meth" : - return 23; + return 23; case "send_var" : - return 21; + return 21; case "set_var" : - return 4; + return 4; default: return -1; } @@ -832,29 +832,29 @@ if (tst03("tend_mesh") !== -1) { function tst04(s) { switch (s) { case "AAAAAAAA" : - return 0; + return 0; case "AAAAAAAAAAAAAAAA" : - return 1; + return 1; case "AAAAAAAAAAAAAAAAAAAAAAAA" : - return 2; + return 2; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 3; + return 3; case "BBBBBBBB" : - return 4; + return 4; case "BBBBBBBBBBBBBBBB" : - return 5; + return 5; case "BBBBBBBBBBBBBBBBBBBBBBBB" : - return 6; + return 6; case "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" : - return 7; + return 7; case "CCCCCCCC" : - return 8; + return 8; case "CCCCCCCCCCCCCCCC" : - return 9; + return 9; case "CCCCCCCCCCCCCCCCCCCCCCCC" : - return 10; + return 10; case "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC" : - return 11; + return 11; default: return -1; } @@ -1110,31 +1110,31 @@ if (tst04("AAAAAAAAAAAAAAADDDD") !== -1) { function tst05(s) { switch (s) { case "AAA" : - return 0; + return 0; case "AAAA" : - return 1; + return 1; case "AAAAA" : - return 2; + return 2; case "AAAAAA" : - return 3; + return 3; case "AAAAAAA" : - return 4; + return 4; case "AAAAAAAAAAAA" : - return 5; + return 5; case "AAAAAAAAAAAAAAAA" : - return 6; + return 6; case "AAAAAAAAAAAAAAAAAAAA" : - return 7; + return 7; case "BBB" : - return 8; + return 8; case "BBBB" : - return 9; + return 9; case "BBBBB" : - return 10; + return 10; case "BBBBBB" : - return 11; + return 11; case "BBBBBBB" : - return 12; + return 12; default: return -1; } @@ -1797,189 +1797,189 @@ let t91 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; function tst06(s) { switch (s) { case "A" : - return 55; + return 55; case "AA" : - return 56; + return 56; case "AAA" : - return 57; + return 57; case "AAAA" : - return 58; + return 58; case "AAAAA" : - return 59; + return 59; case "AAAAAA" : - return 60; + return 60; case "AAAAAAA" : - return 61; + return 61; case "AAAAAAAA" : - return 62; + return 62; case "AAAAAAAAA" : - return 63; + return 63; case "AAAAAAAAAA" : - return 64; + return 64; case "AAAAAAAAAAA" : - return 65; + return 65; case "AAAAAAAAAAAA" : - return 66; + return 66; case "AAAAAAAAAAAAA" : - return 67; + return 67; case "AAAAAAAAAAAAAA" : - return 68; + return 68; case "AAAAAAAAAAAAAAA" : - return 69; + return 69; case "AAAAAAAAAAAAAAAA" : - return 70; + return 70; case "AAAAAAAAAAAAAAAAA" : - return 71; + return 71; case "AAAAAAAAAAAAAAAAAA" : - return 72; + return 72; case "AAAAAAAAAAAAAAAAAAA" : - return 73; + return 73; case "AAAAAAAAAAAAAAAAAAAA" : - return 74; + return 74; case "AAAAAAAAAAAAAAAAAAAAA" : - return 75; + return 75; case "AAAAAAAAAAAAAAAAAAAAAA" : - return 76; + return 76; case "AAAAAAAAAAAAAAAAAAAAAAA" : - return 77; + return 77; case "AAAAAAAAAAAAAAAAAAAAAAAA" : - return 78; + return 78; case "AAAAAAAAAAAAAAAAAAAAAAAAA" : - return 79; + return 79; case "AAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 80; + return 80; case "AAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 81; + return 81; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 82; + return 82; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 83; + return 83; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 84; + return 84; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 85; + return 85; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 86; + return 86; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 87; + return 87; case "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" : - return 88; + return 88; case "BBBBBBBBBBBBBBB" : - return 89; + return 89; case "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" : - return 90; + return 90; case "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" : - return 91; + return 91; case "and" : - return 0; + return 0; case "as" : - return 1; + return 1; case "asr" : - return 54; + return 54; case "assert" : - return 2; + return 2; case "begin" : - return 3; + return 3; case "class" : - return 4; + return 4; case "constraint" : - return 5; + return 5; case "do" : - return 6; + return 6; case "done" : - return 7; + return 7; case "downto" : - return 8; + return 8; case "else" : - return 9; + return 9; case "end" : - return 10; + return 10; case "exception" : - return 11; + return 11; case "external" : - return 12; + return 12; case "false" : - return 13; + return 13; case "for" : - return 14; + return 14; case "fun" : - return 15; + return 15; case "function" : - return 16; + return 16; case "functor" : - return 17; + return 17; case "if" : - return 18; + return 18; case "in" : - return 19; + return 19; case "include" : - return 20; + return 20; case "inherit" : - return 21; + return 21; case "initializer" : - return 22; + return 22; case "land" : - return 49; + return 49; case "lazy" : - return 23; + return 23; case "let" : - return 24; + return 24; case "lor" : - return 50; + return 50; case "lsl" : - return 52; + return 52; case "lsr" : - return 53; + return 53; case "lxor" : - return 51; + return 51; case "match" : - return 25; + return 25; case "method" : - return 26; + return 26; case "mod" : - return 48; + return 48; case "module" : - return 27; + return 27; case "mutable" : - return 28; + return 28; case "new" : - return 29; + return 29; case "object" : - return 30; + return 30; case "of" : - return 31; + return 31; case "open" : - return 32; + return 32; case "or" : - return 33; + return 33; case "private" : - return 34; + return 34; case "rec" : - return 35; + return 35; case "sig" : - return 36; + return 36; case "struct" : - return 37; + return 37; case "then" : - return 38; + return 38; case "to" : - return 39; + return 39; case "true" : - return 40; + return 40; case "try" : - return 41; + return 41; case "type" : - return 42; + return 42; case "val" : - return 43; + return 43; case "virtual" : - return 44; + return 44; case "when" : - return 45; + return 45; case "while" : - return 46; + return 46; case "with" : - return 47; + return 47; default: return -1; } diff --git a/jscomp/test/switch_case_test.js b/jscomp/test/switch_case_test.js index 110f8d48d7..6990bc227c 100644 --- a/jscomp/test/switch_case_test.js +++ b/jscomp/test/switch_case_test.js @@ -31,13 +31,13 @@ function eq(loc, x, y) { function f(x) { switch (x) { case "xx'''" : - return 0; + return 0; case "xx\"" : - return 1; + return 1; case "xx\\\"" : - return 2; + return 2; case "xx\\\"\"" : - return 3; + return 3; default: return 4; } diff --git a/jscomp/test/switch_string.js b/jscomp/test/switch_string.js index 44bb2901b2..4cdd65b785 100644 --- a/jscomp/test/switch_string.js +++ b/jscomp/test/switch_string.js @@ -13,9 +13,9 @@ function foo(x) { function bar(x) { switch (x) { case "\\" : - return "\\"; + return "\\"; case "😀" : - return "😀"; + return "😀"; default: return ""; } diff --git a/jscomp/test/test_bug.js b/jscomp/test/test_bug.js index 2b46d0cd01..2148a05ab2 100644 --- a/jscomp/test/test_bug.js +++ b/jscomp/test/test_bug.js @@ -47,20 +47,20 @@ function escaped(s) { } else { switch (c$1) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -71,13 +71,13 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit$1 = 1; - break; + exit$1 = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } diff --git a/jscomp/test/test_incomplete.js b/jscomp/test/test_incomplete.js index 89fb301e78..a5b0dcc691 100644 --- a/jscomp/test/test_incomplete.js +++ b/jscomp/test/test_incomplete.js @@ -30,10 +30,10 @@ function f3(x) { switch (x.TAG) { case "A" : case "C" : - return x._0 + 1 | 0; + return x._0 + 1 | 0; case "B" : case "D" : - return x._0 + 2 | 0; + return x._0 + 2 | 0; } } diff --git a/jscomp/test/test_ramification.js b/jscomp/test/test_ramification.js index 9065dc4388..d77e2eb12a 100644 --- a/jscomp/test/test_ramification.js +++ b/jscomp/test/test_ramification.js @@ -8,17 +8,17 @@ function ff(x) { case "0" : case "1" : case "2" : - a = 3; - break; + a = 3; + break; case "3" : - a = 4; - break; + a = 4; + break; case "4" : - a = 6; - break; + a = 6; + break; case "7" : - a = 7; - break; + a = 7; + break; default: a = 8; } diff --git a/jscomp/test/test_set.js b/jscomp/test/test_set.js index 464f9fcfc6..88ddfa679d 100644 --- a/jscomp/test/test_set.js +++ b/jscomp/test/test_set.js @@ -591,28 +591,54 @@ function Make(Ord) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + _0: "Empty", + _1: l.hd, + _2: "Empty", + _3: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - _0: "Empty", - _1: l.hd, + _0: { + TAG: "Node", + _0: "Empty", + _1: l.hd, + _2: "Empty", + _3: 1 + }, + _1: match.hd, _2: "Empty", - _3: 1 + _3: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -623,50 +649,24 @@ function Make(Ord) { _2: "Empty", _3: 1 }, - _1: match.hd, - _2: "Empty", + _1: match$1.hd, + _2: { + TAG: "Node", + _0: "Empty", + _1: match$2.hd, + _2: "Empty", + _3: 1 + }, _3: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - _0: { - TAG: "Node", - _0: "Empty", - _1: l.hd, - _2: "Empty", - _3: 1 - }, - _1: match$1.hd, - _2: { - TAG: "Node", - _0: "Empty", - _1: match$2.hd, - _2: "Empty", - _3: 1 - }, - _3: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/jscomp/test/test_simple_pattern_match.js b/jscomp/test/test_simple_pattern_match.js index e127dc7215..9b64d32f86 100644 --- a/jscomp/test/test_simple_pattern_match.js +++ b/jscomp/test/test_simple_pattern_match.js @@ -8,11 +8,11 @@ let match; switch (Sys.os_type) { case "Cygwin" : case "Unix" : - match = [ - 1, - 2 - ]; - break; + match = [ + 1, + 2 + ]; + break; default: match = [ 3, diff --git a/jscomp/test/test_string.js b/jscomp/test/test_string.js index f71fcdffbe..2fee5dc228 100644 --- a/jscomp/test/test_string.js +++ b/jscomp/test/test_string.js @@ -7,9 +7,9 @@ let Caml_string = require("../../lib/js/caml_string.js"); function f(x) { switch (x) { case "aaaabb" : - return 0; + return 0; case "bbbb" : - return 1; + return 1; default: throw new Error("Assert_failure", { cause: { diff --git a/jscomp/test/test_string_case.js b/jscomp/test/test_string_case.js index 9a5bd0ef27..4b8b9df4cd 100644 --- a/jscomp/test/test_string_case.js +++ b/jscomp/test/test_string_case.js @@ -5,9 +5,9 @@ function f(x) { switch (x) { case "abcd" : - return 0; + return 0; case "bcde" : - return 1; + return 1; default: throw new Error("Assert_failure", { cause: { diff --git a/jscomp/test/test_string_switch.js b/jscomp/test/test_string_switch.js index 14432b71c7..0a8a542cb5 100644 --- a/jscomp/test/test_string_switch.js +++ b/jscomp/test/test_string_switch.js @@ -7,11 +7,11 @@ let os_version; switch (Sys.os_type) { case "Cygwin" : - os_version = 2; - break; + os_version = 2; + break; case "Unix" : - os_version = 1; - break; + os_version = 1; + break; default: os_version = 3; } diff --git a/jscomp/test/test_switch.js b/jscomp/test/test_switch.js index cf69436849..ec09ba1db9 100644 --- a/jscomp/test/test_switch.js +++ b/jscomp/test/test_switch.js @@ -12,13 +12,13 @@ function f(x) { } switch (x.TAG) { case "A" : - return 0; + return 0; case "B" : - return 1; + return 1; case "C" : - return 2; + return 2; case "F" : - return 3; + return 3; } } diff --git a/jscomp/test/ticker.js b/jscomp/test/ticker.js index 0ad4a839d8..d1cc64013b 100644 --- a/jscomp/test/ticker.js +++ b/jscomp/test/ticker.js @@ -1247,32 +1247,25 @@ function process_input_line(ticker_map, all_tickers, line) { if (tokens) { switch (tokens.hd) { case "Q" : - let match = tokens.tl; - if (match) { - let match$1 = match.tl; - if (match$1) { - if (match$1.tl) { - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - } - let ticker_map$1 = ticker_map !== undefined ? Caml_option.valFromOption(ticker_map) : compute_update_sequences(all_tickers); - let value = Caml_format.float_of_string(match$1.hd); - process_quote(ticker_map$1, match.hd, value); - return [ - all_tickers, - Caml_option.some(ticker_map$1) - ]; + let match = tokens.tl; + if (match) { + let match$1 = match.tl; + if (match$1) { + if (match$1.tl) { + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + let ticker_map$1 = ticker_map !== undefined ? Caml_option.valFromOption(ticker_map) : compute_update_sequences(all_tickers); + let value = Caml_format.float_of_string(match$1.hd); + process_quote(ticker_map$1, match.hd, value); + return [ + all_tickers, + Caml_option.some(ticker_map$1) + ]; } throw new Error("Failure", { cause: { @@ -1280,34 +1273,26 @@ function process_input_line(ticker_map, all_tickers, line) { _1: "Invalid input line" } }); + } + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); case "R" : - let match$2 = tokens.tl; - if (match$2) { - let match$3 = match$2.tl; - if (match$3) { - let ticker_name = match$2.hd; - switch (match$3.hd) { - case "+" : - let match$4 = match$3.tl; - if (match$4) { - let match$5 = match$4.tl; - if (match$5) { - if (match$5.tl) { - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - } - return [ - { - hd: make_binary_op(ticker_name, match$4.hd, match$5.hd, "PLUS"), - tl: all_tickers - }, - ticker_map - ]; - } + let match$2 = tokens.tl; + if (match$2) { + let match$3 = match$2.tl; + if (match$3) { + let ticker_name = match$2.hd; + switch (match$3.hd) { + case "+" : + let match$4 = match$3.tl; + if (match$4) { + let match$5 = match$4.tl; + if (match$5) { + if (match$5.tl) { throw new Error("Failure", { cause: { RE_EXN_ID: "Failure", @@ -1315,48 +1300,33 @@ function process_input_line(ticker_map, all_tickers, line) { } }); } - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - case "-" : - let match$6 = match$3.tl; - if (match$6) { - let match$7 = match$6.tl; - if (match$7) { - if (match$7.tl) { - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + return [ + { + hd: make_binary_op(ticker_name, match$4.hd, match$5.hd, "PLUS"), + tl: all_tickers + }, + ticker_map + ]; + } + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" } - return [ - { - hd: make_binary_op(ticker_name, match$6.hd, match$7.hd, "MINUS"), - tl: all_tickers - }, - ticker_map - ]; + }); + } + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" } - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - } - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - case "S" : - if (match$3.tl) { + }); + case "-" : + let match$6 = match$3.tl; + if (match$6) { + let match$7 = match$6.tl; + if (match$7) { + if (match$7.tl) { throw new Error("Failure", { cause: { RE_EXN_ID: "Failure", @@ -1366,31 +1336,53 @@ function process_input_line(ticker_map, all_tickers, line) { } return [ { - hd: { - value: undefined, - rank: "Uninitialized", - ticker_name: ticker_name, - type_: "Market" - }, + hd: make_binary_op(ticker_name, match$6.hd, match$7.hd, "MINUS"), tl: all_tickers }, ticker_map ]; - default: + } throw new Error("Failure", { cause: { RE_EXN_ID: "Failure", _1: "Invalid input line" } }); - } - } else { - throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + } + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); + case "S" : + if (match$3.tl) { + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); + } + return [ + { + hd: { + value: undefined, + rank: "Uninitialized", + ticker_name: ticker_name, + type_: "Market" + }, + tl: all_tickers + }, + ticker_map + ]; + default: + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } } else { throw new Error("Failure", { @@ -1400,6 +1392,14 @@ function process_input_line(ticker_map, all_tickers, line) { } }); } + } else { + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); + } default: throw new Error("Failure", { cause: { diff --git a/jscomp/test/topsort_test.js b/jscomp/test/topsort_test.js index c7b38c4ffe..b189b1cc8d 100644 --- a/jscomp/test/topsort_test.js +++ b/jscomp/test/topsort_test.js @@ -1319,28 +1319,54 @@ function of_list(l) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -1351,50 +1377,24 @@ function of_list(l) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/jscomp/test/typeof_test.js b/jscomp/test/typeof_test.js index e10187f05c..ea671ac58b 100644 --- a/jscomp/test/typeof_test.js +++ b/jscomp/test/typeof_test.js @@ -14,17 +14,17 @@ function string_or_number(x) { } else { switch (ty.TAG) { case "JSNumber" : - console.log(ty._0 + 3); - return true; + console.log(ty._0 + 3); + return true; case "JSString" : - console.log(ty._0 + "hei"); - return true; + console.log(ty._0 + "hei"); + return true; case "JSFunction" : - console.log("Function"); - return false; + console.log("Function"); + return false; case "JSBigInt" : - console.log(ty._0.toString()); - return true; + console.log(ty._0.toString()); + return true; default: return false; } diff --git a/jscomp/test/variant.js b/jscomp/test/variant.js index 4190ed6b8a..9363403df5 100644 --- a/jscomp/test/variant.js +++ b/jscomp/test/variant.js @@ -15,12 +15,12 @@ function foo(x) { } switch (x.TAG) { case "B" : - return x._0; + return x._0; case "C" : - return x._0 + x._1 | 0; + return x._0 + x._1 | 0; case "D" : - let match = x._0; - return match[0] + match[1] | 0; + let match = x._0; + return match[0] + match[1] | 0; } } @@ -44,11 +44,11 @@ function fooC(x) { function switchNum(x) { switch (x) { case 0 : - return "0"; + return "0"; case 1 : - return "1"; + return "1"; case 2 : - return "2"; + return "2"; default: return "_"; } @@ -88,10 +88,10 @@ function rollback_path(subst, p) { if (exn.RE_EXN_ID === "Not_found") { switch (p.TAG) { case "Pdot" : - return "Pdot"; + return "Pdot"; case "Pident" : case "Papply" : - return "Pident | Papply"; + return "Pident | Papply"; } } else { diff --git a/jscomp/test/variantsMatching.js b/jscomp/test/variantsMatching.js index 62c4678445..ae2b3322f1 100644 --- a/jscomp/test/variantsMatching.js +++ b/jscomp/test/variantsMatching.js @@ -5,15 +5,15 @@ function toEnum(x) { switch (x) { case "thisIsA" : - return 0; + return 0; case 42 : - return 1; + return 1; case null : - return 2; + return 2; case "D" : - return 3; + return 3; case 3.14 : - return 5; + return 5; } } @@ -21,15 +21,15 @@ function toEnum(x) { function toString(x) { switch (x) { case "thisIsA" : - return "A"; + return "A"; case 42 : - return "B"; + return "B"; case null : - return "C"; + return "C"; case "D" : - return "D"; + return "D"; case 3.14 : - return "Pi"; + return "Pi"; } } @@ -38,7 +38,7 @@ function bar(x) { switch (x) { case "thisIsA" : case 3.14 : - return 10; + return 10; default: return 0; } @@ -139,21 +139,21 @@ function foo(x) { if (typeof x !== "object") { switch (x) { case "dd" : - return 1; + return 1; case 12 : - return 2; + return 2; case false : - return 3; + return 3; } } else { switch (x.TAG) { case "qq" : - return 4; + return 4; case 42 : - return 5; + return 5; case "F" : - return 6; + return 6; } } @@ -283,9 +283,9 @@ function plus$3(x, y) { switch (x) { case null : case undefined : - return y; + return y; case "WhyNotAnotherOne" : - break; + break; } } else if (!(y === undefined || y === null || y === "WhyNotAnotherOne")) { @@ -300,9 +300,9 @@ function plus$3(x, y) { switch (y) { case null : case undefined : - return x; + return x; case "WhyNotAnotherOne" : - return "WhyNotAnotherOne"; + return "WhyNotAnotherOne"; } } @@ -313,11 +313,11 @@ function kind$1(x) { } switch (x) { case null : - return "null"; + return "null"; case undefined : - return "undefined"; + return "undefined"; case "WhyNotAnotherOne" : - return "whynot"; + return "whynot"; } } @@ -349,11 +349,11 @@ let MyNullableExtended = { function area(shape) { switch (shape.kind) { case 1 : - return Math.PI * Math.pow(shape.radius, 2); + return Math.PI * Math.pow(shape.radius, 2); case "square" : - return Math.pow(shape.sideLength, 2); + return Math.pow(shape.sideLength, 2); case "rectangle" : - return shape.width * shape.height; + return shape.width * shape.height; } } @@ -392,17 +392,17 @@ let CustomTagNotInline = { function classify(x) { switch (typeof x) { case "string" : - return "string"; + return "string"; case "number" : - return "int"; + return "int"; case "boolean" : - if (x) { - return "true"; - } else { - return "boolean"; - } + if (x) { + return "true"; + } else { + return "boolean"; + } case "object" : - return "Object" + x.name; + return "Object" + x.name; } } diff --git a/lib/es6/arg.js b/lib/es6/arg.js index d5ab446481..c9fd3a0c01 100644 --- a/lib/es6/arg.js +++ b/lib/es6/arg.js @@ -202,24 +202,24 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let progname = initpos < argv.contents.length ? Caml_array.get(argv.contents, initpos) : "(?)"; switch (error.TAG) { case "Unknown" : - let s = error._0; - switch (s) { - case "--help" : - case "-help" : - break; - default: - Buffer.add_string(b, progname + ": unknown option '" + s + "'.\n"); - } - break; + let s = error._0; + switch (s) { + case "--help" : + case "-help" : + break; + default: + Buffer.add_string(b, progname + ": unknown option '" + s + "'.\n"); + } + break; case "Wrong" : - Buffer.add_string(b, progname + ": wrong argument '" + error._1 + "'; option '" + error._0 + "' expects " + error._2 + ".\n"); - break; + Buffer.add_string(b, progname + ": wrong argument '" + error._1 + "'; option '" + error._0 + "' expects " + error._2 + ".\n"); + break; case "Missing" : - Buffer.add_string(b, progname + ": option '" + error._0 + "' needs an argument.\n"); - break; + Buffer.add_string(b, progname + ": option '" + error._0 + "' needs an argument.\n"); + break; case "Message" : - Buffer.add_string(b, progname + ": " + error._0 + ".\n"); - break; + Buffer.add_string(b, progname + ": " + error._0 + ".\n"); + break; } usage_b(b, speclist.contents, errmsg); @@ -329,169 +329,169 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let treat_action = function (f) { switch (f.TAG) { case "Unit" : - return f._0(); + return f._0(); case "Bool" : - let arg = get_arg(); - let s$1 = bool_of_string_opt(arg); - if (s$1 !== undefined) { - f._0(s$1); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg, - _2: "a boolean" - } + let arg = get_arg(); + let s$1 = bool_of_string_opt(arg); + if (s$1 !== undefined) { + f._0(s$1); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg, + _2: "a boolean" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set" : - no_arg(); - f._0.contents = true; - return; + no_arg(); + f._0.contents = true; + return; case "Clear" : - no_arg(); - f._0.contents = false; - return; + no_arg(); + f._0.contents = false; + return; case "String" : - let arg$1 = get_arg(); - f._0(arg$1); - return consume_arg(); + let arg$1 = get_arg(); + f._0(arg$1); + return consume_arg(); case "Set_string" : - f._0.contents = get_arg(); - return consume_arg(); + f._0.contents = get_arg(); + return consume_arg(); case "Int" : - let arg$2 = get_arg(); - let x = int_of_string_opt(arg$2); - if (x !== undefined) { - f._0(x); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$2, - _2: "an integer" - } + let arg$2 = get_arg(); + let x = int_of_string_opt(arg$2); + if (x !== undefined) { + f._0(x); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$2, + _2: "an integer" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set_int" : - let arg$3 = get_arg(); - let x$1 = int_of_string_opt(arg$3); - if (x$1 !== undefined) { - f._0.contents = x$1; - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$3, - _2: "an integer" - } + let arg$3 = get_arg(); + let x$1 = int_of_string_opt(arg$3); + if (x$1 !== undefined) { + f._0.contents = x$1; + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$3, + _2: "an integer" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Float" : - let arg$4 = get_arg(); - let x$2 = float_of_string_opt(arg$4); - if (x$2 !== undefined) { - f._0(x$2); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$4, - _2: "a float" - } + let arg$4 = get_arg(); + let x$2 = float_of_string_opt(arg$4); + if (x$2 !== undefined) { + f._0(x$2); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$4, + _2: "a float" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set_float" : - let arg$5 = get_arg(); - let x$3 = float_of_string_opt(arg$5); - if (x$3 !== undefined) { - f._0.contents = x$3; - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$5, - _2: "a float" - } - } - }); - } - return consume_arg(); - case "Tuple" : - return List.iter(treat_action, f._0); - case "Symbol" : - let symb = f._0; - let arg$6 = get_arg(); - if (List.mem(arg$6, symb)) { - f._1(arg$6); - return consume_arg(); - } + let arg$5 = get_arg(); + let x$3 = float_of_string_opt(arg$5); + if (x$3 !== undefined) { + f._0.contents = x$3; + } else { throw new Error(Stop, { cause: { RE_EXN_ID: Stop, _1: { TAG: "Wrong", _0: s, - _1: arg$6, - _2: "one of: " + make_symlist("", " ", "", symb) + _1: arg$5, + _2: "a float" } } }); + } + return consume_arg(); + case "Tuple" : + return List.iter(treat_action, f._0); + case "Symbol" : + let symb = f._0; + let arg$6 = get_arg(); + if (List.mem(arg$6, symb)) { + f._1(arg$6); + return consume_arg(); + } + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$6, + _2: "one of: " + make_symlist("", " ", "", symb) + } + } + }); case "Rest" : - let f$1 = f._0; - while (current.contents < (argv.contents.length - 1 | 0)) { - f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); - consume_arg(); - }; - return; - case "Expand" : - if (!allow_expand) { - throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" - } - }); - } - let arg$7 = get_arg(); - let newarg = f._0(arg$7); + let f$1 = f._0; + while (current.contents < (argv.contents.length - 1 | 0)) { + f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); consume_arg(); - let before = $$Array.sub(argv.contents, 0, current.contents + 1 | 0); - let after = $$Array.sub(argv.contents, current.contents + 1 | 0, (argv.contents.length - current.contents | 0) - 1 | 0); - argv.contents = Caml_array.concat({ - hd: before, + }; + return; + case "Expand" : + if (!allow_expand) { + throw new Error("Invalid_argument", { + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" + } + }); + } + let arg$7 = get_arg(); + let newarg = f._0(arg$7); + consume_arg(); + let before = $$Array.sub(argv.contents, 0, current.contents + 1 | 0); + let after = $$Array.sub(argv.contents, current.contents + 1 | 0, (argv.contents.length - current.contents | 0) - 1 | 0); + argv.contents = Caml_array.concat({ + hd: before, + tl: { + hd: newarg, tl: { - hd: newarg, - tl: { - hd: after, - tl: /* [] */0 - } + hd: after, + tl: /* [] */0 } - }); - return; + } + }); + return; } }; diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index 8e5a31a21f..9efd4d54ee 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -472,28 +472,28 @@ function toArray(n) { function fromSortedArrayRevAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - return singleton(arr[off]); + return singleton(arr[off]); case 2 : - let x0 = arr[off]; - let x1 = arr[off - 1 | 0]; - return { - v: x1, - h: 2, - l: singleton(x0), - r: undefined - }; + let x0 = arr[off]; + let x1 = arr[off - 1 | 0]; + return { + v: x1, + h: 2, + l: singleton(x0), + r: undefined + }; case 3 : - let x0$1 = arr[off]; - let x1$1 = arr[off - 1 | 0]; - let x2 = arr[off - 2 | 0]; - return { - v: x1$1, - h: 2, - l: singleton(x0$1), - r: singleton(x2) - }; + let x0$1 = arr[off]; + let x1$1 = arr[off - 1 | 0]; + let x2 = arr[off - 2 | 0]; + return { + v: x1$1, + h: 2, + l: singleton(x0$1), + r: singleton(x2) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayRevAux(arr, off, nl); @@ -506,28 +506,28 @@ function fromSortedArrayRevAux(arr, off, len) { function fromSortedArrayAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - return singleton(arr[off]); + return singleton(arr[off]); case 2 : - let x0 = arr[off]; - let x1 = arr[off + 1 | 0]; - return { - v: x1, - h: 2, - l: singleton(x0), - r: undefined - }; + let x0 = arr[off]; + let x1 = arr[off + 1 | 0]; + return { + v: x1, + h: 2, + l: singleton(x0), + r: undefined + }; case 3 : - let x0$1 = arr[off]; - let x1$1 = arr[off + 1 | 0]; - let x2 = arr[off + 2 | 0]; - return { - v: x1$1, - h: 2, - l: singleton(x0$1), - r: singleton(x2) - }; + let x0$1 = arr[off]; + let x1$1 = arr[off + 1 | 0]; + let x2 = arr[off + 2 | 0]; + return { + v: x1$1, + h: 2, + l: singleton(x0$1), + r: singleton(x2) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayAux(arr, off, nl); diff --git a/lib/es6/belt_internalAVLtree.js b/lib/es6/belt_internalAVLtree.js index 6aae3b7729..8051373490 100644 --- a/lib/es6/belt_internalAVLtree.js +++ b/lib/es6/belt_internalAVLtree.js @@ -715,36 +715,36 @@ function valuesToArray(n) { function fromSortedArrayRevAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - let match = arr[off]; - return singleton(match[0], match[1]); + let match = arr[off]; + return singleton(match[0], match[1]); case 2 : - let match_0 = arr[off]; - let match_1 = arr[off - 1 | 0]; - let match$1 = match_1; - let match$2 = match_0; - return { - k: match$1[0], - v: match$1[1], - h: 2, - l: singleton(match$2[0], match$2[1]), - r: undefined - }; + let match_0 = arr[off]; + let match_1 = arr[off - 1 | 0]; + let match$1 = match_1; + let match$2 = match_0; + return { + k: match$1[0], + v: match$1[1], + h: 2, + l: singleton(match$2[0], match$2[1]), + r: undefined + }; case 3 : - let match_0$1 = arr[off]; - let match_1$1 = arr[off - 1 | 0]; - let match_2 = arr[off - 2 | 0]; - let match$3 = match_2; - let match$4 = match_1$1; - let match$5 = match_0$1; - return { - k: match$4[0], - v: match$4[1], - h: 2, - l: singleton(match$5[0], match$5[1]), - r: singleton(match$3[0], match$3[1]) - }; + let match_0$1 = arr[off]; + let match_1$1 = arr[off - 1 | 0]; + let match_2 = arr[off - 2 | 0]; + let match$3 = match_2; + let match$4 = match_1$1; + let match$5 = match_0$1; + return { + k: match$4[0], + v: match$4[1], + h: 2, + l: singleton(match$5[0], match$5[1]), + r: singleton(match$3[0], match$3[1]) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayRevAux(arr, off, nl); @@ -757,36 +757,36 @@ function fromSortedArrayRevAux(arr, off, len) { function fromSortedArrayAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - let match = arr[off]; - return singleton(match[0], match[1]); + let match = arr[off]; + return singleton(match[0], match[1]); case 2 : - let match_0 = arr[off]; - let match_1 = arr[off + 1 | 0]; - let match$1 = match_1; - let match$2 = match_0; - return { - k: match$1[0], - v: match$1[1], - h: 2, - l: singleton(match$2[0], match$2[1]), - r: undefined - }; + let match_0 = arr[off]; + let match_1 = arr[off + 1 | 0]; + let match$1 = match_1; + let match$2 = match_0; + return { + k: match$1[0], + v: match$1[1], + h: 2, + l: singleton(match$2[0], match$2[1]), + r: undefined + }; case 3 : - let match_0$1 = arr[off]; - let match_1$1 = arr[off + 1 | 0]; - let match_2 = arr[off + 2 | 0]; - let match$3 = match_2; - let match$4 = match_1$1; - let match$5 = match_0$1; - return { - k: match$4[0], - v: match$4[1], - h: 2, - l: singleton(match$5[0], match$5[1]), - r: singleton(match$3[0], match$3[1]) - }; + let match_0$1 = arr[off]; + let match_1$1 = arr[off + 1 | 0]; + let match_2 = arr[off + 2 | 0]; + let match$3 = match_2; + let match$4 = match_1$1; + let match$5 = match_0$1; + return { + k: match$4[0], + v: match$4[1], + h: 2, + l: singleton(match$5[0], match$5[1]), + r: singleton(match$3[0], match$3[1]) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayAux(arr, off, nl); diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index 348c9bac67..b9131c7f17 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -382,20 +382,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -406,31 +406,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index 348c9bac67..b9131c7f17 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -382,20 +382,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -406,31 +406,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/lib/es6/caml_format.js b/lib/es6/caml_format.js index 663162682c..a05d0e6793 100644 --- a/lib/es6/caml_format.js +++ b/lib/es6/caml_format.js @@ -26,13 +26,13 @@ function parse_digit(c) { function int_of_string_base(x) { switch (x) { case "Oct" : - return 8; + return 8; case "Hex" : - return 16; + return 16; case "Dec" : - return 10; + return 10; case "Bin" : - return 2; + return 2; } } @@ -44,12 +44,12 @@ function parse_sign_and_base(s) { let match = s.codePointAt(i); switch (match) { case 43 : - i = i + 1 | 0; - break; + i = i + 1 | 0; + break; case 45 : - sign = -1; - i = i + 1 | 0; - break; + sign = -1; + i = i + 1 | 0; + break; default: } @@ -60,12 +60,12 @@ function parse_sign_and_base(s) { if (match$1 < 121) { switch (match$1) { case 111 : - base = "Oct"; - i = i + 2 | 0; - break; + base = "Oct"; + i = i + 2 | 0; + break; case 117 : - i = i + 2 | 0; - break; + i = i + 2 | 0; + break; case 112 : case 113 : case 114 : @@ -73,11 +73,11 @@ function parse_sign_and_base(s) { case 116 : case 118 : case 119 : - break; + break; case 120 : - base = "Hex"; - i = i + 2 | 0; - break; + base = "Hex"; + i = i + 2 | 0; + break; } } @@ -91,12 +91,12 @@ function parse_sign_and_base(s) { if (match$1 >= 79) { switch (match$1) { case 79 : - base = "Oct"; - i = i + 2 | 0; - break; + base = "Oct"; + i = i + 2 | 0; + break; case 85 : - i = i + 2 | 0; - break; + i = i + 2 | 0; + break; case 80 : case 81 : case 82 : @@ -104,11 +104,11 @@ function parse_sign_and_base(s) { case 84 : case 86 : case 87 : - break; + break; case 88 : - base = "Hex"; - i = i + 2 | 0; - break; + base = "Hex"; + i = i + 2 | 0; + break; } } @@ -198,26 +198,26 @@ function int64_of_string(s) { let threshold; switch (hbase) { case "Oct" : - threshold = [ - 536870911, - 4294967295 - ]; - break; + threshold = [ + 536870911, + 4294967295 + ]; + break; case "Hex" : - threshold = [ - 268435455, - 4294967295 - ]; - break; + threshold = [ + 268435455, + 4294967295 + ]; + break; case "Dec" : - threshold = [ - 429496729, - 2576980377 - ]; - break; + threshold = [ + 429496729, + 2576980377 + ]; + break; case "Bin" : - threshold = Caml_int64.max_int; - break; + threshold = Caml_int64.max_int; + break; } let len = s.length; @@ -277,11 +277,11 @@ function int64_of_string(s) { function int_of_base(x) { switch (x) { case "Oct" : - return 8; + return 8; case "Hex" : - return 16; + return 16; case "Dec" : - return 10; + return 10; } } @@ -332,27 +332,27 @@ function parse_format(fmt) { } else { switch (c) { case 88 : - f.base = "Hex"; - f.uppercase = true; - _i = i + 1 | 0; - continue; + f.base = "Hex"; + f.uppercase = true; + _i = i + 1 | 0; + continue; case 101 : case 102 : case 103 : - exit = 5; - break; + exit = 5; + break; case 100 : case 105 : - exit = 4; - break; + exit = 4; + break; case 111 : - f.base = "Oct"; - _i = i + 1 | 0; - continue; + f.base = "Oct"; + _i = i + 1 | 0; + continue; case 117 : - f.base = "Dec"; - _i = i + 1 | 0; - continue; + f.base = "Dec"; + _i = i + 1 | 0; + continue; case 89 : case 90 : case 91 : @@ -377,12 +377,12 @@ function parse_format(fmt) { case 116 : case 118 : case 119 : - exit = 1; - break; + exit = 1; + break; case 120 : - f.base = "Hex"; - _i = i + 1 | 0; - continue; + f.base = "Hex"; + _i = i + 1 | 0; + continue; } } @@ -398,33 +398,33 @@ function parse_format(fmt) { } else { switch (c) { case 35 : - f.alternate = true; - _i = i + 1 | 0; - continue; + f.alternate = true; + _i = i + 1 | 0; + continue; case 32 : case 43 : - exit = 2; - break; + exit = 2; + break; case 45 : - f.justify = "-"; - _i = i + 1 | 0; - continue; + f.justify = "-"; + _i = i + 1 | 0; + continue; case 46 : - f.prec = 0; - let j = i + 1 | 0; - while ((function () { - let w = fmt.codePointAt(j) - 48 | 0; - return w >= 0 && w <= 9; - })()) { - f.prec = (Math.imul(f.prec, 10) + fmt.codePointAt(j) | 0) - 48 | 0; - j = j + 1 | 0; - }; - _i = j; - continue; + f.prec = 0; + let j = i + 1 | 0; + while ((function () { + let w = fmt.codePointAt(j) - 48 | 0; + return w >= 0 && w <= 9; + })()) { + f.prec = (Math.imul(f.prec, 10) + fmt.codePointAt(j) | 0) - 48 | 0; + j = j + 1 | 0; + }; + _i = j; + continue; case 48 : - f.filter = "0"; - _i = i + 1 | 0; - continue; + f.filter = "0"; + _i = i + 1 | 0; + continue; case 49 : case 50 : case 51 : @@ -434,42 +434,42 @@ function parse_format(fmt) { case 55 : case 56 : case 57 : - exit = 3; - break; + exit = 3; + break; default: exit = 1; } } switch (exit) { case 1 : - _i = i + 1 | 0; - continue; + _i = i + 1 | 0; + continue; case 2 : - f.signstyle = String.fromCharCode(c); - _i = i + 1 | 0; - continue; + f.signstyle = String.fromCharCode(c); + _i = i + 1 | 0; + continue; case 3 : - f.width = 0; - let j$1 = i; - while ((function () { - let w = fmt.codePointAt(j$1) - 48 | 0; - return w >= 0 && w <= 9; - })()) { - f.width = (Math.imul(f.width, 10) + fmt.codePointAt(j$1) | 0) - 48 | 0; - j$1 = j$1 + 1 | 0; - }; - _i = j$1; - continue; + f.width = 0; + let j$1 = i; + while ((function () { + let w = fmt.codePointAt(j$1) - 48 | 0; + return w >= 0 && w <= 9; + })()) { + f.width = (Math.imul(f.width, 10) + fmt.codePointAt(j$1) | 0) - 48 | 0; + j$1 = j$1 + 1 | 0; + }; + _i = j$1; + continue; case 4 : - f.signedconv = true; - f.base = "Dec"; - _i = i + 1 | 0; - continue; + f.signedconv = true; + f.base = "Dec"; + _i = i + 1 | 0; + continue; case 5 : - f.signedconv = true; - f.conv = String.fromCharCode(c); - _i = i + 1 | 0; - continue; + f.signedconv = true; + f.conv = String.fromCharCode(c); + _i = i + 1 | 0; + continue; } }; @@ -619,14 +619,14 @@ function int64_format(fmt, x) { let s; switch (match) { case "Oct" : - s = oct_of_int64(x$1); - break; + s = oct_of_int64(x$1); + break; case "Hex" : - s = Caml_int64.to_hex(x$1); - break; + s = Caml_int64.to_hex(x$1); + break; case "Dec" : - s = dec_of_pos_int64(x$1); - break; + s = dec_of_pos_int64(x$1); + break; } let fill_s; @@ -652,60 +652,60 @@ function format_float(fmt, x) { let match = f.conv; switch (match) { case "e" : - s = x$1.toExponential(prec); - let i = s.length; - if (s.codePointAt(i - 3 | 0) === /* 'e' */101) { - s = s.slice(0, i - 1 | 0) + ("0" + s.slice(i - 1 | 0)); - } - break; + s = x$1.toExponential(prec); + let i = s.length; + if (s.codePointAt(i - 3 | 0) === /* 'e' */101) { + s = s.slice(0, i - 1 | 0) + ("0" + s.slice(i - 1 | 0)); + } + break; case "f" : - s = x$1.toFixed(prec); - break; + s = x$1.toFixed(prec); + break; case "g" : - let prec$1 = prec !== 0 ? prec : 1; - s = x$1.toExponential(prec$1 - 1 | 0); - let j = s.indexOf("e"); - let exp = Number(s.slice(j + 1 | 0)) | 0; - if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { - let i$1 = j - 1 | 0; - while (s.codePointAt(i$1) === /* '0' */48) { - i$1 = i$1 - 1 | 0; - }; - if (s.codePointAt(i$1) === /* '.' */46) { - i$1 = i$1 - 1 | 0; - } - s = s.slice(0, i$1 + 1 | 0) + s.slice(j); - let i$2 = s.length; - if (s.codePointAt(i$2 - 3 | 0) === /* 'e' */101) { - s = s.slice(0, i$2 - 1 | 0) + ("0" + s.slice(i$2 - 1 | 0)); - } - + let prec$1 = prec !== 0 ? prec : 1; + s = x$1.toExponential(prec$1 - 1 | 0); + let j = s.indexOf("e"); + let exp = Number(s.slice(j + 1 | 0)) | 0; + if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { + let i$1 = j - 1 | 0; + while (s.codePointAt(i$1) === /* '0' */48) { + i$1 = i$1 - 1 | 0; + }; + if (s.codePointAt(i$1) === /* '.' */46) { + i$1 = i$1 - 1 | 0; + } + s = s.slice(0, i$1 + 1 | 0) + s.slice(j); + let i$2 = s.length; + if (s.codePointAt(i$2 - 3 | 0) === /* 'e' */101) { + s = s.slice(0, i$2 - 1 | 0) + ("0" + s.slice(i$2 - 1 | 0)); + } + + } else { + let p = prec$1; + if (exp < 0) { + p = p - (exp + 1 | 0) | 0; + s = x$1.toFixed(p); } else { - let p = prec$1; - if (exp < 0) { - p = p - (exp + 1 | 0) | 0; - s = x$1.toFixed(p); - } else { - while ((function () { - s = x$1.toFixed(p); - return s.length > (prec$1 + 1 | 0); - })()) { - p = p - 1 | 0; - }; - } - if (p !== 0) { - let k = s.length - 1 | 0; - while (s.codePointAt(k) === /* '0' */48) { - k = k - 1 | 0; - }; - if (s.codePointAt(k) === /* '.' */46) { - k = k - 1 | 0; - } - s = s.slice(0, k + 1 | 0); + while ((function () { + s = x$1.toFixed(p); + return s.length > (prec$1 + 1 | 0); + })()) { + p = p - 1 | 0; + }; + } + if (p !== 0) { + let k = s.length - 1 | 0; + while (s.codePointAt(k) === /* '0' */48) { + k = k - 1 | 0; + }; + if (s.codePointAt(k) === /* '.' */46) { + k = k - 1 | 0; } - + s = s.slice(0, k + 1 | 0); } - break; + + } + break; default: } diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index 9260016eb2..92078956ac 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -16,16 +16,16 @@ function init_mod(loc, shape) { switch (shape) { case "Function" : case "Lazy" : - struct_[idx] = undef_module; - return; + struct_[idx] = undef_module; + return; case "Class" : - struct_[idx] = [ - undef_module, - undef_module, - undef_module, - 0 - ]; - return; + struct_[idx] = [ + undef_module, + undef_module, + undef_module, + 0 + ]; + return; } } else { @@ -55,11 +55,11 @@ function update_mod(shape, o, n) { if (typeof shape !== "object") { switch (shape) { case "Function" : - parent[i] = n; - return; + parent[i] = n; + return; case "Lazy" : case "Class" : - return Caml_obj.update_dummy(o, n); + return Caml_obj.update_dummy(o, n); } } else { diff --git a/lib/es6/caml_obj.js b/lib/es6/caml_obj.js index 164efea506..90fe366561 100644 --- a/lib/es6/caml_obj.js +++ b/lib/es6/caml_obj.js @@ -44,46 +44,46 @@ function compare(a, b) { let b_type = typeof b; switch (a_type) { case "bigint" : - if (b_type === "bigint") { - return Caml.float_compare(a, b); - } - break; + if (b_type === "bigint") { + return Caml.float_compare(a, b); + } + break; case "boolean" : - if (b_type === "boolean") { - return Caml.bool_compare(a, b); - } - break; + if (b_type === "boolean") { + return Caml.bool_compare(a, b); + } + break; case "function" : - if (b_type === "function") { - throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "compare: functional value" - } - }); - } - break; + if (b_type === "function") { + throw new Error("Invalid_argument", { + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "compare: functional value" + } + }); + } + break; case "number" : - if (b_type === "number") { - return Caml.float_compare(a, b); - } - break; + if (b_type === "number") { + return Caml.float_compare(a, b); + } + break; case "string" : - if (b_type === "string") { - return Caml.string_compare(a, b); - } else { - return 1; - } + if (b_type === "string") { + return Caml.string_compare(a, b); + } else { + return 1; + } case "undefined" : - return -1; + return -1; default: } switch (b_type) { case "string" : - return -1; + return -1; case "undefined" : - return 1; + return 1; default: if (a_type === "boolean") { return 1; diff --git a/lib/es6/char.js b/lib/es6/char.js index 3e41fcddf6..f7c8cbda35 100644 --- a/lib/es6/char.js +++ b/lib/es6/char.js @@ -31,11 +31,11 @@ function escaped(param) { } else { switch (param) { case 8 : - return "\\b"; + return "\\b"; case 9 : - return "\\t"; + return "\\t"; case 10 : - return "\\n"; + return "\\n"; case 0 : case 1 : case 2 : @@ -46,30 +46,30 @@ function escaped(param) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - return "\\r"; + return "\\r"; } } switch (exit) { case 1 : - let s = [ - 0, - 0, - 0, - 0 - ]; - s[0] = /* '\\' */92; - s[1] = 48 + (param / 100 | 0) | 0; - s[2] = 48 + (param / 10 | 0) % 10 | 0; - s[3] = 48 + param % 10 | 0; - return Bytes.to_string(s); + let s = [ + 0, + 0, + 0, + 0 + ]; + s[0] = /* '\\' */92; + s[1] = 48 + (param / 100 | 0) | 0; + s[2] = 48 + (param / 10 | 0) % 10 | 0; + s[3] = 48 + param % 10 | 0; + return Bytes.to_string(s); case 2 : - let s$1 = [0]; - s$1[0] = param; - return Bytes.to_string(s$1); + let s$1 = [0]; + s$1[0] = param; + return Bytes.to_string(s$1); } } diff --git a/lib/es6/curry.js b/lib/es6/curry.js index 5b3f1b3810..00af2a55d5 100644 --- a/lib/es6/curry.js +++ b/lib/es6/curry.js @@ -31,31 +31,31 @@ function _1(o, a0) { } else { switch (arity) { case 1 : - return o(a0); + return o(a0); case 2 : - return function (param) { - return o(a0, param); - }; + return function (param) { + return o(a0, param); + }; case 3 : - return function (param, param$1) { - return o(a0, param, param$1); - }; + return function (param, param$1) { + return o(a0, param, param$1); + }; case 4 : - return function (param, param$1, param$2) { - return o(a0, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, param, param$1, param$2); + }; case 5 : - return function (param, param$1, param$2, param$3) { - return o(a0, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, param, param$1, param$2, param$3); + }; case 6 : - return function (param, param$1, param$2, param$3, param$4) { - return o(a0, param, param$1, param$2, param$3, param$4); - }; + return function (param, param$1, param$2, param$3, param$4) { + return o(a0, param, param$1, param$2, param$3, param$4); + }; case 7 : - return function (param, param$1, param$2, param$3, param$4, param$5) { - return o(a0, param, param$1, param$2, param$3, param$4, param$5); - }; + return function (param, param$1, param$2, param$3, param$4, param$5) { + return o(a0, param, param$1, param$2, param$3, param$4, param$5); + }; default: return app(o, [a0]); } @@ -80,29 +80,29 @@ function _2(o, a0, a1) { } else { switch (arity) { case 1 : - return app(o(a0), [a1]); + return app(o(a0), [a1]); case 2 : - return o(a0, a1); + return o(a0, a1); case 3 : - return function (param) { - return o(a0, a1, param); - }; + return function (param) { + return o(a0, a1, param); + }; case 4 : - return function (param, param$1) { - return o(a0, a1, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, param, param$1); + }; case 5 : - return function (param, param$1, param$2) { - return o(a0, a1, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, param, param$1, param$2); + }; case 6 : - return function (param, param$1, param$2, param$3) { - return o(a0, a1, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, a1, param, param$1, param$2, param$3); + }; case 7 : - return function (param, param$1, param$2, param$3, param$4) { - return o(a0, a1, param, param$1, param$2, param$3, param$4); - }; + return function (param, param$1, param$2, param$3, param$4) { + return o(a0, a1, param, param$1, param$2, param$3, param$4); + }; default: return app(o, [ a0, @@ -130,30 +130,30 @@ function _3(o, a0, a1, a2) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2 - ]); + return app(o(a0), [ + a1, + a2 + ]); case 2 : - return app(o(a0, a1), [a2]); + return app(o(a0, a1), [a2]); case 3 : - return o(a0, a1, a2); + return o(a0, a1, a2); case 4 : - return function (param) { - return o(a0, a1, a2, param); - }; + return function (param) { + return o(a0, a1, a2, param); + }; case 5 : - return function (param, param$1) { - return o(a0, a1, a2, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, param, param$1); + }; case 6 : - return function (param, param$1, param$2) { - return o(a0, a1, a2, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, a2, param, param$1, param$2); + }; case 7 : - return function (param, param$1, param$2, param$3) { - return o(a0, a1, a2, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, a1, a2, param, param$1, param$2, param$3); + }; default: return app(o, [ a0, @@ -182,32 +182,32 @@ function _4(o, a0, a1, a2, a3) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3 - ]); + return app(o(a0), [ + a1, + a2, + a3 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3 - ]); + return app(o(a0, a1), [ + a2, + a3 + ]); case 3 : - return app(o(a0, a1, a2), [a3]); + return app(o(a0, a1, a2), [a3]); case 4 : - return o(a0, a1, a2, a3); + return o(a0, a1, a2, a3); case 5 : - return function (param) { - return o(a0, a1, a2, a3, param); - }; + return function (param) { + return o(a0, a1, a2, a3, param); + }; case 6 : - return function (param, param$1) { - return o(a0, a1, a2, a3, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, a3, param, param$1); + }; case 7 : - return function (param, param$1, param$2) { - return o(a0, a1, a2, a3, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, a2, a3, param, param$1, param$2); + }; default: return app(o, [ a0, @@ -237,35 +237,35 @@ function _5(o, a0, a1, a2, a3, a4) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4 - ]); + return app(o(a0, a1, a2), [ + a3, + a4 + ]); case 4 : - return app(o(a0, a1, a2, a3), [a4]); + return app(o(a0, a1, a2, a3), [a4]); case 5 : - return o(a0, a1, a2, a3, a4); + return o(a0, a1, a2, a3, a4); case 6 : - return function (param) { - return o(a0, a1, a2, a3, a4, param); - }; + return function (param) { + return o(a0, a1, a2, a3, a4, param); + }; case 7 : - return function (param, param$1) { - return o(a0, a1, a2, a3, a4, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, a3, a4, param, param$1); + }; default: return app(o, [ a0, @@ -296,39 +296,39 @@ function _6(o, a0, a1, a2, a3, a4, a5) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [a5]); + return app(o(a0, a1, a2, a3, a4), [a5]); case 6 : - return o(a0, a1, a2, a3, a4, a5); + return o(a0, a1, a2, a3, a4, a5); case 7 : - return function (param) { - return o(a0, a1, a2, a3, a4, a5, param); - }; + return function (param) { + return o(a0, a1, a2, a3, a4, a5, param); + }; default: return app(o, [ a0, @@ -360,44 +360,44 @@ function _7(o, a0, a1, a2, a3, a4, a5, a6) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5, - a6 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5, + a6 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5, - a6 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5, + a6 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5, - a6 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5, + a6 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5, - a6 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5, + a6 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [ - a5, - a6 - ]); + return app(o(a0, a1, a2, a3, a4), [ + a5, + a6 + ]); case 6 : - return app(o(a0, a1, a2, a3, a4, a5), [a6]); + return app(o(a0, a1, a2, a3, a4, a5), [a6]); case 7 : - return o(a0, a1, a2, a3, a4, a5, a6); + return o(a0, a1, a2, a3, a4, a5, a6); default: return app(o, [ a0, @@ -430,52 +430,52 @@ function _8(o, a0, a1, a2, a3, a4, a5, a6, a7) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5, + a6, + a7 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5, + a6, + a7 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5, + a6, + a7 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5, + a6, + a7 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [ - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2, a3, a4), [ + a5, + a6, + a7 + ]); case 6 : - return app(o(a0, a1, a2, a3, a4, a5), [ - a6, - a7 - ]); + return app(o(a0, a1, a2, a3, a4, a5), [ + a6, + a7 + ]); case 7 : - return app(o(a0, a1, a2, a3, a4, a5, a6), [a7]); + return app(o(a0, a1, a2, a3, a4, a5, a6), [a7]); default: return app(o, [ a0, diff --git a/lib/es6/filename.js b/lib/es6/filename.js index c9f9e90a35..f4bc6b7a68 100644 --- a/lib/es6/filename.js +++ b/lib/es6/filename.js @@ -319,35 +319,35 @@ let match; switch (Sys.os_type) { case "Cygwin" : - match = [ - current_dir_name$2, - "..", - "/", - is_dir_sep$1, - is_relative$1, - is_implicit$1, - check_suffix$1, - temp_dir_name, - quote, - basename$2, - dirname$2 - ]; - break; + match = [ + current_dir_name$2, + "..", + "/", + is_dir_sep$1, + is_relative$1, + is_implicit$1, + check_suffix$1, + temp_dir_name, + quote, + basename$2, + dirname$2 + ]; + break; case "Win32" : - match = [ - current_dir_name$1, - "..", - "\\", - is_dir_sep$1, - is_relative$1, - is_implicit$1, - check_suffix$1, - temp_dir_name$1, - quote$1, - basename$1, - dirname$1 - ]; - break; + match = [ + current_dir_name$1, + "..", + "\\", + is_dir_sep$1, + is_relative$1, + is_implicit$1, + check_suffix$1, + temp_dir_name$1, + quote$1, + basename$1, + dirname$1 + ]; + break; default: match = [ current_dir_name, diff --git a/lib/es6/genlex.js b/lib/es6/genlex.js index 2f1d12f4de..5843af08e1 100644 --- a/lib/es6/genlex.js +++ b/lib/es6/genlex.js @@ -103,80 +103,80 @@ function make_lexer(keywords) { case 13 : case 26 : case 32 : - Stream.junk(strm__); - continue; + Stream.junk(strm__); + continue; case 34 : - Stream.junk(strm__); - reset_buffer(); - return { - TAG: "String", - _0: string(strm__) - }; + Stream.junk(strm__); + reset_buffer(); + return { + TAG: "String", + _0: string(strm__) + }; case 39 : - Stream.junk(strm__); - let c$1; - try { - c$1 = char(strm__); - } catch (raw_exn) { - let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.RE_EXN_ID === Stream.Failure) { - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - throw new Error(exn.RE_EXN_ID, { - cause: exn + Stream.junk(strm__); + let c$1; + try { + c$1 = char(strm__); + } catch (raw_exn) { + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Stream.Failure) { + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } }); } - let match = Stream.peek(strm__); - if (match !== undefined) { - if (match !== 39) { - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - Stream.junk(strm__); - return { - TAG: "Char", - _0: c$1 - }; - } - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } + throw new Error(exn.RE_EXN_ID, { + cause: exn }); + } + let match = Stream.peek(strm__); + if (match !== undefined) { + if (match !== 39) { + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); + } + Stream.junk(strm__); + return { + TAG: "Char", + _0: c$1 + }; + } + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); case 40 : + Stream.junk(strm__); + let match$1 = Stream.peek(strm__); + if (match$1 === 42) { Stream.junk(strm__); - let match$1 = Stream.peek(strm__); - if (match$1 === 42) { - Stream.junk(strm__); - comment(strm__); - return next_token(strm__); - } else { - return keyword_or_error(/* '(' */40); - } + comment(strm__); + return next_token(strm__); + } else { + return keyword_or_error(/* '(' */40); + } case 45 : + Stream.junk(strm__); + let c$2 = Stream.peek(strm__); + if (c$2 !== undefined && !(c$2 > 57 || c$2 < 48)) { Stream.junk(strm__); - let c$2 = Stream.peek(strm__); - if (c$2 !== undefined && !(c$2 > 57 || c$2 < 48)) { - Stream.junk(strm__); - reset_buffer(); - store(/* '-' */45); - store(c$2); - return number(strm__); - } else { - reset_buffer(); - store(/* '-' */45); - return ident2(strm__); - } + reset_buffer(); + store(/* '-' */45); + store(c$2); + return number(strm__); + } else { + reset_buffer(); + store(/* '-' */45); + return ident2(strm__); + } case 48 : case 49 : case 50 : @@ -187,8 +187,8 @@ function make_lexer(keywords) { case 55 : case 56 : case 57 : - exit = 4; - break; + exit = 4; + break; case 0 : case 1 : case 2 : @@ -220,8 +220,8 @@ function make_lexer(keywords) { case 44 : case 46 : case 59 : - exit = 1; - break; + exit = 1; + break; case 33 : case 35 : case 36 : @@ -236,8 +236,8 @@ function make_lexer(keywords) { case 62 : case 63 : case 64 : - exit = 3; - break; + exit = 3; + break; } } @@ -245,13 +245,13 @@ function make_lexer(keywords) { switch (c) { case 92 : case 94 : - exit = 3; - break; + exit = 3; + break; case 91 : case 93 : case 96 : - exit = 1; - break; + exit = 1; + break; default: exit = 2; } @@ -265,49 +265,49 @@ function make_lexer(keywords) { } switch (exit) { case 1 : - Stream.junk(strm__); - return keyword_or_error(c); + Stream.junk(strm__); + return keyword_or_error(c); case 2 : - Stream.junk(strm__); - reset_buffer(); - store(c); - while (true) { - let c$3 = Stream.peek(strm__); - if (c$3 === undefined) { - return ident_or_keyword(get_string()); - } - if (c$3 >= 91) { - if (c$3 > 122 || c$3 < 95) { - if (c$3 > 255 || c$3 < 192) { - return ident_or_keyword(get_string()); - } - - } else if (c$3 === 96) { - return ident_or_keyword(get_string()); - } - - } else if (c$3 >= 48) { - if (!(c$3 > 64 || c$3 < 58)) { + Stream.junk(strm__); + reset_buffer(); + store(c); + while (true) { + let c$3 = Stream.peek(strm__); + if (c$3 === undefined) { + return ident_or_keyword(get_string()); + } + if (c$3 >= 91) { + if (c$3 > 122 || c$3 < 95) { + if (c$3 > 255 || c$3 < 192) { return ident_or_keyword(get_string()); } - } else if (c$3 !== 39) { + } else if (c$3 === 96) { return ident_or_keyword(get_string()); } - Stream.junk(strm__); - store(c$3); - continue; - }; - case 3 : + + } else if (c$3 >= 48) { + if (!(c$3 > 64 || c$3 < 58)) { + return ident_or_keyword(get_string()); + } + + } else if (c$3 !== 39) { + return ident_or_keyword(get_string()); + } Stream.junk(strm__); - reset_buffer(); - store(c); - return ident2(strm__); + store(c$3); + continue; + }; + case 3 : + Stream.junk(strm__); + reset_buffer(); + store(c); + return ident2(strm__); case 4 : - Stream.junk(strm__); - reset_buffer(); - store(c); - return number(strm__); + Stream.junk(strm__); + reset_buffer(); + store(c); + return number(strm__); } }; @@ -355,7 +355,7 @@ function make_lexer(keywords) { case 56 : case 57 : case 59 : - return ident_or_keyword(get_string()); + return ident_or_keyword(get_string()); case 33 : case 35 : case 36 : @@ -371,7 +371,7 @@ function make_lexer(keywords) { case 62 : case 63 : case 64 : - break; + break; } } @@ -540,14 +540,14 @@ function make_lexer(keywords) { if (c1 >= 58) { switch (c1) { case 110 : - Stream.junk(strm__); - return /* '\n' */10; + Stream.junk(strm__); + return /* '\n' */10; case 114 : - Stream.junk(strm__); - return /* '\r' */13; + Stream.junk(strm__); + return /* '\r' */13; case 116 : - Stream.junk(strm__); - return /* '\t' */9; + Stream.junk(strm__); + return /* '\t' */9; default: Stream.junk(strm__); return c1; @@ -610,45 +610,45 @@ function make_lexer(keywords) { if (match !== undefined) { switch (match) { case 40 : - Stream.junk(strm__); - let match$1 = Stream.peek(strm__); - if (match$1 !== undefined) { - if (match$1 !== 42) { - Stream.junk(strm__); - return comment(strm__); - } else { + Stream.junk(strm__); + let match$1 = Stream.peek(strm__); + if (match$1 !== undefined) { + if (match$1 !== 42) { + Stream.junk(strm__); + return comment(strm__); + } else { + Stream.junk(strm__); + comment(strm__); + return comment(strm__); + } + } + throw new Error(Stream.Failure, { + cause: { + RE_EXN_ID: Stream.Failure + } + }); + case 42 : + Stream.junk(strm__); + while (true) { + let match$2 = Stream.peek(strm__); + if (match$2 !== undefined) { + if (match$2 !== 41) { + if (match$2 !== 42) { + Stream.junk(strm__); + return comment(strm__); + } Stream.junk(strm__); - comment(strm__); - return comment(strm__); + continue; } + Stream.junk(strm__); + return; } throw new Error(Stream.Failure, { cause: { RE_EXN_ID: Stream.Failure } }); - case 42 : - Stream.junk(strm__); - while (true) { - let match$2 = Stream.peek(strm__); - if (match$2 !== undefined) { - if (match$2 !== 41) { - if (match$2 !== 42) { - Stream.junk(strm__); - return comment(strm__); - } - Stream.junk(strm__); - continue; - } - Stream.junk(strm__); - return; - } - throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); - }; + }; default: Stream.junk(strm__); continue; diff --git a/lib/es6/js_json.js b/lib/es6/js_json.js index 03cb589c08..e696c42391 100644 --- a/lib/es6/js_json.js +++ b/lib/es6/js_json.js @@ -39,21 +39,21 @@ function classify(x) { function test(x, v) { switch (v) { case "String" : - return typeof x === "string"; + return typeof x === "string"; case "Number" : - return typeof x === "number"; + return typeof x === "number"; case "Object" : - if (x !== null && typeof x === "object") { - return !Array.isArray(x); - } else { - return false; - } + if (x !== null && typeof x === "object") { + return !Array.isArray(x); + } else { + return false; + } case "Array" : - return Array.isArray(x); + return Array.isArray(x); case "Boolean" : - return typeof x === "boolean"; + return typeof x === "boolean"; case "Null" : - return x === null; + return x === null; } } diff --git a/lib/es6/js_types.js b/lib/es6/js_types.js index 4cefeba96a..134c94a5f7 100644 --- a/lib/es6/js_types.js +++ b/lib/es6/js_types.js @@ -49,23 +49,23 @@ function classify(x) { function test(x, v) { switch (v) { case "Undefined" : - return typeof x === "undefined"; + return typeof x === "undefined"; case "Null" : - return x === null; + return x === null; case "Boolean" : - return typeof x === "boolean"; + return typeof x === "boolean"; case "Number" : - return typeof x === "number"; + return typeof x === "number"; case "String" : - return typeof x === "string"; + return typeof x === "string"; case "Function" : - return typeof x === "function"; + return typeof x === "function"; case "Object" : - return typeof x === "object"; + return typeof x === "object"; case "Symbol" : - return typeof x === "symbol"; + return typeof x === "symbol"; case "BigInt" : - return typeof x === "bigint"; + return typeof x === "bigint"; } } diff --git a/lib/es6/moreLabels.js b/lib/es6/moreLabels.js index 988440c243..7641da89e7 100644 --- a/lib/es6/moreLabels.js +++ b/lib/es6/moreLabels.js @@ -1799,28 +1799,54 @@ let $$Set = { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -1831,50 +1857,24 @@ let $$Set = { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/es6/parsing.js b/lib/es6/parsing.js index 0b30d9b72b..039c872e14 100644 --- a/lib/es6/parsing.js +++ b/lib/es6/parsing.js @@ -80,56 +80,56 @@ function yyparse(tables, start, lexer, lexbuf) { let match = Caml_parser.parse_engine(tables, env, cmd, arg); switch (match) { case "Read_token" : - let t = lexer(lexbuf); - env.symb_start = lexbuf.lex_start_p; - env.symb_end = lexbuf.lex_curr_p; - _arg = t; - _cmd = "Token_read"; - continue; + let t = lexer(lexbuf); + env.symb_start = lexbuf.lex_start_p; + env.symb_end = lexbuf.lex_curr_p; + _arg = t; + _cmd = "Token_read"; + continue; case "Raise_parse_error" : - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error + } + }); case "Grow_stacks_1" : - grow_stacks(); - _arg = undefined; - _cmd = "Stacks_grown_1"; - continue; + grow_stacks(); + _arg = undefined; + _cmd = "Stacks_grown_1"; + continue; case "Grow_stacks_2" : - grow_stacks(); - _arg = undefined; - _cmd = "Stacks_grown_2"; - continue; + grow_stacks(); + _arg = undefined; + _cmd = "Stacks_grown_2"; + continue; case "Compute_semantic_action" : - let match$1; - try { + let match$1; + try { + match$1 = [ + "Semantic_action_computed", + Caml_array.get(tables.actions, env.rule_number)(env) + ]; + } catch (raw_exn) { + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Parse_error) { match$1 = [ - "Semantic_action_computed", - Caml_array.get(tables.actions, env.rule_number)(env) + "Error_detected", + undefined ]; - } catch (raw_exn) { - let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.RE_EXN_ID === Parse_error) { - match$1 = [ - "Error_detected", - undefined - ]; - } else { - throw new Error(exn.RE_EXN_ID, { - cause: exn - }); - } + } else { + throw new Error(exn.RE_EXN_ID, { + cause: exn + }); } - _arg = match$1[1]; - _cmd = match$1[0]; - continue; + } + _arg = match$1[1]; + _cmd = match$1[0]; + continue; case "Call_error_function" : - tables.error_function("syntax error"); - _arg = undefined; - _cmd = "Error_detected"; - continue; + tables.error_function("syntax error"); + _arg = undefined; + _cmd = "Error_detected"; + continue; } }; diff --git a/lib/es6/pervasives.js b/lib/es6/pervasives.js index 80e48dfe4d..edb6650d12 100644 --- a/lib/es6/pervasives.js +++ b/lib/es6/pervasives.js @@ -79,9 +79,9 @@ function string_of_bool(b) { function bool_of_string(param) { switch (param) { case "false" : - return false; + return false; case "true" : - return true; + return true; default: throw new Error("Invalid_argument", { cause: { @@ -95,9 +95,9 @@ function bool_of_string(param) { function bool_of_string_opt(param) { switch (param) { case "false" : - return false; + return false; case "true" : - return true; + return true; default: return; } diff --git a/lib/es6/set.js b/lib/es6/set.js index c5aa672494..d3b047c5e8 100644 --- a/lib/es6/set.js +++ b/lib/es6/set.js @@ -825,28 +825,54 @@ function Make(funarg) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -857,50 +883,24 @@ function Make(funarg) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/es6/setLabels.js b/lib/es6/setLabels.js index f566075aca..eb8e5f82d0 100644 --- a/lib/es6/setLabels.js +++ b/lib/es6/setLabels.js @@ -815,28 +815,54 @@ function Make(Ord) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -847,50 +873,24 @@ function Make(Ord) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 5d947efd23..12574bfe79 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -35,65 +35,65 @@ function get_data(count, _d) { } switch (d.TAG) { case "Scons" : - return d; + return d; case "Sapp" : - let d2 = d._1; - let match = get_data(count, d._0); - if (typeof match !== "object") { - _d = d2; - continue; - } - if (match.TAG === "Scons") { - return { - TAG: "Scons", - _0: match._0, - _1: { - TAG: "Sapp", - _0: match._1, - _1: d2 + let d2 = d._1; + let match = get_data(count, d._0); + if (typeof match !== "object") { + _d = d2; + continue; + } + if (match.TAG === "Scons") { + return { + TAG: "Scons", + _0: match._0, + _1: { + TAG: "Sapp", + _0: match._1, + _1: d2 + } + }; + } + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 53, + 13 + ] } - }; - } - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 53, - 13 - ] - } - }); + }); case "Slazy" : - _d = CamlinternalLazy.force(d._0); - continue; + _d = CamlinternalLazy.force(d._0); + continue; case "Sgen" : - let g = d._0; - let match$1 = g.curr; - if (match$1 !== undefined) { - let a = Caml_option.valFromOption(match$1); - if (a !== undefined) { - g.curr = undefined; - return { - TAG: "Scons", - _0: Caml_option.valFromOption(a), - _1: d - }; - } else { - return "Sempty"; - } - } - let a$1 = g.func(count); - if (a$1 !== undefined) { + let g = d._0; + let match$1 = g.curr; + if (match$1 !== undefined) { + let a = Caml_option.valFromOption(match$1); + if (a !== undefined) { + g.curr = undefined; return { TAG: "Scons", - _0: Caml_option.valFromOption(a$1), + _0: Caml_option.valFromOption(a), _1: d }; } else { - g.curr = Caml_option.some(undefined); return "Sempty"; } + } + let a$1 = g.func(count); + if (a$1 !== undefined) { + return { + TAG: "Scons", + _0: Caml_option.valFromOption(a$1), + _1: d + }; + } else { + g.curr = Caml_option.some(undefined); + return "Sempty"; + } } }; @@ -107,38 +107,38 @@ function peek_data(s) { } switch (f.TAG) { case "Scons" : - return Caml_option.some(f._0); + return Caml_option.some(f._0); case "Sapp" : - let d = get_data(s.count, s.data); - if (typeof d !== "object") { - return; - } - if (d.TAG === "Scons") { - s.data = d; - return Caml_option.some(d._0); - } - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 83, - 13 - ] - } - }); + let d = get_data(s.count, s.data); + if (typeof d !== "object") { + return; + } + if (d.TAG === "Scons") { + s.data = d; + return Caml_option.some(d._0); + } + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 83, + 13 + ] + } + }); case "Slazy" : - s.data = CamlinternalLazy.force(f._0); - continue; + s.data = CamlinternalLazy.force(f._0); + continue; case "Sgen" : - let g = f._0; - let a = g.curr; - if (a !== undefined) { - return Caml_option.valFromOption(a); - } - let x = g.func(s.count); - g.curr = Caml_option.some(x); - return x; + let g = f._0; + let a = g.curr; + if (a !== undefined) { + return Caml_option.valFromOption(a); + } + let x = g.func(s.count); + g.curr = Caml_option.some(x); + return x; } }; @@ -157,18 +157,18 @@ function junk_data(s) { if (typeof g === "object") { switch (g.TAG) { case "Scons" : + s.count = s.count + 1 | 0; + s.data = g._1; + return; + case "Sgen" : + let g$1 = g._0; + let match = g$1.curr; + if (match !== undefined) { s.count = s.count + 1 | 0; - s.data = g._1; + g$1.curr = undefined; return; - case "Sgen" : - let g$1 = g._0; - let match = g$1.curr; - if (match !== undefined) { - s.count = s.count + 1 | 0; - g$1.curr = undefined; - return; - } - break; + } + break; default: } @@ -432,25 +432,25 @@ function dump_data(f, param) { } switch (param.TAG) { case "Scons" : - console.log("Scons ("); - f(param._0); - console.log(", "); - dump_data(f, param._1); - console.log(")"); - return; + console.log("Scons ("); + f(param._0); + console.log(", "); + dump_data(f, param._1); + console.log(")"); + return; case "Sapp" : - console.log("Sapp ("); - dump_data(f, param._0); - console.log(", "); - dump_data(f, param._1); - console.log(")"); - return; + console.log("Sapp ("); + dump_data(f, param._0); + console.log(", "); + dump_data(f, param._1); + console.log(")"); + return; case "Slazy" : - console.log("Slazy"); - return; + console.log("Slazy"); + return; case "Sgen" : - console.log("Sgen"); - return; + console.log("Sgen"); + return; } } diff --git a/lib/js/arg.js b/lib/js/arg.js index 6380dcec44..85feeb1d39 100644 --- a/lib/js/arg.js +++ b/lib/js/arg.js @@ -202,24 +202,24 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let progname = initpos < argv.contents.length ? Caml_array.get(argv.contents, initpos) : "(?)"; switch (error.TAG) { case "Unknown" : - let s = error._0; - switch (s) { - case "--help" : - case "-help" : - break; - default: - Buffer.add_string(b, progname + ": unknown option '" + s + "'.\n"); - } - break; + let s = error._0; + switch (s) { + case "--help" : + case "-help" : + break; + default: + Buffer.add_string(b, progname + ": unknown option '" + s + "'.\n"); + } + break; case "Wrong" : - Buffer.add_string(b, progname + ": wrong argument '" + error._1 + "'; option '" + error._0 + "' expects " + error._2 + ".\n"); - break; + Buffer.add_string(b, progname + ": wrong argument '" + error._1 + "'; option '" + error._0 + "' expects " + error._2 + ".\n"); + break; case "Missing" : - Buffer.add_string(b, progname + ": option '" + error._0 + "' needs an argument.\n"); - break; + Buffer.add_string(b, progname + ": option '" + error._0 + "' needs an argument.\n"); + break; case "Message" : - Buffer.add_string(b, progname + ": " + error._0 + ".\n"); - break; + Buffer.add_string(b, progname + ": " + error._0 + ".\n"); + break; } usage_b(b, speclist.contents, errmsg); @@ -329,169 +329,169 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let treat_action = function (f) { switch (f.TAG) { case "Unit" : - return f._0(); + return f._0(); case "Bool" : - let arg = get_arg(); - let s$1 = bool_of_string_opt(arg); - if (s$1 !== undefined) { - f._0(s$1); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg, - _2: "a boolean" - } + let arg = get_arg(); + let s$1 = bool_of_string_opt(arg); + if (s$1 !== undefined) { + f._0(s$1); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg, + _2: "a boolean" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set" : - no_arg(); - f._0.contents = true; - return; + no_arg(); + f._0.contents = true; + return; case "Clear" : - no_arg(); - f._0.contents = false; - return; + no_arg(); + f._0.contents = false; + return; case "String" : - let arg$1 = get_arg(); - f._0(arg$1); - return consume_arg(); + let arg$1 = get_arg(); + f._0(arg$1); + return consume_arg(); case "Set_string" : - f._0.contents = get_arg(); - return consume_arg(); + f._0.contents = get_arg(); + return consume_arg(); case "Int" : - let arg$2 = get_arg(); - let x = int_of_string_opt(arg$2); - if (x !== undefined) { - f._0(x); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$2, - _2: "an integer" - } + let arg$2 = get_arg(); + let x = int_of_string_opt(arg$2); + if (x !== undefined) { + f._0(x); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$2, + _2: "an integer" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set_int" : - let arg$3 = get_arg(); - let x$1 = int_of_string_opt(arg$3); - if (x$1 !== undefined) { - f._0.contents = x$1; - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$3, - _2: "an integer" - } + let arg$3 = get_arg(); + let x$1 = int_of_string_opt(arg$3); + if (x$1 !== undefined) { + f._0.contents = x$1; + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$3, + _2: "an integer" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Float" : - let arg$4 = get_arg(); - let x$2 = float_of_string_opt(arg$4); - if (x$2 !== undefined) { - f._0(x$2); - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$4, - _2: "a float" - } + let arg$4 = get_arg(); + let x$2 = float_of_string_opt(arg$4); + if (x$2 !== undefined) { + f._0(x$2); + } else { + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$4, + _2: "a float" } - }); - } - return consume_arg(); + } + }); + } + return consume_arg(); case "Set_float" : - let arg$5 = get_arg(); - let x$3 = float_of_string_opt(arg$5); - if (x$3 !== undefined) { - f._0.contents = x$3; - } else { - throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$5, - _2: "a float" - } - } - }); - } - return consume_arg(); - case "Tuple" : - return List.iter(treat_action, f._0); - case "Symbol" : - let symb = f._0; - let arg$6 = get_arg(); - if (List.mem(arg$6, symb)) { - f._1(arg$6); - return consume_arg(); - } + let arg$5 = get_arg(); + let x$3 = float_of_string_opt(arg$5); + if (x$3 !== undefined) { + f._0.contents = x$3; + } else { throw new Error(Stop, { cause: { RE_EXN_ID: Stop, _1: { TAG: "Wrong", _0: s, - _1: arg$6, - _2: "one of: " + make_symlist("", " ", "", symb) + _1: arg$5, + _2: "a float" } } }); + } + return consume_arg(); + case "Tuple" : + return List.iter(treat_action, f._0); + case "Symbol" : + let symb = f._0; + let arg$6 = get_arg(); + if (List.mem(arg$6, symb)) { + f._1(arg$6); + return consume_arg(); + } + throw new Error(Stop, { + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$6, + _2: "one of: " + make_symlist("", " ", "", symb) + } + } + }); case "Rest" : - let f$1 = f._0; - while (current.contents < (argv.contents.length - 1 | 0)) { - f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); - consume_arg(); - }; - return; - case "Expand" : - if (!allow_expand) { - throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" - } - }); - } - let arg$7 = get_arg(); - let newarg = f._0(arg$7); + let f$1 = f._0; + while (current.contents < (argv.contents.length - 1 | 0)) { + f$1(Caml_array.get(argv.contents, current.contents + 1 | 0)); consume_arg(); - let before = $$Array.sub(argv.contents, 0, current.contents + 1 | 0); - let after = $$Array.sub(argv.contents, current.contents + 1 | 0, (argv.contents.length - current.contents | 0) - 1 | 0); - argv.contents = Caml_array.concat({ - hd: before, + }; + return; + case "Expand" : + if (!allow_expand) { + throw new Error("Invalid_argument", { + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" + } + }); + } + let arg$7 = get_arg(); + let newarg = f._0(arg$7); + consume_arg(); + let before = $$Array.sub(argv.contents, 0, current.contents + 1 | 0); + let after = $$Array.sub(argv.contents, current.contents + 1 | 0, (argv.contents.length - current.contents | 0) - 1 | 0); + argv.contents = Caml_array.concat({ + hd: before, + tl: { + hd: newarg, tl: { - hd: newarg, - tl: { - hd: after, - tl: /* [] */0 - } + hd: after, + tl: /* [] */0 } - }); - return; + } + }); + return; } }; diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index 4daf108b78..53d3c6ae5d 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -472,28 +472,28 @@ function toArray(n) { function fromSortedArrayRevAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - return singleton(arr[off]); + return singleton(arr[off]); case 2 : - let x0 = arr[off]; - let x1 = arr[off - 1 | 0]; - return { - v: x1, - h: 2, - l: singleton(x0), - r: undefined - }; + let x0 = arr[off]; + let x1 = arr[off - 1 | 0]; + return { + v: x1, + h: 2, + l: singleton(x0), + r: undefined + }; case 3 : - let x0$1 = arr[off]; - let x1$1 = arr[off - 1 | 0]; - let x2 = arr[off - 2 | 0]; - return { - v: x1$1, - h: 2, - l: singleton(x0$1), - r: singleton(x2) - }; + let x0$1 = arr[off]; + let x1$1 = arr[off - 1 | 0]; + let x2 = arr[off - 2 | 0]; + return { + v: x1$1, + h: 2, + l: singleton(x0$1), + r: singleton(x2) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayRevAux(arr, off, nl); @@ -506,28 +506,28 @@ function fromSortedArrayRevAux(arr, off, len) { function fromSortedArrayAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - return singleton(arr[off]); + return singleton(arr[off]); case 2 : - let x0 = arr[off]; - let x1 = arr[off + 1 | 0]; - return { - v: x1, - h: 2, - l: singleton(x0), - r: undefined - }; + let x0 = arr[off]; + let x1 = arr[off + 1 | 0]; + return { + v: x1, + h: 2, + l: singleton(x0), + r: undefined + }; case 3 : - let x0$1 = arr[off]; - let x1$1 = arr[off + 1 | 0]; - let x2 = arr[off + 2 | 0]; - return { - v: x1$1, - h: 2, - l: singleton(x0$1), - r: singleton(x2) - }; + let x0$1 = arr[off]; + let x1$1 = arr[off + 1 | 0]; + let x2 = arr[off + 2 | 0]; + return { + v: x1$1, + h: 2, + l: singleton(x0$1), + r: singleton(x2) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayAux(arr, off, nl); diff --git a/lib/js/belt_internalAVLtree.js b/lib/js/belt_internalAVLtree.js index b99dd39242..4b5fbdb999 100644 --- a/lib/js/belt_internalAVLtree.js +++ b/lib/js/belt_internalAVLtree.js @@ -715,36 +715,36 @@ function valuesToArray(n) { function fromSortedArrayRevAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - let match = arr[off]; - return singleton(match[0], match[1]); + let match = arr[off]; + return singleton(match[0], match[1]); case 2 : - let match_0 = arr[off]; - let match_1 = arr[off - 1 | 0]; - let match$1 = match_1; - let match$2 = match_0; - return { - k: match$1[0], - v: match$1[1], - h: 2, - l: singleton(match$2[0], match$2[1]), - r: undefined - }; + let match_0 = arr[off]; + let match_1 = arr[off - 1 | 0]; + let match$1 = match_1; + let match$2 = match_0; + return { + k: match$1[0], + v: match$1[1], + h: 2, + l: singleton(match$2[0], match$2[1]), + r: undefined + }; case 3 : - let match_0$1 = arr[off]; - let match_1$1 = arr[off - 1 | 0]; - let match_2 = arr[off - 2 | 0]; - let match$3 = match_2; - let match$4 = match_1$1; - let match$5 = match_0$1; - return { - k: match$4[0], - v: match$4[1], - h: 2, - l: singleton(match$5[0], match$5[1]), - r: singleton(match$3[0], match$3[1]) - }; + let match_0$1 = arr[off]; + let match_1$1 = arr[off - 1 | 0]; + let match_2 = arr[off - 2 | 0]; + let match$3 = match_2; + let match$4 = match_1$1; + let match$5 = match_0$1; + return { + k: match$4[0], + v: match$4[1], + h: 2, + l: singleton(match$5[0], match$5[1]), + r: singleton(match$3[0], match$3[1]) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayRevAux(arr, off, nl); @@ -757,36 +757,36 @@ function fromSortedArrayRevAux(arr, off, len) { function fromSortedArrayAux(arr, off, len) { switch (len) { case 0 : - return; + return; case 1 : - let match = arr[off]; - return singleton(match[0], match[1]); + let match = arr[off]; + return singleton(match[0], match[1]); case 2 : - let match_0 = arr[off]; - let match_1 = arr[off + 1 | 0]; - let match$1 = match_1; - let match$2 = match_0; - return { - k: match$1[0], - v: match$1[1], - h: 2, - l: singleton(match$2[0], match$2[1]), - r: undefined - }; + let match_0 = arr[off]; + let match_1 = arr[off + 1 | 0]; + let match$1 = match_1; + let match$2 = match_0; + return { + k: match$1[0], + v: match$1[1], + h: 2, + l: singleton(match$2[0], match$2[1]), + r: undefined + }; case 3 : - let match_0$1 = arr[off]; - let match_1$1 = arr[off + 1 | 0]; - let match_2 = arr[off + 2 | 0]; - let match$3 = match_2; - let match$4 = match_1$1; - let match$5 = match_0$1; - return { - k: match$4[0], - v: match$4[1], - h: 2, - l: singleton(match$5[0], match$5[1]), - r: singleton(match$3[0], match$3[1]) - }; + let match_0$1 = arr[off]; + let match_1$1 = arr[off + 1 | 0]; + let match_2 = arr[off + 2 | 0]; + let match$3 = match_2; + let match$4 = match_1$1; + let match$5 = match_0$1; + return { + k: match$4[0], + v: match$4[1], + h: 2, + l: singleton(match$5[0], match$5[1]), + r: singleton(match$3[0], match$3[1]) + }; default: let nl = len / 2 | 0; let left = fromSortedArrayAux(arr, off, nl); diff --git a/lib/js/bytes.js b/lib/js/bytes.js index a530134631..ed1347fd64 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -382,20 +382,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -406,31 +406,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index a530134631..ed1347fd64 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -382,20 +382,20 @@ function escaped(s) { } else { switch (c) { case 8 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'b' */98; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'b' */98; + break; case 9 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 't' */116; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 't' */116; + break; case 10 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'n' */110; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'n' */110; + break; case 0 : case 1 : case 2 : @@ -406,31 +406,31 @@ function escaped(s) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = /* 'r' */114; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = /* 'r' */114; + break; } } switch (exit) { case 1 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = 48 + (c / 100 | 0) | 0; - n = n + 1 | 0; - s$p[n] = 48 + (c / 10 | 0) % 10 | 0; - n = n + 1 | 0; - s$p[n] = 48 + c % 10 | 0; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = 48 + (c / 100 | 0) | 0; + n = n + 1 | 0; + s$p[n] = 48 + (c / 10 | 0) % 10 | 0; + n = n + 1 | 0; + s$p[n] = 48 + c % 10 | 0; + break; case 2 : - s$p[n] = /* '\\' */92; - n = n + 1 | 0; - s$p[n] = c; - break; + s$p[n] = /* '\\' */92; + n = n + 1 | 0; + s$p[n] = c; + break; } n = n + 1 | 0; diff --git a/lib/js/caml_format.js b/lib/js/caml_format.js index e6af1c7f6e..be5618f87e 100644 --- a/lib/js/caml_format.js +++ b/lib/js/caml_format.js @@ -26,13 +26,13 @@ function parse_digit(c) { function int_of_string_base(x) { switch (x) { case "Oct" : - return 8; + return 8; case "Hex" : - return 16; + return 16; case "Dec" : - return 10; + return 10; case "Bin" : - return 2; + return 2; } } @@ -44,12 +44,12 @@ function parse_sign_and_base(s) { let match = s.codePointAt(i); switch (match) { case 43 : - i = i + 1 | 0; - break; + i = i + 1 | 0; + break; case 45 : - sign = -1; - i = i + 1 | 0; - break; + sign = -1; + i = i + 1 | 0; + break; default: } @@ -60,12 +60,12 @@ function parse_sign_and_base(s) { if (match$1 < 121) { switch (match$1) { case 111 : - base = "Oct"; - i = i + 2 | 0; - break; + base = "Oct"; + i = i + 2 | 0; + break; case 117 : - i = i + 2 | 0; - break; + i = i + 2 | 0; + break; case 112 : case 113 : case 114 : @@ -73,11 +73,11 @@ function parse_sign_and_base(s) { case 116 : case 118 : case 119 : - break; + break; case 120 : - base = "Hex"; - i = i + 2 | 0; - break; + base = "Hex"; + i = i + 2 | 0; + break; } } @@ -91,12 +91,12 @@ function parse_sign_and_base(s) { if (match$1 >= 79) { switch (match$1) { case 79 : - base = "Oct"; - i = i + 2 | 0; - break; + base = "Oct"; + i = i + 2 | 0; + break; case 85 : - i = i + 2 | 0; - break; + i = i + 2 | 0; + break; case 80 : case 81 : case 82 : @@ -104,11 +104,11 @@ function parse_sign_and_base(s) { case 84 : case 86 : case 87 : - break; + break; case 88 : - base = "Hex"; - i = i + 2 | 0; - break; + base = "Hex"; + i = i + 2 | 0; + break; } } @@ -198,26 +198,26 @@ function int64_of_string(s) { let threshold; switch (hbase) { case "Oct" : - threshold = [ - 536870911, - 4294967295 - ]; - break; + threshold = [ + 536870911, + 4294967295 + ]; + break; case "Hex" : - threshold = [ - 268435455, - 4294967295 - ]; - break; + threshold = [ + 268435455, + 4294967295 + ]; + break; case "Dec" : - threshold = [ - 429496729, - 2576980377 - ]; - break; + threshold = [ + 429496729, + 2576980377 + ]; + break; case "Bin" : - threshold = Caml_int64.max_int; - break; + threshold = Caml_int64.max_int; + break; } let len = s.length; @@ -277,11 +277,11 @@ function int64_of_string(s) { function int_of_base(x) { switch (x) { case "Oct" : - return 8; + return 8; case "Hex" : - return 16; + return 16; case "Dec" : - return 10; + return 10; } } @@ -332,27 +332,27 @@ function parse_format(fmt) { } else { switch (c) { case 88 : - f.base = "Hex"; - f.uppercase = true; - _i = i + 1 | 0; - continue; + f.base = "Hex"; + f.uppercase = true; + _i = i + 1 | 0; + continue; case 101 : case 102 : case 103 : - exit = 5; - break; + exit = 5; + break; case 100 : case 105 : - exit = 4; - break; + exit = 4; + break; case 111 : - f.base = "Oct"; - _i = i + 1 | 0; - continue; + f.base = "Oct"; + _i = i + 1 | 0; + continue; case 117 : - f.base = "Dec"; - _i = i + 1 | 0; - continue; + f.base = "Dec"; + _i = i + 1 | 0; + continue; case 89 : case 90 : case 91 : @@ -377,12 +377,12 @@ function parse_format(fmt) { case 116 : case 118 : case 119 : - exit = 1; - break; + exit = 1; + break; case 120 : - f.base = "Hex"; - _i = i + 1 | 0; - continue; + f.base = "Hex"; + _i = i + 1 | 0; + continue; } } @@ -398,33 +398,33 @@ function parse_format(fmt) { } else { switch (c) { case 35 : - f.alternate = true; - _i = i + 1 | 0; - continue; + f.alternate = true; + _i = i + 1 | 0; + continue; case 32 : case 43 : - exit = 2; - break; + exit = 2; + break; case 45 : - f.justify = "-"; - _i = i + 1 | 0; - continue; + f.justify = "-"; + _i = i + 1 | 0; + continue; case 46 : - f.prec = 0; - let j = i + 1 | 0; - while ((function () { - let w = fmt.codePointAt(j) - 48 | 0; - return w >= 0 && w <= 9; - })()) { - f.prec = (Math.imul(f.prec, 10) + fmt.codePointAt(j) | 0) - 48 | 0; - j = j + 1 | 0; - }; - _i = j; - continue; + f.prec = 0; + let j = i + 1 | 0; + while ((function () { + let w = fmt.codePointAt(j) - 48 | 0; + return w >= 0 && w <= 9; + })()) { + f.prec = (Math.imul(f.prec, 10) + fmt.codePointAt(j) | 0) - 48 | 0; + j = j + 1 | 0; + }; + _i = j; + continue; case 48 : - f.filter = "0"; - _i = i + 1 | 0; - continue; + f.filter = "0"; + _i = i + 1 | 0; + continue; case 49 : case 50 : case 51 : @@ -434,42 +434,42 @@ function parse_format(fmt) { case 55 : case 56 : case 57 : - exit = 3; - break; + exit = 3; + break; default: exit = 1; } } switch (exit) { case 1 : - _i = i + 1 | 0; - continue; + _i = i + 1 | 0; + continue; case 2 : - f.signstyle = String.fromCharCode(c); - _i = i + 1 | 0; - continue; + f.signstyle = String.fromCharCode(c); + _i = i + 1 | 0; + continue; case 3 : - f.width = 0; - let j$1 = i; - while ((function () { - let w = fmt.codePointAt(j$1) - 48 | 0; - return w >= 0 && w <= 9; - })()) { - f.width = (Math.imul(f.width, 10) + fmt.codePointAt(j$1) | 0) - 48 | 0; - j$1 = j$1 + 1 | 0; - }; - _i = j$1; - continue; + f.width = 0; + let j$1 = i; + while ((function () { + let w = fmt.codePointAt(j$1) - 48 | 0; + return w >= 0 && w <= 9; + })()) { + f.width = (Math.imul(f.width, 10) + fmt.codePointAt(j$1) | 0) - 48 | 0; + j$1 = j$1 + 1 | 0; + }; + _i = j$1; + continue; case 4 : - f.signedconv = true; - f.base = "Dec"; - _i = i + 1 | 0; - continue; + f.signedconv = true; + f.base = "Dec"; + _i = i + 1 | 0; + continue; case 5 : - f.signedconv = true; - f.conv = String.fromCharCode(c); - _i = i + 1 | 0; - continue; + f.signedconv = true; + f.conv = String.fromCharCode(c); + _i = i + 1 | 0; + continue; } }; @@ -619,14 +619,14 @@ function int64_format(fmt, x) { let s; switch (match) { case "Oct" : - s = oct_of_int64(x$1); - break; + s = oct_of_int64(x$1); + break; case "Hex" : - s = Caml_int64.to_hex(x$1); - break; + s = Caml_int64.to_hex(x$1); + break; case "Dec" : - s = dec_of_pos_int64(x$1); - break; + s = dec_of_pos_int64(x$1); + break; } let fill_s; @@ -652,60 +652,60 @@ function format_float(fmt, x) { let match = f.conv; switch (match) { case "e" : - s = x$1.toExponential(prec); - let i = s.length; - if (s.codePointAt(i - 3 | 0) === /* 'e' */101) { - s = s.slice(0, i - 1 | 0) + ("0" + s.slice(i - 1 | 0)); - } - break; + s = x$1.toExponential(prec); + let i = s.length; + if (s.codePointAt(i - 3 | 0) === /* 'e' */101) { + s = s.slice(0, i - 1 | 0) + ("0" + s.slice(i - 1 | 0)); + } + break; case "f" : - s = x$1.toFixed(prec); - break; + s = x$1.toFixed(prec); + break; case "g" : - let prec$1 = prec !== 0 ? prec : 1; - s = x$1.toExponential(prec$1 - 1 | 0); - let j = s.indexOf("e"); - let exp = Number(s.slice(j + 1 | 0)) | 0; - if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { - let i$1 = j - 1 | 0; - while (s.codePointAt(i$1) === /* '0' */48) { - i$1 = i$1 - 1 | 0; - }; - if (s.codePointAt(i$1) === /* '.' */46) { - i$1 = i$1 - 1 | 0; - } - s = s.slice(0, i$1 + 1 | 0) + s.slice(j); - let i$2 = s.length; - if (s.codePointAt(i$2 - 3 | 0) === /* 'e' */101) { - s = s.slice(0, i$2 - 1 | 0) + ("0" + s.slice(i$2 - 1 | 0)); - } - + let prec$1 = prec !== 0 ? prec : 1; + s = x$1.toExponential(prec$1 - 1 | 0); + let j = s.indexOf("e"); + let exp = Number(s.slice(j + 1 | 0)) | 0; + if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) { + let i$1 = j - 1 | 0; + while (s.codePointAt(i$1) === /* '0' */48) { + i$1 = i$1 - 1 | 0; + }; + if (s.codePointAt(i$1) === /* '.' */46) { + i$1 = i$1 - 1 | 0; + } + s = s.slice(0, i$1 + 1 | 0) + s.slice(j); + let i$2 = s.length; + if (s.codePointAt(i$2 - 3 | 0) === /* 'e' */101) { + s = s.slice(0, i$2 - 1 | 0) + ("0" + s.slice(i$2 - 1 | 0)); + } + + } else { + let p = prec$1; + if (exp < 0) { + p = p - (exp + 1 | 0) | 0; + s = x$1.toFixed(p); } else { - let p = prec$1; - if (exp < 0) { - p = p - (exp + 1 | 0) | 0; - s = x$1.toFixed(p); - } else { - while ((function () { - s = x$1.toFixed(p); - return s.length > (prec$1 + 1 | 0); - })()) { - p = p - 1 | 0; - }; - } - if (p !== 0) { - let k = s.length - 1 | 0; - while (s.codePointAt(k) === /* '0' */48) { - k = k - 1 | 0; - }; - if (s.codePointAt(k) === /* '.' */46) { - k = k - 1 | 0; - } - s = s.slice(0, k + 1 | 0); + while ((function () { + s = x$1.toFixed(p); + return s.length > (prec$1 + 1 | 0); + })()) { + p = p - 1 | 0; + }; + } + if (p !== 0) { + let k = s.length - 1 | 0; + while (s.codePointAt(k) === /* '0' */48) { + k = k - 1 | 0; + }; + if (s.codePointAt(k) === /* '.' */46) { + k = k - 1 | 0; } - + s = s.slice(0, k + 1 | 0); } - break; + + } + break; default: } diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index 3c945ecea2..f2733e209d 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -16,16 +16,16 @@ function init_mod(loc, shape) { switch (shape) { case "Function" : case "Lazy" : - struct_[idx] = undef_module; - return; + struct_[idx] = undef_module; + return; case "Class" : - struct_[idx] = [ - undef_module, - undef_module, - undef_module, - 0 - ]; - return; + struct_[idx] = [ + undef_module, + undef_module, + undef_module, + 0 + ]; + return; } } else { @@ -55,11 +55,11 @@ function update_mod(shape, o, n) { if (typeof shape !== "object") { switch (shape) { case "Function" : - parent[i] = n; - return; + parent[i] = n; + return; case "Lazy" : case "Class" : - return Caml_obj.update_dummy(o, n); + return Caml_obj.update_dummy(o, n); } } else { diff --git a/lib/js/caml_obj.js b/lib/js/caml_obj.js index b63986fe90..1828392070 100644 --- a/lib/js/caml_obj.js +++ b/lib/js/caml_obj.js @@ -44,46 +44,46 @@ function compare(a, b) { let b_type = typeof b; switch (a_type) { case "bigint" : - if (b_type === "bigint") { - return Caml.float_compare(a, b); - } - break; + if (b_type === "bigint") { + return Caml.float_compare(a, b); + } + break; case "boolean" : - if (b_type === "boolean") { - return Caml.bool_compare(a, b); - } - break; + if (b_type === "boolean") { + return Caml.bool_compare(a, b); + } + break; case "function" : - if (b_type === "function") { - throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "compare: functional value" - } - }); - } - break; + if (b_type === "function") { + throw new Error("Invalid_argument", { + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "compare: functional value" + } + }); + } + break; case "number" : - if (b_type === "number") { - return Caml.float_compare(a, b); - } - break; + if (b_type === "number") { + return Caml.float_compare(a, b); + } + break; case "string" : - if (b_type === "string") { - return Caml.string_compare(a, b); - } else { - return 1; - } + if (b_type === "string") { + return Caml.string_compare(a, b); + } else { + return 1; + } case "undefined" : - return -1; + return -1; default: } switch (b_type) { case "string" : - return -1; + return -1; case "undefined" : - return 1; + return 1; default: if (a_type === "boolean") { return 1; diff --git a/lib/js/char.js b/lib/js/char.js index 2ae5bbaca9..29920321a0 100644 --- a/lib/js/char.js +++ b/lib/js/char.js @@ -31,11 +31,11 @@ function escaped(param) { } else { switch (param) { case 8 : - return "\\b"; + return "\\b"; case 9 : - return "\\t"; + return "\\t"; case 10 : - return "\\n"; + return "\\n"; case 0 : case 1 : case 2 : @@ -46,30 +46,30 @@ function escaped(param) { case 7 : case 11 : case 12 : - exit = 1; - break; + exit = 1; + break; case 13 : - return "\\r"; + return "\\r"; } } switch (exit) { case 1 : - let s = [ - 0, - 0, - 0, - 0 - ]; - s[0] = /* '\\' */92; - s[1] = 48 + (param / 100 | 0) | 0; - s[2] = 48 + (param / 10 | 0) % 10 | 0; - s[3] = 48 + param % 10 | 0; - return Bytes.to_string(s); + let s = [ + 0, + 0, + 0, + 0 + ]; + s[0] = /* '\\' */92; + s[1] = 48 + (param / 100 | 0) | 0; + s[2] = 48 + (param / 10 | 0) % 10 | 0; + s[3] = 48 + param % 10 | 0; + return Bytes.to_string(s); case 2 : - let s$1 = [0]; - s$1[0] = param; - return Bytes.to_string(s$1); + let s$1 = [0]; + s$1[0] = param; + return Bytes.to_string(s$1); } } diff --git a/lib/js/curry.js b/lib/js/curry.js index 9344a34a72..54c46389bf 100644 --- a/lib/js/curry.js +++ b/lib/js/curry.js @@ -31,31 +31,31 @@ function _1(o, a0) { } else { switch (arity) { case 1 : - return o(a0); + return o(a0); case 2 : - return function (param) { - return o(a0, param); - }; + return function (param) { + return o(a0, param); + }; case 3 : - return function (param, param$1) { - return o(a0, param, param$1); - }; + return function (param, param$1) { + return o(a0, param, param$1); + }; case 4 : - return function (param, param$1, param$2) { - return o(a0, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, param, param$1, param$2); + }; case 5 : - return function (param, param$1, param$2, param$3) { - return o(a0, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, param, param$1, param$2, param$3); + }; case 6 : - return function (param, param$1, param$2, param$3, param$4) { - return o(a0, param, param$1, param$2, param$3, param$4); - }; + return function (param, param$1, param$2, param$3, param$4) { + return o(a0, param, param$1, param$2, param$3, param$4); + }; case 7 : - return function (param, param$1, param$2, param$3, param$4, param$5) { - return o(a0, param, param$1, param$2, param$3, param$4, param$5); - }; + return function (param, param$1, param$2, param$3, param$4, param$5) { + return o(a0, param, param$1, param$2, param$3, param$4, param$5); + }; default: return app(o, [a0]); } @@ -80,29 +80,29 @@ function _2(o, a0, a1) { } else { switch (arity) { case 1 : - return app(o(a0), [a1]); + return app(o(a0), [a1]); case 2 : - return o(a0, a1); + return o(a0, a1); case 3 : - return function (param) { - return o(a0, a1, param); - }; + return function (param) { + return o(a0, a1, param); + }; case 4 : - return function (param, param$1) { - return o(a0, a1, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, param, param$1); + }; case 5 : - return function (param, param$1, param$2) { - return o(a0, a1, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, param, param$1, param$2); + }; case 6 : - return function (param, param$1, param$2, param$3) { - return o(a0, a1, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, a1, param, param$1, param$2, param$3); + }; case 7 : - return function (param, param$1, param$2, param$3, param$4) { - return o(a0, a1, param, param$1, param$2, param$3, param$4); - }; + return function (param, param$1, param$2, param$3, param$4) { + return o(a0, a1, param, param$1, param$2, param$3, param$4); + }; default: return app(o, [ a0, @@ -130,30 +130,30 @@ function _3(o, a0, a1, a2) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2 - ]); + return app(o(a0), [ + a1, + a2 + ]); case 2 : - return app(o(a0, a1), [a2]); + return app(o(a0, a1), [a2]); case 3 : - return o(a0, a1, a2); + return o(a0, a1, a2); case 4 : - return function (param) { - return o(a0, a1, a2, param); - }; + return function (param) { + return o(a0, a1, a2, param); + }; case 5 : - return function (param, param$1) { - return o(a0, a1, a2, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, param, param$1); + }; case 6 : - return function (param, param$1, param$2) { - return o(a0, a1, a2, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, a2, param, param$1, param$2); + }; case 7 : - return function (param, param$1, param$2, param$3) { - return o(a0, a1, a2, param, param$1, param$2, param$3); - }; + return function (param, param$1, param$2, param$3) { + return o(a0, a1, a2, param, param$1, param$2, param$3); + }; default: return app(o, [ a0, @@ -182,32 +182,32 @@ function _4(o, a0, a1, a2, a3) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3 - ]); + return app(o(a0), [ + a1, + a2, + a3 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3 - ]); + return app(o(a0, a1), [ + a2, + a3 + ]); case 3 : - return app(o(a0, a1, a2), [a3]); + return app(o(a0, a1, a2), [a3]); case 4 : - return o(a0, a1, a2, a3); + return o(a0, a1, a2, a3); case 5 : - return function (param) { - return o(a0, a1, a2, a3, param); - }; + return function (param) { + return o(a0, a1, a2, a3, param); + }; case 6 : - return function (param, param$1) { - return o(a0, a1, a2, a3, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, a3, param, param$1); + }; case 7 : - return function (param, param$1, param$2) { - return o(a0, a1, a2, a3, param, param$1, param$2); - }; + return function (param, param$1, param$2) { + return o(a0, a1, a2, a3, param, param$1, param$2); + }; default: return app(o, [ a0, @@ -237,35 +237,35 @@ function _5(o, a0, a1, a2, a3, a4) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4 - ]); + return app(o(a0, a1, a2), [ + a3, + a4 + ]); case 4 : - return app(o(a0, a1, a2, a3), [a4]); + return app(o(a0, a1, a2, a3), [a4]); case 5 : - return o(a0, a1, a2, a3, a4); + return o(a0, a1, a2, a3, a4); case 6 : - return function (param) { - return o(a0, a1, a2, a3, a4, param); - }; + return function (param) { + return o(a0, a1, a2, a3, a4, param); + }; case 7 : - return function (param, param$1) { - return o(a0, a1, a2, a3, a4, param, param$1); - }; + return function (param, param$1) { + return o(a0, a1, a2, a3, a4, param, param$1); + }; default: return app(o, [ a0, @@ -296,39 +296,39 @@ function _6(o, a0, a1, a2, a3, a4, a5) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [a5]); + return app(o(a0, a1, a2, a3, a4), [a5]); case 6 : - return o(a0, a1, a2, a3, a4, a5); + return o(a0, a1, a2, a3, a4, a5); case 7 : - return function (param) { - return o(a0, a1, a2, a3, a4, a5, param); - }; + return function (param) { + return o(a0, a1, a2, a3, a4, a5, param); + }; default: return app(o, [ a0, @@ -360,44 +360,44 @@ function _7(o, a0, a1, a2, a3, a4, a5, a6) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5, - a6 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5, + a6 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5, - a6 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5, + a6 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5, - a6 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5, + a6 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5, - a6 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5, + a6 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [ - a5, - a6 - ]); + return app(o(a0, a1, a2, a3, a4), [ + a5, + a6 + ]); case 6 : - return app(o(a0, a1, a2, a3, a4, a5), [a6]); + return app(o(a0, a1, a2, a3, a4, a5), [a6]); case 7 : - return o(a0, a1, a2, a3, a4, a5, a6); + return o(a0, a1, a2, a3, a4, a5, a6); default: return app(o, [ a0, @@ -430,52 +430,52 @@ function _8(o, a0, a1, a2, a3, a4, a5, a6, a7) { } else { switch (arity) { case 1 : - return app(o(a0), [ - a1, - a2, - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0), [ + a1, + a2, + a3, + a4, + a5, + a6, + a7 + ]); case 2 : - return app(o(a0, a1), [ - a2, - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1), [ + a2, + a3, + a4, + a5, + a6, + a7 + ]); case 3 : - return app(o(a0, a1, a2), [ - a3, - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2), [ + a3, + a4, + a5, + a6, + a7 + ]); case 4 : - return app(o(a0, a1, a2, a3), [ - a4, - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2, a3), [ + a4, + a5, + a6, + a7 + ]); case 5 : - return app(o(a0, a1, a2, a3, a4), [ - a5, - a6, - a7 - ]); + return app(o(a0, a1, a2, a3, a4), [ + a5, + a6, + a7 + ]); case 6 : - return app(o(a0, a1, a2, a3, a4, a5), [ - a6, - a7 - ]); + return app(o(a0, a1, a2, a3, a4, a5), [ + a6, + a7 + ]); case 7 : - return app(o(a0, a1, a2, a3, a4, a5, a6), [a7]); + return app(o(a0, a1, a2, a3, a4, a5, a6), [a7]); default: return app(o, [ a0, diff --git a/lib/js/filename.js b/lib/js/filename.js index fffc114c71..fa7ccc61b1 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -319,35 +319,35 @@ let match; switch (Sys.os_type) { case "Cygwin" : - match = [ - current_dir_name$2, - "..", - "/", - is_dir_sep$1, - is_relative$1, - is_implicit$1, - check_suffix$1, - temp_dir_name, - quote, - basename$2, - dirname$2 - ]; - break; + match = [ + current_dir_name$2, + "..", + "/", + is_dir_sep$1, + is_relative$1, + is_implicit$1, + check_suffix$1, + temp_dir_name, + quote, + basename$2, + dirname$2 + ]; + break; case "Win32" : - match = [ - current_dir_name$1, - "..", - "\\", - is_dir_sep$1, - is_relative$1, - is_implicit$1, - check_suffix$1, - temp_dir_name$1, - quote$1, - basename$1, - dirname$1 - ]; - break; + match = [ + current_dir_name$1, + "..", + "\\", + is_dir_sep$1, + is_relative$1, + is_implicit$1, + check_suffix$1, + temp_dir_name$1, + quote$1, + basename$1, + dirname$1 + ]; + break; default: match = [ current_dir_name, diff --git a/lib/js/genlex.js b/lib/js/genlex.js index 29a5181539..e97c9d30ec 100644 --- a/lib/js/genlex.js +++ b/lib/js/genlex.js @@ -103,80 +103,80 @@ function make_lexer(keywords) { case 13 : case 26 : case 32 : - Stream.junk(strm__); - continue; + Stream.junk(strm__); + continue; case 34 : - Stream.junk(strm__); - reset_buffer(); - return { - TAG: "String", - _0: string(strm__) - }; + Stream.junk(strm__); + reset_buffer(); + return { + TAG: "String", + _0: string(strm__) + }; case 39 : - Stream.junk(strm__); - let c$1; - try { - c$1 = char(strm__); - } catch (raw_exn) { - let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.RE_EXN_ID === Stream.Failure) { - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - throw new Error(exn.RE_EXN_ID, { - cause: exn + Stream.junk(strm__); + let c$1; + try { + c$1 = char(strm__); + } catch (raw_exn) { + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Stream.Failure) { + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } }); } - let match = Stream.peek(strm__); - if (match !== undefined) { - if (match !== 39) { - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - Stream.junk(strm__); - return { - TAG: "Char", - _0: c$1 - }; - } - throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } + throw new Error(exn.RE_EXN_ID, { + cause: exn }); + } + let match = Stream.peek(strm__); + if (match !== undefined) { + if (match !== 39) { + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); + } + Stream.junk(strm__); + return { + TAG: "Char", + _0: c$1 + }; + } + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); case 40 : + Stream.junk(strm__); + let match$1 = Stream.peek(strm__); + if (match$1 === 42) { Stream.junk(strm__); - let match$1 = Stream.peek(strm__); - if (match$1 === 42) { - Stream.junk(strm__); - comment(strm__); - return next_token(strm__); - } else { - return keyword_or_error(/* '(' */40); - } + comment(strm__); + return next_token(strm__); + } else { + return keyword_or_error(/* '(' */40); + } case 45 : + Stream.junk(strm__); + let c$2 = Stream.peek(strm__); + if (c$2 !== undefined && !(c$2 > 57 || c$2 < 48)) { Stream.junk(strm__); - let c$2 = Stream.peek(strm__); - if (c$2 !== undefined && !(c$2 > 57 || c$2 < 48)) { - Stream.junk(strm__); - reset_buffer(); - store(/* '-' */45); - store(c$2); - return number(strm__); - } else { - reset_buffer(); - store(/* '-' */45); - return ident2(strm__); - } + reset_buffer(); + store(/* '-' */45); + store(c$2); + return number(strm__); + } else { + reset_buffer(); + store(/* '-' */45); + return ident2(strm__); + } case 48 : case 49 : case 50 : @@ -187,8 +187,8 @@ function make_lexer(keywords) { case 55 : case 56 : case 57 : - exit = 4; - break; + exit = 4; + break; case 0 : case 1 : case 2 : @@ -220,8 +220,8 @@ function make_lexer(keywords) { case 44 : case 46 : case 59 : - exit = 1; - break; + exit = 1; + break; case 33 : case 35 : case 36 : @@ -236,8 +236,8 @@ function make_lexer(keywords) { case 62 : case 63 : case 64 : - exit = 3; - break; + exit = 3; + break; } } @@ -245,13 +245,13 @@ function make_lexer(keywords) { switch (c) { case 92 : case 94 : - exit = 3; - break; + exit = 3; + break; case 91 : case 93 : case 96 : - exit = 1; - break; + exit = 1; + break; default: exit = 2; } @@ -265,49 +265,49 @@ function make_lexer(keywords) { } switch (exit) { case 1 : - Stream.junk(strm__); - return keyword_or_error(c); + Stream.junk(strm__); + return keyword_or_error(c); case 2 : - Stream.junk(strm__); - reset_buffer(); - store(c); - while (true) { - let c$3 = Stream.peek(strm__); - if (c$3 === undefined) { - return ident_or_keyword(get_string()); - } - if (c$3 >= 91) { - if (c$3 > 122 || c$3 < 95) { - if (c$3 > 255 || c$3 < 192) { - return ident_or_keyword(get_string()); - } - - } else if (c$3 === 96) { - return ident_or_keyword(get_string()); - } - - } else if (c$3 >= 48) { - if (!(c$3 > 64 || c$3 < 58)) { + Stream.junk(strm__); + reset_buffer(); + store(c); + while (true) { + let c$3 = Stream.peek(strm__); + if (c$3 === undefined) { + return ident_or_keyword(get_string()); + } + if (c$3 >= 91) { + if (c$3 > 122 || c$3 < 95) { + if (c$3 > 255 || c$3 < 192) { return ident_or_keyword(get_string()); } - } else if (c$3 !== 39) { + } else if (c$3 === 96) { return ident_or_keyword(get_string()); } - Stream.junk(strm__); - store(c$3); - continue; - }; - case 3 : + + } else if (c$3 >= 48) { + if (!(c$3 > 64 || c$3 < 58)) { + return ident_or_keyword(get_string()); + } + + } else if (c$3 !== 39) { + return ident_or_keyword(get_string()); + } Stream.junk(strm__); - reset_buffer(); - store(c); - return ident2(strm__); + store(c$3); + continue; + }; + case 3 : + Stream.junk(strm__); + reset_buffer(); + store(c); + return ident2(strm__); case 4 : - Stream.junk(strm__); - reset_buffer(); - store(c); - return number(strm__); + Stream.junk(strm__); + reset_buffer(); + store(c); + return number(strm__); } }; @@ -355,7 +355,7 @@ function make_lexer(keywords) { case 56 : case 57 : case 59 : - return ident_or_keyword(get_string()); + return ident_or_keyword(get_string()); case 33 : case 35 : case 36 : @@ -371,7 +371,7 @@ function make_lexer(keywords) { case 62 : case 63 : case 64 : - break; + break; } } @@ -540,14 +540,14 @@ function make_lexer(keywords) { if (c1 >= 58) { switch (c1) { case 110 : - Stream.junk(strm__); - return /* '\n' */10; + Stream.junk(strm__); + return /* '\n' */10; case 114 : - Stream.junk(strm__); - return /* '\r' */13; + Stream.junk(strm__); + return /* '\r' */13; case 116 : - Stream.junk(strm__); - return /* '\t' */9; + Stream.junk(strm__); + return /* '\t' */9; default: Stream.junk(strm__); return c1; @@ -610,45 +610,45 @@ function make_lexer(keywords) { if (match !== undefined) { switch (match) { case 40 : - Stream.junk(strm__); - let match$1 = Stream.peek(strm__); - if (match$1 !== undefined) { - if (match$1 !== 42) { - Stream.junk(strm__); - return comment(strm__); - } else { + Stream.junk(strm__); + let match$1 = Stream.peek(strm__); + if (match$1 !== undefined) { + if (match$1 !== 42) { + Stream.junk(strm__); + return comment(strm__); + } else { + Stream.junk(strm__); + comment(strm__); + return comment(strm__); + } + } + throw new Error(Stream.Failure, { + cause: { + RE_EXN_ID: Stream.Failure + } + }); + case 42 : + Stream.junk(strm__); + while (true) { + let match$2 = Stream.peek(strm__); + if (match$2 !== undefined) { + if (match$2 !== 41) { + if (match$2 !== 42) { + Stream.junk(strm__); + return comment(strm__); + } Stream.junk(strm__); - comment(strm__); - return comment(strm__); + continue; } + Stream.junk(strm__); + return; } throw new Error(Stream.Failure, { cause: { RE_EXN_ID: Stream.Failure } }); - case 42 : - Stream.junk(strm__); - while (true) { - let match$2 = Stream.peek(strm__); - if (match$2 !== undefined) { - if (match$2 !== 41) { - if (match$2 !== 42) { - Stream.junk(strm__); - return comment(strm__); - } - Stream.junk(strm__); - continue; - } - Stream.junk(strm__); - return; - } - throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); - }; + }; default: Stream.junk(strm__); continue; diff --git a/lib/js/js_json.js b/lib/js/js_json.js index b214ef1e15..088447fc4f 100644 --- a/lib/js/js_json.js +++ b/lib/js/js_json.js @@ -39,21 +39,21 @@ function classify(x) { function test(x, v) { switch (v) { case "String" : - return typeof x === "string"; + return typeof x === "string"; case "Number" : - return typeof x === "number"; + return typeof x === "number"; case "Object" : - if (x !== null && typeof x === "object") { - return !Array.isArray(x); - } else { - return false; - } + if (x !== null && typeof x === "object") { + return !Array.isArray(x); + } else { + return false; + } case "Array" : - return Array.isArray(x); + return Array.isArray(x); case "Boolean" : - return typeof x === "boolean"; + return typeof x === "boolean"; case "Null" : - return x === null; + return x === null; } } diff --git a/lib/js/js_types.js b/lib/js/js_types.js index b279239d92..8ef1a3f721 100644 --- a/lib/js/js_types.js +++ b/lib/js/js_types.js @@ -49,23 +49,23 @@ function classify(x) { function test(x, v) { switch (v) { case "Undefined" : - return typeof x === "undefined"; + return typeof x === "undefined"; case "Null" : - return x === null; + return x === null; case "Boolean" : - return typeof x === "boolean"; + return typeof x === "boolean"; case "Number" : - return typeof x === "number"; + return typeof x === "number"; case "String" : - return typeof x === "string"; + return typeof x === "string"; case "Function" : - return typeof x === "function"; + return typeof x === "function"; case "Object" : - return typeof x === "object"; + return typeof x === "object"; case "Symbol" : - return typeof x === "symbol"; + return typeof x === "symbol"; case "BigInt" : - return typeof x === "bigint"; + return typeof x === "bigint"; } } diff --git a/lib/js/moreLabels.js b/lib/js/moreLabels.js index 48346f2288..3edd9368b1 100644 --- a/lib/js/moreLabels.js +++ b/lib/js/moreLabels.js @@ -1799,28 +1799,54 @@ let $$Set = { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -1831,50 +1857,24 @@ let $$Set = { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/js/parsing.js b/lib/js/parsing.js index 81fe0e8f05..31cb6a2f79 100644 --- a/lib/js/parsing.js +++ b/lib/js/parsing.js @@ -80,56 +80,56 @@ function yyparse(tables, start, lexer, lexbuf) { let match = Caml_parser.parse_engine(tables, env, cmd, arg); switch (match) { case "Read_token" : - let t = lexer(lexbuf); - env.symb_start = lexbuf.lex_start_p; - env.symb_end = lexbuf.lex_curr_p; - _arg = t; - _cmd = "Token_read"; - continue; + let t = lexer(lexbuf); + env.symb_start = lexbuf.lex_start_p; + env.symb_end = lexbuf.lex_curr_p; + _arg = t; + _cmd = "Token_read"; + continue; case "Raise_parse_error" : - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error + } + }); case "Grow_stacks_1" : - grow_stacks(); - _arg = undefined; - _cmd = "Stacks_grown_1"; - continue; + grow_stacks(); + _arg = undefined; + _cmd = "Stacks_grown_1"; + continue; case "Grow_stacks_2" : - grow_stacks(); - _arg = undefined; - _cmd = "Stacks_grown_2"; - continue; + grow_stacks(); + _arg = undefined; + _cmd = "Stacks_grown_2"; + continue; case "Compute_semantic_action" : - let match$1; - try { + let match$1; + try { + match$1 = [ + "Semantic_action_computed", + Caml_array.get(tables.actions, env.rule_number)(env) + ]; + } catch (raw_exn) { + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Parse_error) { match$1 = [ - "Semantic_action_computed", - Caml_array.get(tables.actions, env.rule_number)(env) + "Error_detected", + undefined ]; - } catch (raw_exn) { - let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.RE_EXN_ID === Parse_error) { - match$1 = [ - "Error_detected", - undefined - ]; - } else { - throw new Error(exn.RE_EXN_ID, { - cause: exn - }); - } + } else { + throw new Error(exn.RE_EXN_ID, { + cause: exn + }); } - _arg = match$1[1]; - _cmd = match$1[0]; - continue; + } + _arg = match$1[1]; + _cmd = match$1[0]; + continue; case "Call_error_function" : - tables.error_function("syntax error"); - _arg = undefined; - _cmd = "Error_detected"; - continue; + tables.error_function("syntax error"); + _arg = undefined; + _cmd = "Error_detected"; + continue; } }; diff --git a/lib/js/pervasives.js b/lib/js/pervasives.js index 0b2da39ac6..2be743fc2b 100644 --- a/lib/js/pervasives.js +++ b/lib/js/pervasives.js @@ -79,9 +79,9 @@ function string_of_bool(b) { function bool_of_string(param) { switch (param) { case "false" : - return false; + return false; case "true" : - return true; + return true; default: throw new Error("Invalid_argument", { cause: { @@ -95,9 +95,9 @@ function bool_of_string(param) { function bool_of_string_opt(param) { switch (param) { case "false" : - return false; + return false; case "true" : - return true; + return true; default: return; } diff --git a/lib/js/set.js b/lib/js/set.js index a2ff33a255..fea156c3fc 100644 --- a/lib/js/set.js +++ b/lib/js/set.js @@ -825,28 +825,54 @@ function Make(funarg) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -857,50 +883,24 @@ function Make(funarg) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/js/setLabels.js b/lib/js/setLabels.js index 92134ee0be..5f4031a5e0 100644 --- a/lib/js/setLabels.js +++ b/lib/js/setLabels.js @@ -815,28 +815,54 @@ function Make(Ord) { let sub = function (n, l) { switch (n) { case 0 : + return [ + "Empty", + l + ]; + case 1 : + if (l) { return [ - "Empty", - l + { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + l.tl ]; - case 1 : - if (l) { + } + break; + case 2 : + if (l) { + let match = l.tl; + if (match) { return [ { TAG: "Node", - l: "Empty", - v: l.hd, + l: { + TAG: "Node", + l: "Empty", + v: l.hd, + r: "Empty", + h: 1 + }, + v: match.hd, r: "Empty", - h: 1 + h: 2 }, - l.tl + match.tl ]; } - break; - case 2 : - if (l) { - let match = l.tl; - if (match) { + + } + break; + case 3 : + if (l) { + let match$1 = l.tl; + if (match$1) { + let match$2 = match$1.tl; + if (match$2) { return [ { TAG: "Node", @@ -847,50 +873,24 @@ function Make(Ord) { r: "Empty", h: 1 }, - v: match.hd, - r: "Empty", + v: match$1.hd, + r: { + TAG: "Node", + l: "Empty", + v: match$2.hd, + r: "Empty", + h: 1 + }, h: 2 }, - match.tl + match$2.tl ]; } } - break; - case 3 : - if (l) { - let match$1 = l.tl; - if (match$1) { - let match$2 = match$1.tl; - if (match$2) { - return [ - { - TAG: "Node", - l: { - TAG: "Node", - l: "Empty", - v: l.hd, - r: "Empty", - h: 1 - }, - v: match$1.hd, - r: { - TAG: "Node", - l: "Empty", - v: match$2.hd, - r: "Empty", - h: 1 - }, - h: 2 - }, - match$2.tl - ]; - } - - } - - } - break; + + } + break; default: } diff --git a/lib/js/stream.js b/lib/js/stream.js index add189353e..a450fcb3c1 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -35,65 +35,65 @@ function get_data(count, _d) { } switch (d.TAG) { case "Scons" : - return d; + return d; case "Sapp" : - let d2 = d._1; - let match = get_data(count, d._0); - if (typeof match !== "object") { - _d = d2; - continue; - } - if (match.TAG === "Scons") { - return { - TAG: "Scons", - _0: match._0, - _1: { - TAG: "Sapp", - _0: match._1, - _1: d2 + let d2 = d._1; + let match = get_data(count, d._0); + if (typeof match !== "object") { + _d = d2; + continue; + } + if (match.TAG === "Scons") { + return { + TAG: "Scons", + _0: match._0, + _1: { + TAG: "Sapp", + _0: match._1, + _1: d2 + } + }; + } + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 53, + 13 + ] } - }; - } - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 53, - 13 - ] - } - }); + }); case "Slazy" : - _d = CamlinternalLazy.force(d._0); - continue; + _d = CamlinternalLazy.force(d._0); + continue; case "Sgen" : - let g = d._0; - let match$1 = g.curr; - if (match$1 !== undefined) { - let a = Caml_option.valFromOption(match$1); - if (a !== undefined) { - g.curr = undefined; - return { - TAG: "Scons", - _0: Caml_option.valFromOption(a), - _1: d - }; - } else { - return "Sempty"; - } - } - let a$1 = g.func(count); - if (a$1 !== undefined) { + let g = d._0; + let match$1 = g.curr; + if (match$1 !== undefined) { + let a = Caml_option.valFromOption(match$1); + if (a !== undefined) { + g.curr = undefined; return { TAG: "Scons", - _0: Caml_option.valFromOption(a$1), + _0: Caml_option.valFromOption(a), _1: d }; } else { - g.curr = Caml_option.some(undefined); return "Sempty"; } + } + let a$1 = g.func(count); + if (a$1 !== undefined) { + return { + TAG: "Scons", + _0: Caml_option.valFromOption(a$1), + _1: d + }; + } else { + g.curr = Caml_option.some(undefined); + return "Sempty"; + } } }; @@ -107,38 +107,38 @@ function peek_data(s) { } switch (f.TAG) { case "Scons" : - return Caml_option.some(f._0); + return Caml_option.some(f._0); case "Sapp" : - let d = get_data(s.count, s.data); - if (typeof d !== "object") { - return; - } - if (d.TAG === "Scons") { - s.data = d; - return Caml_option.some(d._0); - } - throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 83, - 13 - ] - } - }); + let d = get_data(s.count, s.data); + if (typeof d !== "object") { + return; + } + if (d.TAG === "Scons") { + s.data = d; + return Caml_option.some(d._0); + } + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 83, + 13 + ] + } + }); case "Slazy" : - s.data = CamlinternalLazy.force(f._0); - continue; + s.data = CamlinternalLazy.force(f._0); + continue; case "Sgen" : - let g = f._0; - let a = g.curr; - if (a !== undefined) { - return Caml_option.valFromOption(a); - } - let x = g.func(s.count); - g.curr = Caml_option.some(x); - return x; + let g = f._0; + let a = g.curr; + if (a !== undefined) { + return Caml_option.valFromOption(a); + } + let x = g.func(s.count); + g.curr = Caml_option.some(x); + return x; } }; @@ -157,18 +157,18 @@ function junk_data(s) { if (typeof g === "object") { switch (g.TAG) { case "Scons" : + s.count = s.count + 1 | 0; + s.data = g._1; + return; + case "Sgen" : + let g$1 = g._0; + let match = g$1.curr; + if (match !== undefined) { s.count = s.count + 1 | 0; - s.data = g._1; + g$1.curr = undefined; return; - case "Sgen" : - let g$1 = g._0; - let match = g$1.curr; - if (match !== undefined) { - s.count = s.count + 1 | 0; - g$1.curr = undefined; - return; - } - break; + } + break; default: } @@ -432,25 +432,25 @@ function dump_data(f, param) { } switch (param.TAG) { case "Scons" : - console.log("Scons ("); - f(param._0); - console.log(", "); - dump_data(f, param._1); - console.log(")"); - return; + console.log("Scons ("); + f(param._0); + console.log(", "); + dump_data(f, param._1); + console.log(")"); + return; case "Sapp" : - console.log("Sapp ("); - dump_data(f, param._0); - console.log(", "); - dump_data(f, param._1); - console.log(")"); - return; + console.log("Sapp ("); + dump_data(f, param._0); + console.log(", "); + dump_data(f, param._1); + console.log(")"); + return; case "Slazy" : - console.log("Slazy"); - return; + console.log("Slazy"); + return; case "Sgen" : - console.log("Sgen"); - return; + console.log("Sgen"); + return; } } From 5c02ff3ea5ed69315f0839546bcc18a3a1ff0c24 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:31:36 +0400 Subject: [PATCH 12/18] Remove empty default from generated Js code --- jscomp/core/js_dump.ml | 4 +++- jscomp/core/lam_compile.ml | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index df026fb3e4..65f2fc8d9d 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -429,6 +429,7 @@ and pp_one_case_clause : 'a. _ -> P.t -> (P.t -> 'a -> unit) -> 'a * J.case_clause -> _ = fun cxt f pp_cond (switch_case, ({ switch_body; should_break; comment } : J.case_clause)) -> + P.newline f; let cxt = P.group f 1 (fun _ -> P.group f 0 (fun _ -> @@ -453,7 +454,6 @@ and pp_one_case_clause : semi f); cxt)) in - P.newline f; cxt and loop_case_clauses : @@ -1181,6 +1181,7 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = match def with | None -> cxt | Some def -> + P.newline f; P.group f 1 (fun _ -> P.string f L.default; P.string f L.colon; @@ -1199,6 +1200,7 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt = match def with | None -> cxt | Some def -> + P.newline f; P.group f 1 (fun _ -> P.string f L.default; P.string f L.colon; diff --git a/jscomp/core/lam_compile.ml b/jscomp/core/lam_compile.ml index b782e12966..dfd678d97f 100644 --- a/jscomp/core/lam_compile.ml +++ b/jscomp/core/lam_compile.ml @@ -584,7 +584,10 @@ and compile_general_cases : | Complete -> None | NonComplete -> None | Default lam -> - Some (Js_output.output_as_block (compile_lambda cxt lam)) + let statements = Js_output.output_as_block (compile_lambda cxt lam) in + match statements with + | [] -> None + | _ -> Some statements in let body = group_apply ~merge_cases cases (fun last (switch_case, lam) -> From ee601b49ef082cb5da14de374e721682f8501bc1 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:31:41 +0400 Subject: [PATCH 13/18] Commit test outputs --- jscomp/test/UntaggedVariants.js | 17 --------------- jscomp/test/adt_optimize_test.js | 12 ----------- jscomp/test/arith_lexer.js | 1 - jscomp/test/arith_syntax.js | 1 - jscomp/test/bdd.js | 2 -- jscomp/test/big_enum.js | 2 -- jscomp/test/compare_test.js | 5 ----- jscomp/test/complex_if_test.js | 2 -- jscomp/test/const_test.js | 1 - jscomp/test/ext_bytes_test.js | 2 -- jscomp/test/gpr_1438.js | 2 -- jscomp/test/gpr_1698_test.js | 6 ------ jscomp/test/gpr_2413_test.js | 1 - jscomp/test/gpr_2642_test.js | 1 - jscomp/test/gpr_2931_test.js | 2 -- jscomp/test/int_switch_test.js | 1 - jscomp/test/js_json_test.js | 1 - jscomp/test/mario_game.js | 32 ----------------------------- jscomp/test/miss_colon_test.js | 3 --- jscomp/test/mock_mt.js | 1 - jscomp/test/mt.js | 1 - jscomp/test/ocaml_re_test.js | 24 ---------------------- jscomp/test/offset.js | 2 -- jscomp/test/rbset.js | 2 -- jscomp/test/rec_module_test.js | 2 -- jscomp/test/record_regression.js | 2 -- jscomp/test/set_gen.js | 2 -- jscomp/test/sexpm.js | 5 ----- jscomp/test/simplify_lambda_632o.js | 2 -- jscomp/test/test_bug.js | 1 - jscomp/test/test_incomplete.js | 1 - jscomp/test/test_set.js | 2 -- jscomp/test/test_switch.js | 1 - jscomp/test/topsort_test.js | 2 -- jscomp/test/variant.js | 2 -- jscomp/test/variantsMatching.js | 9 -------- lib/es6/arg.js | 2 -- lib/es6/bytes.js | 2 -- lib/es6/bytesLabels.js | 2 -- lib/es6/caml_format.js | 12 ----------- lib/es6/caml_module.js | 2 -- lib/es6/caml_obj.js | 2 -- lib/es6/char.js | 2 -- lib/es6/genlex.js | 3 --- lib/es6/js_json.js | 1 - lib/es6/js_types.js | 1 - lib/es6/moreLabels.js | 2 -- lib/es6/parsing.js | 1 - lib/es6/set.js | 2 -- lib/es6/setLabels.js | 2 -- lib/es6/stream.js | 5 ----- lib/js/arg.js | 2 -- lib/js/bytes.js | 2 -- lib/js/bytesLabels.js | 2 -- lib/js/caml_format.js | 12 ----------- lib/js/caml_module.js | 2 -- lib/js/caml_obj.js | 2 -- lib/js/char.js | 2 -- lib/js/genlex.js | 3 --- lib/js/js_json.js | 1 - lib/js/js_types.js | 1 - lib/js/moreLabels.js | 2 -- lib/js/parsing.js | 1 - lib/js/set.js | 2 -- lib/js/setLabels.js | 2 -- lib/js/stream.js | 5 ----- 66 files changed, 237 deletions(-) diff --git a/jscomp/test/UntaggedVariants.js b/jscomp/test/UntaggedVariants.js index 784dea0d4c..dcb171e280 100644 --- a/jscomp/test/UntaggedVariants.js +++ b/jscomp/test/UntaggedVariants.js @@ -123,7 +123,6 @@ function classify$3(x) { return "c"; case "D" : return "d"; - } } else { switch (typeof x) { @@ -133,7 +132,6 @@ function classify$3(x) { return "int"; case "object" : return "Object" + x.name; - } } } @@ -150,7 +148,6 @@ function classify$4(x) { return "int"; case "object" : return "Object" + x.name; - } } @@ -169,7 +166,6 @@ function classify$5(x) { return "int"; case "object" : return "Object" + x.name; - } } @@ -186,7 +182,6 @@ function classify$6(x) { return "JSONTrue"; case null : return "JSONNull"; - } } else { if (Array.isArray(x)) { @@ -211,7 +206,6 @@ function classify$6(x) { TAG: "JSONObject", _0: x }; - } } } @@ -251,7 +245,6 @@ function checkEnum(e) { return "Two"; case "Three" : return "Threeeee"; - } } @@ -270,7 +263,6 @@ function checkEnum$1(e) { return "Two"; case "Three" : return "Threeeee"; - } } @@ -289,7 +281,6 @@ function checkEnum$2(e) { return "Two"; case "Three" : return "Threeeee"; - } } @@ -373,7 +364,6 @@ function classify$9(v) { return v.x; case "function" : return v(3); - } } @@ -469,7 +459,6 @@ async function getUserName(u) { return u.name; case "string" : return u; - } } @@ -481,7 +470,6 @@ async function awaitUser(u) { case "object" : case "string" : return "dummy"; - } } @@ -516,7 +504,6 @@ async function classify$10(a) { case "object" : console.log(a.userName); return; - } } } @@ -559,7 +546,6 @@ async function classifyAll(t) { case "object" : console.log(t.userName); return; - } } @@ -575,7 +561,6 @@ function test(t) { return t; case "function" : return t(); - } } @@ -599,7 +584,6 @@ function should_not_merge(x) { return "boolean"; case "object" : return "do not merge"; - } } @@ -614,7 +598,6 @@ function can_merge(x) { case "boolean" : case "object" : return "merge"; - } } diff --git a/jscomp/test/adt_optimize_test.js b/jscomp/test/adt_optimize_test.js index 09e9ce06ac..5acd35b4ed 100644 --- a/jscomp/test/adt_optimize_test.js +++ b/jscomp/test/adt_optimize_test.js @@ -10,7 +10,6 @@ function f(x) { return 2; case "C" : return 3; - } } @@ -22,7 +21,6 @@ function f_0(x) { return 0; case "C" : return 1; - } } @@ -37,7 +35,6 @@ function f2(x) { return "T001"; case 2 : return "T002"; - } } @@ -53,7 +50,6 @@ function f3(x) { return "Y3"; case "X4" : return "Y4"; - } } @@ -70,7 +66,6 @@ function f5(x) { return 3; case "F" : return 4; - } } else { switch (x.TAG) { @@ -79,7 +74,6 @@ function f5(x) { return 1; case "E" : return 2; - } } } @@ -94,7 +88,6 @@ function f6(x) { return 0; case "F" : return 2; - } } @@ -107,7 +100,6 @@ function f7(x) { return 2; case "F" : return -1; - } } else { switch (x.TAG) { @@ -117,7 +109,6 @@ function f7(x) { return 4; case "E" : return -1; - } } } @@ -157,7 +148,6 @@ function f9(x) { case "T66" : case "T68" : return 3; - } } @@ -172,7 +162,6 @@ function f10(x) { return 4; case "T63" : return 1; - } } else { switch (x.TAG) { @@ -182,7 +171,6 @@ function f10(x) { case "T66" : case "T68" : return 3; - } } } diff --git a/jscomp/test/arith_lexer.js b/jscomp/test/arith_lexer.js index 2ad17d1058..6d54073905 100644 --- a/jscomp/test/arith_lexer.js +++ b/jscomp/test/arith_lexer.js @@ -178,7 +178,6 @@ function str(e) { return "-" + str(e._0); case "Variable" : return e._0; - } } diff --git a/jscomp/test/arith_syntax.js b/jscomp/test/arith_syntax.js index 84b5dea5dc..250f53064e 100644 --- a/jscomp/test/arith_syntax.js +++ b/jscomp/test/arith_syntax.js @@ -19,7 +19,6 @@ function str(e) { return "-" + str(e._0); case "Variable" : return e._0; - } } diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index 59e4d5c833..066f996631 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -280,7 +280,6 @@ function and2(n1, n2) { case "GREATER" : f = mkNode(and2(n1, l2), v2, and2(n1, r2)); break; - } Caml_array.set(andslot1, h, i1); Caml_array.set(andslot2, h, i2); @@ -327,7 +326,6 @@ function xor(n1, n2) { case "GREATER" : f = mkNode(xor(n1, l2), v2, xor(n1, r2)); break; - } Caml_array.set(andslot1, h, i1); Caml_array.set(andslot2, h, i2); diff --git a/jscomp/test/big_enum.js b/jscomp/test/big_enum.js index a51c5d164b..108718e9cc 100644 --- a/jscomp/test/big_enum.js +++ b/jscomp/test/big_enum.js @@ -604,7 +604,6 @@ function to_enum(x) { return 298; case "A299" : return 299; - } } @@ -1210,7 +1209,6 @@ function to_string(x) { return "A298"; case "A299" : return "A299"; - } } diff --git a/jscomp/test/compare_test.js b/jscomp/test/compare_test.js index d3f8d01df2..4b4c6e86ea 100644 --- a/jscomp/test/compare_test.js +++ b/jscomp/test/compare_test.js @@ -10,7 +10,6 @@ function compare(x, y) { return y === "B"; case "C" : return y === "C"; - } } @@ -23,7 +22,6 @@ function compare2(x, y) { case "B" : case "C" : return false; - } case "B" : switch (y) { @@ -32,7 +30,6 @@ function compare2(x, y) { case "A" : case "C" : return false; - } case "C" : switch (y) { @@ -41,9 +38,7 @@ function compare2(x, y) { return false; case "C" : return true; - } - } } diff --git a/jscomp/test/complex_if_test.js b/jscomp/test/complex_if_test.js index 4a016d5977..cdd266d2cb 100644 --- a/jscomp/test/complex_if_test.js +++ b/jscomp/test/complex_if_test.js @@ -93,7 +93,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -111,7 +110,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/jscomp/test/const_test.js b/jscomp/test/const_test.js index 34b4d8223e..e36d5b3ad9 100644 --- a/jscomp/test/const_test.js +++ b/jscomp/test/const_test.js @@ -22,7 +22,6 @@ function fff(x) { return 1; case "C" : return 2; - } } diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index a09d87721d..4c27c9a57f 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -101,7 +101,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -119,7 +118,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/jscomp/test/gpr_1438.js b/jscomp/test/gpr_1438.js index 3c54884a27..9d8750c886 100644 --- a/jscomp/test/gpr_1438.js +++ b/jscomp/test/gpr_1438.js @@ -15,8 +15,6 @@ function actionKey(key, a, b, c, d, e) { case 99 : case 118 : return a; - default: - } return function (param) { diff --git a/jscomp/test/gpr_1698_test.js b/jscomp/test/gpr_1698_test.js index 142602df80..8c752ad228 100644 --- a/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/gpr_1698_test.js @@ -20,7 +20,6 @@ function is_number(_expr) { case "Frac" : case "Gcd" : return false; - } }; } @@ -63,7 +62,6 @@ function compare(context, state, _a, _b) { case "Gcd" : exit = 1; break; - } break; case "Neg" : @@ -103,7 +101,6 @@ function compare(context, state, _a, _b) { case "Gcd" : exit = 1; break; - } break; case "Gcd" : @@ -125,7 +122,6 @@ function compare(context, state, _a, _b) { exit$1 = 3; } break; - } if (exit$3 === 5) { if (b.TAG === "Neg") { @@ -162,7 +158,6 @@ function compare(context, state, _a, _b) { case "Frac" : case "Gcd" : return 1; - } } switch (exit) { @@ -181,7 +176,6 @@ function compare(context, state, _a, _b) { _b = nb; _a = na; continue; - } }; } diff --git a/jscomp/test/gpr_2413_test.js b/jscomp/test/gpr_2413_test.js index f3c4e67b86..02d6c20738 100644 --- a/jscomp/test/gpr_2413_test.js +++ b/jscomp/test/gpr_2413_test.js @@ -15,7 +15,6 @@ function f(x) { case "B" : case "C" : break; - } let a$3 = x._0._0; return Math.imul(a$3, a$3); diff --git a/jscomp/test/gpr_2642_test.js b/jscomp/test/gpr_2642_test.js index 1135ce05ab..1d5d3b9b66 100644 --- a/jscomp/test/gpr_2642_test.js +++ b/jscomp/test/gpr_2642_test.js @@ -17,7 +17,6 @@ function isfree(id, _x) { } _x = x._1; continue; - } }; } diff --git a/jscomp/test/gpr_2931_test.js b/jscomp/test/gpr_2931_test.js index 2faa43da5c..a5746e30eb 100644 --- a/jscomp/test/gpr_2931_test.js +++ b/jscomp/test/gpr_2931_test.js @@ -26,8 +26,6 @@ function fake_c2(a_type, b_type) { return 1; case "undefined" : return -1; - default: - } if (b_type === "undefined") { return 1; diff --git a/jscomp/test/int_switch_test.js b/jscomp/test/int_switch_test.js index 8c21aafd3c..2a0e0e9b34 100644 --- a/jscomp/test/int_switch_test.js +++ b/jscomp/test/int_switch_test.js @@ -58,7 +58,6 @@ function f33(x) { return /* 'c' */99; case "D" : return /* 'x' */120; - } } diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 83f540d2a0..35600fd938 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -489,7 +489,6 @@ function eq_at_i(loc, json, i, kind, expected) { }; })); } - } } diff --git a/jscomp/test/mario_game.js b/jscomp/test/mario_game.js index b95feca00f..47067d154e 100644 --- a/jscomp/test/mario_game.js +++ b/jscomp/test/mario_game.js @@ -145,7 +145,6 @@ function make_enemy(param) { 0, 32 ]); - } } @@ -239,7 +238,6 @@ function make_particle(x) { 13, 27 ]); - } } @@ -311,7 +309,6 @@ function make_type(typ, dir) { 32, 5 ]); - } } else { switch (typ$1) { @@ -371,7 +368,6 @@ function make_type(typ, dir) { 32, 69 ]); - } } } else { @@ -434,7 +430,6 @@ function make_type(typ, dir) { 0, 64 ]); - } } else { switch (typ$2) { @@ -494,7 +489,6 @@ function make_type(typ, dir) { 0, 64 ]); - } } } @@ -550,7 +544,6 @@ function make_type(typ, dir) { 0, 80 ]); - } case "SBlock" : let x$1 = typ._0; @@ -612,9 +605,7 @@ function make_type(typ, dir) { 0, 32 ]); - } - } } @@ -836,7 +827,6 @@ function make_type$2(x) { } case "SBlock" : return setup_obj(false, undefined, undefined); - } } @@ -914,7 +904,6 @@ function spawn(spawnable, context, param) { _1: spr, _2: obj }; - } } @@ -998,7 +987,6 @@ function update_player(player, keys, context) { } else { return; } - } }), keys); let v = player.vel.x * 0.9; @@ -1108,7 +1096,6 @@ function collide_block(check_xOpt, dir, obj) { case "East" : case "West" : break; - } if (check_x) { obj.vel.x = 0; @@ -1172,7 +1159,6 @@ function evolve_enemy(player_dir, typ, spr, obj, context) { case "GKoopaShell" : case "RKoopaShell" : break; - } obj.dir = player_dir; if (obj.vel.x !== 0) { @@ -1276,13 +1262,11 @@ function col_bypass(c1, c2) { case "Block" : ctypes = false; break; - } break; case "Block" : ctypes = false; break; - } if (o1.kill || o2.kill) { return true; @@ -1415,7 +1399,6 @@ function kill(collid, ctx) { } } }; - } } @@ -1762,7 +1745,6 @@ function process_collision(dir, c1, c2, state) { } break; - } break; case "Enemy" : @@ -1834,7 +1816,6 @@ function process_collision(dir, c1, c2, state) { case "West" : exit$3 = 4; break; - } if (exit$3 === 4) { rev_dir(o1$4, t1, s1$3); @@ -1883,7 +1864,6 @@ function process_collision(dir, c1, c2, state) { undefined ]; } - } case "Item" : return [ @@ -1906,7 +1886,6 @@ function process_collision(dir, c1, c2, state) { case "West" : exit$4 = 4; break; - } if (exit$4 === 4) { let exit$5 = 0; @@ -1962,11 +1941,9 @@ function process_collision(dir, c1, c2, state) { updated_block$1, spawned_item$1 ]; - } } break; - } break; case "Item" : @@ -2000,9 +1977,7 @@ function process_collision(dir, c1, c2, state) { undefined, undefined ]; - } - } break; case "Block" : @@ -2010,7 +1985,6 @@ function process_collision(dir, c1, c2, state) { undefined, undefined ]; - } switch (exit) { case 1 : @@ -2096,7 +2070,6 @@ function process_collision(dir, c1, c2, state) { undefined, undefined ]; - } if (exit$6 === 4) { dec_health(o2$2); @@ -2107,7 +2080,6 @@ function process_collision(dir, c1, c2, state) { ]; } break; - } } @@ -2375,8 +2347,6 @@ function keydown(evt) { case 87 : pressed_keys.up = true; break; - default: - } } else if (match >= 32) { switch (match) { @@ -2398,7 +2368,6 @@ function keydown(evt) { case 40 : pressed_keys.down = true; break; - } } return true; @@ -2446,7 +2415,6 @@ function keyup(evt) { case 40 : pressed_keys.down = false; break; - } } return true; diff --git a/jscomp/test/miss_colon_test.js b/jscomp/test/miss_colon_test.js index afc589ffb1..00fe9286d4 100644 --- a/jscomp/test/miss_colon_test.js +++ b/jscomp/test/miss_colon_test.js @@ -41,7 +41,6 @@ function $plus$colon(_f, _g) { _0: f, _1: g }; - } }; } @@ -108,7 +107,6 @@ function $star$colon(_f, _g) { _g = g._1; _f = $star$colon(f, g._0); continue; - } }; } @@ -122,7 +120,6 @@ function simplify(x) { return $plus$colon(simplify(x._0), simplify(x._1)); case "Mul" : return $star$colon(simplify(x._0), simplify(x._1)); - } } diff --git a/jscomp/test/mock_mt.js b/jscomp/test/mock_mt.js index 4283855e47..e2d271f81b 100644 --- a/jscomp/test/mock_mt.js +++ b/jscomp/test/mock_mt.js @@ -78,7 +78,6 @@ function from_pair_suites(name, suites) { case "FailWith" : console.log("failed: " + fn._0); return; - } }), suites); } diff --git a/jscomp/test/mt.js b/jscomp/test/mt.js index 1f4d8aaed3..8f4c47e25f 100644 --- a/jscomp/test/mt.js +++ b/jscomp/test/mt.js @@ -91,7 +91,6 @@ function handleCode(spec) { return assert_fail("failed"); case "FailWith" : return assert_fail(spec._0); - } } diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index 146cd214c3..1e9fe13bbc 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -845,7 +845,6 @@ function equal(_l1, _l2) { case "TExp" : case "TMatch" : return false; - } case "TExp" : if (!l2) { @@ -866,7 +865,6 @@ function equal(_l1, _l2) { case "TSeq" : case "TMatch" : return false; - } case "TMatch" : if (!l2) { @@ -884,9 +882,7 @@ function equal(_l1, _l2) { _l2 = l2.tl; _l1 = l1.tl; continue; - } - } }; } @@ -912,7 +908,6 @@ function hash$1(_l, _accu) { _accu = hash_combine(471882453, hash(marks._0, accu)); _l = l.tl; continue; - } }; } @@ -939,7 +934,6 @@ function tseq(kind, x, y, rem) { case "TSeq" : case "TMatch" : break; - } return { hd: { @@ -1015,7 +1009,6 @@ function mark_used_indices(tbl) { case "TExp" : case "TMatch" : break; - } List.iter((function (param) { let i = param[1]; @@ -1059,7 +1052,6 @@ function remove_matches(extra) { return true; case "TMatch" : return false; - } }), extra); } @@ -1084,7 +1076,6 @@ function split_at_match_rec(_l$p, _x) { List.rev(l$p), remove_matches(x.tl) ]; - } } else { throw new Error("Assert_failure", { @@ -1165,7 +1156,6 @@ function remove_duplicates(prev, _l, y) { }, prev ]; - } }; } @@ -1203,7 +1193,6 @@ function set_idx(idx, x) { }, tl: set_idx(idx, x.tl) }; - } } @@ -1261,7 +1250,6 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { return; case "TMatch" : return x._0; - } }), y$p$1); let match = marks$p !== undefined ? [ @@ -1356,7 +1344,6 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { }, tl: rem }; - } } @@ -1376,7 +1363,6 @@ function delta_seq(c, next_cat, prev_cat, kind, y, z, rem) { return; case "TMatch" : return x._0; - } }), y); if (marks === undefined) { @@ -1407,7 +1393,6 @@ function delta_4(c, next_cat, prev_cat, l, rem) { hd: x, tl: rem$1 }; - } } else { return rem; @@ -1456,7 +1441,6 @@ function status(s) { _1: m$1.pmarks }; break; - } } else { st$1 = "Failed"; @@ -1890,7 +1874,6 @@ function colorize(c, regexp) { case "Start" : case "Stop" : return; - } } else { switch (regexp.TAG) { @@ -2015,7 +1998,6 @@ function equal$2(_x1, _x2) { } else { return false; } - } } else { switch (x1.TAG) { @@ -2159,7 +2141,6 @@ function equal$2(_x1, _x2) { _x2 = x2._1; _x1 = x1._1; continue; - } } }; @@ -2272,8 +2253,6 @@ function merge_sequences(_x) { case "Alternative" : _x = Pervasives.$at(l$p._0, x.tl); continue; - default: - } } return { @@ -2406,7 +2385,6 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _x) }), kind ]; - } } else { switch (x.TAG) { @@ -2735,7 +2713,6 @@ function handle_case(_ign_case, _x) { _0: x._0, _1: handle_case(ign_case, x._1) }; - } }; } @@ -4074,7 +4051,6 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { RE_EXN_ID: Parse_error } }); - } } else { if (c$2 >= 48) { diff --git a/jscomp/test/offset.js b/jscomp/test/offset.js index 4195120626..0777fc8deb 100644 --- a/jscomp/test/offset.js +++ b/jscomp/test/offset.js @@ -944,8 +944,6 @@ function of_list(l) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/jscomp/test/rbset.js b/jscomp/test/rbset.js index 3cad89006f..ed0f7c0818 100644 --- a/jscomp/test/rbset.js +++ b/jscomp/test/rbset.js @@ -121,7 +121,6 @@ function balance_left(l, x, r) { _3: d } }; - } } @@ -197,7 +196,6 @@ function balance_right(l, x, r) { _3: d } }; - } } diff --git a/jscomp/test/rec_module_test.js b/jscomp/test/rec_module_test.js index 0538099f02..fee7d4822e 100644 --- a/jscomp/test/rec_module_test.js +++ b/jscomp/test/rec_module_test.js @@ -1123,8 +1123,6 @@ function of_list(l) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/jscomp/test/record_regression.js b/jscomp/test/record_regression.js index 8c0d31c6f1..7aa0588a55 100644 --- a/jscomp/test/record_regression.js +++ b/jscomp/test/record_regression.js @@ -196,8 +196,6 @@ function inlinedRecord(ir) { ]; } break; - default: - } let x2$2 = ir.x2; if (x2$2 !== undefined) { diff --git a/jscomp/test/set_gen.js b/jscomp/test/set_gen.js index cabcafefad..cb6777beab 100644 --- a/jscomp/test/set_gen.js +++ b/jscomp/test/set_gen.js @@ -527,8 +527,6 @@ function of_sorted_list(l) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 2404985c67..3c273f17e6 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -55,7 +55,6 @@ function _must_escape(s) { RE_EXN_ID: Pervasives.Exit } }); - } } else { exit = 1; @@ -260,7 +259,6 @@ function expr_starting_with(c, k, t) { return expr_list(/* [] */0, k, t); case 41 : return _error(t, "unexpected ')'"); - } } @@ -374,7 +372,6 @@ function atom(k, t) { break; case 34 : return _error(t, "unexpected '\"' in the middle of an atom"); - } } else { exit = 1; @@ -388,7 +385,6 @@ function atom(k, t) { continue; case 2 : return _return_atom(c, k, t); - } }; } @@ -456,7 +452,6 @@ function escaped(k, t) { break; case 116 : return k(/* '\t' */9); - } } diff --git a/jscomp/test/simplify_lambda_632o.js b/jscomp/test/simplify_lambda_632o.js index 0dab095990..b2cf689ace 100644 --- a/jscomp/test/simplify_lambda_632o.js +++ b/jscomp/test/simplify_lambda_632o.js @@ -12,7 +12,6 @@ function f(x) { return "X3"; case "X4" : return "X4"; - } } @@ -26,7 +25,6 @@ function f2(x) { return "X3"; case "X4" : return "X4"; - } } diff --git a/jscomp/test/test_bug.js b/jscomp/test/test_bug.js index 2148a05ab2..47d483ac4e 100644 --- a/jscomp/test/test_bug.js +++ b/jscomp/test/test_bug.js @@ -78,7 +78,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } } else if (c$1 > 91 || c$1 < 35) { diff --git a/jscomp/test/test_incomplete.js b/jscomp/test/test_incomplete.js index a5b0dcc691..88e4af5ae4 100644 --- a/jscomp/test/test_incomplete.js +++ b/jscomp/test/test_incomplete.js @@ -34,7 +34,6 @@ function f3(x) { case "B" : case "D" : return x._0 + 2 | 0; - } } diff --git a/jscomp/test/test_set.js b/jscomp/test/test_set.js index 88ddfa679d..c7bc8d3b7d 100644 --- a/jscomp/test/test_set.js +++ b/jscomp/test/test_set.js @@ -667,8 +667,6 @@ function Make(Ord) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/jscomp/test/test_switch.js b/jscomp/test/test_switch.js index ec09ba1db9..ccb9fab571 100644 --- a/jscomp/test/test_switch.js +++ b/jscomp/test/test_switch.js @@ -19,7 +19,6 @@ function f(x) { return 2; case "F" : return 3; - } } diff --git a/jscomp/test/topsort_test.js b/jscomp/test/topsort_test.js index b189b1cc8d..554d8311e0 100644 --- a/jscomp/test/topsort_test.js +++ b/jscomp/test/topsort_test.js @@ -1395,8 +1395,6 @@ function of_list(l) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/jscomp/test/variant.js b/jscomp/test/variant.js index 9363403df5..88ce5881f4 100644 --- a/jscomp/test/variant.js +++ b/jscomp/test/variant.js @@ -21,7 +21,6 @@ function foo(x) { case "D" : let match = x._0; return match[0] + match[1] | 0; - } } @@ -92,7 +91,6 @@ function rollback_path(subst, p) { case "Pident" : case "Papply" : return "Pident | Papply"; - } } else { throw new Error(exn.RE_EXN_ID, { diff --git a/jscomp/test/variantsMatching.js b/jscomp/test/variantsMatching.js index ae2b3322f1..4ee6946d14 100644 --- a/jscomp/test/variantsMatching.js +++ b/jscomp/test/variantsMatching.js @@ -14,7 +14,6 @@ function toEnum(x) { return 3; case 3.14 : return 5; - } } @@ -30,7 +29,6 @@ function toString(x) { return "D"; case 3.14 : return "Pi"; - } } @@ -144,7 +142,6 @@ function foo(x) { return 2; case false : return 3; - } } else { switch (x.TAG) { @@ -154,7 +151,6 @@ function foo(x) { return 5; case "F" : return 6; - } } } @@ -286,7 +282,6 @@ function plus$3(x, y) { return y; case "WhyNotAnotherOne" : break; - } } else if (!(y === undefined || y === null || y === "WhyNotAnotherOne")) { return { @@ -303,7 +298,6 @@ function plus$3(x, y) { return x; case "WhyNotAnotherOne" : return "WhyNotAnotherOne"; - } } @@ -318,7 +312,6 @@ function kind$1(x) { return "undefined"; case "WhyNotAnotherOne" : return "whynot"; - } } @@ -354,7 +347,6 @@ function area(shape) { return Math.pow(shape.sideLength, 2); case "rectangle" : return shape.width * shape.height; - } } @@ -403,7 +395,6 @@ function classify(x) { } case "object" : return "Object" + x.name; - } } diff --git a/lib/es6/arg.js b/lib/es6/arg.js index c9fd3a0c01..db53fea454 100644 --- a/lib/es6/arg.js +++ b/lib/es6/arg.js @@ -220,7 +220,6 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist case "Message" : Buffer.add_string(b, progname + ": " + error._0 + ".\n"); break; - } usage_b(b, speclist.contents, errmsg); if (Caml_obj.equal(error, { @@ -492,7 +491,6 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } }); return; - } }; treat_action(match[0]); diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index b9131c7f17..184cab20ef 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -413,7 +413,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -431,7 +430,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index b9131c7f17..184cab20ef 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -413,7 +413,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -431,7 +430,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/lib/es6/caml_format.js b/lib/es6/caml_format.js index a05d0e6793..83aa2563df 100644 --- a/lib/es6/caml_format.js +++ b/lib/es6/caml_format.js @@ -33,7 +33,6 @@ function int_of_string_base(x) { return 10; case "Bin" : return 2; - } } @@ -50,8 +49,6 @@ function parse_sign_and_base(s) { sign = -1; i = i + 1 | 0; break; - default: - } if (s.codePointAt(i) === /* '0' */48) { let match$1 = s.codePointAt(i + 1 | 0); @@ -78,7 +75,6 @@ function parse_sign_and_base(s) { base = "Hex"; i = i + 2 | 0; break; - } } @@ -109,7 +105,6 @@ function parse_sign_and_base(s) { base = "Hex"; i = i + 2 | 0; break; - } } @@ -218,7 +213,6 @@ function int64_of_string(s) { case "Bin" : threshold = Caml_int64.max_int; break; - } let len = s.length; let c = i < len ? s.codePointAt(i) : /* '\000' */0; @@ -282,7 +276,6 @@ function int_of_base(x) { return 16; case "Dec" : return 10; - } } @@ -383,7 +376,6 @@ function parse_format(fmt) { f.base = "Hex"; _i = i + 1 | 0; continue; - } } } else if (c >= 72) { @@ -470,7 +462,6 @@ function parse_format(fmt) { f.conv = String.fromCharCode(c); _i = i + 1 | 0; continue; - } }; } @@ -627,7 +618,6 @@ function int64_format(fmt, x) { case "Dec" : s = dec_of_pos_int64(x$1); break; - } let fill_s; if (f.prec >= 0) { @@ -706,8 +696,6 @@ function format_float(fmt, x) { } break; - default: - } } else { s = "inf"; diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index 92078956ac..32bd67e951 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -26,7 +26,6 @@ function init_mod(loc, shape) { 0 ]; return; - } } else { if (shape.TAG === "Module") { @@ -60,7 +59,6 @@ function update_mod(shape, o, n) { case "Lazy" : case "Class" : return Caml_obj.update_dummy(o, n); - } } else { if (shape.TAG !== "Module") { diff --git a/lib/es6/caml_obj.js b/lib/es6/caml_obj.js index 90fe366561..a2c64e0554 100644 --- a/lib/es6/caml_obj.js +++ b/lib/es6/caml_obj.js @@ -76,8 +76,6 @@ function compare(a, b) { } case "undefined" : return -1; - default: - } switch (b_type) { case "string" : diff --git a/lib/es6/char.js b/lib/es6/char.js index f7c8cbda35..4cdf7f79be 100644 --- a/lib/es6/char.js +++ b/lib/es6/char.js @@ -50,7 +50,6 @@ function escaped(param) { break; case 13 : return "\\r"; - } } switch (exit) { @@ -70,7 +69,6 @@ function escaped(param) { let s$1 = [0]; s$1[0] = param; return Bytes.to_string(s$1); - } } diff --git a/lib/es6/genlex.js b/lib/es6/genlex.js index 5843af08e1..eb5e31a19a 100644 --- a/lib/es6/genlex.js +++ b/lib/es6/genlex.js @@ -238,7 +238,6 @@ function make_lexer(keywords) { case 64 : exit = 3; break; - } } } else { @@ -308,7 +307,6 @@ function make_lexer(keywords) { reset_buffer(); store(c); return number(strm__); - } }; }; @@ -372,7 +370,6 @@ function make_lexer(keywords) { case 63 : case 64 : break; - } } Stream.junk(strm__); diff --git a/lib/es6/js_json.js b/lib/es6/js_json.js index e696c42391..398110bc67 100644 --- a/lib/es6/js_json.js +++ b/lib/es6/js_json.js @@ -54,7 +54,6 @@ function test(x, v) { return typeof x === "boolean"; case "Null" : return x === null; - } } diff --git a/lib/es6/js_types.js b/lib/es6/js_types.js index 134c94a5f7..a8a165b63b 100644 --- a/lib/es6/js_types.js +++ b/lib/es6/js_types.js @@ -66,7 +66,6 @@ function test(x, v) { return typeof x === "symbol"; case "BigInt" : return typeof x === "bigint"; - } } diff --git a/lib/es6/moreLabels.js b/lib/es6/moreLabels.js index 7641da89e7..7c847f56f7 100644 --- a/lib/es6/moreLabels.js +++ b/lib/es6/moreLabels.js @@ -1875,8 +1875,6 @@ let $$Set = { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/es6/parsing.js b/lib/es6/parsing.js index 039c872e14..ab74f52ccc 100644 --- a/lib/es6/parsing.js +++ b/lib/es6/parsing.js @@ -130,7 +130,6 @@ function yyparse(tables, start, lexer, lexbuf) { _arg = undefined; _cmd = "Error_detected"; continue; - } }; } catch (raw_exn$1) { diff --git a/lib/es6/set.js b/lib/es6/set.js index d3b047c5e8..b3adce982d 100644 --- a/lib/es6/set.js +++ b/lib/es6/set.js @@ -901,8 +901,6 @@ function Make(funarg) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/es6/setLabels.js b/lib/es6/setLabels.js index eb8e5f82d0..b0c807797f 100644 --- a/lib/es6/setLabels.js +++ b/lib/es6/setLabels.js @@ -891,8 +891,6 @@ function Make(Ord) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 12574bfe79..5213928d2b 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -94,7 +94,6 @@ function get_data(count, _d) { g.curr = Caml_option.some(undefined); return "Sempty"; } - } }; } @@ -139,7 +138,6 @@ function peek_data(s) { let x = g.func(s.count); g.curr = Caml_option.some(x); return x; - } }; } @@ -169,8 +167,6 @@ function junk_data(s) { return; } break; - default: - } } let match$1 = peek_data(s); @@ -451,7 +447,6 @@ function dump_data(f, param) { case "Sgen" : console.log("Sgen"); return; - } } diff --git a/lib/js/arg.js b/lib/js/arg.js index 85feeb1d39..505348c801 100644 --- a/lib/js/arg.js +++ b/lib/js/arg.js @@ -220,7 +220,6 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist case "Message" : Buffer.add_string(b, progname + ": " + error._0 + ".\n"); break; - } usage_b(b, speclist.contents, errmsg); if (Caml_obj.equal(error, { @@ -492,7 +491,6 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } }); return; - } }; treat_action(match[0]); diff --git a/lib/js/bytes.js b/lib/js/bytes.js index ed1347fd64..309823d78b 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -413,7 +413,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -431,7 +430,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index ed1347fd64..309823d78b 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -413,7 +413,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = /* 'r' */114; break; - } } switch (exit) { @@ -431,7 +430,6 @@ function escaped(s) { n = n + 1 | 0; s$p[n] = c; break; - } n = n + 1 | 0; } diff --git a/lib/js/caml_format.js b/lib/js/caml_format.js index be5618f87e..f76357bd4f 100644 --- a/lib/js/caml_format.js +++ b/lib/js/caml_format.js @@ -33,7 +33,6 @@ function int_of_string_base(x) { return 10; case "Bin" : return 2; - } } @@ -50,8 +49,6 @@ function parse_sign_and_base(s) { sign = -1; i = i + 1 | 0; break; - default: - } if (s.codePointAt(i) === /* '0' */48) { let match$1 = s.codePointAt(i + 1 | 0); @@ -78,7 +75,6 @@ function parse_sign_and_base(s) { base = "Hex"; i = i + 2 | 0; break; - } } @@ -109,7 +105,6 @@ function parse_sign_and_base(s) { base = "Hex"; i = i + 2 | 0; break; - } } @@ -218,7 +213,6 @@ function int64_of_string(s) { case "Bin" : threshold = Caml_int64.max_int; break; - } let len = s.length; let c = i < len ? s.codePointAt(i) : /* '\000' */0; @@ -282,7 +276,6 @@ function int_of_base(x) { return 16; case "Dec" : return 10; - } } @@ -383,7 +376,6 @@ function parse_format(fmt) { f.base = "Hex"; _i = i + 1 | 0; continue; - } } } else if (c >= 72) { @@ -470,7 +462,6 @@ function parse_format(fmt) { f.conv = String.fromCharCode(c); _i = i + 1 | 0; continue; - } }; } @@ -627,7 +618,6 @@ function int64_format(fmt, x) { case "Dec" : s = dec_of_pos_int64(x$1); break; - } let fill_s; if (f.prec >= 0) { @@ -706,8 +696,6 @@ function format_float(fmt, x) { } break; - default: - } } else { s = "inf"; diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index f2733e209d..a49c301b6b 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -26,7 +26,6 @@ function init_mod(loc, shape) { 0 ]; return; - } } else { if (shape.TAG === "Module") { @@ -60,7 +59,6 @@ function update_mod(shape, o, n) { case "Lazy" : case "Class" : return Caml_obj.update_dummy(o, n); - } } else { if (shape.TAG !== "Module") { diff --git a/lib/js/caml_obj.js b/lib/js/caml_obj.js index 1828392070..cb566afa68 100644 --- a/lib/js/caml_obj.js +++ b/lib/js/caml_obj.js @@ -76,8 +76,6 @@ function compare(a, b) { } case "undefined" : return -1; - default: - } switch (b_type) { case "string" : diff --git a/lib/js/char.js b/lib/js/char.js index 29920321a0..03d8f86b63 100644 --- a/lib/js/char.js +++ b/lib/js/char.js @@ -50,7 +50,6 @@ function escaped(param) { break; case 13 : return "\\r"; - } } switch (exit) { @@ -70,7 +69,6 @@ function escaped(param) { let s$1 = [0]; s$1[0] = param; return Bytes.to_string(s$1); - } } diff --git a/lib/js/genlex.js b/lib/js/genlex.js index e97c9d30ec..1232ab9b92 100644 --- a/lib/js/genlex.js +++ b/lib/js/genlex.js @@ -238,7 +238,6 @@ function make_lexer(keywords) { case 64 : exit = 3; break; - } } } else { @@ -308,7 +307,6 @@ function make_lexer(keywords) { reset_buffer(); store(c); return number(strm__); - } }; }; @@ -372,7 +370,6 @@ function make_lexer(keywords) { case 63 : case 64 : break; - } } Stream.junk(strm__); diff --git a/lib/js/js_json.js b/lib/js/js_json.js index 088447fc4f..3dd01e8000 100644 --- a/lib/js/js_json.js +++ b/lib/js/js_json.js @@ -54,7 +54,6 @@ function test(x, v) { return typeof x === "boolean"; case "Null" : return x === null; - } } diff --git a/lib/js/js_types.js b/lib/js/js_types.js index 8ef1a3f721..47520c6076 100644 --- a/lib/js/js_types.js +++ b/lib/js/js_types.js @@ -66,7 +66,6 @@ function test(x, v) { return typeof x === "symbol"; case "BigInt" : return typeof x === "bigint"; - } } diff --git a/lib/js/moreLabels.js b/lib/js/moreLabels.js index 3edd9368b1..c2031fecdb 100644 --- a/lib/js/moreLabels.js +++ b/lib/js/moreLabels.js @@ -1875,8 +1875,6 @@ let $$Set = { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/js/parsing.js b/lib/js/parsing.js index 31cb6a2f79..0122d2db9d 100644 --- a/lib/js/parsing.js +++ b/lib/js/parsing.js @@ -130,7 +130,6 @@ function yyparse(tables, start, lexer, lexbuf) { _arg = undefined; _cmd = "Error_detected"; continue; - } }; } catch (raw_exn$1) { diff --git a/lib/js/set.js b/lib/js/set.js index fea156c3fc..6f610bb979 100644 --- a/lib/js/set.js +++ b/lib/js/set.js @@ -901,8 +901,6 @@ function Make(funarg) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/js/setLabels.js b/lib/js/setLabels.js index 5f4031a5e0..8a28405a98 100644 --- a/lib/js/setLabels.js +++ b/lib/js/setLabels.js @@ -891,8 +891,6 @@ function Make(Ord) { } break; - default: - } let nl = n / 2 | 0; let match$3 = sub(nl, l); diff --git a/lib/js/stream.js b/lib/js/stream.js index a450fcb3c1..ee1af1e8e6 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -94,7 +94,6 @@ function get_data(count, _d) { g.curr = Caml_option.some(undefined); return "Sempty"; } - } }; } @@ -139,7 +138,6 @@ function peek_data(s) { let x = g.func(s.count); g.curr = Caml_option.some(x); return x; - } }; } @@ -169,8 +167,6 @@ function junk_data(s) { return; } break; - default: - } } let match$1 = peek_data(s); @@ -451,7 +447,6 @@ function dump_data(f, param) { case "Sgen" : console.log("Sgen"); return; - } } From da59d808442c8a249f725b69add74339c201ea35 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:41:01 +0400 Subject: [PATCH 14/18] Remove tabulation from throw new Error generated code --- jscomp/core/js_dump.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 65f2fc8d9d..a09885ae2f 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -857,11 +857,11 @@ and expression_desc cxt ~(level : int) f x : cxt = cxt) | New (e, el) -> P.cond_paren_group f (level > 15) (fun _ -> - P.group f 1 (fun _ -> + P.group f 0 (fun _ -> P.string f L.new_; P.space f; let cxt = expression ~level:16 cxt f e in - P.paren_group f 1 (fun _ -> + P.paren_group f 0 (fun _ -> match el with Some el -> arguments cxt f el | None -> cxt))) | Cond (e, e1, e2) -> let action () = From 88f5838cbb65f1fa994c3164d5f2f97b176cf5c9 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:41:10 +0400 Subject: [PATCH 15/18] Commit test output --- jscomp/test/406_primitive_test.js | 14 +- jscomp/test/UncurriedExternals.js | 8 +- jscomp/test/adt_optimize_test.js | 18 +- jscomp/test/argv_test.js | 36 +- jscomp/test/arith_parser.js | 20 +- jscomp/test/arity_infer.js | 24 +- jscomp/test/array_safe_get.js | 4 +- jscomp/test/array_test.js | 12 +- jscomp/test/bb.js | 36 +- jscomp/test/bdd.js | 90 +- jscomp/test/bench.js | 10 +- jscomp/test/big_polyvar_test.js | 10818 ++++++++++---------- jscomp/test/bs_array_test.js | 54 +- jscomp/test/bs_queue_test.js | 1458 +-- jscomp/test/chn_test.js | 18 +- jscomp/test/const_defs_test.js | 10 +- jscomp/test/custom_error_test.js | 20 +- jscomp/test/defunctor_make_test.js | 40 +- jscomp/test/demo_int_map.js | 48 +- jscomp/test/earger_curry_test.js | 10 +- jscomp/test/equal_exception_test.js | 140 +- jscomp/test/exception_raise_test.js | 44 +- jscomp/test/exception_rebound_err_test.js | 4 +- jscomp/test/exception_value_test.js | 46 +- jscomp/test/ext_array_test.js | 20 +- jscomp/test/ext_bytes_test.js | 12 +- jscomp/test/ext_filename_test.js | 48 +- jscomp/test/ext_list_test.js | 256 +- jscomp/test/ext_pervasives_test.js | 28 +- jscomp/test/ext_string_test.js | 64 +- jscomp/test/extensible_variant_test.js | 18 +- jscomp/test/flexible_array_test.js | 108 +- jscomp/test/format_regression.js | 72 +- jscomp/test/fun_pattern_match.js | 36 +- jscomp/test/genlex_test.js | 4 +- jscomp/test/gpr_1150.js | 18 +- jscomp/test/gpr_1245_test.js | 4 +- jscomp/test/gpr_1698_test.js | 36 +- jscomp/test/gpr_1701_test.js | 24 +- jscomp/test/gpr_2316_test.js | 28 +- jscomp/test/gpr_2682_test.js | 18 +- jscomp/test/gpr_3877_test.js | 36 +- jscomp/test/gpr_3980_test.js | 52 +- jscomp/test/gpr_405_test.js | 50 +- jscomp/test/gpr_4632.js | 18 +- jscomp/test/gpr_5557.js | 18 +- jscomp/test/gpr_858_unit2_test.js | 18 +- jscomp/test/gpr_974_test.js | 54 +- jscomp/test/inline_map2_test.js | 276 +- jscomp/test/inline_map_demo.js | 80 +- jscomp/test/inline_map_test.js | 48 +- jscomp/test/inline_record_test.js | 72 +- jscomp/test/int64_string_test.js | 28 +- jscomp/test/int_map.js | 108 +- jscomp/test/internal_unused_test.js | 8 +- jscomp/test/js_exception_catch_test.js | 98 +- jscomp/test/js_json_test.js | 54 +- jscomp/test/lazy_test.js | 24 +- jscomp/test/libqueue_test.js | 1444 +-- jscomp/test/map_find_test.js | 96 +- jscomp/test/map_test.js | 216 +- jscomp/test/mario_game.js | 60 +- jscomp/test/noassert.js | 18 +- jscomp/test/ocaml_re_test.js | 492 +- jscomp/test/offset.js | 108 +- jscomp/test/pq_test.js | 16 +- jscomp/test/queue_402.js | 16 +- jscomp/test/raw_hash_tbl_bench.js | 18 +- jscomp/test/rbset.js | 72 +- jscomp/test/reactDOMRe.js | 10 +- jscomp/test/rec_module_test.js | 108 +- jscomp/test/recmodule.js | 36 +- jscomp/test/recursive_module.js | 8 +- jscomp/test/recursive_records_test.js | 18 +- jscomp/test/return_check.js | 54 +- jscomp/test/set_gen.js | 132 +- jscomp/test/sexp.js | 10 +- jscomp/test/sexpm.js | 98 +- jscomp/test/stack_comp_test.js | 4 +- jscomp/test/stream_parser_test.js | 80 +- jscomp/test/string_set.js | 8 +- jscomp/test/string_test.js | 8 +- jscomp/test/stringmatch_test.js | 5112 ++++----- jscomp/test/test_array_primitive.js | 20 +- jscomp/test/test_bool_equal.js | 72 +- jscomp/test/test_closure.js | 18 +- jscomp/test/test_exception.js | 46 +- jscomp/test/test_exception_escape.js | 10 +- jscomp/test/test_for_map.js | 108 +- jscomp/test/test_incomplete.js | 18 +- jscomp/test/test_int_map_find.js | 40 +- jscomp/test/test_list.js | 242 +- jscomp/test/test_match_exception.js | 4 +- jscomp/test/test_per.js | 30 +- jscomp/test/test_seq.js | 32 +- jscomp/test/test_set.js | 92 +- jscomp/test/test_static_catch_ident.js | 4 +- jscomp/test/test_string.js | 18 +- jscomp/test/test_string_case.js | 18 +- jscomp/test/test_string_const.js | 4 +- jscomp/test/test_string_map.js | 48 +- jscomp/test/test_trywith.js | 66 +- jscomp/test/test_while_closure.js | 18 +- jscomp/test/ticker.js | 304 +- jscomp/test/topsort_test.js | 304 +- jscomp/test/uncurried_cast.js | 20 +- jscomp/test/variant.js | 8 +- lib/es6/arg.js | 278 +- lib/es6/array.js | 96 +- lib/es6/arrayLabels.js | 96 +- lib/es6/belt_Array.js | 36 +- lib/es6/belt_List.js | 32 +- lib/es6/belt_MutableQueue.js | 16 +- lib/es6/belt_Option.js | 8 +- lib/es6/belt_Result.js | 8 +- lib/es6/belt_internalAVLset.js | 26 +- lib/es6/belt_internalAVLtree.js | 26 +- lib/es6/belt_internalMapInt.js | 8 +- lib/es6/belt_internalMapString.js | 8 +- lib/es6/belt_internalSetInt.js | 8 +- lib/es6/belt_internalSetString.js | 8 +- lib/es6/buffer.js | 192 +- lib/es6/bytes.js | 154 +- lib/es6/bytesLabels.js | 154 +- lib/es6/caml_array.js | 20 +- lib/es6/caml_bigint.js | 16 +- lib/es6/caml_bytes.js | 30 +- lib/es6/caml_format.js | 80 +- lib/es6/caml_int32.js | 16 +- lib/es6/caml_int64.js | 8 +- lib/es6/caml_module.js | 46 +- lib/es6/caml_obj.js | 40 +- lib/es6/caml_string.js | 10 +- lib/es6/caml_sys.js | 36 +- lib/es6/camlinternalLazy.js | 16 +- lib/es6/char.js | 10 +- lib/es6/digest.js | 60 +- lib/es6/filename.js | 28 +- lib/es6/genlex.js | 168 +- lib/es6/hashtbl.js | 138 +- lib/es6/int32.js | 4 +- lib/es6/int64.js | 4 +- lib/es6/js_exn.js | 28 +- lib/es6/js_null.js | 4 +- lib/es6/js_option.js | 4 +- lib/es6/js_undefined.js | 4 +- lib/es6/lexing.js | 10 +- lib/es6/list.js | 262 +- lib/es6/listLabels.js | 262 +- lib/es6/map.js | 108 +- lib/es6/mapLabels.js | 108 +- lib/es6/moreLabels.js | 216 +- lib/es6/parsing.js | 16 +- lib/es6/pervasives.js | 48 +- lib/es6/queue.js | 16 +- lib/es6/random.js | 30 +- lib/es6/runtime_deriving.js | 8 +- lib/es6/set.js | 108 +- lib/es6/setLabels.js | 108 +- lib/es6/sort.js | 10 +- lib/es6/stack.js | 16 +- lib/es6/stream.js | 52 +- lib/es6/string.js | 84 +- lib/es6/stringLabels.js | 84 +- lib/es6/uchar.js | 40 +- lib/js/arg.js | 278 +- lib/js/array.js | 96 +- lib/js/arrayLabels.js | 96 +- lib/js/belt_Array.js | 36 +- lib/js/belt_List.js | 32 +- lib/js/belt_MutableQueue.js | 16 +- lib/js/belt_Option.js | 8 +- lib/js/belt_Result.js | 8 +- lib/js/belt_internalAVLset.js | 26 +- lib/js/belt_internalAVLtree.js | 26 +- lib/js/belt_internalMapInt.js | 8 +- lib/js/belt_internalMapString.js | 8 +- lib/js/belt_internalSetInt.js | 8 +- lib/js/belt_internalSetString.js | 8 +- lib/js/buffer.js | 192 +- lib/js/bytes.js | 154 +- lib/js/bytesLabels.js | 154 +- lib/js/caml_array.js | 20 +- lib/js/caml_bigint.js | 16 +- lib/js/caml_bytes.js | 30 +- lib/js/caml_format.js | 80 +- lib/js/caml_int32.js | 16 +- lib/js/caml_int64.js | 8 +- lib/js/caml_module.js | 46 +- lib/js/caml_obj.js | 40 +- lib/js/caml_string.js | 10 +- lib/js/caml_sys.js | 36 +- lib/js/camlinternalLazy.js | 16 +- lib/js/char.js | 10 +- lib/js/digest.js | 60 +- lib/js/filename.js | 28 +- lib/js/genlex.js | 168 +- lib/js/hashtbl.js | 138 +- lib/js/int32.js | 4 +- lib/js/int64.js | 4 +- lib/js/js_exn.js | 28 +- lib/js/js_null.js | 4 +- lib/js/js_option.js | 4 +- lib/js/js_undefined.js | 4 +- lib/js/lexing.js | 10 +- lib/js/list.js | 262 +- lib/js/listLabels.js | 262 +- lib/js/map.js | 108 +- lib/js/mapLabels.js | 108 +- lib/js/moreLabels.js | 216 +- lib/js/parsing.js | 16 +- lib/js/pervasives.js | 48 +- lib/js/queue.js | 16 +- lib/js/random.js | 30 +- lib/js/runtime_deriving.js | 8 +- lib/js/set.js | 108 +- lib/js/setLabels.js | 108 +- lib/js/sort.js | 10 +- lib/js/stack.js | 16 +- lib/js/stream.js | 52 +- lib/js/string.js | 84 +- lib/js/stringLabels.js | 84 +- lib/js/uchar.js | 40 +- 223 files changed, 15812 insertions(+), 15812 deletions(-) diff --git a/jscomp/test/406_primitive_test.js b/jscomp/test/406_primitive_test.js index 35fd327e7e..7292ab1928 100644 --- a/jscomp/test/406_primitive_test.js +++ b/jscomp/test/406_primitive_test.js @@ -35,11 +35,11 @@ function f() { for (let i = 0; i <= 200; ++i) { if (i === 10) { throw new Error(A, { - cause: { - RE_EXN_ID: A, - _1: 0 - } - }); + cause: { + RE_EXN_ID: A, + _1: 0 + } + }); } } @@ -50,8 +50,8 @@ function f() { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/UncurriedExternals.js b/jscomp/test/UncurriedExternals.js index 2aa967abd0..c6928253d2 100644 --- a/jscomp/test/UncurriedExternals.js +++ b/jscomp/test/UncurriedExternals.js @@ -5,10 +5,10 @@ let React = require("react"); function dd() { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let h = sum(1.0, 2.0); diff --git a/jscomp/test/adt_optimize_test.js b/jscomp/test/adt_optimize_test.js index 5acd35b4ed..29405a959d 100644 --- a/jscomp/test/adt_optimize_test.js +++ b/jscomp/test/adt_optimize_test.js @@ -183,15 +183,15 @@ function f11(x) { return 1; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "adt_optimize_test.res", - 202, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "adt_optimize_test.res", + 202, + 9 + ] + } + }); } exports.f = f; diff --git a/jscomp/test/argv_test.js b/jscomp/test/argv_test.js index 92dad01f3b..d324689acb 100644 --- a/jscomp/test/argv_test.js +++ b/jscomp/test/argv_test.js @@ -51,28 +51,28 @@ Arg.parse_argv(undefined, [ if (compile.contents !== true) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "argv_test.res", - 14, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "argv_test.res", + 14, + 2 + ] + } + }); } if (test.contents !== false) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "argv_test.res", - 15, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "argv_test.res", + 15, + 2 + ] + } + }); } exports.anno_fun = anno_fun; diff --git a/jscomp/test/arith_parser.js b/jscomp/test/arith_parser.js index a0e7289ded..4fb23e6ba0 100644 --- a/jscomp/test/arith_parser.js +++ b/jscomp/test/arith_parser.js @@ -141,11 +141,11 @@ let yynames_block = "\ let yyact = [ (function (param) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "parser" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "parser" + } + }); }), (function (__caml_parser_env) { return Parsing.peek_val(__caml_parser_env, 1); @@ -212,11 +212,11 @@ let yyact = [ }), (function (__caml_parser_env) { throw new Error(Parsing.YYexit, { - cause: { - RE_EXN_ID: Parsing.YYexit, - _1: Parsing.peek_val(__caml_parser_env, 0) - } - }); + cause: { + RE_EXN_ID: Parsing.YYexit, + _1: Parsing.peek_val(__caml_parser_env, 0) + } + }); }) ]; diff --git a/jscomp/test/arity_infer.js b/jscomp/test/arity_infer.js index da4b18233c..68084b77bd 100644 --- a/jscomp/test/arity_infer.js +++ b/jscomp/test/arity_infer.js @@ -10,20 +10,20 @@ function f0(x) { }); } else { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } return tmp(3); } function f1(x) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); return undefined(x); } @@ -52,10 +52,10 @@ function f3(x) { break; default: throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } return tmp(3); } diff --git a/jscomp/test/array_safe_get.js b/jscomp/test/array_safe_get.js index 9c1f40bc06..ce8a0437bf 100644 --- a/jscomp/test/array_safe_get.js +++ b/jscomp/test/array_safe_get.js @@ -20,8 +20,8 @@ try { y = 0; } else { throw new Error(msg.RE_EXN_ID, { - cause: msg - }); + cause: msg + }); } } diff --git a/jscomp/test/array_test.js b/jscomp/test/array_test.js index 0d405cbb5c..3045800bd1 100644 --- a/jscomp/test/array_test.js +++ b/jscomp/test/array_test.js @@ -21,10 +21,10 @@ function starts_with(xs, prefix, p) { for (let i = 0; i < len2; ++i) { if (!p(Caml_array.get(xs, i), Caml_array.get(prefix, i))) { throw new Error(H, { - cause: { - RE_EXN_ID: H - } - }); + cause: { + RE_EXN_ID: H + } + }); } } @@ -35,8 +35,8 @@ function starts_with(xs, prefix, p) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/bb.js b/jscomp/test/bb.js index 7986a2505d..ad4c90bb11 100644 --- a/jscomp/test/bb.js +++ b/jscomp/test/bb.js @@ -22,15 +22,15 @@ function ff(x) { return "c"; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bb.res", - 13, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bb.res", + 13, + 9 + ] + } + }); } } @@ -48,15 +48,15 @@ function test(x) { break; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bb.res", - 21, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bb.res", + 21, + 9 + ] + } + }); } if (match === "b") { return "b"; diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index 066f996631..f408c2c3d7 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -68,26 +68,26 @@ function resize(newSize) { if (typeof n !== "object") { if (n === "One") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bdd.res", - 60, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bdd.res", + 60, + 13 + ] + } + }); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bdd.res", - 60, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bdd.res", + 60, + 13 + ] + } + }); } else { let ind = hashVal(getId(n._0), getId(n._3), n._1) & newSz_1; Caml_array.set(newArr, ind, { @@ -146,26 +146,26 @@ function mkNode(low, v, high) { if (typeof n !== "object") { if (n === "One") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bdd.res", - 121, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bdd.res", + 121, + 15 + ] + } + }); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bdd.res", - 121, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bdd.res", + 121, + 15 + ] + } + }); } else { if (v === n._1 && idl === getId(n._0) && idh === getId(n._3)) { return n; @@ -403,15 +403,15 @@ function main() { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bdd.res", - 301, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bdd.res", + 301, + 2 + ] + } + }); } main(); diff --git a/jscomp/test/bench.js b/jscomp/test/bench.js index c4eefe7078..d1403d2e36 100644 --- a/jscomp/test/bench.js +++ b/jscomp/test/bench.js @@ -28,11 +28,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f$1(0)); for (let i = 1; i < l; ++i) { diff --git a/jscomp/test/big_polyvar_test.js b/jscomp/test/big_polyvar_test.js index 2af9a1dee7..3cf61f097f 100644 --- a/jscomp/test/big_polyvar_test.js +++ b/jscomp/test/big_polyvar_test.js @@ -26,7815 +26,7815 @@ function eq(x, y) { if ("variant0" !== "variant0") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 314, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 314, + 0 + ] + } + }); } if ("variant1" !== "variant1") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 315, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 315, + 0 + ] + } + }); } if ("variant2" !== "variant2") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 316, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 316, + 0 + ] + } + }); } if ("variant3" !== "variant3") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 317, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 317, + 0 + ] + } + }); } if ("variant4" !== "variant4") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 318, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 318, + 0 + ] + } + }); } if ("variant5" !== "variant5") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 319, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 319, + 0 + ] + } + }); } if ("variant6" !== "variant6") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 320, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 320, + 0 + ] + } + }); } if ("variant7" !== "variant7") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 321, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 321, + 0 + ] + } + }); } if ("variant8" !== "variant8") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 322, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 322, + 0 + ] + } + }); } if ("variant9" !== "variant9") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 323, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 323, + 0 + ] + } + }); } if ("variant10" !== "variant10") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 324, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 324, + 0 + ] + } + }); } if ("variant11" !== "variant11") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 325, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 325, + 0 + ] + } + }); } if ("variant12" !== "variant12") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 326, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 326, + 0 + ] + } + }); } if ("variant13" !== "variant13") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 327, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 327, + 0 + ] + } + }); } if ("variant14" !== "variant14") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 328, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 328, + 0 + ] + } + }); } if ("variant15" !== "variant15") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 329, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 329, + 0 + ] + } + }); } if ("variant16" !== "variant16") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 330, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 330, + 0 + ] + } + }); } if ("variant17" !== "variant17") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 331, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 331, + 0 + ] + } + }); } if ("variant18" !== "variant18") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 332, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 332, + 0 + ] + } + }); } if ("variant19" !== "variant19") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 333, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 333, + 0 + ] + } + }); } if ("variant20" !== "variant20") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 334, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 334, + 0 + ] + } + }); } if ("variant21" !== "variant21") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 335, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 335, + 0 + ] + } + }); } if ("variant22" !== "variant22") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 336, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 336, + 0 + ] + } + }); } if ("variant23" !== "variant23") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 337, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 337, + 0 + ] + } + }); } if ("variant24" !== "variant24") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 338, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 338, + 0 + ] + } + }); } if ("variant25" !== "variant25") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 339, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 339, + 0 + ] + } + }); } if ("variant26" !== "variant26") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 340, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 340, + 0 + ] + } + }); } if ("variant27" !== "variant27") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 341, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 341, + 0 + ] + } + }); } if ("variant28" !== "variant28") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 342, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 342, + 0 + ] + } + }); } if ("variant29" !== "variant29") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 343, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 343, + 0 + ] + } + }); } if ("variant30" !== "variant30") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 344, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 344, + 0 + ] + } + }); } if ("variant31" !== "variant31") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 345, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 345, + 0 + ] + } + }); } if ("variant32" !== "variant32") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 346, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 346, + 0 + ] + } + }); } if ("variant33" !== "variant33") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 347, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 347, + 0 + ] + } + }); } if ("variant34" !== "variant34") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 348, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 348, + 0 + ] + } + }); } if ("variant35" !== "variant35") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 349, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 349, + 0 + ] + } + }); } if ("variant36" !== "variant36") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 350, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 350, + 0 + ] + } + }); } if ("variant37" !== "variant37") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 351, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 351, + 0 + ] + } + }); } if ("variant38" !== "variant38") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 352, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 352, + 0 + ] + } + }); } if ("variant39" !== "variant39") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 353, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 353, + 0 + ] + } + }); } if ("variant40" !== "variant40") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 354, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 354, + 0 + ] + } + }); } if ("variant41" !== "variant41") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 355, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 355, + 0 + ] + } + }); } if ("variant42" !== "variant42") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 356, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 356, + 0 + ] + } + }); } if ("variant43" !== "variant43") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 357, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 357, + 0 + ] + } + }); } if ("variant44" !== "variant44") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 358, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 358, + 0 + ] + } + }); } if ("variant45" !== "variant45") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 359, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 359, + 0 + ] + } + }); } if ("variant46" !== "variant46") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 360, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 360, + 0 + ] + } + }); } if ("variant47" !== "variant47") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 361, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 361, + 0 + ] + } + }); } if ("variant48" !== "variant48") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 362, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 362, + 0 + ] + } + }); } if ("variant49" !== "variant49") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 363, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 363, + 0 + ] + } + }); } if ("variant50" !== "variant50") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 364, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 364, + 0 + ] + } + }); } if ("variant51" !== "variant51") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 365, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 365, + 0 + ] + } + }); } if ("variant52" !== "variant52") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 366, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 366, + 0 + ] + } + }); } if ("variant53" !== "variant53") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 367, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 367, + 0 + ] + } + }); } if ("variant54" !== "variant54") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 368, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 368, + 0 + ] + } + }); } if ("variant55" !== "variant55") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 369, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 369, + 0 + ] + } + }); } if ("variant56" !== "variant56") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 370, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 370, + 0 + ] + } + }); } if ("variant57" !== "variant57") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 371, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 371, + 0 + ] + } + }); } if ("variant58" !== "variant58") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 372, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 372, + 0 + ] + } + }); } if ("variant59" !== "variant59") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 373, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 373, + 0 + ] + } + }); } if ("variant60" !== "variant60") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 374, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 374, + 0 + ] + } + }); } if ("variant61" !== "variant61") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 375, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 375, + 0 + ] + } + }); } if ("variant62" !== "variant62") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 376, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 376, + 0 + ] + } + }); } if ("variant63" !== "variant63") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 377, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 377, + 0 + ] + } + }); } if ("variant64" !== "variant64") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 378, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 378, + 0 + ] + } + }); } if ("variant65" !== "variant65") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 379, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 379, + 0 + ] + } + }); } if ("variant66" !== "variant66") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 380, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 380, + 0 + ] + } + }); } if ("variant67" !== "variant67") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 381, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 381, + 0 + ] + } + }); } if ("variant68" !== "variant68") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 382, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 382, + 0 + ] + } + }); } if ("variant69" !== "variant69") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 383, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 383, + 0 + ] + } + }); } if ("variant70" !== "variant70") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 384, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 384, + 0 + ] + } + }); } if ("variant71" !== "variant71") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 385, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 385, + 0 + ] + } + }); } if ("variant72" !== "variant72") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 386, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 386, + 0 + ] + } + }); } if ("variant73" !== "variant73") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 387, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 387, + 0 + ] + } + }); } if ("variant74" !== "variant74") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 388, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 388, + 0 + ] + } + }); } if ("variant75" !== "variant75") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 389, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 389, + 0 + ] + } + }); } if ("variant76" !== "variant76") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 390, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 390, + 0 + ] + } + }); } if ("variant77" !== "variant77") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 391, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 391, + 0 + ] + } + }); } if ("variant78" !== "variant78") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 392, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 392, + 0 + ] + } + }); } if ("variant79" !== "variant79") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 393, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 393, + 0 + ] + } + }); } if ("variant80" !== "variant80") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 394, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 394, + 0 + ] + } + }); } if ("variant81" !== "variant81") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 395, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 395, + 0 + ] + } + }); } if ("variant82" !== "variant82") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 396, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 396, + 0 + ] + } + }); } if ("variant83" !== "variant83") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 397, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 397, + 0 + ] + } + }); } if ("variant84" !== "variant84") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 398, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 398, + 0 + ] + } + }); } if ("variant85" !== "variant85") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 399, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 399, + 0 + ] + } + }); } if ("variant86" !== "variant86") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 400, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 400, + 0 + ] + } + }); } if ("variant87" !== "variant87") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 401, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 401, + 0 + ] + } + }); } if ("variant88" !== "variant88") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 402, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 402, + 0 + ] + } + }); } if ("variant89" !== "variant89") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 403, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 403, + 0 + ] + } + }); } if ("variant90" !== "variant90") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 404, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 404, + 0 + ] + } + }); } if ("variant91" !== "variant91") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 405, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 405, + 0 + ] + } + }); } if ("variant92" !== "variant92") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 406, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 406, + 0 + ] + } + }); } if ("variant93" !== "variant93") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 407, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 407, + 0 + ] + } + }); } if ("variant94" !== "variant94") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 408, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 408, + 0 + ] + } + }); } if ("variant95" !== "variant95") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 409, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 409, + 0 + ] + } + }); } if ("variant96" !== "variant96") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 410, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 410, + 0 + ] + } + }); } if ("variant97" !== "variant97") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 411, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 411, + 0 + ] + } + }); } if ("variant98" !== "variant98") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 412, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 412, + 0 + ] + } + }); } if ("variant99" !== "variant99") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 413, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 413, + 0 + ] + } + }); } if ("variant100" !== "variant100") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 414, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 414, + 0 + ] + } + }); } if ("variant101" !== "variant101") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 415, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 415, + 0 + ] + } + }); } if ("variant102" !== "variant102") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 416, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 416, + 0 + ] + } + }); } if ("variant103" !== "variant103") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 417, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 417, + 0 + ] + } + }); } if ("variant104" !== "variant104") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 418, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 418, + 0 + ] + } + }); } if ("variant105" !== "variant105") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 419, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 419, + 0 + ] + } + }); } if ("variant106" !== "variant106") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 420, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 420, + 0 + ] + } + }); } if ("variant107" !== "variant107") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 421, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 421, + 0 + ] + } + }); } if ("variant108" !== "variant108") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 422, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 422, + 0 + ] + } + }); } if ("variant109" !== "variant109") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 423, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 423, + 0 + ] + } + }); } if ("variant110" !== "variant110") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 424, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 424, + 0 + ] + } + }); } if ("variant111" !== "variant111") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 425, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 425, + 0 + ] + } + }); } if ("variant112" !== "variant112") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 426, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 426, + 0 + ] + } + }); } if ("variant113" !== "variant113") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 427, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 427, + 0 + ] + } + }); } if ("variant114" !== "variant114") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 428, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 428, + 0 + ] + } + }); } if ("variant115" !== "variant115") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 429, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 429, + 0 + ] + } + }); } if ("variant116" !== "variant116") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 430, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 430, + 0 + ] + } + }); } if ("variant117" !== "variant117") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 431, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 431, + 0 + ] + } + }); } if ("variant118" !== "variant118") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 432, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 432, + 0 + ] + } + }); } if ("variant119" !== "variant119") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 433, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 433, + 0 + ] + } + }); } if ("variant120" !== "variant120") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 434, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 434, + 0 + ] + } + }); } if ("variant121" !== "variant121") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 435, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 435, + 0 + ] + } + }); } if ("variant122" !== "variant122") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 436, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 436, + 0 + ] + } + }); } if ("variant123" !== "variant123") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 437, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 437, + 0 + ] + } + }); } if ("variant124" !== "variant124") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 438, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 438, + 0 + ] + } + }); } if ("variant125" !== "variant125") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 439, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 439, + 0 + ] + } + }); } if ("variant126" !== "variant126") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 440, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 440, + 0 + ] + } + }); } if ("variant127" !== "variant127") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 441, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 441, + 0 + ] + } + }); } if ("variant128" !== "variant128") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 442, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 442, + 0 + ] + } + }); } if ("variant129" !== "variant129") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 443, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 443, + 0 + ] + } + }); } if ("variant130" !== "variant130") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 444, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 444, + 0 + ] + } + }); } if ("variant131" !== "variant131") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 445, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 445, + 0 + ] + } + }); } if ("variant132" !== "variant132") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 446, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 446, + 0 + ] + } + }); } if ("variant133" !== "variant133") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 447, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 447, + 0 + ] + } + }); } if ("variant134" !== "variant134") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 448, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 448, + 0 + ] + } + }); } if ("variant135" !== "variant135") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 449, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 449, + 0 + ] + } + }); } if ("variant136" !== "variant136") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 450, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 450, + 0 + ] + } + }); } if ("variant137" !== "variant137") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 451, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 451, + 0 + ] + } + }); } if ("variant138" !== "variant138") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 452, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 452, + 0 + ] + } + }); } if ("variant139" !== "variant139") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 453, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 453, + 0 + ] + } + }); } if ("variant140" !== "variant140") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 454, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 454, + 0 + ] + } + }); } if ("variant141" !== "variant141") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 455, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 455, + 0 + ] + } + }); } if ("variant142" !== "variant142") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 456, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 456, + 0 + ] + } + }); } if ("variant143" !== "variant143") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 457, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 457, + 0 + ] + } + }); } if ("variant144" !== "variant144") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 458, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 458, + 0 + ] + } + }); } if ("variant145" !== "variant145") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 459, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 459, + 0 + ] + } + }); } if ("variant146" !== "variant146") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 460, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 460, + 0 + ] + } + }); } if ("variant147" !== "variant147") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 461, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 461, + 0 + ] + } + }); } if ("variant148" !== "variant148") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 462, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 462, + 0 + ] + } + }); } if ("variant149" !== "variant149") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 463, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 463, + 0 + ] + } + }); } if ("variant150" !== "variant150") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 464, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 464, + 0 + ] + } + }); } if ("variant151" !== "variant151") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 465, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 465, + 0 + ] + } + }); } if ("variant152" !== "variant152") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 466, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 466, + 0 + ] + } + }); } if ("variant153" !== "variant153") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 467, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 467, + 0 + ] + } + }); } if ("variant154" !== "variant154") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 468, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 468, + 0 + ] + } + }); } if ("variant155" !== "variant155") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 469, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 469, + 0 + ] + } + }); } if ("variant156" !== "variant156") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 470, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 470, + 0 + ] + } + }); } if ("variant157" !== "variant157") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 471, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 471, + 0 + ] + } + }); } if ("variant158" !== "variant158") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 472, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 472, + 0 + ] + } + }); } if ("variant159" !== "variant159") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 473, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 473, + 0 + ] + } + }); } if ("variant160" !== "variant160") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 474, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 474, + 0 + ] + } + }); } if ("variant161" !== "variant161") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 475, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 475, + 0 + ] + } + }); } if ("variant162" !== "variant162") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 476, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 476, + 0 + ] + } + }); } if ("variant163" !== "variant163") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 477, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 477, + 0 + ] + } + }); } if ("variant164" !== "variant164") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 478, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 478, + 0 + ] + } + }); } if ("variant165" !== "variant165") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 479, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 479, + 0 + ] + } + }); } if ("variant166" !== "variant166") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 480, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 480, + 0 + ] + } + }); } if ("variant167" !== "variant167") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 481, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 481, + 0 + ] + } + }); } if ("variant168" !== "variant168") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 482, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 482, + 0 + ] + } + }); } if ("variant169" !== "variant169") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 483, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 483, + 0 + ] + } + }); } if ("variant170" !== "variant170") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 484, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 484, + 0 + ] + } + }); } if ("variant171" !== "variant171") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 485, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 485, + 0 + ] + } + }); } if ("variant172" !== "variant172") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 486, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 486, + 0 + ] + } + }); } if ("variant173" !== "variant173") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 487, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 487, + 0 + ] + } + }); } if ("variant174" !== "variant174") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 488, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 488, + 0 + ] + } + }); } if ("variant175" !== "variant175") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 489, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 489, + 0 + ] + } + }); } if ("variant176" !== "variant176") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 490, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 490, + 0 + ] + } + }); } if ("variant177" !== "variant177") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 491, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 491, + 0 + ] + } + }); } if ("variant178" !== "variant178") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 492, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 492, + 0 + ] + } + }); } if ("variant179" !== "variant179") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 493, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 493, + 0 + ] + } + }); } if ("variant180" !== "variant180") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 494, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 494, + 0 + ] + } + }); } if ("variant181" !== "variant181") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 495, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 495, + 0 + ] + } + }); } if ("variant182" !== "variant182") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 496, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 496, + 0 + ] + } + }); } if ("variant183" !== "variant183") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 497, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 497, + 0 + ] + } + }); } if ("variant184" !== "variant184") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 498, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 498, + 0 + ] + } + }); } if ("variant185" !== "variant185") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 499, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 499, + 0 + ] + } + }); } if ("variant186" !== "variant186") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 500, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 500, + 0 + ] + } + }); } if ("variant187" !== "variant187") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 501, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 501, + 0 + ] + } + }); } if ("variant188" !== "variant188") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 502, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 502, + 0 + ] + } + }); } if ("variant189" !== "variant189") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 503, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 503, + 0 + ] + } + }); } if ("variant190" !== "variant190") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 504, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 504, + 0 + ] + } + }); } if ("variant191" !== "variant191") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 505, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 505, + 0 + ] + } + }); } if ("variant192" !== "variant192") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 506, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 506, + 0 + ] + } + }); } if ("variant193" !== "variant193") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 507, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 507, + 0 + ] + } + }); } if ("variant194" !== "variant194") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 508, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 508, + 0 + ] + } + }); } if ("variant195" !== "variant195") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 509, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 509, + 0 + ] + } + }); } if ("variant196" !== "variant196") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 510, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 510, + 0 + ] + } + }); } if ("variant197" !== "variant197") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 511, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 511, + 0 + ] + } + }); } if ("variant198" !== "variant198") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 512, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 512, + 0 + ] + } + }); } if ("variant199" !== "variant199") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 513, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 513, + 0 + ] + } + }); } if ("variant200" !== "variant200") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 514, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 514, + 0 + ] + } + }); } if ("variant201" !== "variant201") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 515, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 515, + 0 + ] + } + }); } if ("variant202" !== "variant202") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 516, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 516, + 0 + ] + } + }); } if ("variant203" !== "variant203") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 517, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 517, + 0 + ] + } + }); } if ("variant204" !== "variant204") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 518, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 518, + 0 + ] + } + }); } if ("variant205" !== "variant205") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 519, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 519, + 0 + ] + } + }); } if ("variant206" !== "variant206") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 520, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 520, + 0 + ] + } + }); } if ("variant207" !== "variant207") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 521, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 521, + 0 + ] + } + }); } if ("variant208" !== "variant208") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 522, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 522, + 0 + ] + } + }); } if ("variant209" !== "variant209") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 523, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 523, + 0 + ] + } + }); } if ("variant210" !== "variant210") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 524, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 524, + 0 + ] + } + }); } if ("variant211" !== "variant211") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 525, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 525, + 0 + ] + } + }); } if ("variant212" !== "variant212") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 526, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 526, + 0 + ] + } + }); } if ("variant213" !== "variant213") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 527, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 527, + 0 + ] + } + }); } if ("variant214" !== "variant214") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 528, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 528, + 0 + ] + } + }); } if ("variant215" !== "variant215") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 529, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 529, + 0 + ] + } + }); } if ("variant216" !== "variant216") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 530, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 530, + 0 + ] + } + }); } if ("variant217" !== "variant217") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 531, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 531, + 0 + ] + } + }); } if ("variant218" !== "variant218") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 532, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 532, + 0 + ] + } + }); } if ("variant219" !== "variant219") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 533, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 533, + 0 + ] + } + }); } if ("variant220" !== "variant220") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 534, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 534, + 0 + ] + } + }); } if ("variant221" !== "variant221") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 535, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 535, + 0 + ] + } + }); } if ("variant222" !== "variant222") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 536, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 536, + 0 + ] + } + }); } if ("variant223" !== "variant223") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 537, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 537, + 0 + ] + } + }); } if ("variant224" !== "variant224") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 538, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 538, + 0 + ] + } + }); } if ("variant225" !== "variant225") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 539, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 539, + 0 + ] + } + }); } if ("variant226" !== "variant226") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 540, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 540, + 0 + ] + } + }); } if ("variant227" !== "variant227") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 541, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 541, + 0 + ] + } + }); } if ("variant228" !== "variant228") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 542, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 542, + 0 + ] + } + }); } if ("variant229" !== "variant229") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 543, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 543, + 0 + ] + } + }); } if ("variant230" !== "variant230") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 544, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 544, + 0 + ] + } + }); } if ("variant231" !== "variant231") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 545, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 545, + 0 + ] + } + }); } if ("variant232" !== "variant232") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 546, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 546, + 0 + ] + } + }); } if ("variant233" !== "variant233") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 547, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 547, + 0 + ] + } + }); } if ("variant234" !== "variant234") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 548, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 548, + 0 + ] + } + }); } if ("variant235" !== "variant235") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 549, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 549, + 0 + ] + } + }); } if ("variant236" !== "variant236") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 550, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 550, + 0 + ] + } + }); } if ("variant237" !== "variant237") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 551, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 551, + 0 + ] + } + }); } if ("variant238" !== "variant238") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 552, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 552, + 0 + ] + } + }); } if ("variant239" !== "variant239") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 553, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 553, + 0 + ] + } + }); } if ("variant240" !== "variant240") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 554, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 554, + 0 + ] + } + }); } if ("variant241" !== "variant241") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 555, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 555, + 0 + ] + } + }); } if ("variant242" !== "variant242") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 556, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 556, + 0 + ] + } + }); } if ("variant243" !== "variant243") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 557, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 557, + 0 + ] + } + }); } if ("variant244" !== "variant244") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 558, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 558, + 0 + ] + } + }); } if ("variant245" !== "variant245") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 559, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 559, + 0 + ] + } + }); } if ("variant246" !== "variant246") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 560, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 560, + 0 + ] + } + }); } if ("variant247" !== "variant247") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 561, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 561, + 0 + ] + } + }); } if ("variant248" !== "variant248") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 562, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 562, + 0 + ] + } + }); } if ("variant249" !== "variant249") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 563, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 563, + 0 + ] + } + }); } if ("variant250" !== "variant250") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 564, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 564, + 0 + ] + } + }); } if ("variant251" !== "variant251") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 565, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 565, + 0 + ] + } + }); } if ("variant252" !== "variant252") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 566, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 566, + 0 + ] + } + }); } if ("variant253" !== "variant253") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 567, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 567, + 0 + ] + } + }); } if ("variant254" !== "variant254") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 568, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 568, + 0 + ] + } + }); } if ("variant255" !== "variant255") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 569, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 569, + 0 + ] + } + }); } if ("variant256" !== "variant256") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 570, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 570, + 0 + ] + } + }); } if ("variant257" !== "variant257") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 571, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 571, + 0 + ] + } + }); } if ("variant258" !== "variant258") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 572, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 572, + 0 + ] + } + }); } if ("variant259" !== "variant259") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 573, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 573, + 0 + ] + } + }); } if ("variant260" !== "variant260") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 574, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 574, + 0 + ] + } + }); } if ("variant261" !== "variant261") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 575, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 575, + 0 + ] + } + }); } if ("variant262" !== "variant262") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 576, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 576, + 0 + ] + } + }); } if ("variant263" !== "variant263") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 577, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 577, + 0 + ] + } + }); } if ("variant264" !== "variant264") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 578, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 578, + 0 + ] + } + }); } if ("variant265" !== "variant265") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 579, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 579, + 0 + ] + } + }); } if ("variant266" !== "variant266") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 580, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 580, + 0 + ] + } + }); } if ("variant267" !== "variant267") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 581, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 581, + 0 + ] + } + }); } if ("variant268" !== "variant268") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 582, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 582, + 0 + ] + } + }); } if ("variant269" !== "variant269") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 583, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 583, + 0 + ] + } + }); } if ("variant270" !== "variant270") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 584, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 584, + 0 + ] + } + }); } if ("variant271" !== "variant271") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 585, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 585, + 0 + ] + } + }); } if ("variant272" !== "variant272") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 586, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 586, + 0 + ] + } + }); } if ("variant273" !== "variant273") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 587, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 587, + 0 + ] + } + }); } if ("variant274" !== "variant274") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 588, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 588, + 0 + ] + } + }); } if ("variant275" !== "variant275") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 589, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 589, + 0 + ] + } + }); } if ("variant276" !== "variant276") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 590, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 590, + 0 + ] + } + }); } if ("variant277" !== "variant277") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 591, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 591, + 0 + ] + } + }); } if ("variant278" !== "variant278") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 592, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 592, + 0 + ] + } + }); } if ("variant279" !== "variant279") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 593, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 593, + 0 + ] + } + }); } if ("variant280" !== "variant280") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 594, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 594, + 0 + ] + } + }); } if ("variant281" !== "variant281") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 595, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 595, + 0 + ] + } + }); } if ("variant282" !== "variant282") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 596, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 596, + 0 + ] + } + }); } if ("variant283" !== "variant283") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 597, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 597, + 0 + ] + } + }); } if ("variant284" !== "variant284") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 598, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 598, + 0 + ] + } + }); } if ("variant285" !== "variant285") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 599, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 599, + 0 + ] + } + }); } if ("variant286" !== "variant286") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 600, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 600, + 0 + ] + } + }); } if ("variant287" !== "variant287") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 601, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 601, + 0 + ] + } + }); } if ("variant288" !== "variant288") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 602, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 602, + 0 + ] + } + }); } if ("variant289" !== "variant289") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 603, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 603, + 0 + ] + } + }); } if ("variant290" !== "variant290") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 604, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 604, + 0 + ] + } + }); } if ("variant291" !== "variant291") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 605, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 605, + 0 + ] + } + }); } if ("variant292" !== "variant292") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 606, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 606, + 0 + ] + } + }); } if ("variant293" !== "variant293") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 607, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 607, + 0 + ] + } + }); } if ("variant294" !== "variant294") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 608, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 608, + 0 + ] + } + }); } if ("variant295" !== "variant295") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 609, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 609, + 0 + ] + } + }); } if ("variant296" !== "variant296") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 610, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 610, + 0 + ] + } + }); } if ("variant297" !== "variant297") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 611, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 611, + 0 + ] + } + }); } if ("variant298" !== "variant298") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 612, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 612, + 0 + ] + } + }); } if ("variant299" !== "variant299") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 613, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 613, + 0 + ] + } + }); } if (!eq(tFromJs("variant0"), "variant0")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 614, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 614, + 0 + ] + } + }); } if (!eq(tFromJs("variant1"), "variant1")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 615, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 615, + 0 + ] + } + }); } if (!eq(tFromJs("variant2"), "variant2")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 616, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 616, + 0 + ] + } + }); } if (!eq(tFromJs("variant3"), "variant3")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 617, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 617, + 0 + ] + } + }); } if (!eq(tFromJs("variant4"), "variant4")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 618, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 618, + 0 + ] + } + }); } if (!eq(tFromJs("variant5"), "variant5")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 619, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 619, + 0 + ] + } + }); } if (!eq(tFromJs("variant6"), "variant6")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 620, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 620, + 0 + ] + } + }); } if (!eq(tFromJs("variant7"), "variant7")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 621, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 621, + 0 + ] + } + }); } if (!eq(tFromJs("variant8"), "variant8")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 622, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 622, + 0 + ] + } + }); } if (!eq(tFromJs("variant9"), "variant9")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 623, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 623, + 0 + ] + } + }); } if (!eq(tFromJs("variant10"), "variant10")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 624, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 624, + 0 + ] + } + }); } if (!eq(tFromJs("variant11"), "variant11")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 625, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 625, + 0 + ] + } + }); } if (!eq(tFromJs("variant12"), "variant12")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 626, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 626, + 0 + ] + } + }); } if (!eq(tFromJs("variant13"), "variant13")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 627, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 627, + 0 + ] + } + }); } if (!eq(tFromJs("variant14"), "variant14")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 628, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 628, + 0 + ] + } + }); } if (!eq(tFromJs("variant15"), "variant15")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 629, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 629, + 0 + ] + } + }); } if (!eq(tFromJs("variant16"), "variant16")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 630, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 630, + 0 + ] + } + }); } if (!eq(tFromJs("variant17"), "variant17")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 631, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 631, + 0 + ] + } + }); } if (!eq(tFromJs("variant18"), "variant18")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 632, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 632, + 0 + ] + } + }); } if (!eq(tFromJs("variant19"), "variant19")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 633, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 633, + 0 + ] + } + }); } if (!eq(tFromJs("variant20"), "variant20")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 634, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 634, + 0 + ] + } + }); } if (!eq(tFromJs("variant21"), "variant21")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 635, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 635, + 0 + ] + } + }); } if (!eq(tFromJs("variant22"), "variant22")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 636, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 636, + 0 + ] + } + }); } if (!eq(tFromJs("variant23"), "variant23")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 637, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 637, + 0 + ] + } + }); } if (!eq(tFromJs("variant24"), "variant24")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 638, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 638, + 0 + ] + } + }); } if (!eq(tFromJs("variant25"), "variant25")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 639, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 639, + 0 + ] + } + }); } if (!eq(tFromJs("variant26"), "variant26")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 640, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 640, + 0 + ] + } + }); } if (!eq(tFromJs("variant27"), "variant27")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 641, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 641, + 0 + ] + } + }); } if (!eq(tFromJs("variant28"), "variant28")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 642, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 642, + 0 + ] + } + }); } if (!eq(tFromJs("variant29"), "variant29")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 643, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 643, + 0 + ] + } + }); } if (!eq(tFromJs("variant30"), "variant30")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 644, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 644, + 0 + ] + } + }); } if (!eq(tFromJs("variant31"), "variant31")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 645, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 645, + 0 + ] + } + }); } if (!eq(tFromJs("variant32"), "variant32")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 646, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 646, + 0 + ] + } + }); } if (!eq(tFromJs("variant33"), "variant33")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 647, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 647, + 0 + ] + } + }); } if (!eq(tFromJs("variant34"), "variant34")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 648, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 648, + 0 + ] + } + }); } if (!eq(tFromJs("variant35"), "variant35")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 649, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 649, + 0 + ] + } + }); } if (!eq(tFromJs("variant36"), "variant36")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 650, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 650, + 0 + ] + } + }); } if (!eq(tFromJs("variant37"), "variant37")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 651, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 651, + 0 + ] + } + }); } if (!eq(tFromJs("variant38"), "variant38")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 652, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 652, + 0 + ] + } + }); } if (!eq(tFromJs("variant39"), "variant39")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 653, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 653, + 0 + ] + } + }); } if (!eq(tFromJs("variant40"), "variant40")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 654, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 654, + 0 + ] + } + }); } if (!eq(tFromJs("variant41"), "variant41")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 655, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 655, + 0 + ] + } + }); } if (!eq(tFromJs("variant42"), "variant42")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 656, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 656, + 0 + ] + } + }); } if (!eq(tFromJs("variant43"), "variant43")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 657, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 657, + 0 + ] + } + }); } if (!eq(tFromJs("variant44"), "variant44")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 658, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 658, + 0 + ] + } + }); } if (!eq(tFromJs("variant45"), "variant45")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 659, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 659, + 0 + ] + } + }); } if (!eq(tFromJs("variant46"), "variant46")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 660, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 660, + 0 + ] + } + }); } if (!eq(tFromJs("variant47"), "variant47")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 661, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 661, + 0 + ] + } + }); } if (!eq(tFromJs("variant48"), "variant48")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 662, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 662, + 0 + ] + } + }); } if (!eq(tFromJs("variant49"), "variant49")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 663, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 663, + 0 + ] + } + }); } if (!eq(tFromJs("variant50"), "variant50")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 664, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 664, + 0 + ] + } + }); } if (!eq(tFromJs("variant51"), "variant51")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 665, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 665, + 0 + ] + } + }); } if (!eq(tFromJs("variant52"), "variant52")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 666, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 666, + 0 + ] + } + }); } if (!eq(tFromJs("variant53"), "variant53")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 667, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 667, + 0 + ] + } + }); } if (!eq(tFromJs("variant54"), "variant54")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 668, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 668, + 0 + ] + } + }); } if (!eq(tFromJs("variant55"), "variant55")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 669, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 669, + 0 + ] + } + }); } if (!eq(tFromJs("variant56"), "variant56")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 670, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 670, + 0 + ] + } + }); } if (!eq(tFromJs("variant57"), "variant57")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 671, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 671, + 0 + ] + } + }); } if (!eq(tFromJs("variant58"), "variant58")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 672, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 672, + 0 + ] + } + }); } if (!eq(tFromJs("variant59"), "variant59")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 673, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 673, + 0 + ] + } + }); } if (!eq(tFromJs("variant60"), "variant60")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 674, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 674, + 0 + ] + } + }); } if (!eq(tFromJs("variant61"), "variant61")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 675, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 675, + 0 + ] + } + }); } if (!eq(tFromJs("variant62"), "variant62")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 676, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 676, + 0 + ] + } + }); } if (!eq(tFromJs("variant63"), "variant63")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 677, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 677, + 0 + ] + } + }); } if (!eq(tFromJs("variant64"), "variant64")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 678, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 678, + 0 + ] + } + }); } if (!eq(tFromJs("variant65"), "variant65")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 679, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 679, + 0 + ] + } + }); } if (!eq(tFromJs("variant66"), "variant66")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 680, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 680, + 0 + ] + } + }); } if (!eq(tFromJs("variant67"), "variant67")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 681, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 681, + 0 + ] + } + }); } if (!eq(tFromJs("variant68"), "variant68")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 682, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 682, + 0 + ] + } + }); } if (!eq(tFromJs("variant69"), "variant69")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 683, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 683, + 0 + ] + } + }); } if (!eq(tFromJs("variant70"), "variant70")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 684, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 684, + 0 + ] + } + }); } if (!eq(tFromJs("variant71"), "variant71")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 685, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 685, + 0 + ] + } + }); } if (!eq(tFromJs("variant72"), "variant72")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 686, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 686, + 0 + ] + } + }); } if (!eq(tFromJs("variant73"), "variant73")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 687, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 687, + 0 + ] + } + }); } if (!eq(tFromJs("variant74"), "variant74")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 688, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 688, + 0 + ] + } + }); } if (!eq(tFromJs("variant75"), "variant75")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 689, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 689, + 0 + ] + } + }); } if (!eq(tFromJs("variant76"), "variant76")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 690, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 690, + 0 + ] + } + }); } if (!eq(tFromJs("variant77"), "variant77")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 691, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 691, + 0 + ] + } + }); } if (!eq(tFromJs("variant78"), "variant78")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 692, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 692, + 0 + ] + } + }); } if (!eq(tFromJs("variant79"), "variant79")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 693, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 693, + 0 + ] + } + }); } if (!eq(tFromJs("variant80"), "variant80")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 694, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 694, + 0 + ] + } + }); } if (!eq(tFromJs("variant81"), "variant81")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 695, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 695, + 0 + ] + } + }); } if (!eq(tFromJs("variant82"), "variant82")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 696, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 696, + 0 + ] + } + }); } if (!eq(tFromJs("variant83"), "variant83")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 697, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 697, + 0 + ] + } + }); } if (!eq(tFromJs("variant84"), "variant84")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 698, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 698, + 0 + ] + } + }); } if (!eq(tFromJs("variant85"), "variant85")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 699, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 699, + 0 + ] + } + }); } if (!eq(tFromJs("variant86"), "variant86")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 700, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 700, + 0 + ] + } + }); } if (!eq(tFromJs("variant87"), "variant87")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 701, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 701, + 0 + ] + } + }); } if (!eq(tFromJs("variant88"), "variant88")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 702, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 702, + 0 + ] + } + }); } if (!eq(tFromJs("variant89"), "variant89")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 703, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 703, + 0 + ] + } + }); } if (!eq(tFromJs("variant90"), "variant90")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 704, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 704, + 0 + ] + } + }); } if (!eq(tFromJs("variant91"), "variant91")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 705, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 705, + 0 + ] + } + }); } if (!eq(tFromJs("variant92"), "variant92")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 706, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 706, + 0 + ] + } + }); } if (!eq(tFromJs("variant93"), "variant93")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 707, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 707, + 0 + ] + } + }); } if (!eq(tFromJs("variant94"), "variant94")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 708, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 708, + 0 + ] + } + }); } if (!eq(tFromJs("variant95"), "variant95")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 709, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 709, + 0 + ] + } + }); } if (!eq(tFromJs("variant96"), "variant96")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 710, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 710, + 0 + ] + } + }); } if (!eq(tFromJs("variant97"), "variant97")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 711, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 711, + 0 + ] + } + }); } if (!eq(tFromJs("variant98"), "variant98")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 712, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 712, + 0 + ] + } + }); } if (!eq(tFromJs("variant99"), "variant99")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 713, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 713, + 0 + ] + } + }); } if (!eq(tFromJs("variant100"), "variant100")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 714, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 714, + 0 + ] + } + }); } if (!eq(tFromJs("variant101"), "variant101")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 715, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 715, + 0 + ] + } + }); } if (!eq(tFromJs("variant102"), "variant102")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 716, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 716, + 0 + ] + } + }); } if (!eq(tFromJs("variant103"), "variant103")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 717, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 717, + 0 + ] + } + }); } if (!eq(tFromJs("variant104"), "variant104")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 718, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 718, + 0 + ] + } + }); } if (!eq(tFromJs("variant105"), "variant105")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 719, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 719, + 0 + ] + } + }); } if (!eq(tFromJs("variant106"), "variant106")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 720, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 720, + 0 + ] + } + }); } if (!eq(tFromJs("variant107"), "variant107")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 721, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 721, + 0 + ] + } + }); } if (!eq(tFromJs("variant108"), "variant108")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 722, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 722, + 0 + ] + } + }); } if (!eq(tFromJs("variant109"), "variant109")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 723, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 723, + 0 + ] + } + }); } if (!eq(tFromJs("variant110"), "variant110")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 724, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 724, + 0 + ] + } + }); } if (!eq(tFromJs("variant111"), "variant111")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 725, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 725, + 0 + ] + } + }); } if (!eq(tFromJs("variant112"), "variant112")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 726, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 726, + 0 + ] + } + }); } if (!eq(tFromJs("variant113"), "variant113")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 727, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 727, + 0 + ] + } + }); } if (!eq(tFromJs("variant114"), "variant114")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 728, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 728, + 0 + ] + } + }); } if (!eq(tFromJs("variant115"), "variant115")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 729, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 729, + 0 + ] + } + }); } if (!eq(tFromJs("variant116"), "variant116")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 730, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 730, + 0 + ] + } + }); } if (!eq(tFromJs("variant117"), "variant117")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 731, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 731, + 0 + ] + } + }); } if (!eq(tFromJs("variant118"), "variant118")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 732, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 732, + 0 + ] + } + }); } if (!eq(tFromJs("variant119"), "variant119")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 733, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 733, + 0 + ] + } + }); } if (!eq(tFromJs("variant120"), "variant120")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 734, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 734, + 0 + ] + } + }); } if (!eq(tFromJs("variant121"), "variant121")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 735, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 735, + 0 + ] + } + }); } if (!eq(tFromJs("variant122"), "variant122")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 736, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 736, + 0 + ] + } + }); } if (!eq(tFromJs("variant123"), "variant123")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 737, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 737, + 0 + ] + } + }); } if (!eq(tFromJs("variant124"), "variant124")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 738, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 738, + 0 + ] + } + }); } if (!eq(tFromJs("variant125"), "variant125")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 739, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 739, + 0 + ] + } + }); } if (!eq(tFromJs("variant126"), "variant126")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 740, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 740, + 0 + ] + } + }); } if (!eq(tFromJs("variant127"), "variant127")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 741, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 741, + 0 + ] + } + }); } if (!eq(tFromJs("variant128"), "variant128")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 742, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 742, + 0 + ] + } + }); } if (!eq(tFromJs("variant129"), "variant129")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 743, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 743, + 0 + ] + } + }); } if (!eq(tFromJs("variant130"), "variant130")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 744, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 744, + 0 + ] + } + }); } if (!eq(tFromJs("variant131"), "variant131")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 745, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 745, + 0 + ] + } + }); } if (!eq(tFromJs("variant132"), "variant132")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 746, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 746, + 0 + ] + } + }); } if (!eq(tFromJs("variant133"), "variant133")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 747, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 747, + 0 + ] + } + }); } if (!eq(tFromJs("variant134"), "variant134")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 748, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 748, + 0 + ] + } + }); } if (!eq(tFromJs("variant135"), "variant135")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 749, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 749, + 0 + ] + } + }); } if (!eq(tFromJs("variant136"), "variant136")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 750, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 750, + 0 + ] + } + }); } if (!eq(tFromJs("variant137"), "variant137")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 751, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 751, + 0 + ] + } + }); } if (!eq(tFromJs("variant138"), "variant138")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 752, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 752, + 0 + ] + } + }); } if (!eq(tFromJs("variant139"), "variant139")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 753, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 753, + 0 + ] + } + }); } if (!eq(tFromJs("variant140"), "variant140")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 754, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 754, + 0 + ] + } + }); } if (!eq(tFromJs("variant141"), "variant141")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 755, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 755, + 0 + ] + } + }); } if (!eq(tFromJs("variant142"), "variant142")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 756, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 756, + 0 + ] + } + }); } if (!eq(tFromJs("variant143"), "variant143")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 757, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 757, + 0 + ] + } + }); } if (!eq(tFromJs("variant144"), "variant144")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 758, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 758, + 0 + ] + } + }); } if (!eq(tFromJs("variant145"), "variant145")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 759, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 759, + 0 + ] + } + }); } if (!eq(tFromJs("variant146"), "variant146")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 760, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 760, + 0 + ] + } + }); } if (!eq(tFromJs("variant147"), "variant147")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 761, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 761, + 0 + ] + } + }); } if (!eq(tFromJs("variant148"), "variant148")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 762, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 762, + 0 + ] + } + }); } if (!eq(tFromJs("variant149"), "variant149")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 763, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 763, + 0 + ] + } + }); } if (!eq(tFromJs("variant150"), "variant150")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 764, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 764, + 0 + ] + } + }); } if (!eq(tFromJs("variant151"), "variant151")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 765, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 765, + 0 + ] + } + }); } if (!eq(tFromJs("variant152"), "variant152")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 766, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 766, + 0 + ] + } + }); } if (!eq(tFromJs("variant153"), "variant153")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 767, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 767, + 0 + ] + } + }); } if (!eq(tFromJs("variant154"), "variant154")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 768, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 768, + 0 + ] + } + }); } if (!eq(tFromJs("variant155"), "variant155")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 769, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 769, + 0 + ] + } + }); } if (!eq(tFromJs("variant156"), "variant156")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 770, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 770, + 0 + ] + } + }); } if (!eq(tFromJs("variant157"), "variant157")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 771, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 771, + 0 + ] + } + }); } if (!eq(tFromJs("variant158"), "variant158")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 772, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 772, + 0 + ] + } + }); } if (!eq(tFromJs("variant159"), "variant159")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 773, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 773, + 0 + ] + } + }); } if (!eq(tFromJs("variant160"), "variant160")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 774, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 774, + 0 + ] + } + }); } if (!eq(tFromJs("variant161"), "variant161")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 775, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 775, + 0 + ] + } + }); } if (!eq(tFromJs("variant162"), "variant162")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 776, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 776, + 0 + ] + } + }); } if (!eq(tFromJs("variant163"), "variant163")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 777, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 777, + 0 + ] + } + }); } if (!eq(tFromJs("variant164"), "variant164")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 778, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 778, + 0 + ] + } + }); } if (!eq(tFromJs("variant165"), "variant165")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 779, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 779, + 0 + ] + } + }); } if (!eq(tFromJs("variant166"), "variant166")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 780, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 780, + 0 + ] + } + }); } if (!eq(tFromJs("variant167"), "variant167")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 781, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 781, + 0 + ] + } + }); } if (!eq(tFromJs("variant168"), "variant168")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 782, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 782, + 0 + ] + } + }); } if (!eq(tFromJs("variant169"), "variant169")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 783, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 783, + 0 + ] + } + }); } if (!eq(tFromJs("variant170"), "variant170")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 784, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 784, + 0 + ] + } + }); } if (!eq(tFromJs("variant171"), "variant171")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 785, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 785, + 0 + ] + } + }); } if (!eq(tFromJs("variant172"), "variant172")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 786, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 786, + 0 + ] + } + }); } if (!eq(tFromJs("variant173"), "variant173")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 787, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 787, + 0 + ] + } + }); } if (!eq(tFromJs("variant174"), "variant174")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 788, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 788, + 0 + ] + } + }); } if (!eq(tFromJs("variant175"), "variant175")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 789, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 789, + 0 + ] + } + }); } if (!eq(tFromJs("variant176"), "variant176")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 790, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 790, + 0 + ] + } + }); } if (!eq(tFromJs("variant177"), "variant177")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 791, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 791, + 0 + ] + } + }); } if (!eq(tFromJs("variant178"), "variant178")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 792, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 792, + 0 + ] + } + }); } if (!eq(tFromJs("variant179"), "variant179")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 793, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 793, + 0 + ] + } + }); } if (!eq(tFromJs("variant180"), "variant180")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 794, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 794, + 0 + ] + } + }); } if (!eq(tFromJs("variant181"), "variant181")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 795, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 795, + 0 + ] + } + }); } if (!eq(tFromJs("variant182"), "variant182")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 796, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 796, + 0 + ] + } + }); } if (!eq(tFromJs("variant183"), "variant183")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 797, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 797, + 0 + ] + } + }); } if (!eq(tFromJs("variant184"), "variant184")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 798, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 798, + 0 + ] + } + }); } if (!eq(tFromJs("variant185"), "variant185")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 799, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 799, + 0 + ] + } + }); } if (!eq(tFromJs("variant186"), "variant186")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 800, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 800, + 0 + ] + } + }); } if (!eq(tFromJs("variant187"), "variant187")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 801, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 801, + 0 + ] + } + }); } if (!eq(tFromJs("variant188"), "variant188")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 802, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 802, + 0 + ] + } + }); } if (!eq(tFromJs("variant189"), "variant189")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 803, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 803, + 0 + ] + } + }); } if (!eq(tFromJs("variant190"), "variant190")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 804, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 804, + 0 + ] + } + }); } if (!eq(tFromJs("variant191"), "variant191")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 805, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 805, + 0 + ] + } + }); } if (!eq(tFromJs("variant192"), "variant192")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 806, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 806, + 0 + ] + } + }); } if (!eq(tFromJs("variant193"), "variant193")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 807, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 807, + 0 + ] + } + }); } if (!eq(tFromJs("variant194"), "variant194")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 808, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 808, + 0 + ] + } + }); } if (!eq(tFromJs("variant195"), "variant195")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 809, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 809, + 0 + ] + } + }); } if (!eq(tFromJs("variant196"), "variant196")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 810, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 810, + 0 + ] + } + }); } if (!eq(tFromJs("variant197"), "variant197")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 811, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 811, + 0 + ] + } + }); } if (!eq(tFromJs("variant198"), "variant198")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 812, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 812, + 0 + ] + } + }); } if (!eq(tFromJs("variant199"), "variant199")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 813, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 813, + 0 + ] + } + }); } if (!eq(tFromJs("variant200"), "variant200")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 814, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 814, + 0 + ] + } + }); } if (!eq(tFromJs("variant201"), "variant201")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 815, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 815, + 0 + ] + } + }); } if (!eq(tFromJs("variant202"), "variant202")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 816, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 816, + 0 + ] + } + }); } if (!eq(tFromJs("variant203"), "variant203")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 817, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 817, + 0 + ] + } + }); } if (!eq(tFromJs("variant204"), "variant204")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 818, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 818, + 0 + ] + } + }); } if (!eq(tFromJs("variant205"), "variant205")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 819, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 819, + 0 + ] + } + }); } if (!eq(tFromJs("variant206"), "variant206")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 820, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 820, + 0 + ] + } + }); } if (!eq(tFromJs("variant207"), "variant207")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 821, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 821, + 0 + ] + } + }); } if (!eq(tFromJs("variant208"), "variant208")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 822, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 822, + 0 + ] + } + }); } if (!eq(tFromJs("variant209"), "variant209")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 823, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 823, + 0 + ] + } + }); } if (!eq(tFromJs("variant210"), "variant210")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 824, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 824, + 0 + ] + } + }); } if (!eq(tFromJs("variant211"), "variant211")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 825, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 825, + 0 + ] + } + }); } if (!eq(tFromJs("variant212"), "variant212")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 826, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 826, + 0 + ] + } + }); } if (!eq(tFromJs("variant213"), "variant213")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 827, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 827, + 0 + ] + } + }); } if (!eq(tFromJs("variant214"), "variant214")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 828, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 828, + 0 + ] + } + }); } if (!eq(tFromJs("variant215"), "variant215")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 829, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 829, + 0 + ] + } + }); } if (!eq(tFromJs("variant216"), "variant216")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 830, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 830, + 0 + ] + } + }); } if (!eq(tFromJs("variant217"), "variant217")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 831, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 831, + 0 + ] + } + }); } if (!eq(tFromJs("variant218"), "variant218")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 832, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 832, + 0 + ] + } + }); } if (!eq(tFromJs("variant219"), "variant219")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 833, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 833, + 0 + ] + } + }); } if (!eq(tFromJs("variant220"), "variant220")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 834, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 834, + 0 + ] + } + }); } if (!eq(tFromJs("variant221"), "variant221")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 835, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 835, + 0 + ] + } + }); } if (!eq(tFromJs("variant222"), "variant222")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 836, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 836, + 0 + ] + } + }); } if (!eq(tFromJs("variant223"), "variant223")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 837, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 837, + 0 + ] + } + }); } if (!eq(tFromJs("variant224"), "variant224")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 838, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 838, + 0 + ] + } + }); } if (!eq(tFromJs("variant225"), "variant225")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 839, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 839, + 0 + ] + } + }); } if (!eq(tFromJs("variant226"), "variant226")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 840, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 840, + 0 + ] + } + }); } if (!eq(tFromJs("variant227"), "variant227")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 841, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 841, + 0 + ] + } + }); } if (!eq(tFromJs("variant228"), "variant228")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 842, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 842, + 0 + ] + } + }); } if (!eq(tFromJs("variant229"), "variant229")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 843, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 843, + 0 + ] + } + }); } if (!eq(tFromJs("variant230"), "variant230")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 844, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 844, + 0 + ] + } + }); } if (!eq(tFromJs("variant231"), "variant231")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 845, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 845, + 0 + ] + } + }); } if (!eq(tFromJs("variant232"), "variant232")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 846, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 846, + 0 + ] + } + }); } if (!eq(tFromJs("variant233"), "variant233")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 847, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 847, + 0 + ] + } + }); } if (!eq(tFromJs("variant234"), "variant234")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 848, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 848, + 0 + ] + } + }); } if (!eq(tFromJs("variant235"), "variant235")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 849, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 849, + 0 + ] + } + }); } if (!eq(tFromJs("variant236"), "variant236")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 850, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 850, + 0 + ] + } + }); } if (!eq(tFromJs("variant237"), "variant237")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 851, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 851, + 0 + ] + } + }); } if (!eq(tFromJs("variant238"), "variant238")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 852, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 852, + 0 + ] + } + }); } if (!eq(tFromJs("variant239"), "variant239")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 853, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 853, + 0 + ] + } + }); } if (!eq(tFromJs("variant240"), "variant240")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 854, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 854, + 0 + ] + } + }); } if (!eq(tFromJs("variant241"), "variant241")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 855, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 855, + 0 + ] + } + }); } if (!eq(tFromJs("variant242"), "variant242")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 856, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 856, + 0 + ] + } + }); } if (!eq(tFromJs("variant243"), "variant243")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 857, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 857, + 0 + ] + } + }); } if (!eq(tFromJs("variant244"), "variant244")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 858, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 858, + 0 + ] + } + }); } if (!eq(tFromJs("variant245"), "variant245")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 859, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 859, + 0 + ] + } + }); } if (!eq(tFromJs("variant246"), "variant246")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 860, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 860, + 0 + ] + } + }); } if (!eq(tFromJs("variant247"), "variant247")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 861, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 861, + 0 + ] + } + }); } if (!eq(tFromJs("variant248"), "variant248")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 862, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 862, + 0 + ] + } + }); } if (!eq(tFromJs("variant249"), "variant249")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 863, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 863, + 0 + ] + } + }); } if (!eq(tFromJs("variant250"), "variant250")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 864, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 864, + 0 + ] + } + }); } if (!eq(tFromJs("variant251"), "variant251")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 865, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 865, + 0 + ] + } + }); } if (!eq(tFromJs("variant252"), "variant252")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 866, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 866, + 0 + ] + } + }); } if (!eq(tFromJs("variant253"), "variant253")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 867, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 867, + 0 + ] + } + }); } if (!eq(tFromJs("variant254"), "variant254")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 868, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 868, + 0 + ] + } + }); } if (!eq(tFromJs("variant255"), "variant255")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 869, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 869, + 0 + ] + } + }); } if (!eq(tFromJs("variant256"), "variant256")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 870, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 870, + 0 + ] + } + }); } if (!eq(tFromJs("variant257"), "variant257")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 871, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 871, + 0 + ] + } + }); } if (!eq(tFromJs("variant258"), "variant258")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 872, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 872, + 0 + ] + } + }); } if (!eq(tFromJs("variant259"), "variant259")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 873, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 873, + 0 + ] + } + }); } if (!eq(tFromJs("variant260"), "variant260")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 874, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 874, + 0 + ] + } + }); } if (!eq(tFromJs("variant261"), "variant261")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 875, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 875, + 0 + ] + } + }); } if (!eq(tFromJs("variant262"), "variant262")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 876, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 876, + 0 + ] + } + }); } if (!eq(tFromJs("variant263"), "variant263")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 877, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 877, + 0 + ] + } + }); } if (!eq(tFromJs("variant264"), "variant264")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 878, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 878, + 0 + ] + } + }); } if (!eq(tFromJs("variant265"), "variant265")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 879, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 879, + 0 + ] + } + }); } if (!eq(tFromJs("variant266"), "variant266")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 880, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 880, + 0 + ] + } + }); } if (!eq(tFromJs("variant267"), "variant267")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 881, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 881, + 0 + ] + } + }); } if (!eq(tFromJs("variant268"), "variant268")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 882, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 882, + 0 + ] + } + }); } if (!eq(tFromJs("variant269"), "variant269")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 883, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 883, + 0 + ] + } + }); } if (!eq(tFromJs("variant270"), "variant270")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 884, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 884, + 0 + ] + } + }); } if (!eq(tFromJs("variant271"), "variant271")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 885, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 885, + 0 + ] + } + }); } if (!eq(tFromJs("variant272"), "variant272")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 886, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 886, + 0 + ] + } + }); } if (!eq(tFromJs("variant273"), "variant273")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 887, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 887, + 0 + ] + } + }); } if (!eq(tFromJs("variant274"), "variant274")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 888, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 888, + 0 + ] + } + }); } if (!eq(tFromJs("variant275"), "variant275")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 889, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 889, + 0 + ] + } + }); } if (!eq(tFromJs("variant276"), "variant276")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 890, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 890, + 0 + ] + } + }); } if (!eq(tFromJs("variant277"), "variant277")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 891, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 891, + 0 + ] + } + }); } if (!eq(tFromJs("variant278"), "variant278")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 892, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 892, + 0 + ] + } + }); } if (!eq(tFromJs("variant279"), "variant279")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 893, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 893, + 0 + ] + } + }); } if (!eq(tFromJs("variant280"), "variant280")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 894, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 894, + 0 + ] + } + }); } if (!eq(tFromJs("variant281"), "variant281")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 895, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 895, + 0 + ] + } + }); } if (!eq(tFromJs("variant282"), "variant282")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 896, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 896, + 0 + ] + } + }); } if (!eq(tFromJs("variant283"), "variant283")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 897, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 897, + 0 + ] + } + }); } if (!eq(tFromJs("variant284"), "variant284")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 898, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 898, + 0 + ] + } + }); } if (!eq(tFromJs("variant285"), "variant285")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 899, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 899, + 0 + ] + } + }); } if (!eq(tFromJs("variant286"), "variant286")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 900, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 900, + 0 + ] + } + }); } if (!eq(tFromJs("variant287"), "variant287")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 901, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 901, + 0 + ] + } + }); } if (!eq(tFromJs("variant288"), "variant288")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 902, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 902, + 0 + ] + } + }); } if (!eq(tFromJs("variant289"), "variant289")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 903, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 903, + 0 + ] + } + }); } if (!eq(tFromJs("variant290"), "variant290")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 904, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 904, + 0 + ] + } + }); } if (!eq(tFromJs("variant291"), "variant291")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 905, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 905, + 0 + ] + } + }); } if (!eq(tFromJs("variant292"), "variant292")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 906, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 906, + 0 + ] + } + }); } if (!eq(tFromJs("variant293"), "variant293")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 907, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 907, + 0 + ] + } + }); } if (!eq(tFromJs("variant294"), "variant294")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 908, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 908, + 0 + ] + } + }); } if (!eq(tFromJs("variant295"), "variant295")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 909, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 909, + 0 + ] + } + }); } if (!eq(tFromJs("variant296"), "variant296")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 910, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 910, + 0 + ] + } + }); } if (!eq(tFromJs("variant297"), "variant297")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 911, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 911, + 0 + ] + } + }); } if (!eq(tFromJs("variant298"), "variant298")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 912, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 912, + 0 + ] + } + }); } if (!eq(tFromJs("variant299"), "variant299")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 913, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 913, + 0 + ] + } + }); } if (!eq(tFromJs("xx"), undefined)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "big_polyvar_test.res", - 914, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "big_polyvar_test.res", + 914, + 0 + ] + } + }); } exports.tToJs = tToJs; diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index 42127e7a76..00f3f1dda6 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -135,15 +135,15 @@ let v$1 = [ if (!Belt_Array.set(v$1, 0, 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_array_test.res", - 51, - 6 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_array_test.res", + 51, + 6 + ] + } + }); } b("File \"bs_array_test.res\", line 48, characters 4-11", Belt_Array.getExn(v$1, 0) === 0); @@ -155,15 +155,15 @@ let v$2 = [ if (!Belt_Array.set(v$2, 1, 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_array_test.res", - 59, - 6 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_array_test.res", + 59, + 6 + ] + } + }); } b("File \"bs_array_test.res\", line 56, characters 4-11", Belt_Array.getExn(v$2, 1) === 0); @@ -279,15 +279,15 @@ function addone(x) { function makeMatrixExn(sx, sy, init) { if (!(sx >= 0 && sy >= 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_array_test.res", - 116, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_array_test.res", + 116, + 2 + ] + } + }); } let res = new Array(sx); for (let x = 0; x < sx; ++x) { diff --git a/jscomp/test/bs_queue_test.js b/jscomp/test/bs_queue_test.js index 803b9790f7..cb4358d47e 100644 --- a/jscomp/test/bs_queue_test.js +++ b/jscomp/test/bs_queue_test.js @@ -44,28 +44,28 @@ let q = { if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), []) && q.length === 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 25, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 25, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 1), q)), [1]) && q.length === 1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 26, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 26, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 2), q)), [ @@ -73,15 +73,15 @@ if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 2), q)) 2 ]) && q.length === 2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 27, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 27, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 3), q)), [ @@ -90,15 +90,15 @@ if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 3), q)) 3 ]) && q.length === 3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 28, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 28, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 4), q)), [ @@ -108,28 +108,28 @@ if (!(Caml_obj.equal(Belt_MutableQueue.toArray((Belt_MutableQueue.add(q, 4), q)) 4 ]) && q.length === 4)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 29, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 29, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 30, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 30, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), [ @@ -138,28 +138,28 @@ if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), [ 4 ]) && q.length === 3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 31, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 31, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 32, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 32, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), [ @@ -167,80 +167,80 @@ if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), [ 4 ]) && q.length === 2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 33, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 33, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 34, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 34, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), [4]) && q.length === 1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 35, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 35, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q) !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 36, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 36, + 2 + ] + } + }); } if (!(Caml_obj.equal(Belt_MutableQueue.toArray(q), []) && q.length === 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 37, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 37, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.popExn, q)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 38, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 38, + 2 + ] + } + }); } let q$1 = { @@ -251,67 +251,67 @@ let q$1 = { if (Belt_MutableQueue.popExn((Belt_MutableQueue.add(q$1, 1), q$1)) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 43, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 43, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.popExn, q$1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 44, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 44, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn((Belt_MutableQueue.add(q$1, 2), q$1)) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 45, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 45, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.popExn, q$1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 46, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 46, + 2 + ] + } + }); } if (q$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 47, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 47, + 2 + ] + } + }); } let q$2 = { @@ -322,145 +322,145 @@ let q$2 = { if (Belt_MutableQueue.peekExn((Belt_MutableQueue.add(q$2, 1), q$2)) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 52, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 52, + 2 + ] + } + }); } if (Belt_MutableQueue.peekExn((Belt_MutableQueue.add(q$2, 2), q$2)) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 53, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 53, + 2 + ] + } + }); } if (Belt_MutableQueue.peekExn((Belt_MutableQueue.add(q$2, 3), q$2)) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 54, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 54, + 2 + ] + } + }); } if (Belt_MutableQueue.peekExn(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 55, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 55, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 56, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 56, + 2 + ] + } + }); } if (Belt_MutableQueue.peekExn(q$2) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 57, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 57, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q$2) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 58, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 58, + 2 + ] + } + }); } if (Belt_MutableQueue.peekExn(q$2) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 59, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 59, + 2 + ] + } + }); } if (Belt_MutableQueue.popExn(q$2) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 60, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 60, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.peekExn, q$2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 61, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 61, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.peekExn, q$2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 62, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 62, + 2 + ] + } + }); } let q$3 = { @@ -477,28 +477,28 @@ Belt_MutableQueue.clear(q$3); if (q$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 71, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 71, + 2 + ] + } + }); } if (!does_raise(Belt_MutableQueue.popExn, q$3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 72, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 72, + 2 + ] + } + }); } if (!Caml_obj.equal(q$3, { @@ -507,30 +507,30 @@ if (!Caml_obj.equal(q$3, { last: undefined })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 73, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 73, + 2 + ] + } + }); } Belt_MutableQueue.add(q$3, 42); if (Belt_MutableQueue.popExn(q$3) !== 42) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 75, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 75, + 2 + ] + } + }); } let q1 = { @@ -558,15 +558,15 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1), [ 10 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 84, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 84, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2), [ @@ -582,55 +582,55 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2), [ 10 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 85, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 85, + 2 + ] + } + }); } if (q1.length !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 86, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 86, + 2 + ] + } + }); } if (q2.length !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 87, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 87, + 2 + ] + } + }); } for (let i$2 = 1; i$2 <= 10; ++i$2) { if (Belt_MutableQueue.popExn(q1) !== i$2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 89, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 89, + 4 + ] + } + }); } } @@ -638,15 +638,15 @@ for (let i$2 = 1; i$2 <= 10; ++i$2) { for (let i$3 = 1; i$3 <= 10; ++i$3) { if (Belt_MutableQueue.popExn(q2) !== i$3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 92, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 92, + 4 + ] + } + }); } } @@ -659,42 +659,42 @@ let q$4 = { if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 98, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 98, + 2 + ] + } + }); } for (let i$4 = 1; i$4 <= 10; ++i$4) { Belt_MutableQueue.add(q$4, i$4); if (q$4.length !== i$4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 101, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 101, + 4 + ] + } + }); } if (q$4.length === 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 102, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 102, + 4 + ] + } + }); } } @@ -702,55 +702,55 @@ for (let i$4 = 1; i$4 <= 10; ++i$4) { for (let i$5 = 10; i$5 >= 1; --i$5) { if (q$4.length !== i$5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 105, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 105, + 4 + ] + } + }); } if (q$4.length === 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 106, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 106, + 4 + ] + } + }); } Belt_MutableQueue.popExn(q$4); } if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 109, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 109, + 2 + ] + } + }); } if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 110, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 110, + 2 + ] + } + }); } let q$5 = { @@ -770,15 +770,15 @@ let i$7 = { Belt_MutableQueue.forEach(q$5, (function (j) { if (i$7.contents !== j) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 120, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 120, + 4 + ] + } + }); } i$7.contents = i$7.contents + 1 | 0; })); @@ -797,108 +797,108 @@ let q2$1 = { if (q1$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 127, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 127, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$1), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 128, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 128, + 2 + ] + } + }); } if (q2$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 129, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 129, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$1), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 130, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 130, + 2 + ] + } + }); } Belt_MutableQueue.transfer(q1$1, q2$1); if (q1$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 132, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 132, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$1), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 133, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 133, + 2 + ] + } + }); } if (q2$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 134, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 134, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$1), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 135, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 135, + 2 + ] + } + }); } let q1$2 = { @@ -919,15 +919,15 @@ for (let i$8 = 1; i$8 <= 4; ++i$8) { if (q1$2.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 143, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 143, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$2), [ @@ -937,82 +937,82 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$2), [ 4 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 144, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 144, + 2 + ] + } + }); } if (q2$2.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 145, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 145, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$2), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 146, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 146, + 2 + ] + } + }); } Belt_MutableQueue.transfer(q1$2, q2$2); if (q1$2.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 148, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 148, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$2), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 149, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 149, + 2 + ] + } + }); } if (q2$2.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 150, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 150, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$2), [ @@ -1022,15 +1022,15 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$2), [ 4 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 151, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 151, + 2 + ] + } + }); } let q1$3 = { @@ -1051,41 +1051,41 @@ for (let i$9 = 5; i$9 <= 8; ++i$9) { if (q1$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 159, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 159, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$3), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 160, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 160, + 2 + ] + } + }); } if (q2$3.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 161, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 161, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$3), [ @@ -1095,56 +1095,56 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$3), [ 8 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 162, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 162, + 2 + ] + } + }); } Belt_MutableQueue.transfer(q1$3, q2$3); if (q1$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 164, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 164, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$3), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 165, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 165, + 2 + ] + } + }); } if (q2$3.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 166, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 166, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$3), [ @@ -1154,15 +1154,15 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$3), [ 8 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 167, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 167, + 2 + ] + } + }); } let q1$4 = { @@ -1187,15 +1187,15 @@ for (let i$11 = 5; i$11 <= 8; ++i$11) { if (q1$4.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 178, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 178, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$4), [ @@ -1205,28 +1205,28 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$4), [ 4 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 179, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 179, + 2 + ] + } + }); } if (q2$4.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 180, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 180, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$4), [ @@ -1236,43 +1236,43 @@ if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$4), [ 8 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 181, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 181, + 2 + ] + } + }); } Belt_MutableQueue.transfer(q1$4, q2$4); if (q1$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 183, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 183, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q1$4), [])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 184, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 184, + 2 + ] + } + }); } let v = [ @@ -1288,28 +1288,28 @@ let v = [ if (q2$4.length !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 186, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 186, + 2 + ] + } + }); } if (!Caml_obj.equal(Belt_MutableQueue.toArray(q2$4), v)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 187, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 187, + 2 + ] + } + }); } if (Belt_MutableQueue.reduce(q2$4, 0, (function (x, y) { @@ -1318,15 +1318,15 @@ if (Belt_MutableQueue.reduce(q2$4, 0, (function (x, y) { return x - y | 0; }))) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "bs_queue_test.res", - 189, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "bs_queue_test.res", + 189, + 2 + ] + } + }); } console.log("OK"); diff --git a/jscomp/test/chn_test.js b/jscomp/test/chn_test.js index 06f028068e..a3f98dfeb4 100644 --- a/jscomp/test/chn_test.js +++ b/jscomp/test/chn_test.js @@ -41,15 +41,15 @@ function convert(s) { return x$1; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "chn_test.res", - 17, - 14 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "chn_test.res", + 17, + 14 + ] + } + }); }))); } diff --git a/jscomp/test/const_defs_test.js b/jscomp/test/const_defs_test.js index 4c529ee379..2e2bb57544 100644 --- a/jscomp/test/const_defs_test.js +++ b/jscomp/test/const_defs_test.js @@ -6,11 +6,11 @@ let u = 3; function f() { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "hi" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "hi" + } + }); } exports.u = u; diff --git a/jscomp/test/custom_error_test.js b/jscomp/test/custom_error_test.js index 8384688a2c..0e19bcac08 100644 --- a/jscomp/test/custom_error_test.js +++ b/jscomp/test/custom_error_test.js @@ -15,8 +15,8 @@ function test_js_error() { return; } throw new Error(err.RE_EXN_ID, { - cause: err - }); + cause: err + }); } return e; } @@ -29,12 +29,12 @@ function test_js_error2() { if (e.RE_EXN_ID === Js_exn.$$Error) { console.log(e._1.stack); throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } } @@ -49,8 +49,8 @@ function example1() { return; } throw new Error(err.RE_EXN_ID, { - cause: err - }); + cause: err + }); } return v; } @@ -64,8 +64,8 @@ function example2() { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/defunctor_make_test.js b/jscomp/test/defunctor_make_test.js index 75b6eca17b..1e0ac446ce 100644 --- a/jscomp/test/defunctor_make_test.js +++ b/jscomp/test/defunctor_make_test.js @@ -45,11 +45,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l._3; let ld = l._2; @@ -62,11 +62,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -80,11 +80,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r._3; let rd = r._2; @@ -97,11 +97,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, compare, x_) { diff --git a/jscomp/test/demo_int_map.js b/jscomp/test/demo_int_map.js index d568453cd8..50052476dc 100644 --- a/jscomp/test/demo_int_map.js +++ b/jscomp/test/demo_int_map.js @@ -31,11 +31,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -48,11 +48,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -66,11 +66,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -83,11 +83,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, param) { @@ -141,10 +141,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = x - param.v | 0; if (c === 0) { diff --git a/jscomp/test/earger_curry_test.js b/jscomp/test/earger_curry_test.js index c135ad49fb..be5e5b3cb0 100644 --- a/jscomp/test/earger_curry_test.js +++ b/jscomp/test/earger_curry_test.js @@ -29,11 +29,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f$1(0)); for (let i = 1; i < l; ++i) { diff --git a/jscomp/test/equal_exception_test.js b/jscomp/test/equal_exception_test.js index f407bef1a2..263778a862 100644 --- a/jscomp/test/equal_exception_test.js +++ b/jscomp/test/equal_exception_test.js @@ -14,72 +14,72 @@ let v = "gso"; function is_equal() { if (Caml_bytes.get(Bytes.make(3, /* 'a' */97), 0) !== /* 'a' */97) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 4, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 4, + 2 + ] + } + }); } if (Bytes.make(3, /* 'a' */97)[0] !== /* 'a' */97) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 5, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 5, + 2 + ] + } + }); } let u = Bytes.make(3, /* 'a' */97); u[0] = /* 'b' */98; if (u[0] !== /* 'b' */98) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 8, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 8, + 2 + ] + } + }); } if (Caml_string.get(v, 0) === /* 'g' */103) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 9, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 9, + 2 + ] + } + }); } function is_exception() { try { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -91,8 +91,8 @@ function is_normal_exception(_x) { }; try { throw new Error(v.RE_EXN_ID, { - cause: v - }); + cause: v + }); } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === A) { @@ -100,12 +100,12 @@ function is_normal_exception(_x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -113,10 +113,10 @@ function is_arbitrary_exception() { let A = /* @__PURE__ */Caml_exceptions.create("A"); try { throw new Error(A, { - cause: { - RE_EXN_ID: A - } - }); + cause: { + RE_EXN_ID: A + } + }); } catch (exn) { return; } @@ -166,28 +166,28 @@ if (Caml_obj.equal(e, { RE_EXN_ID: Not_found }) !== false) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 50, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 50, + 0 + ] + } + }); } if (Not_found === "Not_found" !== false) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "equal_exception_test.res", - 51, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "equal_exception_test.res", + 51, + 0 + ] + } + }); } Mt.from_suites("exception", suites); diff --git a/jscomp/test/exception_raise_test.js b/jscomp/test/exception_raise_test.js index 6649be392e..70c918c055 100644 --- a/jscomp/test/exception_raise_test.js +++ b/jscomp/test/exception_raise_test.js @@ -95,15 +95,15 @@ try { a0 = x$3._1; } else { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "exception_raise_test.res", - 104, - 7 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "exception_raise_test.res", + 104, + 7 + ] + } + }); } } @@ -157,15 +157,15 @@ let suites = { }; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "exception_raise_test.res", - 127, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "exception_raise_test.res", + 127, + 15 + ] + } + }); }) ], tl: /* [] */0 @@ -190,10 +190,10 @@ try { try { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } catch (raw_e$3) { let e$1 = Caml_js_exceptions.internalToOCamlException(raw_e$3); eq("File \"exception_raise_test.res\", line 141, characters 10-17", Caml_js_exceptions.as_js_exn(e$1) !== undefined, false); diff --git a/jscomp/test/exception_rebound_err_test.js b/jscomp/test/exception_rebound_err_test.js index 294a4f07e4..403e7a2b7f 100644 --- a/jscomp/test/exception_rebound_err_test.js +++ b/jscomp/test/exception_rebound_err_test.js @@ -73,8 +73,8 @@ function f(g) { return 1; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/exception_value_test.js b/jscomp/test/exception_value_test.js index 83bab66c11..dee7400ffb 100644 --- a/jscomp/test/exception_value_test.js +++ b/jscomp/test/exception_value_test.js @@ -7,34 +7,34 @@ let Caml_js_exceptions = require("../../lib/js/caml_js_exceptions.js"); function f() { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function assert_f(x) { if (x <= 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "exception_value_test.res", - 4, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "exception_value_test.res", + 4, + 11 + ] + } + }); } return 3; } function hh() { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let A = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.A"); @@ -57,8 +57,8 @@ function test_not_found(f, param) { return 2; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -70,12 +70,12 @@ function test_js_error2() { if (e.RE_EXN_ID === Js_exn.$$Error) { console.log(e._1.stack); throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } } diff --git a/jscomp/test/ext_array_test.js b/jscomp/test/ext_array_test.js index 804f6bd4cb..d3793e0f0c 100644 --- a/jscomp/test/ext_array_test.js +++ b/jscomp/test/ext_array_test.js @@ -106,11 +106,11 @@ function filter_map(f, a) { function range(from, to_) { if (from > to_) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_array_test.range" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_array_test.range" + } + }); } return $$Array.init((to_ - from | 0) + 1 | 0, (function (i) { return i + from | 0; @@ -121,11 +121,11 @@ function map2i(f, a, b) { let len = a.length; if (len !== b.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_array_test.map2i" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_array_test.map2i" + } + }); } return $$Array.mapi((function (i, a) { return f(i, a, b[i]); diff --git a/jscomp/test/ext_bytes_test.js b/jscomp/test/ext_bytes_test.js index 4c27c9a57f..d011a861d0 100644 --- a/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/ext_bytes_test.js @@ -135,10 +135,10 @@ function starts_with(xs, prefix, p) { for (let i = 0; i < len2; ++i) { if (!p(Caml_bytes.get(xs, i), Caml_bytes.get(prefix, i))) { throw new Error(H, { - cause: { - RE_EXN_ID: H - } - }); + cause: { + RE_EXN_ID: H + } + }); } } @@ -149,8 +149,8 @@ function starts_with(xs, prefix, p) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/ext_filename_test.js b/jscomp/test/ext_filename_test.js index dd6afdb17b..e443d10358 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -64,15 +64,15 @@ function chop_extension(locOpt, name) { if (exn.RE_EXN_ID === "Invalid_argument") { let s = "Filename.chop_extension ( " + loc + " : " + name + " )"; throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -85,8 +85,8 @@ function chop_extension_if_any(fname) { return fname; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -147,11 +147,11 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { if (i >= len) { let s = "invalid path: " + file2; throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); } let curr_char = file2.codePointAt(i); if (!(curr_char === os_path_separator_char || curr_char === /* '.' */46)) { @@ -177,11 +177,11 @@ function find_root_filename(_cwd, filename) { } let s = filename + " not found from " + cwd; throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); }; } @@ -355,11 +355,11 @@ if (Sys.unix) { } else { let s = "Unknown OS : " + Sys.os_type; throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); } let $slash$slash = Filename.concat; diff --git a/jscomp/test/ext_list_test.js b/jscomp/test/ext_list_test.js index 85971fa2bc..34f7d88f78 100644 --- a/jscomp/test/ext_list_test.js +++ b/jscomp/test/ext_list_test.js @@ -204,21 +204,21 @@ function filter_map2(f, _xs, _ys) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.filter_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.filter_map2" + } + }); } if (!ys) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.filter_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.filter_map2" + } + }); }; } @@ -245,21 +245,21 @@ function filter_map2i(f, xs, ys) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.filter_map2i" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.filter_map2i" + } + }); } if (!ys) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.filter_map2i" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.filter_map2i" + } + }); }; }; return aux(0, xs, ys); @@ -297,19 +297,19 @@ function flat_map2(f, lx, ly) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.flat_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.flat_map2" + } + }); } if (ly$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.flat_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.flat_map2" + } + }); } return List.rev(acc); }; @@ -351,11 +351,11 @@ function map2_last(f, l1, l2) { } else { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2_last" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2_last" + } + }); } } if (l2) { @@ -366,21 +366,21 @@ function map2_last(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2_last" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2_last" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2_last" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2_last" + } + }); } function map_last(f, l1) { @@ -414,30 +414,30 @@ function fold_right2_last(f, l1, l2, accu) { } else { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } } if (l2) { return f(false, last1, l2.hd, fold_right2_last(f, l1$1, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -451,11 +451,11 @@ function take(n, l) { let arr_length = arr.length; if (arr_length < n) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.take" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.take" + } + }); } return [ $$Array.to_list($$Array.sub(arr, 0, n)), @@ -540,11 +540,11 @@ function exclude_tail(x) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.exclude_tail" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.exclude_tail" + } + }); }; } @@ -594,22 +594,22 @@ function drop(_n, _h) { let n = _n; if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.drop" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.drop" + } + }); } if (n === 0) { return h; } if (h === /* [] */0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.drop" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.drop" + } + }); } _h = List.tl(h); _n = n - 1 | 0; @@ -779,11 +779,11 @@ function reduce_from_right(fn, lst) { }), match.hd, match.tl); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.reduce" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.reduce" + } + }); } function reduce_from_left(fn, lst) { @@ -791,11 +791,11 @@ function reduce_from_left(fn, lst) { return List.fold_left(fn, lst.hd, lst.tl); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.reduce_from_left" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.reduce_from_left" + } + }); } function create_ref_empty() { @@ -810,11 +810,11 @@ function ref_top(x) { return match.hd; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.ref_top" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.ref_top" + } + }); } function ref_empty(x) { @@ -840,11 +840,11 @@ function ref_pop(refs) { return match.hd; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.ref_pop" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.ref_pop" + } + }); } function rev_except_last(xs) { @@ -870,11 +870,11 @@ function rev_except_last(xs) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.rev_except_last" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.rev_except_last" + } + }); }; } @@ -896,11 +896,11 @@ function last(_xs) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_list_test.last" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_list_test.last" + } + }); }; } @@ -919,15 +919,15 @@ function assoc_by_string(def, k, _lst) { return Caml_option.valFromOption(def); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ext_list_test.res", - 472, - 14 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ext_list_test.res", + 472, + 14 + ] + } + }); }; } @@ -946,15 +946,15 @@ function assoc_by_int(def, k, _lst) { return Caml_option.valFromOption(def); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ext_list_test.res", - 487, - 14 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ext_list_test.res", + 487, + 14 + ] + } + }); }; } diff --git a/jscomp/test/ext_pervasives_test.js b/jscomp/test/ext_pervasives_test.js index b5b80f5580..5527fdf735 100644 --- a/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/ext_pervasives_test.js @@ -12,8 +12,8 @@ function $$finally(v, action, f) { } catch (e$1) { action(v); throw new Error(e$1.RE_EXN_ID, { - cause: e$1 - }); + cause: e$1 + }); } action(v); return e; @@ -39,10 +39,10 @@ function is_pos_pow(n) { continue; } throw new Error(E, { - cause: { - RE_EXN_ID: E - } - }); + cause: { + RE_EXN_ID: E + } + }); }; } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -50,8 +50,8 @@ function is_pos_pow(n) { return -1; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -75,10 +75,10 @@ function is_pos_pow_2(n) { continue; } throw new Error(E, { - cause: { - RE_EXN_ID: E - } - }); + cause: { + RE_EXN_ID: E + } + }); }; } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -86,8 +86,8 @@ function is_pos_pow_2(n) { return -1; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/ext_string_test.js b/jscomp/test/ext_string_test.js index 912b1b7849..c73d6f37a0 100644 --- a/jscomp/test/ext_string_test.js +++ b/jscomp/test/ext_string_test.js @@ -218,11 +218,11 @@ function for_all_range(s, start, finish, p) { let len = s.length; if (start < 0 || finish >= len) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_string_test.for_all_range" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_string_test.for_all_range" + } + }); } return unsafe_for_all_range(s, start, finish, p); } @@ -274,10 +274,10 @@ function find(startOpt, sub, s) { while ((i + n | 0) <= s_len) { if (unsafe_is_sub(sub, 0, s, i, n)) { throw new Error(Local_exit, { - cause: { - RE_EXN_ID: Local_exit - } - }); + cause: { + RE_EXN_ID: Local_exit + } + }); } i = i + 1 | 0; }; @@ -288,8 +288,8 @@ function find(startOpt, sub, s) { return i; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -301,11 +301,11 @@ function non_overlap_count(sub, s) { let sub_len = sub.length; if (sub.length === 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_string_test.non_overlap_count" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_string_test.non_overlap_count" + } + }); } let _acc = 0; let _off = 0; @@ -329,10 +329,10 @@ function rfind(sub, s) { while (i >= 0) { if (unsafe_is_sub(sub, 0, s, i, n)) { throw new Error(Local_exit, { - cause: { - RE_EXN_ID: Local_exit - } - }); + cause: { + RE_EXN_ID: Local_exit + } + }); } i = i - 1 | 0; }; @@ -343,8 +343,8 @@ function rfind(sub, s) { return i; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -355,11 +355,11 @@ function tail_from(s, x) { } let s$1 = "Ext_string_test.tail_from " + (s + (" : " + String(x))); throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s$1 - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s$1 + } + }); } function digits_of_str(s, offset, x) { @@ -553,11 +553,11 @@ function no_char(x, ch, i, len) { let str_len = x.length; if (i < 0 || i >= str_len || len >= str_len) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Ext_string_test.no_char" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Ext_string_test.no_char" + } + }); } return unsafe_no_char(x, ch, i, len); } diff --git a/jscomp/test/extensible_variant_test.js b/jscomp/test/extensible_variant_test.js index a8bfbe5080..dbebc62d58 100644 --- a/jscomp/test/extensible_variant_test.js +++ b/jscomp/test/extensible_variant_test.js @@ -25,15 +25,15 @@ function to_int(x) { return x._2; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "extensible_variant_test.res", - 16, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "extensible_variant_test.res", + 16, + 9 + ] + } + }); } let suites_0 = [ diff --git a/jscomp/test/flexible_array_test.js b/jscomp/test/flexible_array_test.js index d2111f2450..8ce92b71c2 100644 --- a/jscomp/test/flexible_array_test.js +++ b/jscomp/test/flexible_array_test.js @@ -11,10 +11,10 @@ function sub(_tr, _k) { let tr = _tr; if (typeof tr !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (k === 1) { return tr._0; @@ -41,10 +41,10 @@ function update(tr, k, w) { }; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = tr._2; let l = tr._1; @@ -77,10 +77,10 @@ function update(tr, k, w) { function $$delete(tr, n) { if (typeof tr !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (n === 1) { return "Lf"; @@ -126,10 +126,10 @@ function loext(tr, w) { function lorem(tr) { if (typeof tr !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = tr._1; if (typeof l === "object") { @@ -145,15 +145,15 @@ function lorem(tr) { return "Lf"; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "flexible_array_test.res", - 80, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "flexible_array_test.res", + 80, + 9 + ] + } + }); } let empty = [ @@ -170,11 +170,11 @@ function get(param, i) { return sub(param[0], i + 1 | 0); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.get" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.get" + } + }); } function set(param, i, v) { @@ -186,11 +186,11 @@ function set(param, i, v) { ]; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.set" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.set" + } + }); } function push_front(param, v) { @@ -209,11 +209,11 @@ function pop_front(param) { ]; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.pop_front" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.pop_front" + } + }); } function push_back(param, v) { @@ -233,11 +233,11 @@ function pop_back(param) { ]; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.pop_back" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.pop_back" + } + }); } function filter_from(i, p, s) { @@ -324,15 +324,15 @@ if (!$eq$tilde(sort(u), [ 6 ])) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "flexible_array_test.res", - 184, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "flexible_array_test.res", + 184, + 2 + ] + } + }); } let v = $$Array.init(500, (function (i) { diff --git a/jscomp/test/format_regression.js b/jscomp/test/format_regression.js index 096e497d05..c89043c8cd 100644 --- a/jscomp/test/format_regression.js +++ b/jscomp/test/format_regression.js @@ -4,54 +4,54 @@ function peek_queue(param) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "format_regression.res", - 10, - 22 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "format_regression.res", + 10, + 22 + ] + } + }); } function int_of_size(param) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "format_regression.res", - 11, - 23 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "format_regression.res", + 11, + 23 + ] + } + }); } function take_queue(param) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "format_regression.res", - 12, - 22 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "format_regression.res", + 12, + 22 + ] + } + }); } function format_pp_token(param, param$1, param$2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "format_regression.res", - 13, - 35 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "format_regression.res", + 13, + 35 + ] + } + }); } function advance_loop(state) { diff --git a/jscomp/test/fun_pattern_match.js b/jscomp/test/fun_pattern_match.js index a7f1adbd17..e2cab8232f 100644 --- a/jscomp/test/fun_pattern_match.js +++ b/jscomp/test/fun_pattern_match.js @@ -23,15 +23,15 @@ function f3(param, param$1) { rhs === "Uninitialized"; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "fun_pattern_match.res", - 33, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "fun_pattern_match.res", + 33, + 9 + ] + } + }); } function f4(param, param$1) { @@ -46,15 +46,15 @@ function f4(param, param$1) { rhs === "Uninitialized"; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "fun_pattern_match.res", - 39, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "fun_pattern_match.res", + 39, + 9 + ] + } + }); } let x = { diff --git a/jscomp/test/genlex_test.js b/jscomp/test/genlex_test.js index 846f6c00a4..0638104f8c 100644 --- a/jscomp/test/genlex_test.js +++ b/jscomp/test/genlex_test.js @@ -46,8 +46,8 @@ function to_list(s) { return List.rev(acc); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } _acc = { hd: v, diff --git a/jscomp/test/gpr_1150.js b/jscomp/test/gpr_1150.js index 82b56b2d74..d8286103da 100644 --- a/jscomp/test/gpr_1150.js +++ b/jscomp/test/gpr_1150.js @@ -216,15 +216,15 @@ function f(children) { } if (children$15.tl) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_1150.res", - 100, - 62 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_1150.res", + 100, + 62 + ] + } + }); } return [ a0, diff --git a/jscomp/test/gpr_1245_test.js b/jscomp/test/gpr_1245_test.js index 8cfe9e268a..e1e0e9044b 100644 --- a/jscomp/test/gpr_1245_test.js +++ b/jscomp/test/gpr_1245_test.js @@ -47,8 +47,8 @@ function a1(f) { return 1; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/gpr_1698_test.js b/jscomp/test/gpr_1698_test.js index 8c752ad228..70186a2079 100644 --- a/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/gpr_1698_test.js @@ -49,15 +49,15 @@ function compare(context, state, _a, _b) { break; case "Frac" : throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_1698_test.res", - 41, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_1698_test.res", + 41, + 9 + ] + } + }); case "Pow" : case "Gcd" : exit = 1; @@ -75,15 +75,15 @@ function compare(context, state, _a, _b) { switch (b.TAG) { case "Val" : throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_1698_test.res", - 41, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_1698_test.res", + 41, + 9 + ] + } + }); case "Neg" : exit$3 = 5; break; diff --git a/jscomp/test/gpr_1701_test.js b/jscomp/test/gpr_1701_test.js index e5b7c3048a..81226bbfca 100644 --- a/jscomp/test/gpr_1701_test.js +++ b/jscomp/test/gpr_1701_test.js @@ -10,10 +10,10 @@ let Foo = /* @__PURE__ */Caml_exceptions.create("Gpr_1701_test.Foo"); function test(n) { if (n === 0) { throw new Error(Foo, { - cause: { - RE_EXN_ID: Foo - } - }); + cause: { + RE_EXN_ID: Foo + } + }); } try { return test(n - 1 | 0); @@ -23,8 +23,8 @@ function test(n) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -43,8 +43,8 @@ function read_lines(inc) { l = undefined; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } if (l === undefined) { @@ -71,8 +71,8 @@ function read_lines2(inc) { return List.rev(acc); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } _acc = { hd: l, @@ -96,8 +96,8 @@ function read_lines3(inc) { return List.rev(acc); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; return loop(/* [] */0); diff --git a/jscomp/test/gpr_2316_test.js b/jscomp/test/gpr_2316_test.js index a4d0e0658b..9740acfc1a 100644 --- a/jscomp/test/gpr_2316_test.js +++ b/jscomp/test/gpr_2316_test.js @@ -33,19 +33,19 @@ let y; try { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "boo" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "boo" + } + }); } catch (raw_msg) { let msg = Caml_js_exceptions.internalToOCamlException(raw_msg); if (msg.RE_EXN_ID === "Failure") { y = msg._1; } else { throw new Error(msg.RE_EXN_ID, { - cause: msg - }); + cause: msg + }); } } @@ -55,19 +55,19 @@ let exit = 0; try { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "boo" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "boo" + } + }); } catch (raw_msg$1) { let msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg$1); if (msg$1.RE_EXN_ID === "Failure") { x = msg$1._1; } else { throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } diff --git a/jscomp/test/gpr_2682_test.js b/jscomp/test/gpr_2682_test.js index c7fceff492..9cad19d945 100644 --- a/jscomp/test/gpr_2682_test.js +++ b/jscomp/test/gpr_2682_test.js @@ -47,15 +47,15 @@ let bbbb = f3(); if (!bbbb) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_2682_test.res", - 52, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_2682_test.res", + 52, + 0 + ] + } + }); } exports.sum = sum; diff --git a/jscomp/test/gpr_3877_test.js b/jscomp/test/gpr_3877_test.js index ee26bf3c5e..2e8759406b 100644 --- a/jscomp/test/gpr_3877_test.js +++ b/jscomp/test/gpr_3877_test.js @@ -22,28 +22,28 @@ let b = "bad response"; if (a !== "good response") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_3877_test.res", - 26, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_3877_test.res", + 26, + 0 + ] + } + }); } if (b !== "bad response") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_3877_test.res", - 27, - 0 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_3877_test.res", + 27, + 0 + ] + } + }); } exports.test = test; diff --git a/jscomp/test/gpr_3980_test.js b/jscomp/test/gpr_3980_test.js index b0de4b2bef..3509224e47 100644 --- a/jscomp/test/gpr_3980_test.js +++ b/jscomp/test/gpr_3980_test.js @@ -8,44 +8,44 @@ let match = 1; if (match !== undefined) { if (match !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_3980_test.res", - 15, - 7 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_3980_test.res", + 15, + 7 + ] + } + }); } let match$1 = 1; if (match$1 !== 1) { if (match$1 !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_3980_test.res", - 13, - 9 - ] - } - }); - } - Js_math.floor(1); - } - -} else { - throw new Error("Assert_failure", { cause: { RE_EXN_ID: "Assert_failure", _1: [ "gpr_3980_test.res", - 15, - 7 + 13, + 9 ] } }); + } + Js_math.floor(1); + } + +} else { + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_3980_test.res", + 15, + 7 + ] + } + }); } /* Not a pure module */ diff --git a/jscomp/test/gpr_405_test.js b/jscomp/test/gpr_405_test.js index a35295c8e8..fc7a5c6494 100644 --- a/jscomp/test/gpr_405_test.js +++ b/jscomp/test/gpr_405_test.js @@ -20,8 +20,8 @@ function Make(funarg) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; let min_cutset = function (gr, first_node) { @@ -38,27 +38,27 @@ function Make(funarg) { let step2 = function (top, rest_of_stack) { if (find_default(already_processed, top)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_405_test.res", - 40, - 6 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_405_test.res", + 40, + 6 + ] + } + }); } if (find_default(on_the_stack, top)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_405_test.res", - 41, - 6 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_405_test.res", + 41, + 6 + ] + } + }); } H.add(on_the_stack, top, true); H.add(n_labels, top, counter.contents); @@ -97,11 +97,11 @@ function Make(funarg) { } if (H.find(l_labels, top$1) > H.find(n_labels, top$1)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Graph.Mincut: graph not reducible" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Graph.Mincut: graph not reducible" + } + }); } if (!rest_of_stack$1) { return cut_set.contents; diff --git a/jscomp/test/gpr_4632.js b/jscomp/test/gpr_4632.js index 070edd1752..ec0408651d 100644 --- a/jscomp/test/gpr_4632.js +++ b/jscomp/test/gpr_4632.js @@ -22,15 +22,15 @@ let T0 = { }; throw new Error("Match_failure", { - cause: { - RE_EXN_ID: "Match_failure", - _1: [ - "gpr_4632.res", - 12, - 6 - ] - } - }); + cause: { + RE_EXN_ID: "Match_failure", + _1: [ + "gpr_4632.res", + 12, + 6 + ] + } +}); exports.T0 = T0; exports.T1 = T1; diff --git a/jscomp/test/gpr_5557.js b/jscomp/test/gpr_5557.js index 550804df76..0ca3201b67 100644 --- a/jscomp/test/gpr_5557.js +++ b/jscomp/test/gpr_5557.js @@ -7,15 +7,15 @@ function isA(c) { return true; } throw new Error("Match_failure", { - cause: { - RE_EXN_ID: "Match_failure", - _1: [ - "gpr_5557.res", - 5, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Match_failure", + _1: [ + "gpr_5557.res", + 5, + 2 + ] + } + }); } let h = /* 'a' */97; diff --git a/jscomp/test/gpr_858_unit2_test.js b/jscomp/test/gpr_858_unit2_test.js index 83f91cc71e..ce8f9934ef 100644 --- a/jscomp/test/gpr_858_unit2_test.js +++ b/jscomp/test/gpr_858_unit2_test.js @@ -22,15 +22,15 @@ for (let i = 1; i <= 2; ++i) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_858_unit2_test.res", - 6, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_858_unit2_test.res", + 6, + 13 + ] + } + }); }; f(0, i); } diff --git a/jscomp/test/gpr_974_test.js b/jscomp/test/gpr_974_test.js index ad28504aef..0c7ede290d 100644 --- a/jscomp/test/gpr_974_test.js +++ b/jscomp/test/gpr_974_test.js @@ -6,41 +6,41 @@ let Caml_option = require("../../lib/js/caml_option.js"); if (!Caml_obj.equal(Caml_option.nullable_to_opt(""), "")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_974_test.res", - 2, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_974_test.res", + 2, + 2 + ] + } + }); } if (!Caml_obj.equal(Caml_option.undefined_to_opt(""), "")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_974_test.res", - 3, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_974_test.res", + 3, + 2 + ] + } + }); } if (!Caml_obj.equal(Caml_option.null_to_opt(""), "")) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "gpr_974_test.res", - 4, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "gpr_974_test.res", + 4, + 2 + ] + } + }); } /* Not a pure module */ diff --git a/jscomp/test/inline_map2_test.js b/jscomp/test/inline_map2_test.js index 8286460ecb..8acb03a28d 100644 --- a/jscomp/test/inline_map2_test.js +++ b/jscomp/test/inline_map2_test.js @@ -44,11 +44,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l._3; let ld = l._2; @@ -61,11 +61,11 @@ function Make(Ord) { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -79,11 +79,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r._3; let rd = r._2; @@ -96,11 +96,11 @@ function Make(Ord) { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (x) { if (typeof x !== "object") { @@ -145,10 +145,10 @@ function Make(Ord) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Ord.compare(x, x_._1); if (c === 0) { @@ -177,10 +177,10 @@ function Make(Ord) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -198,10 +198,10 @@ function Make(Ord) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = x._3; if (typeof r !== "object") { @@ -217,11 +217,11 @@ function Make(Ord) { let remove_min_binding = function (x) { if (typeof x !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -442,15 +442,15 @@ function Make(Ord) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map2_test.res", - 359, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map2_test.res", + 359, + 11 + ] + } + }); } let v2 = s2._1; let match$1 = split(v2, s1); @@ -680,11 +680,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l._3; let ld = l._2; @@ -697,11 +697,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -715,11 +715,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r._3; let rd = r._2; @@ -732,11 +732,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty(x) { @@ -784,10 +784,10 @@ function find(x, _x_) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, x_._1); if (c === 0) { @@ -818,10 +818,10 @@ function min_binding(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -840,10 +840,10 @@ function max_binding(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = x._3; if (typeof r !== "object") { @@ -860,11 +860,11 @@ function max_binding(_x) { function remove_min_binding(x) { if (typeof x !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -1099,15 +1099,15 @@ function merge(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map2_test.res", - 359, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map2_test.res", + 359, + 11 + ] + } + }); } let v2 = s2._1; let match$1 = split(v2, s1); @@ -1373,11 +1373,11 @@ function bal$1(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l._3; let ld = l._2; @@ -1390,11 +1390,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(ll, lv, ld, lr._0), lr._1, lr._2, create$1(lr._3, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -1408,11 +1408,11 @@ function bal$1(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r._3; let rd = r._2; @@ -1425,11 +1425,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(l, x, d, rl._0), rl._1, rl._2, create$1(rl._3, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty$1(x) { @@ -1477,10 +1477,10 @@ function find$1(x, _x_) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.string_compare(x, x_._1); if (c === 0) { @@ -1511,10 +1511,10 @@ function min_binding$1(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -1533,10 +1533,10 @@ function max_binding$1(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = x._3; if (typeof r !== "object") { @@ -1553,11 +1553,11 @@ function max_binding$1(_x) { function remove_min_binding$1(x) { if (typeof x !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -1792,15 +1792,15 @@ function merge$1(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map2_test.res", - 359, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map2_test.res", + 359, + 11 + ] + } + }); } let v2 = s2._1; let match$1 = split$1(v2, s1); diff --git a/jscomp/test/inline_map_demo.js b/jscomp/test/inline_map_demo.js index d844a10d46..842d8a800a 100644 --- a/jscomp/test/inline_map_demo.js +++ b/jscomp/test/inline_map_demo.js @@ -34,15 +34,15 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map_demo.res", - 41, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map_demo.res", + 41, + 15 + ] + } + }); } let lr = l._3; let ld = l._2; @@ -55,15 +55,15 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map_demo.res", - 47, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map_demo.res", + 47, + 19 + ] + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -77,15 +77,15 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map_demo.res", - 55, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map_demo.res", + 55, + 15 + ] + } + }); } let rr = r._3; let rd = r._2; @@ -98,15 +98,15 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_map_demo.res", - 61, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_map_demo.res", + 61, + 19 + ] + } + }); } function add(x, data, tree) { @@ -174,10 +174,10 @@ function find(px, _x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(px, x._1); if (c === 0) { diff --git a/jscomp/test/inline_map_test.js b/jscomp/test/inline_map_test.js index ec35b49114..1a2655903f 100644 --- a/jscomp/test/inline_map_test.js +++ b/jscomp/test/inline_map_test.js @@ -34,11 +34,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l._3; let ld = l._2; @@ -51,11 +51,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -69,11 +69,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r._3; let rd = r._2; @@ -86,11 +86,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, x_) { @@ -130,10 +130,10 @@ function find(x, _x_) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, x_._1); if (c === 0) { diff --git a/jscomp/test/inline_record_test.js b/jscomp/test/inline_record_test.js index f45c9b7538..28e795d78f 100644 --- a/jscomp/test/inline_record_test.js +++ b/jscomp/test/inline_record_test.js @@ -68,15 +68,15 @@ if (A0 === A0) { tmp = 3; } else { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_record_test.res", - 47, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_record_test.res", + 47, + 9 + ] + } + }); } eq("File \"inline_record_test.res\", line 44, characters 2-9", tmp, 3); @@ -112,15 +112,15 @@ if (v4.TAG === "A0") { tmp$1 = v4.x; } else { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_record_test.res", - 74, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_record_test.res", + 74, + 9 + ] + } + }); } eq("File \"inline_record_test.res\", line 71, characters 2-9", tmp$1, 11); @@ -129,15 +129,15 @@ let tmp$2; if (v5.TAG === "A0") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_record_test.res", - 83, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_record_test.res", + 83, + 9 + ] + } + }); } tmp$2 = v5.z; @@ -172,15 +172,15 @@ if (v6.RE_EXN_ID === A4) { tmp$3 = v6.x; } else { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "inline_record_test.res", - 108, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "inline_record_test.res", + 108, + 9 + ] + } + }); } eq("File \"inline_record_test.res\", line 105, characters 2-9", tmp$3, 11); diff --git a/jscomp/test/int64_string_test.js b/jscomp/test/int64_string_test.js index 0e3c3c116f..2d59d31d7d 100644 --- a/jscomp/test/int64_string_test.js +++ b/jscomp/test/int64_string_test.js @@ -1308,20 +1308,6 @@ Belt_List.forEach(random_data, (function (u) { if (u) { if (u.tl) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "int64_string_test.res", - 191, - 9 - ] - } - }); - } - let match = u.hd; - return eq("File \"int64_string_test.res\", line 190, characters 25-32", Caml_int64.to_string(match[0]), match[1]); - } - throw new Error("Assert_failure", { cause: { RE_EXN_ID: "Assert_failure", _1: [ @@ -1331,6 +1317,20 @@ Belt_List.forEach(random_data, (function (u) { ] } }); + } + let match = u.hd; + return eq("File \"int64_string_test.res\", line 190, characters 25-32", Caml_int64.to_string(match[0]), match[1]); + } + throw new Error("Assert_failure", { + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "int64_string_test.res", + 191, + 9 + ] + } + }); })); eq("File \"int64_string_test.res\", line 195, characters 3-10", Caml_int64.to_string([ diff --git a/jscomp/test/int_map.js b/jscomp/test/int_map.js index ea5cd7ac7c..25b7da89be 100644 --- a/jscomp/test/int_map.js +++ b/jscomp/test/int_map.js @@ -44,11 +44,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -61,11 +61,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -79,11 +79,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -96,11 +96,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty(param) { @@ -162,10 +162,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, param.v); if (c === 0) { @@ -181,10 +181,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -259,10 +259,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -367,10 +367,10 @@ function min_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -407,10 +407,10 @@ function max_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -445,11 +445,11 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -754,15 +754,15 @@ function merge$1(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/jscomp/test/internal_unused_test.js b/jscomp/test/internal_unused_test.js index 968d42b9ce..006038bf8a 100644 --- a/jscomp/test/internal_unused_test.js +++ b/jscomp/test/internal_unused_test.js @@ -9,10 +9,10 @@ let A = /* @__PURE__ */Caml_exceptions.create("Internal_unused_test.P1.A"); function f() { throw new Error(A, { - cause: { - RE_EXN_ID: A - } - }); + cause: { + RE_EXN_ID: A + } + }); } let c = 5; diff --git a/jscomp/test/js_exception_catch_test.js b/jscomp/test/js_exception_catch_test.js index 085b7bd651..4f0fa303d2 100644 --- a/jscomp/test/js_exception_catch_test.js +++ b/jscomp/test/js_exception_catch_test.js @@ -72,8 +72,8 @@ try { })); } else { throw new Error(x.RE_EXN_ID, { - cause: x - }); + cause: x + }); } } @@ -134,89 +134,89 @@ eq("File \"js_exception_catch_test.res\", line 44, characters 5-12", test(functi eq("File \"js_exception_catch_test.res\", line 45, characters 5-12", test(function () { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }), "Not_found"); eq("File \"js_exception_catch_test.res\", line 46, characters 5-12", test(function () { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "x" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "x" + } + }); }), "Invalid_argument"); eq("File \"js_exception_catch_test.res\", line 47, characters 5-12", test(function () { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "" + } + }); }), "Invalid_any"); eq("File \"js_exception_catch_test.res\", line 48, characters 5-12", test(function () { throw new Error(A, { - cause: { - RE_EXN_ID: A, - _1: 2 - } - }); + cause: { + RE_EXN_ID: A, + _1: 2 + } + }); }), "A2"); eq("File \"js_exception_catch_test.res\", line 49, characters 5-12", test(function () { throw new Error(A, { - cause: { - RE_EXN_ID: A, - _1: 3 - } - }); + cause: { + RE_EXN_ID: A, + _1: 3 + } + }); }), "A_any"); eq("File \"js_exception_catch_test.res\", line 50, characters 5-12", test(function () { throw new Error(B, { - cause: { - RE_EXN_ID: B - } - }); + cause: { + RE_EXN_ID: B + } + }); }), "B"); eq("File \"js_exception_catch_test.res\", line 51, characters 5-12", test(function () { throw new Error(C, { - cause: { - RE_EXN_ID: C, - _1: 1, - _2: 2 - } - }); + cause: { + RE_EXN_ID: C, + _1: 1, + _2: 2 + } + }); }), "C"); eq("File \"js_exception_catch_test.res\", line 52, characters 5-12", test(function () { throw new Error(C, { - cause: { - RE_EXN_ID: C, - _1: 0, - _2: 2 - } - }); + cause: { + RE_EXN_ID: C, + _1: 0, + _2: 2 + } + }); }), "C_any"); eq("File \"js_exception_catch_test.res\", line 53, characters 5-12", test(function () { throw new Error(new Error("x").RE_EXN_ID, { - cause: new Error("x") - }); + cause: new Error("x") + }); }), "Js_error"); eq("File \"js_exception_catch_test.res\", line 54, characters 5-12", test(function () { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "x" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "x" + } + }); }), "Any"); Mt.from_pair_suites("Js_exception_catch_test", suites.contents); diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 35600fd938..98d00e1596 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -98,29 +98,29 @@ add_test("File \"js_json_test.res\", line 22, characters 11-18", (function () { let ty3 = Js_json.classify(x); if (typeof ty3 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "js_json_test.res", - 37, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "js_json_test.res", + 37, + 19 + ] + } + }); } if (ty3.TAG === "JSONNumber") { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "js_json_test.res", - 37, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "js_json_test.res", + 37, + 19 + ] + } + }); }); return { TAG: "Ok", @@ -260,15 +260,15 @@ function option_get(x) { return Caml_option.valFromOption(x); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "js_json_test.res", - 111, - 12 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "js_json_test.res", + 111, + 12 + ] + } + }); } let dict = {}; diff --git a/jscomp/test/lazy_test.js b/jscomp/test/lazy_test.js index 217632df99..7d56dbcdeb 100644 --- a/jscomp/test/lazy_test.js +++ b/jscomp/test/lazy_test.js @@ -61,19 +61,19 @@ let f006 = CamlinternalLazy.from_fun(function () { let f007 = CamlinternalLazy.from_fun(function () { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }); function f$1() { console.log("hi"); throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let f008 = CamlinternalLazy.from_fun(function () { @@ -217,10 +217,10 @@ Mt.from_pair_suites("Lazy_test", { TAG: "Ok", _0: !Lazy.is_val(CamlinternalLazy.from_fun(function () { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); })) }; }) diff --git a/jscomp/test/libqueue_test.js b/jscomp/test/libqueue_test.js index edc4076796..d3db327772 100644 --- a/jscomp/test/libqueue_test.js +++ b/jscomp/test/libqueue_test.js @@ -44,8 +44,8 @@ function does_raise(f, q) { return true; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -57,15 +57,15 @@ let q = { if (!(to_list(q) === /* [] */0 && q.length === 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 30, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 30, + 2 + ] + } + }); } Queue.add(1, q); @@ -75,15 +75,15 @@ if (!(Caml_obj.equal(to_list(q), { tl: /* [] */0 }) && q.length === 1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 32, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 32, + 2 + ] + } + }); } Queue.add(2, q); @@ -96,15 +96,15 @@ if (!(Caml_obj.equal(to_list(q), { } }) && q.length === 2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 34, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 34, + 2 + ] + } + }); } Queue.add(3, q); @@ -120,15 +120,15 @@ if (!(Caml_obj.equal(to_list(q), { } }) && q.length === 3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 36, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 36, + 2 + ] + } + }); } Queue.add(4, q); @@ -147,28 +147,28 @@ if (!(Caml_obj.equal(to_list(q), { } }) && q.length === 4)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 38, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 38, + 2 + ] + } + }); } if (Queue.take(q) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 39, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 39, + 2 + ] + } + }); } if (!(Caml_obj.equal(to_list(q), { @@ -182,28 +182,28 @@ if (!(Caml_obj.equal(to_list(q), { } }) && q.length === 3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 40, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 40, + 2 + ] + } + }); } if (Queue.take(q) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 41, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 41, + 2 + ] + } + }); } if (!(Caml_obj.equal(to_list(q), { @@ -214,28 +214,28 @@ if (!(Caml_obj.equal(to_list(q), { } }) && q.length === 2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 42, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 42, + 2 + ] + } + }); } if (Queue.take(q) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 43, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 43, + 2 + ] + } + }); } if (!(Caml_obj.equal(to_list(q), { @@ -243,54 +243,54 @@ if (!(Caml_obj.equal(to_list(q), { tl: /* [] */0 }) && q.length === 1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 44, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 44, + 2 + ] + } + }); } if (Queue.take(q) !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 45, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 45, + 2 + ] + } + }); } if (!(to_list(q) === /* [] */0 && q.length === 0)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 46, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 46, + 2 + ] + } + }); } if (!does_raise(Queue.take, q)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 47, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 47, + 2 + ] + } + }); } let q$1 = { @@ -303,69 +303,69 @@ Queue.add(1, q$1); if (Queue.take(q$1) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 53, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 53, + 2 + ] + } + }); } if (!does_raise(Queue.take, q$1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 54, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 54, + 2 + ] + } + }); } Queue.add(2, q$1); if (Queue.take(q$1) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 56, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 56, + 2 + ] + } + }); } if (!does_raise(Queue.take, q$1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 57, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 57, + 2 + ] + } + }); } if (q$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 58, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 58, + 2 + ] + } + }); } let q$2 = { @@ -378,149 +378,149 @@ Queue.add(1, q$2); if (Queue.peek(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 64, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 64, + 2 + ] + } + }); } Queue.add(2, q$2); if (Queue.peek(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 66, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 66, + 2 + ] + } + }); } Queue.add(3, q$2); if (Queue.peek(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 68, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 68, + 2 + ] + } + }); } if (Queue.peek(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 69, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 69, + 2 + ] + } + }); } if (Queue.take(q$2) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 70, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 70, + 2 + ] + } + }); } if (Queue.peek(q$2) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 71, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 71, + 2 + ] + } + }); } if (Queue.take(q$2) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 72, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 72, + 2 + ] + } + }); } if (Queue.peek(q$2) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 73, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 73, + 2 + ] + } + }); } if (Queue.take(q$2) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 74, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 74, + 2 + ] + } + }); } if (!does_raise(Queue.peek, q$2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 75, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 75, + 2 + ] + } + }); } if (!does_raise(Queue.peek, q$2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 76, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 76, + 2 + ] + } + }); } let q$3 = { @@ -537,28 +537,28 @@ Queue.clear(q$3); if (q$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 85, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 85, + 2 + ] + } + }); } if (!does_raise(Queue.take, q$3)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 86, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 86, + 2 + ] + } + }); } if (!Caml_obj.equal(q$3, { @@ -567,30 +567,30 @@ if (!Caml_obj.equal(q$3, { last: "Nil" })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 87, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 87, + 2 + ] + } + }); } Queue.add(42, q$3); if (Queue.take(q$3) !== 42) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 89, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 89, + 2 + ] + } + }); } let q1 = { @@ -637,15 +637,15 @@ if (!Caml_obj.equal(to_list(q1), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 98, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 98, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2), { @@ -680,55 +680,55 @@ if (!Caml_obj.equal(to_list(q2), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 99, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 99, + 2 + ] + } + }); } if (q1.length !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 100, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 100, + 2 + ] + } + }); } if (q2.length !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 101, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 101, + 2 + ] + } + }); } for (let i$2 = 1; i$2 <= 10; ++i$2) { if (Queue.take(q1) !== i$2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 103, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 103, + 4 + ] + } + }); } } @@ -736,15 +736,15 @@ for (let i$2 = 1; i$2 <= 10; ++i$2) { for (let i$3 = 1; i$3 <= 10; ++i$3) { if (Queue.take(q2) !== i$3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 106, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 106, + 4 + ] + } + }); } } @@ -757,42 +757,42 @@ let q$4 = { if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 112, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 112, + 2 + ] + } + }); } for (let i$4 = 1; i$4 <= 10; ++i$4) { Queue.add(i$4, q$4); if (q$4.length !== i$4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 115, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 115, + 4 + ] + } + }); } if (q$4.length === 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 116, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 116, + 4 + ] + } + }); } } @@ -800,55 +800,55 @@ for (let i$4 = 1; i$4 <= 10; ++i$4) { for (let i$5 = 10; i$5 >= 1; --i$5) { if (q$4.length !== i$5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 119, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 119, + 4 + ] + } + }); } if (q$4.length === 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 120, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 120, + 4 + ] + } + }); } Queue.take(q$4); } if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 123, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 123, + 2 + ] + } + }); } if (q$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 124, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 124, + 2 + ] + } + }); } let q$5 = { @@ -868,15 +868,15 @@ let i$7 = { Queue.iter((function (j) { if (i$7.contents !== j) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 134, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 134, + 4 + ] + } + }); } i$7.contents = i$7.contents + 1 | 0; }), q$5); @@ -895,108 +895,108 @@ let q2$1 = { if (q1$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 141, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 141, + 2 + ] + } + }); } if (to_list(q1$1) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 142, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 142, + 2 + ] + } + }); } if (q2$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 143, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 143, + 2 + ] + } + }); } if (to_list(q2$1) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 144, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 144, + 2 + ] + } + }); } Queue.transfer(q1$1, q2$1); if (q1$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 146, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 146, + 2 + ] + } + }); } if (to_list(q1$1) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 147, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 147, + 2 + ] + } + }); } if (q2$1.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 148, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 148, + 2 + ] + } + }); } if (to_list(q2$1) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 149, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 149, + 2 + ] + } + }); } let q1$2 = { @@ -1017,15 +1017,15 @@ for (let i$8 = 1; i$8 <= 4; ++i$8) { if (q1$2.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 157, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 157, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q1$2), { @@ -1042,82 +1042,82 @@ if (!Caml_obj.equal(to_list(q1$2), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 158, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 158, + 2 + ] + } + }); } if (q2$2.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 159, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 159, + 2 + ] + } + }); } if (to_list(q2$2) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 160, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 160, + 2 + ] + } + }); } Queue.transfer(q1$2, q2$2); if (q1$2.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 162, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 162, + 2 + ] + } + }); } if (to_list(q1$2) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 163, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 163, + 2 + ] + } + }); } if (q2$2.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 164, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 164, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2$2), { @@ -1134,15 +1134,15 @@ if (!Caml_obj.equal(to_list(q2$2), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 165, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 165, + 2 + ] + } + }); } let q1$3 = { @@ -1163,41 +1163,41 @@ for (let i$9 = 5; i$9 <= 8; ++i$9) { if (q1$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 173, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 173, + 2 + ] + } + }); } if (to_list(q1$3) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 174, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 174, + 2 + ] + } + }); } if (q2$3.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 175, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 175, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2$3), { @@ -1214,56 +1214,56 @@ if (!Caml_obj.equal(to_list(q2$3), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 176, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 176, + 2 + ] + } + }); } Queue.transfer(q1$3, q2$3); if (q1$3.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 178, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 178, + 2 + ] + } + }); } if (to_list(q1$3) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 179, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 179, + 2 + ] + } + }); } if (q2$3.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 180, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 180, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2$3), { @@ -1280,15 +1280,15 @@ if (!Caml_obj.equal(to_list(q2$3), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 181, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 181, + 2 + ] + } + }); } let q1$4 = { @@ -1313,15 +1313,15 @@ for (let i$11 = 5; i$11 <= 8; ++i$11) { if (q1$4.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 192, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 192, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q1$4), { @@ -1338,28 +1338,28 @@ if (!Caml_obj.equal(to_list(q1$4), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 193, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 193, + 2 + ] + } + }); } if (q2$4.length !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 194, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 194, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2$4), { @@ -1376,56 +1376,56 @@ if (!Caml_obj.equal(to_list(q2$4), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 195, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 195, + 2 + ] + } + }); } Queue.transfer(q1$4, q2$4); if (q1$4.length !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 197, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 197, + 2 + ] + } + }); } if (to_list(q1$4) !== /* [] */0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 198, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 198, + 2 + ] + } + }); } if (q2$4.length !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 199, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 199, + 2 + ] + } + }); } if (!Caml_obj.equal(to_list(q2$4), { @@ -1454,15 +1454,15 @@ if (!Caml_obj.equal(to_list(q2$4), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "libqueue_test.res", - 200, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "libqueue_test.res", + 200, + 2 + ] + } + }); } console.log("OK"); diff --git a/jscomp/test/map_find_test.js b/jscomp/test/map_find_test.js index c6fb6aae20..c070c6c521 100644 --- a/jscomp/test/map_find_test.js +++ b/jscomp/test/map_find_test.js @@ -34,11 +34,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -51,11 +51,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -69,11 +69,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -86,11 +86,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, param) { @@ -144,10 +144,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, param.v); if (c === 0) { @@ -215,11 +215,11 @@ function bal$1(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -232,11 +232,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(ll, lv, ld, lr.l), lr.v, lr.d, create$1(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -250,11 +250,11 @@ function bal$1(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -267,11 +267,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(l, x, d, rl.l), rl.v, rl.d, create$1(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add$1(x, data, param) { @@ -325,10 +325,10 @@ function find$1(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.string_compare(x, param.v); if (c === 0) { diff --git a/jscomp/test/map_test.js b/jscomp/test/map_test.js index 43e3c4670c..defd198b77 100644 --- a/jscomp/test/map_test.js +++ b/jscomp/test/map_test.js @@ -52,11 +52,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -69,11 +69,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -87,11 +87,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -104,11 +104,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty(param) { @@ -170,10 +170,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, param.v); if (c === 0) { @@ -189,10 +189,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -267,10 +267,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -375,10 +375,10 @@ function min_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -415,10 +415,10 @@ function max_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -453,11 +453,11 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -762,15 +762,15 @@ function merge$1(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); @@ -1046,11 +1046,11 @@ function bal$1(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -1063,11 +1063,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(ll, lv, ld, lr.l), lr.v, lr.d, create$1(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -1081,11 +1081,11 @@ function bal$1(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -1098,11 +1098,11 @@ function bal$1(l, x, d, r) { return create$1(create$1(l, x, d, rl.l), rl.v, rl.d, create$1(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty$1(param) { @@ -1164,10 +1164,10 @@ function find$1(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.string_compare(x, param.v); if (c === 0) { @@ -1183,10 +1183,10 @@ function find_first$1(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1261,10 +1261,10 @@ function find_last$1(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1369,10 +1369,10 @@ function min_binding$1(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1409,10 +1409,10 @@ function max_binding$1(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -1447,11 +1447,11 @@ function max_binding_opt$1(_param) { function remove_min_binding$1(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1756,15 +1756,15 @@ function merge$3(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split$1(v2, s1); diff --git a/jscomp/test/mario_game.js b/jscomp/test/mario_game.js index 47067d154e..38059f9871 100644 --- a/jscomp/test/mario_game.js +++ b/jscomp/test/mario_game.js @@ -1485,11 +1485,11 @@ function game_win(ctx) { ctx.font = "20px 'Press Start 2P'"; ctx.fillText("You win!", 180, 128); throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Game over." - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Game over." + } + }); } function game_loss(ctx) { @@ -1500,11 +1500,11 @@ function game_loss(ctx) { ctx.font = "20px 'Press Start 2P'"; ctx.fillText("GAME OVER. You lose!", 60, 128); throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Game over." - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Game over." + } + }); } let Draw = { @@ -2467,11 +2467,11 @@ function choose_enemy_typ(typ) { return "Goomba"; default: throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Shouldn't reach here" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Shouldn't reach here" + } + }); } } @@ -2492,11 +2492,11 @@ function choose_sblock_typ(typ) { return "Ground"; default: throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Shouldn't reach here" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Shouldn't reach here" + } + }); } } @@ -3008,11 +3008,11 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { }; default: throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Shouldn't reach here" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Shouldn't reach here" + } + }); } } @@ -3282,11 +3282,11 @@ function load(param) { } else { console.log("cant find canvas " + canvas_id); throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "fail" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "fail" + } + }); } let context = canvas.getContext("2d"); document.addEventListener("keydown", keydown, true); diff --git a/jscomp/test/noassert.js b/jscomp/test/noassert.js index 9335aecfc6..249a4ce2fb 100644 --- a/jscomp/test/noassert.js +++ b/jscomp/test/noassert.js @@ -4,15 +4,15 @@ function f() { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "noassert.res", - 1, - 14 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "noassert.res", + 1, + 14 + ] + } + }); } function h() { diff --git a/jscomp/test/ocaml_re_test.js b/jscomp/test/ocaml_re_test.js index 1e9fe13bbc..7bf28c6f0b 100644 --- a/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/ocaml_re_test.js @@ -321,11 +321,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -338,11 +338,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -356,11 +356,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -373,11 +373,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, param) { @@ -522,11 +522,11 @@ function bal$1(l, v, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -538,11 +538,11 @@ function bal$1(l, v, r) { return create$1(create$1(ll, lv, lr.l), lr.v, create$1(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -555,11 +555,11 @@ function bal$1(l, v, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -571,11 +571,11 @@ function bal$1(l, v, r) { return create$1(create$1(l, v, rl.l), rl.v, create$1(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } function add$1(x, param) { @@ -1079,15 +1079,15 @@ function split_at_match_rec(_l$p, _x) { } } else { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ocaml_re_test.res", - 816, - 16 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ocaml_re_test.res", + 816, + 16 + ] + } + }); } }; } @@ -1523,8 +1523,8 @@ function find_state(re, desc) { return st; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -1605,8 +1605,8 @@ function final(info, st, cat) { return res; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -1627,8 +1627,8 @@ function find_initial_state(re, cat) { return st; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -1732,10 +1732,10 @@ function trans_set(cache, cm, s) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = compare(v, param.v); if (c === 0) { @@ -1754,8 +1754,8 @@ function trans_set(cache, cm, s) { return l; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -1895,15 +1895,15 @@ function colorize(c, regexp) { continue; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ocaml_re_test.res", - 2169, - 8 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ocaml_re_test.res", + 2169, + 8 + ] + } + }); } } }; @@ -2511,15 +2511,15 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _x) ]; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ocaml_re_test.res", - 2403, - 80 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ocaml_re_test.res", + 2403, + 80 + ] + } + }); } } }; @@ -2554,29 +2554,29 @@ function case_insens(s) { function as_set(x) { if (typeof x !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ocaml_re_test.res", - 2438, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ocaml_re_test.res", + 2438, + 11 + ] + } + }); } if (x.TAG === "Set") { return x._0; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "ocaml_re_test.res", - 2438, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "ocaml_re_test.res", + 2438, + 11 + ] + } + }); } function handle_case(_ign_case, _x) { @@ -2789,19 +2789,19 @@ let epsilon = { function repn(r, i, j) { if (i < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Re.repn" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Re.repn" + } + }); } if (j !== undefined && j < i) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Re.repn" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Re.repn" + } + }); } return { TAG: "Repeat", @@ -2831,11 +2831,11 @@ function compl(l) { return r; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Re.compl" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Re.compl" + } + }); } let any = { @@ -3186,11 +3186,11 @@ function exec_internal(name, posOpt, lenOpt, groups, re, s) { let len = lenOpt !== undefined ? lenOpt : -1; if (pos < 0 || len < -1 || (pos + len | 0) > s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: name - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: name + } + }); } let partial = false; let slen = s.length; @@ -3257,18 +3257,18 @@ function exec_internal(name, posOpt, lenOpt, groups, re, s) { function offset$1(t, i) { if (((i << 1) + 1 | 0) >= t.marks.length) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let m1 = Caml_array.get(t.marks, (i << 1)); if (m1 === -1) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let p1 = Caml_array.get(t.gpos, m1) - 1 | 0; let p2 = Caml_array.get(t.gpos, Caml_array.get(t.marks, (i << 1) + 1 | 0)) - 1 | 0; @@ -3319,11 +3319,11 @@ function posix_class_of_string(x) { default: let s = "Invalid pcre class: " + x; throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } } @@ -3353,18 +3353,18 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { try { if (Caml_string.get(s$p, j) !== Caml_string.get(s, i.contents + j | 0)) { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } catch (exn) { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } i.contents = i.contents + len | 0; @@ -3375,8 +3375,8 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return false; } throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } }; let get = function () { @@ -3444,10 +3444,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let r = regexp$p(branch()); if (!accept(/* ')' */41)) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return r; } @@ -3455,18 +3455,18 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return comment(); } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let r$1 = regexp$p(branch()); if (!accept(/* ')' */41)) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return { TAG: "Group", @@ -3499,10 +3499,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { if (accept(/* '\\' */92)) { if (i.contents === l) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let c = get(); switch (c) { @@ -3517,10 +3517,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 56 : case 57 : throw new Error(Not_supported, { - cause: { - RE_EXN_ID: Not_supported - } - }); + cause: { + RE_EXN_ID: Not_supported + } + }); case 65 : return "Beg_of_str"; case 66 : @@ -3626,10 +3626,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 120 : case 121 : throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); case 122 : return "End_of_str"; default: @@ -3641,10 +3641,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } else { if (i.contents === l) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let c$1 = get(); if (c$1 >= 64) { @@ -3656,24 +3656,24 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } if (c$1 >= 44) { if (c$1 >= 63) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return { TAG: "Set", @@ -3682,10 +3682,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } if (c$1 >= 42) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return { TAG: "Set", @@ -3716,10 +3716,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let i$p = Math.imul(10, i$1) + (d$1 - /* '0' */48 | 0) | 0; if (i$p < i$1) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } _i = i$p; continue; @@ -3745,17 +3745,17 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let j = accept(/* ',' */44) ? integer() : i$1; if (!accept(/* '}' */125)) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } if (j !== undefined && j < i$1) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return greedy_mod(repn(r, i$1, j)); } @@ -3765,19 +3765,19 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let char = function () { if (i.contents === l) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let c = get(); if (c === /* '[' */91) { if (accept(/* '=' */61)) { throw new Error(Not_supported, { - cause: { - RE_EXN_ID: Not_supported - } - }); + cause: { + RE_EXN_ID: Not_supported + } + }); } if (accept(/* ':' */58)) { let compl$1 = accept(/* '^' */94); @@ -3827,21 +3827,21 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } if (!accept_s(":]")) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let posix_class = posix_class_of_string(cls); let re = compl$1 ? compl({ @@ -3861,25 +3861,25 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } if (i.contents === l) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } let c$1 = get(); if (!accept(/* '.' */46)) { throw new Error(Not_supported, { - cause: { - RE_EXN_ID: Not_supported - } - }); + cause: { + RE_EXN_ID: Not_supported + } + }); } if (!accept(/* ']' */93)) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return { NAME: "Char", @@ -4047,18 +4047,18 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { case 121 : case 122 : throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } } else { if (c$2 >= 48) { throw new Error(Not_supported, { - cause: { - RE_EXN_ID: Not_supported - } - }); + cause: { + RE_EXN_ID: Not_supported + } + }); } return { NAME: "Char", @@ -4162,10 +4162,10 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { let res = regexp$p(branch()); if (i.contents !== l) { throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); } return res; } @@ -4209,16 +4209,16 @@ function exec(rex, pos, s) { } if (substr === "Failed") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let s = "a".repeat(1048575) + "b"; diff --git a/jscomp/test/offset.js b/jscomp/test/offset.js index 0777fc8deb..07958cb021 100644 --- a/jscomp/test/offset.js +++ b/jscomp/test/offset.js @@ -36,11 +36,11 @@ function bal(l, v, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -52,11 +52,11 @@ function bal(l, v, r) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -69,11 +69,11 @@ function bal(l, v, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -85,11 +85,11 @@ function bal(l, v, r) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } function add(x, param) { @@ -174,10 +174,10 @@ function min_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -208,10 +208,10 @@ function max_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -240,11 +240,11 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -659,10 +659,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = Caml.string_compare(x, v); @@ -679,10 +679,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -745,10 +745,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -956,15 +956,15 @@ function of_list(l) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l$1), l$1)[0]; } else { diff --git a/jscomp/test/pq_test.js b/jscomp/test/pq_test.js index 4888a86070..55344e6523 100644 --- a/jscomp/test/pq_test.js +++ b/jscomp/test/pq_test.js @@ -41,10 +41,10 @@ let Queue_is_empty = /* @__PURE__ */Caml_exceptions.create("Pq_test.PrioQueue.Qu function remove_top(x) { if (typeof x !== "object") { throw new Error(Queue_is_empty, { - cause: { - RE_EXN_ID: Queue_is_empty - } - }); + cause: { + RE_EXN_ID: Queue_is_empty + } + }); } let left = x._2; let tmp = x._3; @@ -85,10 +85,10 @@ function extract(x) { ]; } throw new Error(Queue_is_empty, { - cause: { - RE_EXN_ID: Queue_is_empty - } - }); + cause: { + RE_EXN_ID: Queue_is_empty + } + }); } let PrioQueue = { diff --git a/jscomp/test/queue_402.js b/jscomp/test/queue_402.js index 7e3b9bec24..2e37b1eba6 100644 --- a/jscomp/test/queue_402.js +++ b/jscomp/test/queue_402.js @@ -41,10 +41,10 @@ function add(x, q) { function peek(q) { if (q.length === 0) { throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } return q.tail.next.content; } @@ -52,10 +52,10 @@ function peek(q) { function take(q) { if (q.length === 0) { throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } q.length = q.length - 1 | 0; let tail = q.tail; diff --git a/jscomp/test/raw_hash_tbl_bench.js b/jscomp/test/raw_hash_tbl_bench.js index 3cbbb305b7..0e1650354a 100644 --- a/jscomp/test/raw_hash_tbl_bench.js +++ b/jscomp/test/raw_hash_tbl_bench.js @@ -11,15 +11,15 @@ function bench() { for (let i$1 = 0; i$1 <= 1000000; ++i$1) { if (!Hashtbl.mem(table, i$1)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "raw_hash_tbl_bench.res", - 8, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "raw_hash_tbl_bench.res", + 8, + 4 + ] + } + }); } } diff --git a/jscomp/test/rbset.js b/jscomp/test/rbset.js index ed0f7c0818..559c1cfe84 100644 --- a/jscomp/test/rbset.js +++ b/jscomp/test/rbset.js @@ -266,15 +266,15 @@ function unbalanced_left(x) { } } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "rbset.res", - 64, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "rbset.res", + 64, + 9 + ] + } + }); } function unbalanced_right(x) { @@ -336,15 +336,15 @@ function unbalanced_right(x) { } } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "rbset.res", - 75, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "rbset.res", + 75, + 9 + ] + } + }); } function lbalance(x1, x2, x3) { @@ -561,15 +561,15 @@ function add(x, s) { function remove_min(x) { if (typeof x !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "rbset.res", - 138, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "rbset.res", + 138, + 4 + ] + } + }); } let c = x._0; if (c === "Black") { @@ -598,15 +598,15 @@ function remove_min(x) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "rbset.res", - 138, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "rbset.res", + 138, + 4 + ] + } + }); } } else { diff --git a/jscomp/test/reactDOMRe.js b/jscomp/test/reactDOMRe.js index a8fef06588..e438f9ee76 100644 --- a/jscomp/test/reactDOMRe.js +++ b/jscomp/test/reactDOMRe.js @@ -70,11 +70,11 @@ function hydrateToElementWithId(reactElement, id) { let element = document.getElementById(id); if (element == null) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "ReactDOMRe.hydrateToElementWithId : no element of id " + (id + " found in the HTML.") - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "ReactDOMRe.hydrateToElementWithId : no element of id " + (id + " found in the HTML.") + } + }); } ReactDom.hydrate(reactElement, element); } diff --git a/jscomp/test/rec_module_test.js b/jscomp/test/rec_module_test.js index fee7d4822e..44fec3d4c3 100644 --- a/jscomp/test/rec_module_test.js +++ b/jscomp/test/rec_module_test.js @@ -215,11 +215,11 @@ function bal(l, v, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -231,11 +231,11 @@ function bal(l, v, r) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -248,11 +248,11 @@ function bal(l, v, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -264,11 +264,11 @@ function bal(l, v, r) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } function add(x, param) { @@ -353,10 +353,10 @@ function min_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -387,10 +387,10 @@ function max_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -419,11 +419,11 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -838,10 +838,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = AAA.compare(x, v); @@ -858,10 +858,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -924,10 +924,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1135,15 +1135,15 @@ function of_list(l) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l$1), l$1)[0]; } else { diff --git a/jscomp/test/recmodule.js b/jscomp/test/recmodule.js index c5b9cec6fc..c1dd92c6ed 100644 --- a/jscomp/test/recmodule.js +++ b/jscomp/test/recmodule.js @@ -41,15 +41,15 @@ let Adapter = { function MakeLayer$2(Deps) { let presentJson = function (json, status) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "recmodule.res", - 60, - 41 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "recmodule.res", + 60, + 41 + ] + } + }); }; let routes = function () { return [[ @@ -117,15 +117,15 @@ let U = Caml_module.init_mod([ function presentJson(json, status) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "recmodule.res", - 60, - 41 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "recmodule.res", + 60, + 41 + ] + } + }); } function routes() { diff --git a/jscomp/test/recursive_module.js b/jscomp/test/recursive_module.js index ba1c713297..e3c0df5885 100644 --- a/jscomp/test/recursive_module.js +++ b/jscomp/test/recursive_module.js @@ -107,8 +107,8 @@ try { tmp = -1; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -184,8 +184,8 @@ try { tmp$1 = 4; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } diff --git a/jscomp/test/recursive_records_test.js b/jscomp/test/recursive_records_test.js index ccf80b9d3b..61816cb5d4 100644 --- a/jscomp/test/recursive_records_test.js +++ b/jscomp/test/recursive_records_test.js @@ -69,15 +69,15 @@ function tl_exn(x) { return x.next; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "recursive_records_test.res", - 49, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "recursive_records_test.res", + 49, + 11 + ] + } + }); } eq("File \"recursive_records_test.res\", line 54, characters 5-12", (hd(rec_cell2) + hd(tl_exn(rec_cell2)) | 0) + hd(tl_exn(tl_exn(rec_cell2))) | 0, 9); diff --git a/jscomp/test/return_check.js b/jscomp/test/return_check.js index 58a814e65e..06b689c120 100644 --- a/jscomp/test/return_check.js +++ b/jscomp/test/return_check.js @@ -19,15 +19,15 @@ function f_undefined(xs, i) { return k; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "return_check.res", - 23, - 12 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "return_check.res", + 23, + 12 + ] + } + }); } function f_escaped_not(xs, i) { @@ -61,15 +61,15 @@ function f_null(xs, i) { return k; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "return_check.res", - 51, - 12 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "return_check.res", + 51, + 12 + ] + } + }); } function f_null_undefined(xs, i) { @@ -78,15 +78,15 @@ function f_null_undefined(xs, i) { return k; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "return_check.res", - 59, - 12 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "return_check.res", + 59, + 12 + ] + } + }); } exports.test = test; diff --git a/jscomp/test/set_gen.js b/jscomp/test/set_gen.js index cb6777beab..56131cc7bb 100644 --- a/jscomp/test/set_gen.js +++ b/jscomp/test/set_gen.js @@ -36,10 +36,10 @@ function min_elt(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -55,10 +55,10 @@ function max_elt(_x) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = x._2; if (typeof r !== "object") { @@ -209,18 +209,18 @@ function check_height_and_diff(x) { let hr = check_height_and_diff(x._2); if (h !== (max_int_2(hl, hr) + 1 | 0)) { throw new Error(Height_invariant_broken, { - cause: { - RE_EXN_ID: Height_invariant_broken - } - }); + cause: { + RE_EXN_ID: Height_invariant_broken + } + }); } let diff = Pervasives.abs(hl - hr | 0); if (diff > 2) { throw new Error(Height_diff_borken, { - cause: { - RE_EXN_ID: Height_diff_borken - } - }); + cause: { + RE_EXN_ID: Height_diff_borken + } + }); } return h; } @@ -251,15 +251,15 @@ function internal_bal(l, v, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set_gen.res", - 278, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set_gen.res", + 278, + 15 + ] + } + }); } let lr = l._2; let lv = l._1; @@ -271,15 +271,15 @@ function internal_bal(l, v, r) { return create(create(ll, lv, lr._0), lr._1, create(lr._2, v, r)); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set_gen.res", - 288, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set_gen.res", + 288, + 19 + ] + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -292,15 +292,15 @@ function internal_bal(l, v, r) { } if (typeof r !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set_gen.res", - 300, - 15 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set_gen.res", + 300, + 15 + ] + } + }); } let rr = r._2; let rv = r._1; @@ -312,25 +312,25 @@ function internal_bal(l, v, r) { return create(create(l, v, rl._0), rl._1, create(rl._2, rv, rr)); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set_gen.res", - 306, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set_gen.res", + 306, + 19 + ] + } + }); } function remove_min_elt(x) { if (typeof x !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -539,15 +539,15 @@ function of_sorted_list(l) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set_gen.res", - 447, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set_gen.res", + 447, + 18 + ] + } + }); }; return sub(List.length(l), l)[0]; } diff --git a/jscomp/test/sexp.js b/jscomp/test/sexp.js index 8bf7714bb3..6f1601514f 100644 --- a/jscomp/test/sexp.js +++ b/jscomp/test/sexp.js @@ -498,11 +498,11 @@ function get_exn(e) { return Caml_option.valFromOption(e); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "CCSexp.Traverse.get_exn" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "CCSexp.Traverse.get_exn" + } + }); } let of_unit = { diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index 3c273f17e6..bf9221f37e 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -23,17 +23,17 @@ function _must_escape(s) { exit = 1; } else { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } else { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } else if (c >= 11) { if (c >= 32) { @@ -51,10 +51,10 @@ function _must_escape(s) { case 40 : case 41 : throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } else { exit = 1; @@ -62,19 +62,19 @@ function _must_escape(s) { } else { if (c >= 9) { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } exit = 1; } if (exit === 1 && c > 127) { throw new Error(Pervasives.Exit, { - cause: { - RE_EXN_ID: Pervasives.Exit - } - }); + cause: { + RE_EXN_ID: Pervasives.Exit + } + }); } } @@ -85,8 +85,8 @@ function _must_escape(s) { return true; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -162,15 +162,15 @@ function _refill(t, k_succ, k_fail) { function _get(t) { if (t.i >= t.len) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "sexpm.res", - 111, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "sexpm.res", + 111, + 4 + ] + } + }); } let c = Caml_bytes.get(t.buf, t.i); t.i = t.i + 1 | 0; @@ -237,15 +237,15 @@ function expr_starting_with(c, k, t) { switch (c) { case 32 : throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "sexpm.res", - 152, - 27 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "sexpm.res", + 152, + 27 + ] + } + }); case 34 : return quoted(k, t); case 33 : @@ -264,15 +264,15 @@ function expr_starting_with(c, k, t) { } else if (c >= 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "sexpm.res", - 152, - 27 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "sexpm.res", + 152, + 27 + ] + } + }); } Buffer.add_char(t.atom, c); return atom(k, t); diff --git a/jscomp/test/stack_comp_test.js b/jscomp/test/stack_comp_test.js index 2a14136b37..915fafeb4c 100644 --- a/jscomp/test/stack_comp_test.js +++ b/jscomp/test/stack_comp_test.js @@ -65,8 +65,8 @@ function does_raise(f, s) { return true; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/stream_parser_test.js b/jscomp/test/stream_parser_test.js index fc90603a8d..c79f09df72 100644 --- a/jscomp/test/stream_parser_test.js +++ b/jscomp/test/stream_parser_test.js @@ -41,36 +41,36 @@ function parse(token) { return v; } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced parens" - } - }); + cause: { + RE_EXN_ID: Parse_error, + _1: "Unbalanced parens" + } + }); } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced parens" - } - }); + cause: { + RE_EXN_ID: Parse_error, + _1: "Unbalanced parens" + } + }); } Queue.push(n, look_ahead); throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "unexpected token" - } - }); + cause: { + RE_EXN_ID: Parse_error, + _1: "unexpected token" + } + }); case "Int" : return n._0; default: Queue.push(n, look_ahead); throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "unexpected token" - } - }); + cause: { + RE_EXN_ID: Parse_error, + _1: "unexpected token" + } + }); } }; let parse_term = function () { @@ -180,34 +180,34 @@ function l_parse(token) { return v; } throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced )" - } - }); - } - throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unbalanced )" - } - }); - } - throw new Error(Parse_error, { cause: { RE_EXN_ID: Parse_error, - _1: "Unexpected token" + _1: "Unbalanced )" } }); + } + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error, + _1: "Unbalanced )" + } + }); + } + throw new Error(Parse_error, { + cause: { + RE_EXN_ID: Parse_error, + _1: "Unexpected token" + } + }); case "Int" : return i._0; default: throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error, - _1: "Unexpected token" - } - }); + cause: { + RE_EXN_ID: Parse_error, + _1: "Unexpected token" + } + }); } }; let parse_f_aux = function (_a) { diff --git a/jscomp/test/string_set.js b/jscomp/test/string_set.js index 03f60c3fec..437b01483c 100644 --- a/jscomp/test/string_set.js +++ b/jscomp/test/string_set.js @@ -224,10 +224,10 @@ function find(x, _tree) { let tree = _tree; if (typeof tree !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = tree._1; let c = Caml.string_compare(x, v); diff --git a/jscomp/test/string_test.js b/jscomp/test/string_test.js index b12c5207ff..7d8042cada 100644 --- a/jscomp/test/string_test.js +++ b/jscomp/test/string_test.js @@ -73,8 +73,8 @@ function rev_split_by_char(c, s) { }; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; return loop(0, /* [] */0); @@ -103,8 +103,8 @@ function xsplit(delim, s) { }; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } let l_0 = $$String.sub(s, i$p + 1 | 0, (x - i$p | 0) - 1 | 0); let l$1 = { diff --git a/jscomp/test/stringmatch_test.js b/jscomp/test/stringmatch_test.js index 3531091eb7..e9632da06a 100644 --- a/jscomp/test/stringmatch_test.js +++ b/jscomp/test/stringmatch_test.js @@ -12,41 +12,41 @@ function tst01(s) { if (tst01("") !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 22, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 22, + 2 + ] + } + }); } if (tst01("\x00\x00\x00\x03") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 23, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 23, + 2 + ] + } + }); } if (tst01("\x00\x00\x00\x00\x00\x00\x00\x07") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 24, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 24, + 2 + ] + } + }); } function tst02(s) { @@ -56,27 +56,27 @@ function tst02(s) { return 1; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 33, - 21 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 33, + 21 + ] + } + }); } if (len === 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 35, - 21 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 35, + 21 + ] + } + }); } if (s === "A") { return 2; @@ -87,67 +87,67 @@ function tst02(s) { if (tst02("") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 42, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 42, + 2 + ] + } + }); } if (tst02("A") !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 43, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 43, + 2 + ] + } + }); } if (tst02("B") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 44, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 44, + 2 + ] + } + }); } if (tst02("\x00\x00\x00\x00\x00\x00\x00\x07") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 45, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 45, + 2 + ] + } + }); } if (tst02("\x00\x00\x00\x03") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 46, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 46, + 2 + ] + } + }); } function tst03(s) { @@ -207,626 +207,626 @@ function tst03(s) { if (tst03("get_const") !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 131, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 131, + 2 + ] + } + }); } if (tst03("set_congt") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 132, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 132, + 2 + ] + } + }); } if (tst03("get_var") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 133, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 133, + 2 + ] + } + }); } if (tst03("gat_ver") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 134, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 134, + 2 + ] + } + }); } if (tst03("get_env") !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 135, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 135, + 2 + ] + } + }); } if (tst03("get_env") !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 136, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 136, + 2 + ] + } + }); } if (tst03("get_meth") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 137, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 137, + 2 + ] + } + }); } if (tst03("met_geth") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 138, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 138, + 2 + ] + } + }); } if (tst03("set_var") !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 139, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 139, + 2 + ] + } + }); } if (tst03("sev_tar") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 140, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 140, + 2 + ] + } + }); } if (tst03("app_const") !== 5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 141, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 141, + 2 + ] + } + }); } if (tst03("ppa_const") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 142, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 142, + 2 + ] + } + }); } if (tst03("app_var") !== 6) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 143, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 143, + 2 + ] + } + }); } if (tst03("app_var") !== 6) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 144, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 144, + 2 + ] + } + }); } if (tst03("app_env") !== 7) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 145, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 145, + 2 + ] + } + }); } if (tst03("epp_anv") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 146, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 146, + 2 + ] + } + }); } if (tst03("app_meth") !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 147, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 147, + 2 + ] + } + }); } if (tst03("atp_meph") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 148, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 148, + 2 + ] + } + }); } if (tst03("app_const_const") !== 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 149, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 149, + 2 + ] + } + }); } if (tst03("app_const_const") !== 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 150, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 150, + 2 + ] + } + }); } if (tst03("app_const_var") !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 151, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 151, + 2 + ] + } + }); } if (tst03("atp_consp_var") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 152, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 152, + 2 + ] + } + }); } if (tst03("app_const_env") !== 11) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 153, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 153, + 2 + ] + } + }); } if (tst03("app_constne_v") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 154, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 154, + 2 + ] + } + }); } if (tst03("app_const_meth") !== 12) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 155, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 155, + 2 + ] + } + }); } if (tst03("spp_conat_meth") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 156, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 156, + 2 + ] + } + }); } if (tst03("app_var_const") !== 13) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 157, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 157, + 2 + ] + } + }); } if (tst03("app_va_rconst") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 158, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 158, + 2 + ] + } + }); } if (tst03("app_env_const") !== 14) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 159, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 159, + 2 + ] + } + }); } if (tst03("app_env_const") !== 14) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 160, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 160, + 2 + ] + } + }); } if (tst03("app_meth_const") !== 15) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 161, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 161, + 2 + ] + } + }); } if (tst03("app_teth_consm") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 162, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 162, + 2 + ] + } + }); } if (tst03("meth_app_const") !== 16) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 163, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 163, + 2 + ] + } + }); } if (tst03("math_epp_const") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 164, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 164, + 2 + ] + } + }); } if (tst03("meth_app_var") !== 17) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 165, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 165, + 2 + ] + } + }); } if (tst03("meth_app_var") !== 17) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 166, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 166, + 2 + ] + } + }); } if (tst03("meth_app_env") !== 18) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 167, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 167, + 2 + ] + } + }); } if (tst03("eeth_app_mnv") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 168, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 168, + 2 + ] + } + }); } if (tst03("meth_app_meth") !== 19) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 169, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 169, + 2 + ] + } + }); } if (tst03("meth_apt_meph") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 170, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 170, + 2 + ] + } + }); } if (tst03("send_const") !== 20) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 171, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 171, + 2 + ] + } + }); } if (tst03("tend_conss") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 172, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 172, + 2 + ] + } + }); } if (tst03("send_var") !== 21) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 173, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 173, + 2 + ] + } + }); } if (tst03("serd_van") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 174, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 174, + 2 + ] + } + }); } if (tst03("send_env") !== 22) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 175, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 175, + 2 + ] + } + }); } if (tst03("sen_denv") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 176, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 176, + 2 + ] + } + }); } if (tst03("send_meth") !== 23) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 177, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 177, + 2 + ] + } + }); } if (tst03("tend_mesh") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 178, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 178, + 2 + ] + } + }); } function tst04(s) { @@ -862,249 +862,249 @@ function tst04(s) { if (tst04("AAAAAAAA") !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 215, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 215, + 2 + ] + } + }); } if (tst04("AAAAAAAAAAAAAAAA") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 216, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 216, + 2 + ] + } + }); } if (tst04("AAAAAAAAAAAAAAAAAAAAAAAA") !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 217, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 217, + 2 + ] + } + }); } if (tst04("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 218, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 218, + 2 + ] + } + }); } if (tst04("BBBBBBBB") !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 219, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 219, + 2 + ] + } + }); } if (tst04("BBBBBBBBBBBBBBBB") !== 5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 220, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 220, + 2 + ] + } + }); } if (tst04("BBBBBBBBBBBBBBBBBBBBBBBB") !== 6) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 221, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 221, + 2 + ] + } + }); } if (tst04("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB") !== 7) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 222, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 222, + 2 + ] + } + }); } if (tst04("CCCCCCCC") !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 223, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 223, + 2 + ] + } + }); } if (tst04("CCCCCCCCCCCCCCCC") !== 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 224, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 224, + 2 + ] + } + }); } if (tst04("CCCCCCCCCCCCCCCCCCCCCCCC") !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 225, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 225, + 2 + ] + } + }); } if (tst04("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC") !== 11) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 226, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 226, + 2 + ] + } + }); } if (tst04("") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 227, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 227, + 2 + ] + } + }); } if (tst04("DDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 228, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 228, + 2 + ] + } + }); } if (tst04("DDDDDDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 229, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 229, + 2 + ] + } + }); } if (tst04("AAADDDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 230, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 230, + 2 + ] + } + }); } if (tst04("AAAAAAADDDDDDDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 231, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 231, + 2 + ] + } + }); } if (tst04("AAAAAAADDDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 232, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 232, + 2 + ] + } + }); } if (tst04("AAAAAAAAAAAAAAADDDD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 233, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 233, + 2 + ] + } + }); } function tst05(s) { @@ -1142,288 +1142,288 @@ function tst05(s) { if (tst05("AAA") !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 272, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 272, + 2 + ] + } + }); } if (tst05("AAAA") !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 273, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 273, + 2 + ] + } + }); } if (tst05("AAAAA") !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 274, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 274, + 2 + ] + } + }); } if (tst05("AAAAAA") !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 275, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 275, + 2 + ] + } + }); } if (tst05("AAAAAAA") !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 276, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 276, + 2 + ] + } + }); } if (tst05("AAAAAAAAAAAA") !== 5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 277, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 277, + 2 + ] + } + }); } if (tst05("AAAAAAAAAAAAAAAA") !== 6) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 278, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 278, + 2 + ] + } + }); } if (tst05("AAAAAAAAAAAAAAAAAAAA") !== 7) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 279, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 279, + 2 + ] + } + }); } if (tst05("BBB") !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 280, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 280, + 2 + ] + } + }); } if (tst05("BBBB") !== 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 281, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 281, + 2 + ] + } + }); } if (tst05("BBBBB") !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 282, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 282, + 2 + ] + } + }); } if (tst05("BBBBBB") !== 11) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 283, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 283, + 2 + ] + } + }); } if (tst05("BBBBBBB") !== 12) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 284, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 284, + 2 + ] + } + }); } if (tst05("") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 285, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 285, + 2 + ] + } + }); } if (tst05("AAD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 286, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 286, + 2 + ] + } + }); } if (tst05("AAAD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 287, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 287, + 2 + ] + } + }); } if (tst05("AAAAAAD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 288, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 288, + 2 + ] + } + }); } if (tst05("AAAAAAAD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 289, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 289, + 2 + ] + } + }); } if (tst05("BBD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 290, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 290, + 2 + ] + } + }); } if (tst05("BBBD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 291, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 291, + 2 + ] + } + }); } if (tst05("BBBBBBD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 292, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 292, + 2 + ] + } + }); } if (tst05("BBBBBBBD") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 293, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 293, + 2 + ] + } + }); } let s00 = "and"; @@ -1987,2407 +1987,2407 @@ function tst06(s) { if (tst06(s00) !== 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 582, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 582, + 2 + ] + } + }); } if (tst06(t00) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 583, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 583, + 2 + ] + } + }); } if (tst06(s01) !== 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 584, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 584, + 2 + ] + } + }); } if (tst06(t01) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 585, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 585, + 2 + ] + } + }); } if (tst06(s02) !== 2) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 586, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 586, + 2 + ] + } + }); } if (tst06(t02) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 587, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 587, + 2 + ] + } + }); } if (tst06(s03) !== 3) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 588, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 588, + 2 + ] + } + }); } if (tst06(t03) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 589, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 589, + 2 + ] + } + }); } if (tst06(s04) !== 4) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 590, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 590, + 2 + ] + } + }); } if (tst06(t04) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 591, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 591, + 2 + ] + } + }); } if (tst06(s05) !== 5) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 592, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 592, + 2 + ] + } + }); } if (tst06(t05) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 593, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 593, + 2 + ] + } + }); } if (tst06(s06) !== 6) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 594, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 594, + 2 + ] + } + }); } if (tst06(t06) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 595, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 595, + 2 + ] + } + }); } if (tst06(s07) !== 7) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 596, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 596, + 2 + ] + } + }); } if (tst06(t07) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 597, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 597, + 2 + ] + } + }); } if (tst06(s08) !== 8) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 598, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 598, + 2 + ] + } + }); } if (tst06(t08) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 599, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 599, + 2 + ] + } + }); } if (tst06(s09) !== 9) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 600, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 600, + 2 + ] + } + }); } if (tst06(t09) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 601, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 601, + 2 + ] + } + }); } if (tst06(s10) !== 10) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 602, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 602, + 2 + ] + } + }); } if (tst06(t10) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 603, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 603, + 2 + ] + } + }); } if (tst06(s11) !== 11) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 604, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 604, + 2 + ] + } + }); } if (tst06(t11) !== 11) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 605, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 605, + 2 + ] + } + }); } if (tst06(s12) !== 12) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 606, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 606, + 2 + ] + } + }); } if (tst06(t12) !== 12) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 607, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 607, + 2 + ] + } + }); } if (tst06(s13) !== 13) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 608, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 608, + 2 + ] + } + }); } if (tst06(t13) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 609, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 609, + 2 + ] + } + }); } if (tst06(s14) !== 14) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 610, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 610, + 2 + ] + } + }); } if (tst06(t14) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 611, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 611, + 2 + ] + } + }); } if (tst06(s15) !== 15) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 612, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 612, + 2 + ] + } + }); } if (tst06(t15) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 613, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 613, + 2 + ] + } + }); } if (tst06(s16) !== 16) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 614, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 614, + 2 + ] + } + }); } if (tst06(t16) !== 16) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 615, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 615, + 2 + ] + } + }); } if (tst06(s17) !== 17) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 616, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 616, + 2 + ] + } + }); } if (tst06(t17) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 617, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 617, + 2 + ] + } + }); } if (tst06(s18) !== 18) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 618, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 618, + 2 + ] + } + }); } if (tst06(t18) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 619, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 619, + 2 + ] + } + }); } if (tst06(s19) !== 19) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 620, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 620, + 2 + ] + } + }); } if (tst06(t19) !== 19) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 621, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 621, + 2 + ] + } + }); } if (tst06(s20) !== 20) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 622, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 622, + 2 + ] + } + }); } if (tst06(t20) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 623, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 623, + 2 + ] + } + }); } if (tst06(s21) !== 21) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 624, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 624, + 2 + ] + } + }); } if (tst06(t21) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 625, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 625, + 2 + ] + } + }); } if (tst06(s22) !== 22) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 626, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 626, + 2 + ] + } + }); } if (tst06(t22) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 627, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 627, + 2 + ] + } + }); } if (tst06(s23) !== 23) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 628, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 628, + 2 + ] + } + }); } if (tst06(t23) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 629, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 629, + 2 + ] + } + }); } if (tst06(s24) !== 24) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 630, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 630, + 2 + ] + } + }); } if (tst06(t24) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 631, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 631, + 2 + ] + } + }); } if (tst06(s25) !== 25) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 632, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 632, + 2 + ] + } + }); } if (tst06(t25) !== 25) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 633, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 633, + 2 + ] + } + }); } if (tst06(s26) !== 26) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 634, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 634, + 2 + ] + } + }); } if (tst06(t26) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 635, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 635, + 2 + ] + } + }); } if (tst06(s27) !== 27) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 636, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 636, + 2 + ] + } + }); } if (tst06(t27) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 637, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 637, + 2 + ] + } + }); } if (tst06(s28) !== 28) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 638, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 638, + 2 + ] + } + }); } if (tst06(t28) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 639, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 639, + 2 + ] + } + }); } if (tst06(s29) !== 29) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 640, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 640, + 2 + ] + } + }); } if (tst06(t29) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 641, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 641, + 2 + ] + } + }); } if (tst06(s30) !== 30) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 642, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 642, + 2 + ] + } + }); } if (tst06(t30) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 643, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 643, + 2 + ] + } + }); } if (tst06(s31) !== 31) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 644, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 644, + 2 + ] + } + }); } if (tst06(t31) !== 31) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 645, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 645, + 2 + ] + } + }); } if (tst06(s32) !== 32) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 646, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 646, + 2 + ] + } + }); } if (tst06(t32) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 647, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 647, + 2 + ] + } + }); } if (tst06(s33) !== 33) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 648, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 648, + 2 + ] + } + }); } if (tst06(t33) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 649, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 649, + 2 + ] + } + }); } if (tst06(s34) !== 34) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 650, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 650, + 2 + ] + } + }); } if (tst06(t34) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 651, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 651, + 2 + ] + } + }); } if (tst06(s35) !== 35) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 652, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 652, + 2 + ] + } + }); } if (tst06(t35) !== 35) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 653, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 653, + 2 + ] + } + }); } if (tst06(s36) !== 36) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 654, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 654, + 2 + ] + } + }); } if (tst06(t36) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 655, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 655, + 2 + ] + } + }); } if (tst06(s37) !== 37) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 656, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 656, + 2 + ] + } + }); } if (tst06(t37) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 657, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 657, + 2 + ] + } + }); } if (tst06(s38) !== 38) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 658, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 658, + 2 + ] + } + }); } if (tst06(t38) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 659, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 659, + 2 + ] + } + }); } if (tst06(s39) !== 39) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 660, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 660, + 2 + ] + } + }); } if (tst06(t39) !== 39) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 661, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 661, + 2 + ] + } + }); } if (tst06(s40) !== 40) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 662, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 662, + 2 + ] + } + }); } if (tst06(t40) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 663, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 663, + 2 + ] + } + }); } if (tst06(s41) !== 41) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 664, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 664, + 2 + ] + } + }); } if (tst06(t41) !== 41) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 665, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 665, + 2 + ] + } + }); } if (tst06(s42) !== 42) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 666, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 666, + 2 + ] + } + }); } if (tst06(t42) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 667, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 667, + 2 + ] + } + }); } if (tst06(s43) !== 43) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 668, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 668, + 2 + ] + } + }); } if (tst06(t43) !== 43) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 669, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 669, + 2 + ] + } + }); } if (tst06(s44) !== 44) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 670, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 670, + 2 + ] + } + }); } if (tst06(t44) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 671, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 671, + 2 + ] + } + }); } if (tst06(s45) !== 45) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 672, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 672, + 2 + ] + } + }); } if (tst06(t45) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 673, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 673, + 2 + ] + } + }); } if (tst06(s46) !== 46) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 674, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 674, + 2 + ] + } + }); } if (tst06(t46) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 675, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 675, + 2 + ] + } + }); } if (tst06(s47) !== 47) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 676, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 676, + 2 + ] + } + }); } if (tst06(t47) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 677, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 677, + 2 + ] + } + }); } if (tst06(s48) !== 48) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 678, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 678, + 2 + ] + } + }); } if (tst06(t48) !== 48) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 679, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 679, + 2 + ] + } + }); } if (tst06(s49) !== 49) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 680, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 680, + 2 + ] + } + }); } if (tst06(t49) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 681, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 681, + 2 + ] + } + }); } if (tst06(s50) !== 50) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 682, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 682, + 2 + ] + } + }); } if (tst06(t50) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 683, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 683, + 2 + ] + } + }); } if (tst06(s51) !== 51) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 684, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 684, + 2 + ] + } + }); } if (tst06(t51) !== 51) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 685, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 685, + 2 + ] + } + }); } if (tst06(s52) !== 52) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 686, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 686, + 2 + ] + } + }); } if (tst06(t52) !== 52) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 687, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 687, + 2 + ] + } + }); } if (tst06(s53) !== 53) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 688, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 688, + 2 + ] + } + }); } if (tst06(t53) !== 53) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 689, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 689, + 2 + ] + } + }); } if (tst06(s54) !== 54) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 690, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 690, + 2 + ] + } + }); } if (tst06(t54) !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 691, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 691, + 2 + ] + } + }); } if (tst06(s55) !== 55) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 692, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 692, + 2 + ] + } + }); } if (tst06(t55) !== 55) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 693, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 693, + 2 + ] + } + }); } if (tst06(s56) !== 56) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 694, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 694, + 2 + ] + } + }); } if (tst06(t56) !== 56) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 695, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 695, + 2 + ] + } + }); } if (tst06(s57) !== 57) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 696, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 696, + 2 + ] + } + }); } if (tst06(t57) !== 57) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 697, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 697, + 2 + ] + } + }); } if (tst06(s58) !== 58) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 698, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 698, + 2 + ] + } + }); } if (tst06(t58) !== 58) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 699, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 699, + 2 + ] + } + }); } if (tst06(s59) !== 59) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 700, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 700, + 2 + ] + } + }); } if (tst06(t59) !== 59) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 701, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 701, + 2 + ] + } + }); } if (tst06(s60) !== 60) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 702, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 702, + 2 + ] + } + }); } if (tst06(t60) !== 60) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 703, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 703, + 2 + ] + } + }); } if (tst06(s61) !== 61) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 704, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 704, + 2 + ] + } + }); } if (tst06(t61) !== 61) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 705, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 705, + 2 + ] + } + }); } if (tst06(s62) !== 62) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 706, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 706, + 2 + ] + } + }); } if (tst06(t62) !== 62) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 707, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 707, + 2 + ] + } + }); } if (tst06(s63) !== 63) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 708, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 708, + 2 + ] + } + }); } if (tst06(t63) !== 63) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 709, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 709, + 2 + ] + } + }); } if (tst06(s64) !== 64) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 710, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 710, + 2 + ] + } + }); } if (tst06(t64) !== 64) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 711, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 711, + 2 + ] + } + }); } if (tst06(s65) !== 65) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 712, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 712, + 2 + ] + } + }); } if (tst06(t65) !== 65) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 713, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 713, + 2 + ] + } + }); } if (tst06(s66) !== 66) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 714, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 714, + 2 + ] + } + }); } if (tst06(t66) !== 66) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 715, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 715, + 2 + ] + } + }); } if (tst06(s67) !== 67) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 716, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 716, + 2 + ] + } + }); } if (tst06(t67) !== 67) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 717, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 717, + 2 + ] + } + }); } if (tst06(s68) !== 68) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 718, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 718, + 2 + ] + } + }); } if (tst06(t68) !== 68) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 719, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 719, + 2 + ] + } + }); } if (tst06(s69) !== 69) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 720, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 720, + 2 + ] + } + }); } if (tst06(t69) !== 69) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 721, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 721, + 2 + ] + } + }); } if (tst06(s70) !== 70) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 722, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 722, + 2 + ] + } + }); } if (tst06(t70) !== 70) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 723, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 723, + 2 + ] + } + }); } if (tst06(s71) !== 71) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 724, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 724, + 2 + ] + } + }); } if (tst06(t71) !== 71) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 725, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 725, + 2 + ] + } + }); } if (tst06(s72) !== 72) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 726, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 726, + 2 + ] + } + }); } if (tst06(t72) !== 72) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 727, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 727, + 2 + ] + } + }); } if (tst06(s73) !== 73) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 728, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 728, + 2 + ] + } + }); } if (tst06(t73) !== 73) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 729, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 729, + 2 + ] + } + }); } if (tst06(s74) !== 74) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 730, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 730, + 2 + ] + } + }); } if (tst06(t74) !== 74) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 731, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 731, + 2 + ] + } + }); } if (tst06(s75) !== 75) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 732, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 732, + 2 + ] + } + }); } if (tst06(t75) !== 75) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 733, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 733, + 2 + ] + } + }); } if (tst06(s76) !== 76) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 734, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 734, + 2 + ] + } + }); } if (tst06(t76) !== 76) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 735, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 735, + 2 + ] + } + }); } if (tst06(s77) !== 77) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 736, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 736, + 2 + ] + } + }); } if (tst06(t77) !== 77) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 737, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 737, + 2 + ] + } + }); } if (tst06(s78) !== 78) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 738, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 738, + 2 + ] + } + }); } if (tst06(t78) !== 78) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 739, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 739, + 2 + ] + } + }); } if (tst06(s79) !== 79) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 740, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 740, + 2 + ] + } + }); } if (tst06(t79) !== 79) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 741, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 741, + 2 + ] + } + }); } if (tst06(s80) !== 80) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 742, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 742, + 2 + ] + } + }); } if (tst06(t80) !== 80) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 743, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 743, + 2 + ] + } + }); } if (tst06(s81) !== 81) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 744, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 744, + 2 + ] + } + }); } if (tst06(t81) !== 81) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 745, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 745, + 2 + ] + } + }); } if (tst06(s82) !== 82) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 746, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 746, + 2 + ] + } + }); } if (tst06(t82) !== 82) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 747, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 747, + 2 + ] + } + }); } if (tst06(s83) !== 83) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 748, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 748, + 2 + ] + } + }); } if (tst06(t83) !== 83) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 749, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 749, + 2 + ] + } + }); } if (tst06(s84) !== 84) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 750, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 750, + 2 + ] + } + }); } if (tst06(t84) !== 84) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 751, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 751, + 2 + ] + } + }); } if (tst06(s85) !== 85) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 752, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 752, + 2 + ] + } + }); } if (tst06(t85) !== 85) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 753, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 753, + 2 + ] + } + }); } if (tst06(s86) !== 86) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 754, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 754, + 2 + ] + } + }); } if (tst06(t86) !== 86) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 755, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 755, + 2 + ] + } + }); } if (tst06(s87) !== 87) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 756, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 756, + 2 + ] + } + }); } if (tst06(t87) !== 87) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 757, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 757, + 2 + ] + } + }); } if (tst06(s88) !== 88) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 758, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 758, + 2 + ] + } + }); } if (tst06(t88) !== 88) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 759, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 759, + 2 + ] + } + }); } if (tst06(s89) !== 89) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 760, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 760, + 2 + ] + } + }); } if (tst06(t89) !== 89) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 761, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 761, + 2 + ] + } + }); } if (tst06(s90) !== 90) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 762, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 762, + 2 + ] + } + }); } if (tst06(t90) !== 90) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 763, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 763, + 2 + ] + } + }); } if (tst06(s91) !== 91) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 764, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 764, + 2 + ] + } + }); } if (tst06(t91) !== 91) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 765, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 765, + 2 + ] + } + }); } if (tst06("") !== -1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stringmatch_test.res", - 766, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stringmatch_test.res", + 766, + 2 + ] + } + }); } exports.tst01 = tst01; diff --git a/jscomp/test/test_array_primitive.js b/jscomp/test/test_array_primitive.js index ab453f968a..3ac46e92e8 100644 --- a/jscomp/test/test_array_primitive.js +++ b/jscomp/test/test_array_primitive.js @@ -14,11 +14,11 @@ function caml_array_sub(x, offset, len) { function caml_array_set(xs, index, newval) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } Caml_array.set(xs, index, newval); } @@ -26,11 +26,11 @@ function caml_array_set(xs, index, newval) { function caml_array_get(xs, index) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return Caml_array.get(xs, index); } diff --git a/jscomp/test/test_bool_equal.js b/jscomp/test/test_bool_equal.js index e5b824d6e7..d4a80430d8 100644 --- a/jscomp/test/test_bool_equal.js +++ b/jscomp/test/test_bool_equal.js @@ -19,51 +19,51 @@ function bool_equal(x, y) { function assertions() { if (!bool_equal(true, true)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_bool_equal.res", - 16, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_bool_equal.res", + 16, + 2 + ] + } + }); } if (!bool_equal(false, false)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_bool_equal.res", - 17, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_bool_equal.res", + 17, + 2 + ] + } + }); } if (bool_equal(true, false)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_bool_equal.res", - 18, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_bool_equal.res", + 18, + 2 + ] + } + }); } if (bool_equal(false, true)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_bool_equal.res", - 19, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_bool_equal.res", + 19, + 2 + ] + } + }); } } diff --git a/jscomp/test/test_closure.js b/jscomp/test/test_closure.js index 6ff2a91399..ebef4942f9 100644 --- a/jscomp/test/test_closure.js +++ b/jscomp/test/test_closure.js @@ -28,15 +28,15 @@ $$Array.iter((function (x) { if (v.contents !== 45) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_closure.res", - 52, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_closure.res", + 52, + 2 + ] + } + }); } exports.v = v; diff --git a/jscomp/test/test_exception.js b/jscomp/test/test_exception.js index b050e637b5..d8fd225654 100644 --- a/jscomp/test/test_exception.js +++ b/jscomp/test/test_exception.js @@ -8,45 +8,45 @@ let Local = /* @__PURE__ */Caml_exceptions.create("Test_exception.Local"); function f() { throw new Error(Local, { - cause: { - RE_EXN_ID: Local, - _1: 3 - } - }); + cause: { + RE_EXN_ID: Local, + _1: 3 + } + }); } function g() { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function h() { throw new Error(Test_common.U, { - cause: { - RE_EXN_ID: Test_common.U, - _1: 3 - } - }); + cause: { + RE_EXN_ID: Test_common.U, + _1: 3 + } + }); } function x() { throw new Error(Test_common.H, { - cause: { - RE_EXN_ID: Test_common.H - } - }); + cause: { + RE_EXN_ID: Test_common.H + } + }); } function xx() { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "x" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "x" + } + }); } let Nullary = /* @__PURE__ */Caml_exceptions.create("Test_exception.Nullary"); diff --git a/jscomp/test/test_exception_escape.js b/jscomp/test/test_exception_escape.js index 4e4957d2b5..418fec2b66 100644 --- a/jscomp/test/test_exception_escape.js +++ b/jscomp/test/test_exception_escape.js @@ -9,11 +9,11 @@ let f; try { throw new Error(A, { - cause: { - RE_EXN_ID: A, - _1: 3 - } - }); + cause: { + RE_EXN_ID: A, + _1: 3 + } + }); } catch (exn) { f = 3; } diff --git a/jscomp/test/test_for_map.js b/jscomp/test/test_for_map.js index c0f6c7aa18..d5400a46d9 100644 --- a/jscomp/test/test_for_map.js +++ b/jscomp/test/test_for_map.js @@ -44,11 +44,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -61,11 +61,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -79,11 +79,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -96,11 +96,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty(param) { @@ -162,10 +162,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.int_compare(x, param.v); if (c === 0) { @@ -181,10 +181,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -259,10 +259,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -367,10 +367,10 @@ function min_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -407,10 +407,10 @@ function max_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -445,11 +445,11 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -754,15 +754,15 @@ function merge$1(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/jscomp/test/test_incomplete.js b/jscomp/test/test_incomplete.js index 88e4af5ae4..bfcf01440e 100644 --- a/jscomp/test/test_incomplete.js +++ b/jscomp/test/test_incomplete.js @@ -7,15 +7,15 @@ function f(x) { return /* 'a' */97; } throw new Error("Match_failure", { - cause: { - RE_EXN_ID: "Match_failure", - _1: [ - "test_incomplete.res", - 3, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Match_failure", + _1: [ + "test_incomplete.res", + 3, + 2 + ] + } + }); } function f2(x) { diff --git a/jscomp/test/test_int_map_find.js b/jscomp/test/test_int_map_find.js index bb5b8cdfce..b5de86fa27 100644 --- a/jscomp/test/test_int_map_find.js +++ b/jscomp/test/test_int_map_find.js @@ -33,11 +33,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -50,11 +50,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -68,11 +68,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -85,11 +85,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, param) { diff --git a/jscomp/test/test_list.js b/jscomp/test/test_list.js index 1be64f069b..3f5818641f 100644 --- a/jscomp/test/test_list.js +++ b/jscomp/test/test_list.js @@ -27,11 +27,11 @@ function hd(x) { return x.hd; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "hd" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "hd" + } + }); } function tl(x) { @@ -39,21 +39,21 @@ function tl(x) { return x.tl; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "tl" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "tl" + } + }); } function nth(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -69,11 +69,11 @@ function nth(l, n) { continue; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "nth" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "nth" + } + }); }; } @@ -208,21 +208,21 @@ function map2(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } function rev_map2(f, l1, l2) { @@ -244,19 +244,19 @@ function rev_map2(f, l1, l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } if (l2$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } return accu; }; @@ -274,21 +274,21 @@ function iter2(f, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); } if (!l2) { return; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); }; } @@ -305,19 +305,19 @@ function fold_left2(f, _accu, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } return accu; }; @@ -329,19 +329,19 @@ function fold_right2(f, l1, l2, accu) { return f(l1.hd, l2.hd, fold_right2(f, l1.tl, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -388,21 +388,21 @@ function for_all2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); } if (!l2) { return true; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); }; } @@ -420,21 +420,21 @@ function exists2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); } if (!l2) { return false; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); }; } @@ -478,10 +478,10 @@ function assoc(x, _x_) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -497,10 +497,10 @@ function assq(x, _x_) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -576,10 +576,10 @@ function find(p, _x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -675,21 +675,21 @@ function combine(l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } function merge(cmp, l1, l2) { @@ -727,15 +727,15 @@ function chop(_k, _l) { continue; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_list.res", - 343, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_list.res", + 343, + 11 + ] + } + }); }; } diff --git a/jscomp/test/test_match_exception.js b/jscomp/test/test_match_exception.js index 90b1f424e5..6fe415efa7 100644 --- a/jscomp/test/test_match_exception.js +++ b/jscomp/test/test_match_exception.js @@ -12,8 +12,8 @@ function f(g, x) { return 3; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/jscomp/test/test_per.js b/jscomp/test/test_per.js index 9e71d99071..eea5830322 100644 --- a/jscomp/test/test_per.js +++ b/jscomp/test/test_per.js @@ -8,20 +8,20 @@ let Caml_exceptions = require("../../lib/js/caml_exceptions.js"); function failwith(s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); } function invalid_arg(s) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } let Exit = /* @__PURE__ */Caml_exceptions.create("Test_per.Exit"); @@ -98,11 +98,11 @@ function $caret(s1, s2) { function char_of_int(n) { if (n < 0 || n > 255) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "char_of_int" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "char_of_int" + } + }); } return n; } diff --git a/jscomp/test/test_seq.js b/jscomp/test/test_seq.js index 523d9be296..10c3093667 100644 --- a/jscomp/test/test_seq.js +++ b/jscomp/test/test_seq.js @@ -24,23 +24,23 @@ function assoc3(x, _l) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } function help_action() { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Unknown", - _0: "-help" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Unknown", + _0: "-help" + } + } + }); } function v(speclist) { @@ -73,8 +73,8 @@ function add_help(speclist) { }; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } let add2; @@ -97,8 +97,8 @@ function add_help(speclist) { }; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } return Pervasives.$at(speclist, Pervasives.$at(add1, add2)); diff --git a/jscomp/test/test_set.js b/jscomp/test/test_set.js index c7bc8d3b7d..a8fbcc1f3f 100644 --- a/jscomp/test/test_set.js +++ b/jscomp/test/test_set.js @@ -32,11 +32,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l._2; let lv = l._1; @@ -48,11 +48,11 @@ function Make(Ord) { return create(create(ll, lv, lr._0), lr._1, create(lr._2, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -65,11 +65,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r._2; let rv = r._1; @@ -81,11 +81,11 @@ function Make(Ord) { return create(create(l, v, rl._0), rl._1, create(rl._2, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, x_) { if (typeof x_ !== "object") { @@ -154,10 +154,10 @@ function Make(Ord) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -172,10 +172,10 @@ function Make(Ord) { let x = _x; if (typeof x !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = x._2; if (typeof r !== "object") { @@ -188,11 +188,11 @@ function Make(Ord) { let remove_min_elt = function (x) { if (typeof x !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = x._0; if (typeof l !== "object") { @@ -573,10 +573,10 @@ function Make(Ord) { let x_ = _x_; if (typeof x_ !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = x_._1; let c = Ord.compare(x, v); @@ -679,15 +679,15 @@ function Make(Ord) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_set.res", - 497, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_set.res", + 497, + 20 + ] + } + }); }; return sub(List.length(l), l)[0]; }; diff --git a/jscomp/test/test_static_catch_ident.js b/jscomp/test/test_static_catch_ident.js index 358620938a..0f07ea108a 100644 --- a/jscomp/test/test_static_catch_ident.js +++ b/jscomp/test/test_static_catch_ident.js @@ -11,8 +11,8 @@ function scanf_bad_input(ib, x) { s = x._1; } else { throw new Error(x.RE_EXN_ID, { - cause: x - }); + cause: x + }); } for (let i = 0; i <= 100; ++i) { console.log(s); diff --git a/jscomp/test/test_string.js b/jscomp/test/test_string.js index 2fee5dc228..6cda6ae83e 100644 --- a/jscomp/test/test_string.js +++ b/jscomp/test/test_string.js @@ -12,15 +12,15 @@ function f(x) { return 1; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_string.res", - 5, - 17 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_string.res", + 5, + 17 + ] + } + }); } } diff --git a/jscomp/test/test_string_case.js b/jscomp/test/test_string_case.js index 4b8b9df4cd..867814c4a6 100644 --- a/jscomp/test/test_string_case.js +++ b/jscomp/test/test_string_case.js @@ -10,15 +10,15 @@ function f(x) { return 1; default: throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_string_case.res", - 5, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_string_case.res", + 5, + 9 + ] + } + }); } } diff --git a/jscomp/test/test_string_const.js b/jscomp/test/test_string_const.js index a5c13796fc..cadb0599f9 100644 --- a/jscomp/test/test_string_const.js +++ b/jscomp/test/test_string_const.js @@ -17,8 +17,8 @@ try { hh = /* 'a' */97; } else { throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } } diff --git a/jscomp/test/test_string_map.js b/jscomp/test/test_string_map.js index 010ef18b27..b8bc888cf3 100644 --- a/jscomp/test/test_string_map.js +++ b/jscomp/test/test_string_map.js @@ -32,11 +32,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -49,11 +49,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -67,11 +67,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -84,11 +84,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function add(x, data, param) { @@ -142,10 +142,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml.string_compare(x, param.v); if (c === 0) { diff --git a/jscomp/test/test_trywith.js b/jscomp/test/test_trywith.js index 72253026dc..f327c553a7 100644 --- a/jscomp/test/test_trywith.js +++ b/jscomp/test/test_trywith.js @@ -19,8 +19,8 @@ function ff(g, x) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID !== "Not_found") { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -30,8 +30,8 @@ function ff(g, x) { let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID !== Out_of_memory) { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } @@ -41,8 +41,8 @@ function ff(g, x) { let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.RE_EXN_ID !== Sys_error) { throw new Error(exn$2.RE_EXN_ID, { - cause: exn$2 - }); + cause: exn$2 + }); } } @@ -52,8 +52,8 @@ function ff(g, x) { let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.RE_EXN_ID !== "Invalid_argument") { throw new Error(exn$3.RE_EXN_ID, { - cause: exn$3 - }); + cause: exn$3 + }); } } @@ -63,8 +63,8 @@ function ff(g, x) { let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.RE_EXN_ID !== "End_of_file") { throw new Error(exn$4.RE_EXN_ID, { - cause: exn$4 - }); + cause: exn$4 + }); } } @@ -74,8 +74,8 @@ function ff(g, x) { let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.RE_EXN_ID !== "Match_failure") { throw new Error(exn$5.RE_EXN_ID, { - cause: exn$5 - }); + cause: exn$5 + }); } } @@ -85,8 +85,8 @@ function ff(g, x) { let exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); if (exn$6.RE_EXN_ID !== Stack_overflow) { throw new Error(exn$6.RE_EXN_ID, { - cause: exn$6 - }); + cause: exn$6 + }); } } @@ -96,8 +96,8 @@ function ff(g, x) { let exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); if (exn$7.RE_EXN_ID !== Sys_blocked_io) { throw new Error(exn$7.RE_EXN_ID, { - cause: exn$7 - }); + cause: exn$7 + }); } } @@ -107,8 +107,8 @@ function ff(g, x) { let exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); if (exn$8.RE_EXN_ID !== "Assert_failure") { throw new Error(exn$8.RE_EXN_ID, { - cause: exn$8 - }); + cause: exn$8 + }); } } @@ -120,17 +120,17 @@ function ff(g, x) { return; } throw new Error(exn$9.RE_EXN_ID, { - cause: exn$9 - }); + cause: exn$9 + }); } } function u() { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function f(x) { @@ -141,15 +141,15 @@ function f(x) { return 1; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_trywith.res", - 59, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_trywith.res", + 59, + 9 + ] + } + }); } let u1 = "bad character decimal encoding \\"; diff --git a/jscomp/test/test_while_closure.js b/jscomp/test/test_while_closure.js index 0f96e37af2..1378a7ded1 100644 --- a/jscomp/test/test_while_closure.js +++ b/jscomp/test/test_while_closure.js @@ -33,15 +33,15 @@ console.log(String(v.contents)); if (v.contents !== 45) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "test_while_closure.res", - 55, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "test_while_closure.res", + 55, + 2 + ] + } + }); } let count = 10; diff --git a/jscomp/test/ticker.js b/jscomp/test/ticker.js index d1cc64013b..adb9217fd2 100644 --- a/jscomp/test/ticker.js +++ b/jscomp/test/ticker.js @@ -33,8 +33,8 @@ function split(delim, s) { }; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } let l_0 = $$String.sub(s, i$p + 1 | 0, (x - i$p | 0) - 1 | 0); let l$1 = { @@ -135,11 +135,11 @@ function bal(l, x, d, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -152,11 +152,11 @@ function bal(l, x, d, r) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -170,11 +170,11 @@ function bal(l, x, d, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -187,11 +187,11 @@ function bal(l, x, d, r) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } function is_empty(param) { @@ -253,10 +253,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml_obj.compare(x, param.v); if (c === 0) { @@ -272,10 +272,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -350,10 +350,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -458,10 +458,10 @@ function min_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -498,10 +498,10 @@ function max_binding(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -536,11 +536,11 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -845,15 +845,15 @@ function merge$1(f, s1, s2) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split$1(v2, s1); @@ -1162,18 +1162,18 @@ function compute_update_sequences(all_tickers) { if (typeof x !== "object") { if (x === "Uninitialized") { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "All nodes should be ranked" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "All nodes should be ranked" + } + }); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "All nodes should be ranked" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "All nodes should be ranked" + } + }); } else { let y = rhs.rank; if (typeof y === "object") { @@ -1181,18 +1181,18 @@ function compute_update_sequences(all_tickers) { } if (y === "Uninitialized") { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "All nodes should be ranked" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "All nodes should be ranked" + } + }); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "All nodes should be ranked" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "All nodes should be ranked" + } + }); } }), l); return add(k, l$1, map); @@ -1209,11 +1209,11 @@ function process_quote(ticker_map, new_ticker, new_value) { return; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Only single Market ticker should be udpated upon a new quote" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Only single Market ticker should be udpated upon a new quote" + } + }); } let match$1 = match._0; let match$2 = match$1.lhs.value; @@ -1253,11 +1253,11 @@ function process_input_line(ticker_map, all_tickers, line) { if (match$1) { if (match$1.tl) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } let ticker_map$1 = ticker_map !== undefined ? Caml_option.valFromOption(ticker_map) : compute_update_sequences(all_tickers); let value = Caml_format.float_of_string(match$1.hd); @@ -1268,18 +1268,18 @@ function process_input_line(ticker_map, all_tickers, line) { ]; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); case "R" : let match$2 = tokens.tl; if (match$2) { @@ -1294,11 +1294,11 @@ function process_input_line(ticker_map, all_tickers, line) { if (match$5) { if (match$5.tl) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } return [ { @@ -1309,18 +1309,18 @@ function process_input_line(ticker_map, all_tickers, line) { ]; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); case "-" : let match$6 = match$3.tl; if (match$6) { @@ -1328,11 +1328,11 @@ function process_input_line(ticker_map, all_tickers, line) { if (match$7) { if (match$7.tl) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } return [ { @@ -1343,26 +1343,26 @@ function process_input_line(ticker_map, all_tickers, line) { ]; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); case "S" : if (match$3.tl) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } return [ { @@ -1378,43 +1378,43 @@ function process_input_line(ticker_map, all_tickers, line) { ]; default: throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - } - } else { - throw new Error("Failure", { cause: { RE_EXN_ID: "Failure", _1: "Invalid input line" } }); + } + } else { + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } } else { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } default: throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Invalid input line" - } - }); - } - } else { - throw new Error("Failure", { cause: { RE_EXN_ID: "Failure", _1: "Invalid input line" } }); + } + } else { + throw new Error("Failure", { + cause: { + RE_EXN_ID: "Failure", + _1: "Invalid input line" + } + }); } } diff --git a/jscomp/test/topsort_test.js b/jscomp/test/topsort_test.js index 554d8311e0..c1af12c84e 100644 --- a/jscomp/test/topsort_test.js +++ b/jscomp/test/topsort_test.js @@ -122,15 +122,15 @@ if (!Caml_obj.equal(dfs1({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 35, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 35, + 2 + ] + } + }); } console.log(""); @@ -161,15 +161,15 @@ if (!Caml_obj.equal(dfs1({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 38, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 38, + 2 + ] + } + }); } function dfs2(nodes, graph, visited) { @@ -223,15 +223,15 @@ if (!Caml_obj.equal(dfs2({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 57, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 57, + 2 + ] + } + }); } if (!Caml_obj.equal(dfs2({ @@ -260,15 +260,15 @@ if (!Caml_obj.equal(dfs2({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 58, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 58, + 2 + ] + } + }); } function dfs3(nodes, graph) { @@ -319,15 +319,15 @@ if (!Caml_obj.equal(dfs3({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 74, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 74, + 2 + ] + } + }); } if (!Caml_obj.equal(dfs3({ @@ -356,15 +356,15 @@ if (!Caml_obj.equal(dfs3({ } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 75, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 75, + 2 + ] + } + }); } let grwork = { @@ -446,15 +446,15 @@ if (!Caml_obj.equal(unsafe_topsort(grwork), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 112, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 112, + 9 + ] + } + }); } function height(param) { @@ -487,11 +487,11 @@ function bal(l, v, r) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -503,11 +503,11 @@ function bal(l, v, r) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -520,11 +520,11 @@ function bal(l, v, r) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -536,11 +536,11 @@ function bal(l, v, r) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } function add(x, param) { @@ -625,10 +625,10 @@ function min_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -659,10 +659,10 @@ function max_elt(_param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -691,11 +691,11 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1110,10 +1110,10 @@ function find(x, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = Caml.string_compare(x, v); @@ -1130,10 +1130,10 @@ function find_first(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1196,10 +1196,10 @@ function find_last(f, _param) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1407,15 +1407,15 @@ function of_list(l) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l$1), l$1)[0]; } else { @@ -1479,14 +1479,14 @@ function pathsort(graph) { let set = param[0]; if (mem(node, set)) { throw new Error(Cycle, { - cause: { - RE_EXN_ID: Cycle, - _1: { - hd: node, - tl: stack - } - } - }); + cause: { + RE_EXN_ID: Cycle, + _1: { + hd: node, + tl: stack + } + } + }); } return [ add(node, set), @@ -1538,15 +1538,15 @@ if (!Caml_obj.equal(pathsort(grwork), { } })) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 144, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 144, + 9 + ] + } + }); } try { @@ -1558,15 +1558,15 @@ try { tl: grwork }); throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 148, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 148, + 2 + ] + } + }); } catch (raw_exn) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); let exit = 0; @@ -1596,15 +1596,15 @@ try { } if (exit === 1) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "topsort_test.res", - 151, - 7 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "topsort_test.res", + 151, + 7 + ] + } + }); } } diff --git a/jscomp/test/uncurried_cast.js b/jscomp/test/uncurried_cast.js index 56e3fa54c2..1546d3777a 100644 --- a/jscomp/test/uncurried_cast.js +++ b/jscomp/test/uncurried_cast.js @@ -6,8 +6,8 @@ let Caml_exceptions = require("../../lib/js/caml_exceptions.js"); function raise(e) { throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } let map = Belt_List.mapU; @@ -25,10 +25,10 @@ let E = /* @__PURE__ */Caml_exceptions.create("Uncurried_cast.E"); function testRaise() { throw new Error(E, { - cause: { - RE_EXN_ID: E - } - }); + cause: { + RE_EXN_ID: E + } + }); } let l = Belt_List.mapU({ @@ -71,10 +71,10 @@ let StandardNotation = { function testRaise$1() { throw new Error(E, { - cause: { - RE_EXN_ID: E - } - }); + cause: { + RE_EXN_ID: E + } + }); } let l$1 = Belt_List.mapU({ diff --git a/jscomp/test/variant.js b/jscomp/test/variant.js index 88ce5881f4..d288abaca6 100644 --- a/jscomp/test/variant.js +++ b/jscomp/test/variant.js @@ -94,8 +94,8 @@ function rollback_path(subst, p) { } } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } } @@ -132,8 +132,8 @@ function fooExn(f) { return match[0] + match[1] | 0; } throw new Error(n.RE_EXN_ID, { - cause: n - }); + cause: n + }); } } diff --git a/lib/es6/arg.js b/lib/es6/arg.js index db53fea454..bd24d4e8e7 100644 --- a/lib/es6/arg.js +++ b/lib/es6/arg.js @@ -32,10 +32,10 @@ function assoc3(x, _l) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -60,14 +60,14 @@ function make_symlist(prefix, sep, suffix, l) { function help_action() { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Unknown", - _0: "-help" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Unknown", + _0: "-help" + } + } + }); } function add_help(speclist) { @@ -91,8 +91,8 @@ function add_help(speclist) { }; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } let add2; @@ -115,8 +115,8 @@ function add_help(speclist) { }; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } return Pervasives.$at(speclist, Pervasives.$at(add1, add2)); @@ -162,8 +162,8 @@ function bool_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -176,8 +176,8 @@ function int_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -190,8 +190,8 @@ function float_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -264,23 +264,23 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Unknown", - _0: s - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Unknown", + _0: s + } + } + }); } throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } let follow = match[1]; @@ -289,16 +289,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return; } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: follow, - _2: "no argument" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: follow, + _2: "no argument" + } + } + }); }; let get_arg = function () { if (follow !== undefined) { @@ -308,14 +308,14 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return Caml_array.get(argv.contents, current.contents + 1 | 0); } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Missing", - _0: s - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Missing", + _0: s + } + } + }); }; let consume_arg = function () { if (follow !== undefined) { @@ -336,16 +336,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(s$1); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg, - _2: "a boolean" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg, + _2: "a boolean" + } + } + }); } return consume_arg(); case "Set" : @@ -370,16 +370,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(x); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$2, - _2: "an integer" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$2, + _2: "an integer" + } + } + }); } return consume_arg(); case "Set_int" : @@ -389,16 +389,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0.contents = x$1; } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$3, - _2: "an integer" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$3, + _2: "an integer" + } + } + }); } return consume_arg(); case "Float" : @@ -408,16 +408,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(x$2); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$4, - _2: "a float" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$4, + _2: "a float" + } + } + }); } return consume_arg(); case "Set_float" : @@ -427,16 +427,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0.contents = x$3; } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$5, - _2: "a float" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$5, + _2: "a float" + } + } + }); } return consume_arg(); case "Tuple" : @@ -449,16 +449,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return consume_arg(); } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$6, - _2: "one of: " + make_symlist("", " ", "", symb) - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$6, + _2: "one of: " + make_symlist("", " ", "", symb) + } + } + }); case "Rest" : let f$1 = f._0; while (current.contents < (argv.contents.length - 1 | 0)) { @@ -469,11 +469,11 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist case "Expand" : if (!allow_expand) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" + } + }); } let arg$7 = get_arg(); let newarg = f._0(arg$7); @@ -501,23 +501,23 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let m = Caml_js_exceptions.internalToOCamlException(raw_m); if (m.RE_EXN_ID === Bad) { throw new Error(convert_error({ - TAG: "Message", - _0: m._1 - }).RE_EXN_ID, { - cause: convert_error({ - TAG: "Message", - _0: m._1 - }) - }); + TAG: "Message", + _0: m._1 + }).RE_EXN_ID, { + cause: convert_error({ + TAG: "Message", + _0: m._1 + }) + }); } if (m.RE_EXN_ID === Stop) { throw new Error(convert_error(m._1).RE_EXN_ID, { - cause: convert_error(m._1) - }); + cause: convert_error(m._1) + }); } throw new Error(m.RE_EXN_ID, { - cause: m - }); + cause: m + }); } current.contents = current.contents + 1 | 0; }; @@ -555,8 +555,8 @@ function parse(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -574,8 +574,8 @@ function parse_dynamic(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -602,8 +602,8 @@ function parse_expand(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -639,8 +639,8 @@ function second_word(s) { return len; } throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } if (exit === 2) { return loop(n$1 + 1 | 0); @@ -648,8 +648,8 @@ function second_word(s) { } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } return loop(n + 1 | 0); diff --git a/lib/es6/array.js b/lib/es6/array.js index 85f8553031..badec4a0e5 100644 --- a/lib/es6/array.js +++ b/lib/es6/array.js @@ -15,11 +15,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f(0)); for (let i = 1; i < l; ++i) { @@ -59,11 +59,11 @@ function append(a1, a2) { function sub(a, ofs, len) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.sub" + } + }); } return Caml_array.sub(a, ofs, len); } @@ -71,11 +71,11 @@ function sub(a, ofs, len) { function fill(a, ofs, len, v) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.fill" + } + }); } for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; @@ -85,11 +85,11 @@ function fill(a, ofs, len, v) { function blit(a1, ofs1, a2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (a1.length - len | 0) || ofs2 < 0 || ofs2 > (a2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.blit" + } + }); } Caml_array.blit(a1, ofs1, a2, ofs2, len); } @@ -103,11 +103,11 @@ function iter(f, a) { function iter2(f, a, b) { if (a.length !== b.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.iter2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.iter2: arrays must have the same length" + } + }); } for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); @@ -131,11 +131,11 @@ function map2(f, a, b) { let lb = b.length; if (la !== lb) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.map2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.map2: arrays must have the same length" + } + }); } if (la === 0) { return []; @@ -318,11 +318,11 @@ function sort(cmp, a) { return i31; } throw new Error(Bottom, { - cause: { - RE_EXN_ID: Bottom, - _1: i - } - }); + cause: { + RE_EXN_ID: Bottom, + _1: i + } + }); }; let trickle = function (l, i, e) { try { @@ -343,8 +343,8 @@ function sort(cmp, a) { return Caml_array.set(a, i$2._1, e); } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let bubble = function (l, i) { @@ -363,8 +363,8 @@ function sort(cmp, a) { return i$2._1; } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let trickleup = function (_i, e) { @@ -373,15 +373,15 @@ function sort(cmp, a) { let father = (i - 1 | 0) / 3 | 0; if (i === father) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "array.res", - 321, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "array.res", + 321, + 4 + ] + } + }); } if (cmp(Caml_array.get(a, father), e) >= 0) { return Caml_array.set(a, i, e); diff --git a/lib/es6/arrayLabels.js b/lib/es6/arrayLabels.js index fdd07f461f..db8c5e22db 100644 --- a/lib/es6/arrayLabels.js +++ b/lib/es6/arrayLabels.js @@ -15,11 +15,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f(0)); for (let i = 1; i < l; ++i) { @@ -59,11 +59,11 @@ function append(a1, a2) { function sub(a, ofs, len) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.sub" + } + }); } return Caml_array.sub(a, ofs, len); } @@ -71,11 +71,11 @@ function sub(a, ofs, len) { function fill(a, ofs, len, v) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.fill" + } + }); } for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; @@ -85,11 +85,11 @@ function fill(a, ofs, len, v) { function blit(a1, ofs1, a2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (a1.length - len | 0) || ofs2 < 0 || ofs2 > (a2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.blit" + } + }); } Caml_array.blit(a1, ofs1, a2, ofs2, len); } @@ -103,11 +103,11 @@ function iter(f, a) { function iter2(f, a, b) { if (a.length !== b.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.iter2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.iter2: arrays must have the same length" + } + }); } for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); @@ -131,11 +131,11 @@ function map2(f, a, b) { let lb = b.length; if (la !== lb) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.map2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.map2: arrays must have the same length" + } + }); } if (la === 0) { return []; @@ -318,11 +318,11 @@ function sort(cmp, a) { return i31; } throw new Error(Bottom, { - cause: { - RE_EXN_ID: Bottom, - _1: i - } - }); + cause: { + RE_EXN_ID: Bottom, + _1: i + } + }); }; let trickle = function (l, i, e) { try { @@ -343,8 +343,8 @@ function sort(cmp, a) { return Caml_array.set(a, i$2._1, e); } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let bubble = function (l, i) { @@ -363,8 +363,8 @@ function sort(cmp, a) { return i$2._1; } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let trickleup = function (_i, e) { @@ -373,15 +373,15 @@ function sort(cmp, a) { let father = (i - 1 | 0) / 3 | 0; if (i === father) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "arrayLabels.res", - 321, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "arrayLabels.res", + 321, + 4 + ] + } + }); } if (cmp(Caml_array.get(a, father), e) >= 0) { return Caml_array.set(a, i, e); diff --git a/lib/es6/belt_Array.js b/lib/es6/belt_Array.js index 456978922a..6ba3ca9788 100644 --- a/lib/es6/belt_Array.js +++ b/lib/es6/belt_Array.js @@ -13,15 +13,15 @@ function get(arr, i) { function getExn(arr, i) { if (!(i >= 0 && i < arr.length)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_Array.res", - 36, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_Array.res", + 36, + 2 + ] + } + }); } return arr[i]; } @@ -38,15 +38,15 @@ function set(arr, i, v) { function setExn(arr, i, v) { if (!(i >= 0 && i < arr.length)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_Array.res", - 49, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_Array.res", + 49, + 2 + ] + } + }); } arr[i] = v; } diff --git a/lib/es6/belt_List.js b/lib/es6/belt_List.js index c1cf1af1e9..ea587f3fcd 100644 --- a/lib/es6/belt_List.js +++ b/lib/es6/belt_List.js @@ -16,10 +16,10 @@ function headExn(x) { return x.hd; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function tail(x) { @@ -34,10 +34,10 @@ function tailExn(x) { return x.tl; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function add(xs, x) { @@ -72,10 +72,10 @@ function get(x, n) { function getExn(x, n) { if (n < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let _x = x; let _n = n; @@ -91,10 +91,10 @@ function getExn(x, n) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_MutableQueue.js b/lib/es6/belt_MutableQueue.js index 9fd5eda359..254d27cb79 100644 --- a/lib/es6/belt_MutableQueue.js +++ b/lib/es6/belt_MutableQueue.js @@ -55,10 +55,10 @@ function peekExn(q) { return v.content; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function pop(q) { @@ -91,10 +91,10 @@ function popExn(q) { } } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function popUndefined(q) { diff --git a/lib/es6/belt_Option.js b/lib/es6/belt_Option.js index 840279441c..ecc0fa749c 100644 --- a/lib/es6/belt_Option.js +++ b/lib/es6/belt_Option.js @@ -33,10 +33,10 @@ function getExn(x) { return Caml_option.valFromOption(x); } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function mapWithDefaultU(opt, $$default, f) { diff --git a/lib/es6/belt_Result.js b/lib/es6/belt_Result.js index e3594b9633..caffcf0e41 100644 --- a/lib/es6/belt_Result.js +++ b/lib/es6/belt_Result.js @@ -6,10 +6,10 @@ function getExn(x) { return x._0; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function mapWithDefaultU(opt, $$default, f) { diff --git a/lib/es6/belt_internalAVLset.js b/lib/es6/belt_internalAVLset.js index 9efd4d54ee..82c2aa4996 100644 --- a/lib/es6/belt_internalAVLset.js +++ b/lib/es6/belt_internalAVLset.js @@ -380,15 +380,15 @@ function checkInvariantInternal(_v) { ) | 0; if (!(diff <= 2 && diff >= -2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_internalAVLset.res", - 319, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_internalAVLset.res", + 319, + 4 + ] + } + }); } checkInvariantInternal(l); _v = r; @@ -749,10 +749,10 @@ function getExn(_n, x, cmp) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_internalAVLtree.js b/lib/es6/belt_internalAVLtree.js index 8051373490..759a7b964b 100644 --- a/lib/es6/belt_internalAVLtree.js +++ b/lib/es6/belt_internalAVLtree.js @@ -607,15 +607,15 @@ function checkInvariantInternal(_v) { let diff = treeHeight(l) - treeHeight(r) | 0; if (!(diff <= 2 && diff >= -2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_internalAVLtree.res", - 457, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_internalAVLtree.res", + 457, + 4 + ] + } + }); } checkInvariantInternal(l); _v = r; @@ -922,10 +922,10 @@ function getExn(_n, x, cmp) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_internalMapInt.js b/lib/es6/belt_internalMapInt.js index 9eafd19789..ca244dd3dd 100644 --- a/lib/es6/belt_internalMapInt.js +++ b/lib/es6/belt_internalMapInt.js @@ -63,10 +63,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_internalMapString.js b/lib/es6/belt_internalMapString.js index 0a859913f3..4f84afba47 100644 --- a/lib/es6/belt_internalMapString.js +++ b/lib/es6/belt_internalMapString.js @@ -63,10 +63,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_internalSetInt.js b/lib/es6/belt_internalSetInt.js index fe1298b0cc..25243c2d97 100644 --- a/lib/es6/belt_internalSetInt.js +++ b/lib/es6/belt_internalSetInt.js @@ -142,10 +142,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/belt_internalSetString.js b/lib/es6/belt_internalSetString.js index d1982740ae..cf752d348b 100644 --- a/lib/es6/belt_internalSetString.js +++ b/lib/es6/belt_internalSetString.js @@ -142,10 +142,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/es6/buffer.js b/lib/es6/buffer.js index 6d94bab7c4..13da86c768 100644 --- a/lib/es6/buffer.js +++ b/lib/es6/buffer.js @@ -27,11 +27,11 @@ function to_bytes(b) { function sub(b, ofs, len) { if (ofs < 0 || len < 0 || ofs > (b.position - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.sub" + } + }); } return Bytes.sub_string(b.buffer, ofs, len); } @@ -39,11 +39,11 @@ function sub(b, ofs, len) { function blit(src, srcoff, dst, dstoff, len) { if (len < 0 || srcoff < 0 || srcoff > (src.position - len | 0) || dstoff < 0 || dstoff > (dst.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.blit" + } + }); } Bytes.blit(src.buffer, srcoff, dst, dstoff, len); } @@ -51,11 +51,11 @@ function blit(src, srcoff, dst, dstoff, len) { function nth(b, ofs) { if (ofs < 0 || ofs >= b.position) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.nth" + } + }); } return b.buffer[ofs]; } @@ -99,15 +99,15 @@ function add_utf_8_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 98, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 98, + 18 + ] + } + }); } if (u$1 <= 127) { return add_char(b, u$1); @@ -146,30 +146,30 @@ function add_utf_8_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 127, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 127, + 9 + ] + } + }); } function add_utf_16be_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 132, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 132, + 18 + ] + } + }); } if (u$1 <= 65535) { let pos = b.position; @@ -197,30 +197,30 @@ function add_utf_16be_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 154, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 154, + 9 + ] + } + }); } function add_utf_16le_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 159, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 159, + 18 + ] + } + }); } if (u$1 <= 65535) { let pos = b.position; @@ -248,25 +248,25 @@ function add_utf_16le_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 181, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 181, + 9 + ] + } + }); } function add_substring(b, s, offset, len) { if (offset < 0 || len < 0 || offset > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.add_substring/add_subbytes" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.add_substring/add_subbytes" + } + }); } let new_position = b.position + len | 0; if (new_position > b.length) { @@ -306,15 +306,15 @@ function closing(param) { return /* '}' */125; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 216, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 216, + 9 + ] + } + }); } function advance_to_closing(opening, closing, k, s, start) { @@ -326,10 +326,10 @@ function advance_to_closing(opening, closing, k, s, start) { let k$1 = _k; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (Caml_string.get(s, i) === opening) { _i = i + 1 | 0; @@ -384,10 +384,10 @@ function advance_to_non_alpha(s, start) { function find_ident(s, start, lim) { if (start >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml_string.get(s, start); if (c !== 40 && c !== 123) { @@ -456,11 +456,11 @@ function add_substitute(b, f, s) { function truncate(b, len) { if (len < 0 || len > b.position) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.truncate" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.truncate" + } + }); } b.position = len; } diff --git a/lib/es6/bytes.js b/lib/es6/bytes.js index 184cab20ef..ef34d50b27 100644 --- a/lib/es6/bytes.js +++ b/lib/es6/bytes.js @@ -111,11 +111,11 @@ function of_string(s) { function sub(s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.sub / Bytes.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.sub / Bytes.sub" + } + }); } let r = Caml_bytes.create(len); unsafe_blit(s, ofs, r, 0, len); @@ -139,22 +139,22 @@ function $plus$plus(a, b) { return c; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } if (match$1) { return c; } if (match$2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } return c; } @@ -181,11 +181,11 @@ function extend(s, left, right) { function fill(s, ofs, len, c) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.fill / Bytes.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.fill / Bytes.fill" + } + }); } unsafe_fill(s, ofs, len, c); } @@ -193,11 +193,11 @@ function fill(s, ofs, len, c) { function blit(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.blit" + } + }); } unsafe_blit(s1, ofs1, s2, ofs2, len); } @@ -205,11 +205,11 @@ function blit(s1, ofs1, s2, ofs2, len) { function blit_string(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.blit / Bytes.blit_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.blit / Bytes.blit_string" + } + }); } if (len <= 0) { return; @@ -246,11 +246,11 @@ function ensure_ge(x, y) { return x; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.concat" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.concat" + } + }); } function sum_lengths(_acc, seplen, _param) { @@ -490,10 +490,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -529,11 +529,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -542,11 +542,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -556,10 +556,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -576,11 +576,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -606,11 +606,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -619,11 +619,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -634,8 +634,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -646,11 +646,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -661,8 +661,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/bytesLabels.js b/lib/es6/bytesLabels.js index 184cab20ef..ef34d50b27 100644 --- a/lib/es6/bytesLabels.js +++ b/lib/es6/bytesLabels.js @@ -111,11 +111,11 @@ function of_string(s) { function sub(s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.sub / Bytes.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.sub / Bytes.sub" + } + }); } let r = Caml_bytes.create(len); unsafe_blit(s, ofs, r, 0, len); @@ -139,22 +139,22 @@ function $plus$plus(a, b) { return c; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } if (match$1) { return c; } if (match$2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } return c; } @@ -181,11 +181,11 @@ function extend(s, left, right) { function fill(s, ofs, len, c) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.fill / Bytes.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.fill / Bytes.fill" + } + }); } unsafe_fill(s, ofs, len, c); } @@ -193,11 +193,11 @@ function fill(s, ofs, len, c) { function blit(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.blit" + } + }); } unsafe_blit(s1, ofs1, s2, ofs2, len); } @@ -205,11 +205,11 @@ function blit(s1, ofs1, s2, ofs2, len) { function blit_string(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.blit / Bytes.blit_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.blit / Bytes.blit_string" + } + }); } if (len <= 0) { return; @@ -246,11 +246,11 @@ function ensure_ge(x, y) { return x; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.concat" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.concat" + } + }); } function sum_lengths(_acc, seplen, _param) { @@ -490,10 +490,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -529,11 +529,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -542,11 +542,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -556,10 +556,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -576,11 +576,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -606,11 +606,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -619,11 +619,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -634,8 +634,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -646,11 +646,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -661,8 +661,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/caml_array.js b/lib/es6/caml_array.js index 38a64d8b5d..692a92b75e 100644 --- a/lib/es6/caml_array.js +++ b/lib/es6/caml_array.js @@ -58,11 +58,11 @@ function concat(l) { function set(xs, index, newval) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } xs[index] = newval; } @@ -70,11 +70,11 @@ function set(xs, index, newval) { function get(xs, index) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return xs[index]; } diff --git a/lib/es6/caml_bigint.js b/lib/es6/caml_bigint.js index 82eb6a5c15..bdac616c54 100644 --- a/lib/es6/caml_bigint.js +++ b/lib/es6/caml_bigint.js @@ -4,10 +4,10 @@ function div(x, y) { if (y === 0n) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x / y; } @@ -15,10 +15,10 @@ function div(x, y) { function mod_(x, y) { if (y === 0n) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x % y; } diff --git a/lib/es6/caml_bytes.js b/lib/es6/caml_bytes.js index 9d09897839..72ae5a5032 100644 --- a/lib/es6/caml_bytes.js +++ b/lib/es6/caml_bytes.js @@ -4,11 +4,11 @@ function set(s, i, ch) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } s[i] = ch; } @@ -16,11 +16,11 @@ function set(s, i, ch) { function get(s, i) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return s[i]; } @@ -28,11 +28,11 @@ function get(s, i) { function create(len) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.create" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.create" + } + }); } let result = new Array(len); for (let i = 0; i < len; ++i) { diff --git a/lib/es6/caml_format.js b/lib/es6/caml_format.js index 83aa2563df..debf240abf 100644 --- a/lib/es6/caml_format.js +++ b/lib/es6/caml_format.js @@ -130,11 +130,11 @@ function int_of_string(s) { let d = parse_digit(c); if (d < 0 || d >= base) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } let aux = function (_acc, _k) { while (true) { @@ -151,20 +151,20 @@ function int_of_string(s) { let v = parse_digit(a); if (v < 0 || v >= base) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } let acc$1 = base * acc + v; if (acc$1 > threshold) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } _k = k + 1 | 0; _acc = acc$1; @@ -175,11 +175,11 @@ function int_of_string(s) { let or_res = res | 0; if (base === 10 && res !== or_res) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } return or_res; } @@ -219,11 +219,11 @@ function int64_of_string(s) { let d = Caml_int64.of_int32(parse_digit(c)); if (Caml.i64_lt(d, Caml_int64.zero) || Caml.i64_ge(d, base)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } let aux = function (_acc, _k) { while (true) { @@ -240,11 +240,11 @@ function int64_of_string(s) { let v = Caml_int64.of_int32(parse_digit(a)); if (Caml.i64_lt(v, Caml_int64.zero) || Caml.i64_ge(v, base) || Caml.i64_gt(acc, threshold)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } let acc$1 = Caml_int64.add(Caml_int64.mul(base, acc), v); _k = k + 1 | 0; @@ -259,11 +259,11 @@ function int64_of_string(s) { 10 ]) && Caml.i64_neq(res, or_res)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } return or_res; } @@ -291,11 +291,11 @@ function parse_format(fmt) { let len = fmt.length; if (len > 31) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "format_int: format too long" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "format_int: format too long" + } + }); } let f = { justify: "+", diff --git a/lib/es6/caml_int32.js b/lib/es6/caml_int32.js index d1e7064277..b5cd97b472 100644 --- a/lib/es6/caml_int32.js +++ b/lib/es6/caml_int32.js @@ -4,10 +4,10 @@ function div(x, y) { if (y === 0) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x / y | 0; } @@ -15,10 +15,10 @@ function div(x, y) { function mod_(x, y) { if (y === 0) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x % y; } diff --git a/lib/es6/caml_int64.js b/lib/es6/caml_int64.js index 9f8026650d..14bae1175a 100644 --- a/lib/es6/caml_int64.js +++ b/lib/es6/caml_int64.js @@ -384,10 +384,10 @@ function div(_self, _other) { exit$1 = 2; } else { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } if (exit$1 === 2) { if (self_hi !== -2147483648) { diff --git a/lib/es6/caml_module.js b/lib/es6/caml_module.js index 32bd67e951..55a5dc88d5 100644 --- a/lib/es6/caml_module.js +++ b/lib/es6/caml_module.js @@ -5,11 +5,11 @@ import * as Caml_obj from "./caml_obj.js"; function init_mod(loc, shape) { let undef_module = function (param) { throw new Error("Undefined_recursive_module", { - cause: { - RE_EXN_ID: "Undefined_recursive_module", - _1: loc - } - }); + cause: { + RE_EXN_ID: "Undefined_recursive_module", + _1: loc + } + }); }; let loop = function (shape, struct_, idx) { if (typeof shape !== "object") { @@ -75,15 +75,15 @@ function update_mod(shape, o, n) { }; if (typeof shape !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "caml_module.res", - 109, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "caml_module.res", + 109, + 9 + ] + } + }); } if (shape.TAG === "Module") { let comps = shape._0; @@ -95,15 +95,15 @@ function update_mod(shape, o, n) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "caml_module.res", - 109, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "caml_module.res", + 109, + 9 + ] + } + }); } export { diff --git a/lib/es6/caml_obj.js b/lib/es6/caml_obj.js index a2c64e0554..8fc4b04320 100644 --- a/lib/es6/caml_obj.js +++ b/lib/es6/caml_obj.js @@ -56,11 +56,11 @@ function compare(a, b) { case "function" : if (b_type === "function") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "compare: functional value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "compare: functional value" + } + }); } break; case "number" : @@ -137,11 +137,11 @@ function compare(a, b) { } if (tag_a === 251) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: abstract value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: abstract value" + } + }); } if (tag_a !== tag_b) { if (tag_a < tag_b) { @@ -267,11 +267,11 @@ function equal(a, b) { let b_type = typeof b; if (a_type === "function" || b_type === "function") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: functional value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: functional value" + } + }); } if (b_type === "number" || b_type === "bigint" || b_type === "undefined" || b === null) { return false; @@ -283,11 +283,11 @@ function equal(a, b) { } if (tag_a === 251) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: abstract value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: abstract value" + } + }); } if (tag_a !== tag_b) { return false; diff --git a/lib/es6/caml_string.js b/lib/es6/caml_string.js index 4ed21b8024..8fe93ba893 100644 --- a/lib/es6/caml_string.js +++ b/lib/es6/caml_string.js @@ -4,11 +4,11 @@ function get(s, i) { if (i >= s.length || i < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return s.codePointAt(i); } diff --git a/lib/es6/caml_sys.js b/lib/es6/caml_sys.js index d0a2aa2bea..c1b42a6668 100644 --- a/lib/es6/caml_sys.js +++ b/lib/es6/caml_sys.js @@ -4,20 +4,20 @@ function sys_getenv(s) { if (typeof process === "undefined" || process.env === undefined) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let x = process.env[s]; if (x !== undefined) { return x; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let os_type = (function(_){ @@ -74,20 +74,20 @@ function sys_exit(exit_code) { function sys_is_directory(_s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "sys_is_directory not implemented" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "sys_is_directory not implemented" + } + }); } function sys_file_exists(_s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "sys_file_exists not implemented" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "sys_file_exists not implemented" + } + }); } export { diff --git a/lib/es6/camlinternalLazy.js b/lib/es6/camlinternalLazy.js index b7f110ecdf..4e8978398a 100644 --- a/lib/es6/camlinternalLazy.js +++ b/lib/es6/camlinternalLazy.js @@ -17,10 +17,10 @@ function forward_with_closure(blk, closure) { function raise_undefined() { throw new Error(Undefined, { - cause: { - RE_EXN_ID: Undefined - } - }); + cause: { + RE_EXN_ID: Undefined + } + }); } function force(lzv) { @@ -34,12 +34,12 @@ function force(lzv) { } catch (e) { lzv.VAL = (function () { throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); }); throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } } } diff --git a/lib/es6/char.js b/lib/es6/char.js index 4cdf7f79be..f9da73cd4f 100644 --- a/lib/es6/char.js +++ b/lib/es6/char.js @@ -5,11 +5,11 @@ import * as Bytes from "./bytes.js"; function chr(n) { if (n < 0 || n > 255) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Char.chr" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Char.chr" + } + }); } return n; } diff --git a/lib/es6/digest.js b/lib/es6/digest.js index 04c8b1d33b..b5a203d3d8 100644 --- a/lib/es6/digest.js +++ b/lib/es6/digest.js @@ -18,11 +18,11 @@ function bytes(b) { function substring(str, ofs, len) { if (ofs < 0 || len < 0 || ofs > (str.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.substring" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.substring" + } + }); } return Caml_md5.md5_string(str, ofs, len); } @@ -40,11 +40,11 @@ function char_hex(n) { function to_hex(d) { if (d.length !== 16) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.to_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.to_hex" + } + }); } let result = Caml_bytes.create(32); for (let i = 0; i <= 15; ++i) { @@ -58,42 +58,42 @@ function to_hex(d) { function from_hex(s) { if (s.length !== 32) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } let digit = function (c) { if (c >= 65) { if (c >= 97) { if (c >= 103) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return (c - /* 'a' */97 | 0) + 10 | 0; } if (c >= 71) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return (c - /* 'A' */65 | 0) + 10 | 0; } if (c > 57 || c < 48) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return c - /* '0' */48 | 0; }; diff --git a/lib/es6/filename.js b/lib/es6/filename.js index f4bc6b7a68..7eff32f9f3 100644 --- a/lib/es6/filename.js +++ b/lib/es6/filename.js @@ -124,8 +124,8 @@ try { temp_dir_name = "/tmp"; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -206,8 +206,8 @@ try { temp_dir_name$1 = "."; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } @@ -383,11 +383,11 @@ function chop_suffix(name, suff) { let n = name.length - suff.length | 0; if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Filename.chop_suffix" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Filename.chop_suffix" + } + }); } return $$String.sub(name, 0, n); } @@ -431,11 +431,11 @@ function chop_extension(name) { let l = extension_len(name); if (l === 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Filename.chop_extension" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Filename.chop_extension" + } + }); } return $$String.sub(name, 0, name.length - l | 0); } diff --git a/lib/es6/genlex.js b/lib/es6/genlex.js index eb5e31a19a..9e2005ad19 100644 --- a/lib/es6/genlex.js +++ b/lib/es6/genlex.js @@ -61,8 +61,8 @@ function make_lexer(keywords) { }; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; let keyword_or_error = function (c) { @@ -73,15 +73,15 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "Illegal character " + s - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "Illegal character " + s + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; let next_token = function (strm__) { @@ -121,25 +121,25 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } let match = Stream.peek(strm__); if (match !== undefined) { if (match !== 39) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); return { @@ -148,11 +148,11 @@ function make_lexer(keywords) { }; } throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); case 40 : Stream.junk(strm__); let match$1 = Stream.peek(strm__); @@ -476,15 +476,15 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } store(c$1); continue; @@ -493,10 +493,10 @@ function make_lexer(keywords) { return get_string(); } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); }; }; let char = function (strm__) { @@ -513,22 +513,22 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; let escape = function (strm__) { @@ -556,49 +556,49 @@ function make_lexer(keywords) { if (c2 !== undefined) { if (c2 > 57 || c2 < 48) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); let c3 = Stream.peek(strm__); if (c3 !== undefined) { if (c3 > 57 || c3 < 48) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - Stream.junk(strm__); - return Char.chr((Math.imul(c1 - 48 | 0, 100) + Math.imul(c2 - 48 | 0, 10) | 0) + (c3 - 48 | 0) | 0); - } - throw new Error(Stream.$$Error, { cause: { RE_EXN_ID: Stream.$$Error, _1: "" } }); + } + Stream.junk(strm__); + return Char.chr((Math.imul(c1 - 48 | 0, 100) + Math.imul(c2 - 48 | 0, 10) | 0) + (c3 - 48 | 0) | 0); + } + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); return c1; } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; let comment = function (strm__) { @@ -620,10 +620,10 @@ function make_lexer(keywords) { } } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); case 42 : Stream.junk(strm__); while (true) { @@ -641,10 +641,10 @@ function make_lexer(keywords) { return; } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); }; default: Stream.junk(strm__); @@ -652,10 +652,10 @@ function make_lexer(keywords) { } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; }; diff --git a/lib/es6/hashtbl.js b/lib/es6/hashtbl.js index 8a47150ae6..6a8a0e8b92 100644 --- a/lib/es6/hashtbl.js +++ b/lib/es6/hashtbl.js @@ -112,15 +112,15 @@ function copy_bucketlist(param) { }; if (typeof prec !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "hashtbl.res", - 110, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "hashtbl.res", + 110, + 19 + ] + } + }); } prec.next = r; _param = next; @@ -255,10 +255,10 @@ function find(h, key) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -268,10 +268,10 @@ function find(h, key) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -281,10 +281,10 @@ function find(h, key) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -297,10 +297,10 @@ function find(h, key) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; @@ -471,13 +471,13 @@ function iter(f, h) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -528,13 +528,13 @@ function filter_map_inplace(f, h) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -571,13 +571,13 @@ function fold(f, h, init) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -661,10 +661,10 @@ function MakeSeeded(H) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -674,10 +674,10 @@ function MakeSeeded(H) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -687,10 +687,10 @@ function MakeSeeded(H) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -703,10 +703,10 @@ function MakeSeeded(H) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; @@ -909,10 +909,10 @@ function Make(H) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -922,10 +922,10 @@ function Make(H) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -935,10 +935,10 @@ function Make(H) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -951,10 +951,10 @@ function Make(H) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; diff --git a/lib/es6/int32.js b/lib/es6/int32.js index 7a18fc37ad..044b7687ef 100644 --- a/lib/es6/int32.js +++ b/lib/es6/int32.js @@ -37,8 +37,8 @@ function of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/int64.js b/lib/es6/int64.js index aaa83e9271..1c102d7b2f 100644 --- a/lib/es6/int64.js +++ b/lib/es6/int64.js @@ -30,8 +30,8 @@ function of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/js_exn.js b/lib/es6/js_exn.js index 6df4f31f32..5d9a1f8fa9 100644 --- a/lib/es6/js_exn.js +++ b/lib/es6/js_exn.js @@ -3,44 +3,44 @@ function raiseError(str) { throw new Error(new Error(str).RE_EXN_ID, { - cause: new Error(str) - }); + cause: new Error(str) + }); } function raiseEvalError(str) { throw new Error(new EvalError(str).RE_EXN_ID, { - cause: new EvalError(str) - }); + cause: new EvalError(str) + }); } function raiseRangeError(str) { throw new Error(new RangeError(str).RE_EXN_ID, { - cause: new RangeError(str) - }); + cause: new RangeError(str) + }); } function raiseReferenceError(str) { throw new Error(new ReferenceError(str).RE_EXN_ID, { - cause: new ReferenceError(str) - }); + cause: new ReferenceError(str) + }); } function raiseSyntaxError(str) { throw new Error(new SyntaxError(str).RE_EXN_ID, { - cause: new SyntaxError(str) - }); + cause: new SyntaxError(str) + }); } function raiseTypeError(str) { throw new Error(new TypeError(str).RE_EXN_ID, { - cause: new TypeError(str) - }); + cause: new TypeError(str) + }); } function raiseUriError(str) { throw new Error(new URIError(str).RE_EXN_ID, { - cause: new URIError(str) - }); + cause: new URIError(str) + }); } let $$Error$1 = "JsError"; diff --git a/lib/es6/js_null.js b/lib/es6/js_null.js index c6706e56a8..4a30b70360 100644 --- a/lib/es6/js_null.js +++ b/lib/es6/js_null.js @@ -11,8 +11,8 @@ function getExn(f) { return f; } throw new Error(new Error("Js.Null.getExn").RE_EXN_ID, { - cause: new Error("Js.Null.getExn") - }); + cause: new Error("Js.Null.getExn") + }); } function bind(x, f) { diff --git a/lib/es6/js_option.js b/lib/es6/js_option.js index 73e0a2f8ad..b24505acab 100644 --- a/lib/es6/js_option.js +++ b/lib/es6/js_option.js @@ -27,8 +27,8 @@ function getExn(x) { return Caml_option.valFromOption(x); } throw new Error(new Error("getExn").RE_EXN_ID, { - cause: new Error("getExn") - }); + cause: new Error("getExn") + }); } function equal(eq, a, b) { diff --git a/lib/es6/js_undefined.js b/lib/es6/js_undefined.js index 68411f013f..762283d3da 100644 --- a/lib/es6/js_undefined.js +++ b/lib/es6/js_undefined.js @@ -15,8 +15,8 @@ function getExn(f) { return f; } throw new Error(new Error("Js.Undefined.getExn").RE_EXN_ID, { - cause: new Error("Js.Undefined.getExn") - }); + cause: new Error("Js.Undefined.getExn") + }); } function bind(x, f) { diff --git a/lib/es6/lexing.js b/lib/es6/lexing.js index 0b3f058f7a..ab69f5bfac 100644 --- a/lib/es6/lexing.js +++ b/lib/es6/lexing.js @@ -55,11 +55,11 @@ function from_function(f) { let newlen = (x.lex_buffer.length << 1); if (((x.lex_buffer_len - x.lex_start_pos | 0) + n | 0) > newlen) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Lexing.lex_refill: cannot grow buffer" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Lexing.lex_refill: cannot grow buffer" + } + }); } let newbuf = Caml_bytes.create(newlen); Bytes.blit(x.lex_buffer, x.lex_start_pos, newbuf, 0, x.lex_buffer_len - x.lex_start_pos | 0); diff --git a/lib/es6/list.js b/lib/es6/list.js index cafe8427db..27207c1d45 100644 --- a/lib/es6/list.js +++ b/lib/es6/list.js @@ -31,11 +31,11 @@ function hd(param) { return param.hd; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "hd" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "hd" + } + }); } function tl(param) { @@ -43,21 +43,21 @@ function tl(param) { return param.tl; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "tl" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "tl" + } + }); } function nth(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -73,22 +73,22 @@ function nth(l, n) { continue; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "nth" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "nth" + } + }); }; } function nth_opt(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -157,11 +157,11 @@ function init_aux(i, n, f) { function init(len, f) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.init" + } + }); } if (len > 10000) { return rev_append(init_tailrec_aux(/* [] */0, 0, len, f), /* [] */0); @@ -281,21 +281,21 @@ function map2(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } function rev_map2(f, l1, l2) { @@ -317,19 +317,19 @@ function rev_map2(f, l1, l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } if (l2$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } return accu; }; @@ -347,21 +347,21 @@ function iter2(f, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); } if (!l2) { return; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); }; } @@ -378,19 +378,19 @@ function fold_left2(f, _accu, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } return accu; }; @@ -402,19 +402,19 @@ function fold_right2(f, l1, l2, accu) { return f(l1.hd, l2.hd, fold_right2(f, l1.tl, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -461,21 +461,21 @@ function for_all2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); } if (!l2) { return true; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); }; } @@ -493,21 +493,21 @@ function exists2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); } if (!l2) { return false; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); }; } @@ -551,10 +551,10 @@ function assoc(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -585,10 +585,10 @@ function assq(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -679,10 +679,10 @@ function find(p, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -791,21 +791,21 @@ function combine(l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } function merge(cmp, l1, l2) { @@ -843,15 +843,15 @@ function chop(_k, _l) { continue; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "list.res", - 420, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "list.res", + 420, + 11 + ] + } + }); }; } diff --git a/lib/es6/listLabels.js b/lib/es6/listLabels.js index 42017ada06..46744d700a 100644 --- a/lib/es6/listLabels.js +++ b/lib/es6/listLabels.js @@ -31,11 +31,11 @@ function hd(param) { return param.hd; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "hd" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "hd" + } + }); } function tl(param) { @@ -43,21 +43,21 @@ function tl(param) { return param.tl; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "tl" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "tl" + } + }); } function nth(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -73,22 +73,22 @@ function nth(l, n) { continue; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "nth" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "nth" + } + }); }; } function nth_opt(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -157,11 +157,11 @@ function init_aux(i, n, f) { function init(len, f) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.init" + } + }); } if (len > 10000) { return rev_append(init_tailrec_aux(/* [] */0, 0, len, f), /* [] */0); @@ -281,21 +281,21 @@ function map2(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } function rev_map2(f, l1, l2) { @@ -317,19 +317,19 @@ function rev_map2(f, l1, l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } if (l2$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } return accu; }; @@ -347,21 +347,21 @@ function iter2(f, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); } if (!l2) { return; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); }; } @@ -378,19 +378,19 @@ function fold_left2(f, _accu, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } return accu; }; @@ -402,19 +402,19 @@ function fold_right2(f, l1, l2, accu) { return f(l1.hd, l2.hd, fold_right2(f, l1.tl, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -461,21 +461,21 @@ function for_all2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); } if (!l2) { return true; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); }; } @@ -493,21 +493,21 @@ function exists2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); } if (!l2) { return false; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); }; } @@ -551,10 +551,10 @@ function assoc(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -585,10 +585,10 @@ function assq(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -679,10 +679,10 @@ function find(p, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -791,21 +791,21 @@ function combine(l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } function merge(cmp, l1, l2) { @@ -843,15 +843,15 @@ function chop(_k, _l) { continue; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "listLabels.res", - 420, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "listLabels.res", + 420, + 11 + ] + } + }); }; } diff --git a/lib/es6/map.js b/lib/es6/map.js index 84d4f73cb9..1204bf6025 100644 --- a/lib/es6/map.js +++ b/lib/es6/map.js @@ -40,11 +40,11 @@ function Make(funarg) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -57,11 +57,11 @@ function Make(funarg) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -75,11 +75,11 @@ function Make(funarg) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -92,11 +92,11 @@ function Make(funarg) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -155,10 +155,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = funarg.compare(x, param.v); if (c === 0) { @@ -173,10 +173,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -249,10 +249,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -353,10 +353,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -391,10 +391,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -427,11 +427,11 @@ function Make(funarg) { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -720,15 +720,15 @@ function Make(funarg) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/lib/es6/mapLabels.js b/lib/es6/mapLabels.js index 58bcbd2c6f..af3164d63e 100644 --- a/lib/es6/mapLabels.js +++ b/lib/es6/mapLabels.js @@ -40,11 +40,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -57,11 +57,11 @@ function Make(Ord) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -75,11 +75,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -92,11 +92,11 @@ function Make(Ord) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -155,10 +155,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Ord.compare(x, param.v); if (c === 0) { @@ -195,10 +195,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -271,10 +271,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -353,10 +353,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -391,10 +391,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -427,11 +427,11 @@ function Make(Ord) { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -720,15 +720,15 @@ function Make(Ord) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "mapLabels.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "mapLabels.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/lib/es6/moreLabels.js b/lib/es6/moreLabels.js index 7c847f56f7..36efe9670a 100644 --- a/lib/es6/moreLabels.js +++ b/lib/es6/moreLabels.js @@ -70,11 +70,11 @@ let $$Map = { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -87,11 +87,11 @@ let $$Map = { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -105,11 +105,11 @@ let $$Map = { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -122,11 +122,11 @@ let $$Map = { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -185,10 +185,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = funarg.compare(x, param.v); if (c === 0) { @@ -225,10 +225,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -301,10 +301,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -383,10 +383,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -421,10 +421,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -457,11 +457,11 @@ let $$Map = { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -750,15 +750,15 @@ let $$Map = { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "mapLabels.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "mapLabels.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); @@ -1016,11 +1016,11 @@ let $$Set = { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -1032,11 +1032,11 @@ let $$Set = { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -1049,11 +1049,11 @@ let $$Set = { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -1065,11 +1065,11 @@ let $$Set = { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -1148,10 +1148,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1180,10 +1180,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -1210,11 +1210,11 @@ let $$Set = { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1611,10 +1611,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = funarg.compare(x, v); @@ -1647,10 +1647,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1713,10 +1713,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1887,15 +1887,15 @@ let $$Set = { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "setLabels.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "setLabels.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l), l)[0]; }; diff --git a/lib/es6/parsing.js b/lib/es6/parsing.js index ab74f52ccc..bf77a01d44 100644 --- a/lib/es6/parsing.js +++ b/lib/es6/parsing.js @@ -88,10 +88,10 @@ function yyparse(tables, start, lexer, lexbuf) { continue; case "Raise_parse_error" : throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); case "Grow_stacks_1" : grow_stacks(); _arg = undefined; @@ -118,8 +118,8 @@ function yyparse(tables, start, lexer, lexbuf) { ]; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } _arg = match$1[1]; @@ -153,8 +153,8 @@ function yyparse(tables, start, lexer, lexbuf) { } }); throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } diff --git a/lib/es6/pervasives.js b/lib/es6/pervasives.js index edb6650d12..a80ead8cb4 100644 --- a/lib/es6/pervasives.js +++ b/lib/es6/pervasives.js @@ -8,20 +8,20 @@ import * as Caml_js_exceptions from "./caml_js_exceptions.js"; function failwith(s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); } function invalid_arg(s) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } let Exit = /* @__PURE__ */Caml_exceptions.create("Pervasives.Exit"); @@ -59,11 +59,11 @@ function classify_float(x) { function char_of_int(n) { if (n < 0 || n > 255) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "char_of_int" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "char_of_int" + } + }); } return n; } @@ -84,11 +84,11 @@ function bool_of_string(param) { return true; default: throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "bool_of_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "bool_of_string" + } + }); } } @@ -112,8 +112,8 @@ function int_of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -154,8 +154,8 @@ function float_of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/queue.js b/lib/es6/queue.js index 3dbfc29c2e..72b301fa5f 100644 --- a/lib/es6/queue.js +++ b/lib/es6/queue.js @@ -42,20 +42,20 @@ function peek(q) { return match.content; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function take(q) { let match = q.first; if (typeof match !== "object") { throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } let content = match.content; let next = match.next; diff --git a/lib/es6/random.js b/lib/es6/random.js index c951357884..4f58498949 100644 --- a/lib/es6/random.js +++ b/lib/es6/random.js @@ -76,11 +76,11 @@ function bits(s) { function int(s, bound) { if (bound > 1073741823 || bound <= 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int" + } + }); } while (true) { let r = bits(s); @@ -95,11 +95,11 @@ function int(s, bound) { function int32(s, bound) { if (bound <= 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int32" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int32" + } + }); } while (true) { let b1 = bits(s); @@ -116,11 +116,11 @@ function int32(s, bound) { function int64(s, bound) { if (Caml.i64_le(bound, Caml_int64.zero)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int64" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int64" + } + }); } while (true) { let b1 = Caml_int64.of_int32(bits(s)); diff --git a/lib/es6/runtime_deriving.js b/lib/es6/runtime_deriving.js index e2b665fdb9..36b9eb01d8 100644 --- a/lib/es6/runtime_deriving.js +++ b/lib/es6/runtime_deriving.js @@ -4,10 +4,10 @@ function raiseWhenNotFound(x) { if (x == null) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } return x; } diff --git a/lib/es6/set.js b/lib/es6/set.js index b3adce982d..764a62ec36 100644 --- a/lib/es6/set.js +++ b/lib/es6/set.js @@ -32,11 +32,11 @@ function Make(funarg) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -48,11 +48,11 @@ function Make(funarg) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -65,11 +65,11 @@ function Make(funarg) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -81,11 +81,11 @@ function Make(funarg) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -164,10 +164,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -196,10 +196,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -226,11 +226,11 @@ function Make(funarg) { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -623,10 +623,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = funarg.compare(x, v); @@ -642,10 +642,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -706,10 +706,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -913,15 +913,15 @@ function Make(funarg) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l$1), l$1)[0]; } else { diff --git a/lib/es6/setLabels.js b/lib/es6/setLabels.js index b0c807797f..0d96269262 100644 --- a/lib/es6/setLabels.js +++ b/lib/es6/setLabels.js @@ -32,11 +32,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -48,11 +48,11 @@ function Make(Ord) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -65,11 +65,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -81,11 +81,11 @@ function Make(Ord) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -164,10 +164,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -196,10 +196,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -226,11 +226,11 @@ function Make(Ord) { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -627,10 +627,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = Ord.compare(x, v); @@ -663,10 +663,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -729,10 +729,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -903,15 +903,15 @@ function Make(Ord) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "setLabels.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "setLabels.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l), l)[0]; }; diff --git a/lib/es6/sort.js b/lib/es6/sort.js index edf5cdf0e6..f2c66fedfa 100644 --- a/lib/es6/sort.js +++ b/lib/es6/sort.js @@ -115,11 +115,11 @@ function array(cmp, arr) { let j = hi - 1 | 0; if (!cmp(pivot, arr[hi]) || !cmp(arr[lo], pivot)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Sort.array" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Sort.array" + } + }); } while (i < j) { while (!cmp(pivot, arr[i])) { diff --git a/lib/es6/stack.js b/lib/es6/stack.js index dd86dd733d..147171622d 100644 --- a/lib/es6/stack.js +++ b/lib/es6/stack.js @@ -40,10 +40,10 @@ function pop(s) { return match.hd; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function top(s) { @@ -52,10 +52,10 @@ function top(s) { return match.hd; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function is_empty(s) { diff --git a/lib/es6/stream.js b/lib/es6/stream.js index 5213928d2b..548760f914 100644 --- a/lib/es6/stream.js +++ b/lib/es6/stream.js @@ -55,15 +55,15 @@ function get_data(count, _d) { }; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 53, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 53, + 13 + ] + } + }); case "Slazy" : _d = CamlinternalLazy.force(d._0); continue; @@ -117,15 +117,15 @@ function peek_data(s) { return Caml_option.some(d._0); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 83, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 83, + 13 + ] + } + }); case "Slazy" : s.data = CamlinternalLazy.force(f._0); continue; @@ -235,10 +235,10 @@ function next(s) { return Caml_option.valFromOption(a); } throw new Error(Failure, { - cause: { - RE_EXN_ID: Failure - } - }); + cause: { + RE_EXN_ID: Failure + } + }); } function empty(s) { @@ -247,10 +247,10 @@ function empty(s) { return; } throw new Error(Failure, { - cause: { - RE_EXN_ID: Failure - } - }); + cause: { + RE_EXN_ID: Failure + } + }); } function iter(f, strm) { diff --git a/lib/es6/string.js b/lib/es6/string.js index 3828572bc2..c19e2db03c 100644 --- a/lib/es6/string.js +++ b/lib/es6/string.js @@ -91,10 +91,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -130,11 +130,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -143,11 +143,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -157,10 +157,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -177,11 +177,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -207,11 +207,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -220,11 +220,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -235,8 +235,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -247,11 +247,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -262,8 +262,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/stringLabels.js b/lib/es6/stringLabels.js index 9144be9727..74f7f99d18 100644 --- a/lib/es6/stringLabels.js +++ b/lib/es6/stringLabels.js @@ -93,10 +93,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -132,11 +132,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -145,11 +145,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -159,10 +159,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -179,11 +179,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -209,11 +209,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -222,11 +222,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -237,8 +237,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -249,11 +249,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -264,8 +264,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/es6/uchar.js b/lib/es6/uchar.js index f98c218a31..c75c5caada 100644 --- a/lib/es6/uchar.js +++ b/lib/es6/uchar.js @@ -17,11 +17,11 @@ function succ(u) { } if (u === 1114111) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "U+10FFFF has no successor" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "U+10FFFF has no successor" + } + }); } return u + 1 | 0; } @@ -32,11 +32,11 @@ function pred(u) { } if (u === 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "U+0000 has no predecessor" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "U+0000 has no predecessor" + } + }); } return u - 1 | 0; } @@ -57,11 +57,11 @@ function of_int(i) { } let s = err_not_sv(i); throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } function is_char(u) { @@ -78,11 +78,11 @@ function to_char(u) { } let s = err_not_latin1(u); throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } function unsafe_to_char(prim) { diff --git a/lib/js/arg.js b/lib/js/arg.js index 505348c801..e06814b14b 100644 --- a/lib/js/arg.js +++ b/lib/js/arg.js @@ -32,10 +32,10 @@ function assoc3(x, _l) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -60,14 +60,14 @@ function make_symlist(prefix, sep, suffix, l) { function help_action() { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Unknown", - _0: "-help" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Unknown", + _0: "-help" + } + } + }); } function add_help(speclist) { @@ -91,8 +91,8 @@ function add_help(speclist) { }; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } let add2; @@ -115,8 +115,8 @@ function add_help(speclist) { }; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } return Pervasives.$at(speclist, Pervasives.$at(add1, add2)); @@ -162,8 +162,8 @@ function bool_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -176,8 +176,8 @@ function int_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -190,8 +190,8 @@ function float_of_string_opt(x) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -264,23 +264,23 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.RE_EXN_ID === "Not_found") { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Unknown", - _0: s - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Unknown", + _0: s + } + } + }); } throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } let follow = match[1]; @@ -289,16 +289,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return; } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: follow, - _2: "no argument" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: follow, + _2: "no argument" + } + } + }); }; let get_arg = function () { if (follow !== undefined) { @@ -308,14 +308,14 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return Caml_array.get(argv.contents, current.contents + 1 | 0); } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Missing", - _0: s - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Missing", + _0: s + } + } + }); }; let consume_arg = function () { if (follow !== undefined) { @@ -336,16 +336,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(s$1); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg, - _2: "a boolean" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg, + _2: "a boolean" + } + } + }); } return consume_arg(); case "Set" : @@ -370,16 +370,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(x); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$2, - _2: "an integer" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$2, + _2: "an integer" + } + } + }); } return consume_arg(); case "Set_int" : @@ -389,16 +389,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0.contents = x$1; } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$3, - _2: "an integer" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$3, + _2: "an integer" + } + } + }); } return consume_arg(); case "Float" : @@ -408,16 +408,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0(x$2); } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$4, - _2: "a float" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$4, + _2: "a float" + } + } + }); } return consume_arg(); case "Set_float" : @@ -427,16 +427,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist f._0.contents = x$3; } else { throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$5, - _2: "a float" - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$5, + _2: "a float" + } + } + }); } return consume_arg(); case "Tuple" : @@ -449,16 +449,16 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return consume_arg(); } throw new Error(Stop, { - cause: { - RE_EXN_ID: Stop, - _1: { - TAG: "Wrong", - _0: s, - _1: arg$6, - _2: "one of: " + make_symlist("", " ", "", symb) - } - } - }); + cause: { + RE_EXN_ID: Stop, + _1: { + TAG: "Wrong", + _0: s, + _1: arg$6, + _2: "one of: " + make_symlist("", " ", "", symb) + } + } + }); case "Rest" : let f$1 = f._0; while (current.contents < (argv.contents.length - 1 | 0)) { @@ -469,11 +469,11 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist case "Expand" : if (!allow_expand) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic" + } + }); } let arg$7 = get_arg(); let newarg = f._0(arg$7); @@ -501,23 +501,23 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist let m = Caml_js_exceptions.internalToOCamlException(raw_m); if (m.RE_EXN_ID === Bad) { throw new Error(convert_error({ - TAG: "Message", - _0: m._1 - }).RE_EXN_ID, { - cause: convert_error({ - TAG: "Message", - _0: m._1 - }) - }); + TAG: "Message", + _0: m._1 + }).RE_EXN_ID, { + cause: convert_error({ + TAG: "Message", + _0: m._1 + }) + }); } if (m.RE_EXN_ID === Stop) { throw new Error(convert_error(m._1).RE_EXN_ID, { - cause: convert_error(m._1) - }); + cause: convert_error(m._1) + }); } throw new Error(m.RE_EXN_ID, { - cause: m - }); + cause: m + }); } current.contents = current.contents + 1 | 0; }; @@ -555,8 +555,8 @@ function parse(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -574,8 +574,8 @@ function parse_dynamic(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -602,8 +602,8 @@ function parse_expand(l, f, msg) { return Pervasives.exit(0); } throw new Error(msg$1.RE_EXN_ID, { - cause: msg$1 - }); + cause: msg$1 + }); } } @@ -639,8 +639,8 @@ function second_word(s) { return len; } throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } if (exit === 2) { return loop(n$1 + 1 | 0); @@ -648,8 +648,8 @@ function second_word(s) { } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } return loop(n + 1 | 0); diff --git a/lib/js/array.js b/lib/js/array.js index 37198d5fea..81d2af9cb4 100644 --- a/lib/js/array.js +++ b/lib/js/array.js @@ -15,11 +15,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f(0)); for (let i = 1; i < l; ++i) { @@ -59,11 +59,11 @@ function append(a1, a2) { function sub(a, ofs, len) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.sub" + } + }); } return Caml_array.sub(a, ofs, len); } @@ -71,11 +71,11 @@ function sub(a, ofs, len) { function fill(a, ofs, len, v) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.fill" + } + }); } for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; @@ -85,11 +85,11 @@ function fill(a, ofs, len, v) { function blit(a1, ofs1, a2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (a1.length - len | 0) || ofs2 < 0 || ofs2 > (a2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.blit" + } + }); } Caml_array.blit(a1, ofs1, a2, ofs2, len); } @@ -103,11 +103,11 @@ function iter(f, a) { function iter2(f, a, b) { if (a.length !== b.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.iter2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.iter2: arrays must have the same length" + } + }); } for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); @@ -131,11 +131,11 @@ function map2(f, a, b) { let lb = b.length; if (la !== lb) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.map2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.map2: arrays must have the same length" + } + }); } if (la === 0) { return []; @@ -318,11 +318,11 @@ function sort(cmp, a) { return i31; } throw new Error(Bottom, { - cause: { - RE_EXN_ID: Bottom, - _1: i - } - }); + cause: { + RE_EXN_ID: Bottom, + _1: i + } + }); }; let trickle = function (l, i, e) { try { @@ -343,8 +343,8 @@ function sort(cmp, a) { return Caml_array.set(a, i$2._1, e); } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let bubble = function (l, i) { @@ -363,8 +363,8 @@ function sort(cmp, a) { return i$2._1; } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let trickleup = function (_i, e) { @@ -373,15 +373,15 @@ function sort(cmp, a) { let father = (i - 1 | 0) / 3 | 0; if (i === father) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "array.res", - 321, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "array.res", + 321, + 4 + ] + } + }); } if (cmp(Caml_array.get(a, father), e) >= 0) { return Caml_array.set(a, i, e); diff --git a/lib/js/arrayLabels.js b/lib/js/arrayLabels.js index 33ae6dc024..cd50a85c00 100644 --- a/lib/js/arrayLabels.js +++ b/lib/js/arrayLabels.js @@ -15,11 +15,11 @@ function init(l, f) { } if (l < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.init" + } + }); } let res = Caml_array.make(l, f(0)); for (let i = 1; i < l; ++i) { @@ -59,11 +59,11 @@ function append(a1, a2) { function sub(a, ofs, len) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.sub" + } + }); } return Caml_array.sub(a, ofs, len); } @@ -71,11 +71,11 @@ function sub(a, ofs, len) { function fill(a, ofs, len, v) { if (ofs < 0 || len < 0 || ofs > (a.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.fill" + } + }); } for (let i = ofs, i_finish = ofs + len | 0; i < i_finish; ++i) { a[i] = v; @@ -85,11 +85,11 @@ function fill(a, ofs, len, v) { function blit(a1, ofs1, a2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (a1.length - len | 0) || ofs2 < 0 || ofs2 > (a2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.blit" + } + }); } Caml_array.blit(a1, ofs1, a2, ofs2, len); } @@ -103,11 +103,11 @@ function iter(f, a) { function iter2(f, a, b) { if (a.length !== b.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.iter2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.iter2: arrays must have the same length" + } + }); } for (let i = 0, i_finish = a.length; i < i_finish; ++i) { f(a[i], b[i]); @@ -131,11 +131,11 @@ function map2(f, a, b) { let lb = b.length; if (la !== lb) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Array.map2: arrays must have the same length" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Array.map2: arrays must have the same length" + } + }); } if (la === 0) { return []; @@ -318,11 +318,11 @@ function sort(cmp, a) { return i31; } throw new Error(Bottom, { - cause: { - RE_EXN_ID: Bottom, - _1: i - } - }); + cause: { + RE_EXN_ID: Bottom, + _1: i + } + }); }; let trickle = function (l, i, e) { try { @@ -343,8 +343,8 @@ function sort(cmp, a) { return Caml_array.set(a, i$2._1, e); } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let bubble = function (l, i) { @@ -363,8 +363,8 @@ function sort(cmp, a) { return i$2._1; } throw new Error(i$2.RE_EXN_ID, { - cause: i$2 - }); + cause: i$2 + }); } }; let trickleup = function (_i, e) { @@ -373,15 +373,15 @@ function sort(cmp, a) { let father = (i - 1 | 0) / 3 | 0; if (i === father) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "arrayLabels.res", - 321, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "arrayLabels.res", + 321, + 4 + ] + } + }); } if (cmp(Caml_array.get(a, father), e) >= 0) { return Caml_array.set(a, i, e); diff --git a/lib/js/belt_Array.js b/lib/js/belt_Array.js index 999f73a7ff..d7d823123f 100644 --- a/lib/js/belt_Array.js +++ b/lib/js/belt_Array.js @@ -13,15 +13,15 @@ function get(arr, i) { function getExn(arr, i) { if (!(i >= 0 && i < arr.length)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_Array.res", - 36, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_Array.res", + 36, + 2 + ] + } + }); } return arr[i]; } @@ -38,15 +38,15 @@ function set(arr, i, v) { function setExn(arr, i, v) { if (!(i >= 0 && i < arr.length)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_Array.res", - 49, - 2 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_Array.res", + 49, + 2 + ] + } + }); } arr[i] = v; } diff --git a/lib/js/belt_List.js b/lib/js/belt_List.js index e5ef0119ec..4c4b08fba9 100644 --- a/lib/js/belt_List.js +++ b/lib/js/belt_List.js @@ -16,10 +16,10 @@ function headExn(x) { return x.hd; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function tail(x) { @@ -34,10 +34,10 @@ function tailExn(x) { return x.tl; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function add(xs, x) { @@ -72,10 +72,10 @@ function get(x, n) { function getExn(x, n) { if (n < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let _x = x; let _n = n; @@ -91,10 +91,10 @@ function getExn(x, n) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_MutableQueue.js b/lib/js/belt_MutableQueue.js index 4cf2358fb1..8cde57fad0 100644 --- a/lib/js/belt_MutableQueue.js +++ b/lib/js/belt_MutableQueue.js @@ -55,10 +55,10 @@ function peekExn(q) { return v.content; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function pop(q) { @@ -91,10 +91,10 @@ function popExn(q) { } } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function popUndefined(q) { diff --git a/lib/js/belt_Option.js b/lib/js/belt_Option.js index 699dfdbf58..151ee79694 100644 --- a/lib/js/belt_Option.js +++ b/lib/js/belt_Option.js @@ -33,10 +33,10 @@ function getExn(x) { return Caml_option.valFromOption(x); } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function mapWithDefaultU(opt, $$default, f) { diff --git a/lib/js/belt_Result.js b/lib/js/belt_Result.js index 24ac6ac449..782d71ec5f 100644 --- a/lib/js/belt_Result.js +++ b/lib/js/belt_Result.js @@ -6,10 +6,10 @@ function getExn(x) { return x._0; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } function mapWithDefaultU(opt, $$default, f) { diff --git a/lib/js/belt_internalAVLset.js b/lib/js/belt_internalAVLset.js index 53d3c6ae5d..a533c380ee 100644 --- a/lib/js/belt_internalAVLset.js +++ b/lib/js/belt_internalAVLset.js @@ -380,15 +380,15 @@ function checkInvariantInternal(_v) { ) | 0; if (!(diff <= 2 && diff >= -2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_internalAVLset.res", - 319, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_internalAVLset.res", + 319, + 4 + ] + } + }); } checkInvariantInternal(l); _v = r; @@ -749,10 +749,10 @@ function getExn(_n, x, cmp) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_internalAVLtree.js b/lib/js/belt_internalAVLtree.js index 4b5fbdb999..4cab81d9b4 100644 --- a/lib/js/belt_internalAVLtree.js +++ b/lib/js/belt_internalAVLtree.js @@ -607,15 +607,15 @@ function checkInvariantInternal(_v) { let diff = treeHeight(l) - treeHeight(r) | 0; if (!(diff <= 2 && diff >= -2)) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "belt_internalAVLtree.res", - 457, - 4 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "belt_internalAVLtree.res", + 457, + 4 + ] + } + }); } checkInvariantInternal(l); _v = r; @@ -922,10 +922,10 @@ function getExn(_n, x, cmp) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_internalMapInt.js b/lib/js/belt_internalMapInt.js index f9527c89e5..bf9ea59213 100644 --- a/lib/js/belt_internalMapInt.js +++ b/lib/js/belt_internalMapInt.js @@ -63,10 +63,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_internalMapString.js b/lib/js/belt_internalMapString.js index 4a797c0e76..b0cd11be69 100644 --- a/lib/js/belt_internalMapString.js +++ b/lib/js/belt_internalMapString.js @@ -63,10 +63,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_internalSetInt.js b/lib/js/belt_internalSetInt.js index d3f2032fe4..d319345d87 100644 --- a/lib/js/belt_internalSetInt.js +++ b/lib/js/belt_internalSetInt.js @@ -142,10 +142,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/belt_internalSetString.js b/lib/js/belt_internalSetString.js index c6eee9cb8d..de811887c7 100644 --- a/lib/js/belt_internalSetString.js +++ b/lib/js/belt_internalSetString.js @@ -142,10 +142,10 @@ function getExn(_n, x) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } diff --git a/lib/js/buffer.js b/lib/js/buffer.js index 2c3532cb5e..c59f4ffe76 100644 --- a/lib/js/buffer.js +++ b/lib/js/buffer.js @@ -27,11 +27,11 @@ function to_bytes(b) { function sub(b, ofs, len) { if (ofs < 0 || len < 0 || ofs > (b.position - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.sub" + } + }); } return Bytes.sub_string(b.buffer, ofs, len); } @@ -39,11 +39,11 @@ function sub(b, ofs, len) { function blit(src, srcoff, dst, dstoff, len) { if (len < 0 || srcoff < 0 || srcoff > (src.position - len | 0) || dstoff < 0 || dstoff > (dst.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.blit" + } + }); } Bytes.blit(src.buffer, srcoff, dst, dstoff, len); } @@ -51,11 +51,11 @@ function blit(src, srcoff, dst, dstoff, len) { function nth(b, ofs) { if (ofs < 0 || ofs >= b.position) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.nth" + } + }); } return b.buffer[ofs]; } @@ -99,15 +99,15 @@ function add_utf_8_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 98, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 98, + 18 + ] + } + }); } if (u$1 <= 127) { return add_char(b, u$1); @@ -146,30 +146,30 @@ function add_utf_8_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 127, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 127, + 9 + ] + } + }); } function add_utf_16be_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 132, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 132, + 18 + ] + } + }); } if (u$1 <= 65535) { let pos = b.position; @@ -197,30 +197,30 @@ function add_utf_16be_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 154, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 154, + 9 + ] + } + }); } function add_utf_16le_uchar(b, u) { let u$1 = u; if (u$1 < 0) { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 159, - 18 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 159, + 18 + ] + } + }); } if (u$1 <= 65535) { let pos = b.position; @@ -248,25 +248,25 @@ function add_utf_16le_uchar(b, u) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 181, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 181, + 9 + ] + } + }); } function add_substring(b, s, offset, len) { if (offset < 0 || len < 0 || offset > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.add_substring/add_subbytes" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.add_substring/add_subbytes" + } + }); } let new_position = b.position + len | 0; if (new_position > b.length) { @@ -306,15 +306,15 @@ function closing(param) { return /* '}' */125; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "buffer.res", - 216, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "buffer.res", + 216, + 9 + ] + } + }); } function advance_to_closing(opening, closing, k, s, start) { @@ -326,10 +326,10 @@ function advance_to_closing(opening, closing, k, s, start) { let k$1 = _k; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (Caml_string.get(s, i) === opening) { _i = i + 1 | 0; @@ -384,10 +384,10 @@ function advance_to_non_alpha(s, start) { function find_ident(s, start, lim) { if (start >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Caml_string.get(s, start); if (c !== 40 && c !== 123) { @@ -456,11 +456,11 @@ function add_substitute(b, f, s) { function truncate(b, len) { if (len < 0 || len > b.position) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Buffer.truncate" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Buffer.truncate" + } + }); } b.position = len; } diff --git a/lib/js/bytes.js b/lib/js/bytes.js index 309823d78b..b404268df9 100644 --- a/lib/js/bytes.js +++ b/lib/js/bytes.js @@ -111,11 +111,11 @@ function of_string(s) { function sub(s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.sub / Bytes.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.sub / Bytes.sub" + } + }); } let r = Caml_bytes.create(len); unsafe_blit(s, ofs, r, 0, len); @@ -139,22 +139,22 @@ function $plus$plus(a, b) { return c; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } if (match$1) { return c; } if (match$2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } return c; } @@ -181,11 +181,11 @@ function extend(s, left, right) { function fill(s, ofs, len, c) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.fill / Bytes.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.fill / Bytes.fill" + } + }); } unsafe_fill(s, ofs, len, c); } @@ -193,11 +193,11 @@ function fill(s, ofs, len, c) { function blit(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.blit" + } + }); } unsafe_blit(s1, ofs1, s2, ofs2, len); } @@ -205,11 +205,11 @@ function blit(s1, ofs1, s2, ofs2, len) { function blit_string(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.blit / Bytes.blit_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.blit / Bytes.blit_string" + } + }); } if (len <= 0) { return; @@ -246,11 +246,11 @@ function ensure_ge(x, y) { return x; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.concat" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.concat" + } + }); } function sum_lengths(_acc, seplen, _param) { @@ -490,10 +490,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -529,11 +529,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -542,11 +542,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -556,10 +556,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -576,11 +576,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -606,11 +606,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -619,11 +619,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -634,8 +634,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -646,11 +646,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -661,8 +661,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/bytesLabels.js b/lib/js/bytesLabels.js index 309823d78b..b404268df9 100644 --- a/lib/js/bytesLabels.js +++ b/lib/js/bytesLabels.js @@ -111,11 +111,11 @@ function of_string(s) { function sub(s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.sub / Bytes.sub" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.sub / Bytes.sub" + } + }); } let r = Caml_bytes.create(len); unsafe_blit(s, ofs, r, 0, len); @@ -139,22 +139,22 @@ function $plus$plus(a, b) { return c; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } if (match$1) { return c; } if (match$2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.extend" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.extend" + } + }); } return c; } @@ -181,11 +181,11 @@ function extend(s, left, right) { function fill(s, ofs, len, c) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.fill / Bytes.fill" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.fill / Bytes.fill" + } + }); } unsafe_fill(s, ofs, len, c); } @@ -193,11 +193,11 @@ function fill(s, ofs, len, c) { function blit(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.blit" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.blit" + } + }); } unsafe_blit(s1, ofs1, s2, ofs2, len); } @@ -205,11 +205,11 @@ function blit(s1, ofs1, s2, ofs2, len) { function blit_string(s1, ofs1, s2, ofs2, len) { if (len < 0 || ofs1 < 0 || ofs1 > (s1.length - len | 0) || ofs2 < 0 || ofs2 > (s2.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.blit / Bytes.blit_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.blit / Bytes.blit_string" + } + }); } if (len <= 0) { return; @@ -246,11 +246,11 @@ function ensure_ge(x, y) { return x; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Bytes.concat" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Bytes.concat" + } + }); } function sum_lengths(_acc, seplen, _param) { @@ -490,10 +490,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -529,11 +529,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -542,11 +542,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -556,10 +556,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s[i] === c) { return i; @@ -576,11 +576,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -606,11 +606,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -619,11 +619,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -634,8 +634,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -646,11 +646,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -661,8 +661,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/caml_array.js b/lib/js/caml_array.js index f8d009fc63..64193ae514 100644 --- a/lib/js/caml_array.js +++ b/lib/js/caml_array.js @@ -58,11 +58,11 @@ function concat(l) { function set(xs, index, newval) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } xs[index] = newval; } @@ -70,11 +70,11 @@ function set(xs, index, newval) { function get(xs, index) { if (index < 0 || index >= xs.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return xs[index]; } diff --git a/lib/js/caml_bigint.js b/lib/js/caml_bigint.js index 9e185af4b8..30cda2d9ce 100644 --- a/lib/js/caml_bigint.js +++ b/lib/js/caml_bigint.js @@ -4,10 +4,10 @@ function div(x, y) { if (y === 0n) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x / y; } @@ -15,10 +15,10 @@ function div(x, y) { function mod_(x, y) { if (y === 0n) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x % y; } diff --git a/lib/js/caml_bytes.js b/lib/js/caml_bytes.js index 7c3abca3cc..b7909d1b9d 100644 --- a/lib/js/caml_bytes.js +++ b/lib/js/caml_bytes.js @@ -4,11 +4,11 @@ function set(s, i, ch) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } s[i] = ch; } @@ -16,11 +16,11 @@ function set(s, i, ch) { function get(s, i) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return s[i]; } @@ -28,11 +28,11 @@ function get(s, i) { function create(len) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.create" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.create" + } + }); } let result = new Array(len); for (let i = 0; i < len; ++i) { diff --git a/lib/js/caml_format.js b/lib/js/caml_format.js index f76357bd4f..c272d1b695 100644 --- a/lib/js/caml_format.js +++ b/lib/js/caml_format.js @@ -130,11 +130,11 @@ function int_of_string(s) { let d = parse_digit(c); if (d < 0 || d >= base) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } let aux = function (_acc, _k) { while (true) { @@ -151,20 +151,20 @@ function int_of_string(s) { let v = parse_digit(a); if (v < 0 || v >= base) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } let acc$1 = base * acc + v; if (acc$1 > threshold) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } _k = k + 1 | 0; _acc = acc$1; @@ -175,11 +175,11 @@ function int_of_string(s) { let or_res = res | 0; if (base === 10 && res !== or_res) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int_of_string" + } + }); } return or_res; } @@ -219,11 +219,11 @@ function int64_of_string(s) { let d = Caml_int64.of_int32(parse_digit(c)); if (Caml.i64_lt(d, Caml_int64.zero) || Caml.i64_ge(d, base)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } let aux = function (_acc, _k) { while (true) { @@ -240,11 +240,11 @@ function int64_of_string(s) { let v = Caml_int64.of_int32(parse_digit(a)); if (Caml.i64_lt(v, Caml_int64.zero) || Caml.i64_ge(v, base) || Caml.i64_gt(acc, threshold)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } let acc$1 = Caml_int64.add(Caml_int64.mul(base, acc), v); _k = k + 1 | 0; @@ -259,11 +259,11 @@ function int64_of_string(s) { 10 ]) && Caml.i64_neq(res, or_res)) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "int64_of_string" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "int64_of_string" + } + }); } return or_res; } @@ -291,11 +291,11 @@ function parse_format(fmt) { let len = fmt.length; if (len > 31) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "format_int: format too long" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "format_int: format too long" + } + }); } let f = { justify: "+", diff --git a/lib/js/caml_int32.js b/lib/js/caml_int32.js index 4c5418e3e9..8bb64e9cba 100644 --- a/lib/js/caml_int32.js +++ b/lib/js/caml_int32.js @@ -4,10 +4,10 @@ function div(x, y) { if (y === 0) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x / y | 0; } @@ -15,10 +15,10 @@ function div(x, y) { function mod_(x, y) { if (y === 0) { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } return x % y; } diff --git a/lib/js/caml_int64.js b/lib/js/caml_int64.js index 0c6b709be2..10e77156ba 100644 --- a/lib/js/caml_int64.js +++ b/lib/js/caml_int64.js @@ -384,10 +384,10 @@ function div(_self, _other) { exit$1 = 2; } else { throw new Error("Division_by_zero", { - cause: { - RE_EXN_ID: "Division_by_zero" - } - }); + cause: { + RE_EXN_ID: "Division_by_zero" + } + }); } if (exit$1 === 2) { if (self_hi !== -2147483648) { diff --git a/lib/js/caml_module.js b/lib/js/caml_module.js index a49c301b6b..32846e33c2 100644 --- a/lib/js/caml_module.js +++ b/lib/js/caml_module.js @@ -5,11 +5,11 @@ let Caml_obj = require("./caml_obj.js"); function init_mod(loc, shape) { let undef_module = function (param) { throw new Error("Undefined_recursive_module", { - cause: { - RE_EXN_ID: "Undefined_recursive_module", - _1: loc - } - }); + cause: { + RE_EXN_ID: "Undefined_recursive_module", + _1: loc + } + }); }; let loop = function (shape, struct_, idx) { if (typeof shape !== "object") { @@ -75,15 +75,15 @@ function update_mod(shape, o, n) { }; if (typeof shape !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "caml_module.res", - 109, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "caml_module.res", + 109, + 9 + ] + } + }); } if (shape.TAG === "Module") { let comps = shape._0; @@ -95,15 +95,15 @@ function update_mod(shape, o, n) { return; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "caml_module.res", - 109, - 9 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "caml_module.res", + 109, + 9 + ] + } + }); } exports.init_mod = init_mod; diff --git a/lib/js/caml_obj.js b/lib/js/caml_obj.js index cb566afa68..65e0d78ebc 100644 --- a/lib/js/caml_obj.js +++ b/lib/js/caml_obj.js @@ -56,11 +56,11 @@ function compare(a, b) { case "function" : if (b_type === "function") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "compare: functional value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "compare: functional value" + } + }); } break; case "number" : @@ -137,11 +137,11 @@ function compare(a, b) { } if (tag_a === 251) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: abstract value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: abstract value" + } + }); } if (tag_a !== tag_b) { if (tag_a < tag_b) { @@ -267,11 +267,11 @@ function equal(a, b) { let b_type = typeof b; if (a_type === "function" || b_type === "function") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: functional value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: functional value" + } + }); } if (b_type === "number" || b_type === "bigint" || b_type === "undefined" || b === null) { return false; @@ -283,11 +283,11 @@ function equal(a, b) { } if (tag_a === 251) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "equal: abstract value" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "equal: abstract value" + } + }); } if (tag_a !== tag_b) { return false; diff --git a/lib/js/caml_string.js b/lib/js/caml_string.js index 13f3625959..252ba1b3fd 100644 --- a/lib/js/caml_string.js +++ b/lib/js/caml_string.js @@ -4,11 +4,11 @@ function get(s, i) { if (i >= s.length || i < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "index out of bounds" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "index out of bounds" + } + }); } return s.codePointAt(i); } diff --git a/lib/js/caml_sys.js b/lib/js/caml_sys.js index 621591c386..dae731f2ab 100644 --- a/lib/js/caml_sys.js +++ b/lib/js/caml_sys.js @@ -4,20 +4,20 @@ function sys_getenv(s) { if (typeof process === "undefined" || process.env === undefined) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let x = process.env[s]; if (x !== undefined) { return x; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let os_type = (function(_){ @@ -74,20 +74,20 @@ function sys_exit(exit_code) { function sys_is_directory(_s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "sys_is_directory not implemented" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "sys_is_directory not implemented" + } + }); } function sys_file_exists(_s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "sys_file_exists not implemented" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "sys_file_exists not implemented" + } + }); } exports.sys_getenv = sys_getenv; diff --git a/lib/js/camlinternalLazy.js b/lib/js/camlinternalLazy.js index f754861cee..a1f4efec8a 100644 --- a/lib/js/camlinternalLazy.js +++ b/lib/js/camlinternalLazy.js @@ -17,10 +17,10 @@ function forward_with_closure(blk, closure) { function raise_undefined() { throw new Error(Undefined, { - cause: { - RE_EXN_ID: Undefined - } - }); + cause: { + RE_EXN_ID: Undefined + } + }); } function force(lzv) { @@ -34,12 +34,12 @@ function force(lzv) { } catch (e) { lzv.VAL = (function () { throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); }); throw new Error(e.RE_EXN_ID, { - cause: e - }); + cause: e + }); } } } diff --git a/lib/js/char.js b/lib/js/char.js index 03d8f86b63..319b877a5b 100644 --- a/lib/js/char.js +++ b/lib/js/char.js @@ -5,11 +5,11 @@ let Bytes = require("./bytes.js"); function chr(n) { if (n < 0 || n > 255) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Char.chr" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Char.chr" + } + }); } return n; } diff --git a/lib/js/digest.js b/lib/js/digest.js index 9402af7643..103d5c8fa9 100644 --- a/lib/js/digest.js +++ b/lib/js/digest.js @@ -18,11 +18,11 @@ function bytes(b) { function substring(str, ofs, len) { if (ofs < 0 || len < 0 || ofs > (str.length - len | 0)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.substring" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.substring" + } + }); } return Caml_md5.md5_string(str, ofs, len); } @@ -40,11 +40,11 @@ function char_hex(n) { function to_hex(d) { if (d.length !== 16) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.to_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.to_hex" + } + }); } let result = Caml_bytes.create(32); for (let i = 0; i <= 15; ++i) { @@ -58,42 +58,42 @@ function to_hex(d) { function from_hex(s) { if (s.length !== 32) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } let digit = function (c) { if (c >= 65) { if (c >= 97) { if (c >= 103) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return (c - /* 'a' */97 | 0) + 10 | 0; } if (c >= 71) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return (c - /* 'A' */65 | 0) + 10 | 0; } if (c > 57 || c < 48) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Digest.from_hex" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Digest.from_hex" + } + }); } return c - /* '0' */48 | 0; }; diff --git a/lib/js/filename.js b/lib/js/filename.js index fa7ccc61b1..4cbda61834 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -124,8 +124,8 @@ try { temp_dir_name = "/tmp"; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -206,8 +206,8 @@ try { temp_dir_name$1 = "."; } else { throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } @@ -383,11 +383,11 @@ function chop_suffix(name, suff) { let n = name.length - suff.length | 0; if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Filename.chop_suffix" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Filename.chop_suffix" + } + }); } return $$String.sub(name, 0, n); } @@ -431,11 +431,11 @@ function chop_extension(name) { let l = extension_len(name); if (l === 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Filename.chop_extension" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Filename.chop_extension" + } + }); } return $$String.sub(name, 0, name.length - l | 0); } diff --git a/lib/js/genlex.js b/lib/js/genlex.js index 1232ab9b92..e708d6239b 100644 --- a/lib/js/genlex.js +++ b/lib/js/genlex.js @@ -61,8 +61,8 @@ function make_lexer(keywords) { }; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; let keyword_or_error = function (c) { @@ -73,15 +73,15 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "Illegal character " + s - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "Illegal character " + s + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } }; let next_token = function (strm__) { @@ -121,25 +121,25 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } let match = Stream.peek(strm__); if (match !== undefined) { if (match !== 39) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); return { @@ -148,11 +148,11 @@ function make_lexer(keywords) { }; } throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); case 40 : Stream.junk(strm__); let match$1 = Stream.peek(strm__); @@ -476,15 +476,15 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } store(c$1); continue; @@ -493,10 +493,10 @@ function make_lexer(keywords) { return get_string(); } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); }; }; let char = function (strm__) { @@ -513,22 +513,22 @@ function make_lexer(keywords) { let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === Stream.Failure) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; let escape = function (strm__) { @@ -556,49 +556,49 @@ function make_lexer(keywords) { if (c2 !== undefined) { if (c2 > 57 || c2 < 48) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); let c3 = Stream.peek(strm__); if (c3 !== undefined) { if (c3 > 57 || c3 < 48) { throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); - } - Stream.junk(strm__); - return Char.chr((Math.imul(c1 - 48 | 0, 100) + Math.imul(c2 - 48 | 0, 10) | 0) + (c3 - 48 | 0) | 0); - } - throw new Error(Stream.$$Error, { cause: { RE_EXN_ID: Stream.$$Error, _1: "" } }); + } + Stream.junk(strm__); + return Char.chr((Math.imul(c1 - 48 | 0, 100) + Math.imul(c2 - 48 | 0, 10) | 0) + (c3 - 48 | 0) | 0); + } + throw new Error(Stream.$$Error, { + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } throw new Error(Stream.$$Error, { - cause: { - RE_EXN_ID: Stream.$$Error, - _1: "" - } - }); + cause: { + RE_EXN_ID: Stream.$$Error, + _1: "" + } + }); } Stream.junk(strm__); return c1; } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; let comment = function (strm__) { @@ -620,10 +620,10 @@ function make_lexer(keywords) { } } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); case 42 : Stream.junk(strm__); while (true) { @@ -641,10 +641,10 @@ function make_lexer(keywords) { return; } throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); }; default: Stream.junk(strm__); @@ -652,10 +652,10 @@ function make_lexer(keywords) { } } else { throw new Error(Stream.Failure, { - cause: { - RE_EXN_ID: Stream.Failure - } - }); + cause: { + RE_EXN_ID: Stream.Failure + } + }); } }; }; diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index 2f3ef459b2..112833ee17 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -112,15 +112,15 @@ function copy_bucketlist(param) { }; if (typeof prec !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "hashtbl.res", - 110, - 19 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "hashtbl.res", + 110, + 19 + ] + } + }); } prec.next = r; _param = next; @@ -255,10 +255,10 @@ function find(h, key) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -268,10 +268,10 @@ function find(h, key) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -281,10 +281,10 @@ function find(h, key) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -297,10 +297,10 @@ function find(h, key) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; @@ -471,13 +471,13 @@ function iter(f, h) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -528,13 +528,13 @@ function filter_map_inplace(f, h) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -571,13 +571,13 @@ function fold(f, h, init) { } catch (exn) { if (old_trav) { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } flip_ongoing_traversal(h); throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -661,10 +661,10 @@ function MakeSeeded(H) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -674,10 +674,10 @@ function MakeSeeded(H) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -687,10 +687,10 @@ function MakeSeeded(H) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -703,10 +703,10 @@ function MakeSeeded(H) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; @@ -909,10 +909,10 @@ function Make(H) { let match = Caml_array.get(h.data, key_index(h, key)); if (typeof match !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k1 = match.key; let d1 = match.data; @@ -922,10 +922,10 @@ function Make(H) { } if (typeof next1 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k2 = next1.key; let d2 = next1.data; @@ -935,10 +935,10 @@ function Make(H) { } if (typeof next2 !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k3 = next2.key; let d3 = next2.data; @@ -951,10 +951,10 @@ function Make(H) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let k = param.key; let data = param.data; diff --git a/lib/js/int32.js b/lib/js/int32.js index a5e4870acf..00883d1909 100644 --- a/lib/js/int32.js +++ b/lib/js/int32.js @@ -37,8 +37,8 @@ function of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/int64.js b/lib/js/int64.js index af597f0f9a..b46cab5118 100644 --- a/lib/js/int64.js +++ b/lib/js/int64.js @@ -30,8 +30,8 @@ function of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/js_exn.js b/lib/js/js_exn.js index 5229577c1f..706c4b6181 100644 --- a/lib/js/js_exn.js +++ b/lib/js/js_exn.js @@ -3,44 +3,44 @@ function raiseError(str) { throw new Error(new Error(str).RE_EXN_ID, { - cause: new Error(str) - }); + cause: new Error(str) + }); } function raiseEvalError(str) { throw new Error(new EvalError(str).RE_EXN_ID, { - cause: new EvalError(str) - }); + cause: new EvalError(str) + }); } function raiseRangeError(str) { throw new Error(new RangeError(str).RE_EXN_ID, { - cause: new RangeError(str) - }); + cause: new RangeError(str) + }); } function raiseReferenceError(str) { throw new Error(new ReferenceError(str).RE_EXN_ID, { - cause: new ReferenceError(str) - }); + cause: new ReferenceError(str) + }); } function raiseSyntaxError(str) { throw new Error(new SyntaxError(str).RE_EXN_ID, { - cause: new SyntaxError(str) - }); + cause: new SyntaxError(str) + }); } function raiseTypeError(str) { throw new Error(new TypeError(str).RE_EXN_ID, { - cause: new TypeError(str) - }); + cause: new TypeError(str) + }); } function raiseUriError(str) { throw new Error(new URIError(str).RE_EXN_ID, { - cause: new URIError(str) - }); + cause: new URIError(str) + }); } let $$Error$1 = "JsError"; diff --git a/lib/js/js_null.js b/lib/js/js_null.js index 73f42da3cf..7d8ddcb6e1 100644 --- a/lib/js/js_null.js +++ b/lib/js/js_null.js @@ -11,8 +11,8 @@ function getExn(f) { return f; } throw new Error(new Error("Js.Null.getExn").RE_EXN_ID, { - cause: new Error("Js.Null.getExn") - }); + cause: new Error("Js.Null.getExn") + }); } function bind(x, f) { diff --git a/lib/js/js_option.js b/lib/js/js_option.js index bdd59b6389..0b876c2b9a 100644 --- a/lib/js/js_option.js +++ b/lib/js/js_option.js @@ -27,8 +27,8 @@ function getExn(x) { return Caml_option.valFromOption(x); } throw new Error(new Error("getExn").RE_EXN_ID, { - cause: new Error("getExn") - }); + cause: new Error("getExn") + }); } function equal(eq, a, b) { diff --git a/lib/js/js_undefined.js b/lib/js/js_undefined.js index fcbfb19305..567ce8fec5 100644 --- a/lib/js/js_undefined.js +++ b/lib/js/js_undefined.js @@ -15,8 +15,8 @@ function getExn(f) { return f; } throw new Error(new Error("Js.Undefined.getExn").RE_EXN_ID, { - cause: new Error("Js.Undefined.getExn") - }); + cause: new Error("Js.Undefined.getExn") + }); } function bind(x, f) { diff --git a/lib/js/lexing.js b/lib/js/lexing.js index 4dcf861f9b..eb3b49462b 100644 --- a/lib/js/lexing.js +++ b/lib/js/lexing.js @@ -55,11 +55,11 @@ function from_function(f) { let newlen = (x.lex_buffer.length << 1); if (((x.lex_buffer_len - x.lex_start_pos | 0) + n | 0) > newlen) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "Lexing.lex_refill: cannot grow buffer" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "Lexing.lex_refill: cannot grow buffer" + } + }); } let newbuf = Caml_bytes.create(newlen); Bytes.blit(x.lex_buffer, x.lex_start_pos, newbuf, 0, x.lex_buffer_len - x.lex_start_pos | 0); diff --git a/lib/js/list.js b/lib/js/list.js index 382f7a802d..46da49279a 100644 --- a/lib/js/list.js +++ b/lib/js/list.js @@ -31,11 +31,11 @@ function hd(param) { return param.hd; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "hd" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "hd" + } + }); } function tl(param) { @@ -43,21 +43,21 @@ function tl(param) { return param.tl; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "tl" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "tl" + } + }); } function nth(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -73,22 +73,22 @@ function nth(l, n) { continue; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "nth" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "nth" + } + }); }; } function nth_opt(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -157,11 +157,11 @@ function init_aux(i, n, f) { function init(len, f) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.init" + } + }); } if (len > 10000) { return rev_append(init_tailrec_aux(/* [] */0, 0, len, f), /* [] */0); @@ -281,21 +281,21 @@ function map2(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } function rev_map2(f, l1, l2) { @@ -317,19 +317,19 @@ function rev_map2(f, l1, l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } if (l2$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } return accu; }; @@ -347,21 +347,21 @@ function iter2(f, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); } if (!l2) { return; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); }; } @@ -378,19 +378,19 @@ function fold_left2(f, _accu, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } return accu; }; @@ -402,19 +402,19 @@ function fold_right2(f, l1, l2, accu) { return f(l1.hd, l2.hd, fold_right2(f, l1.tl, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -461,21 +461,21 @@ function for_all2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); } if (!l2) { return true; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); }; } @@ -493,21 +493,21 @@ function exists2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); } if (!l2) { return false; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); }; } @@ -551,10 +551,10 @@ function assoc(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -585,10 +585,10 @@ function assq(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -679,10 +679,10 @@ function find(p, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -791,21 +791,21 @@ function combine(l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } function merge(cmp, l1, l2) { @@ -843,15 +843,15 @@ function chop(_k, _l) { continue; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "list.res", - 420, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "list.res", + 420, + 11 + ] + } + }); }; } diff --git a/lib/js/listLabels.js b/lib/js/listLabels.js index e70418f020..564e9376f2 100644 --- a/lib/js/listLabels.js +++ b/lib/js/listLabels.js @@ -31,11 +31,11 @@ function hd(param) { return param.hd; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "hd" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "hd" + } + }); } function tl(param) { @@ -43,21 +43,21 @@ function tl(param) { return param.tl; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "tl" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "tl" + } + }); } function nth(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -73,22 +73,22 @@ function nth(l, n) { continue; } throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: "nth" - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: "nth" + } + }); }; } function nth_opt(l, n) { if (n < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.nth" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.nth" + } + }); } let _l = l; let _n = n; @@ -157,11 +157,11 @@ function init_aux(i, n, f) { function init(len, f) { if (len < 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.init" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.init" + } + }); } if (len > 10000) { return rev_append(init_tailrec_aux(/* [] */0, 0, len, f), /* [] */0); @@ -281,21 +281,21 @@ function map2(f, l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.map2" + } + }); } function rev_map2(f, l1, l2) { @@ -317,19 +317,19 @@ function rev_map2(f, l1, l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } if (l2$1) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.rev_map2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.rev_map2" + } + }); } return accu; }; @@ -347,21 +347,21 @@ function iter2(f, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); } if (!l2) { return; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.iter2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.iter2" + } + }); }; } @@ -378,19 +378,19 @@ function fold_left2(f, _accu, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_left2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_left2" + } + }); } return accu; }; @@ -402,19 +402,19 @@ function fold_right2(f, l1, l2, accu) { return f(l1.hd, l2.hd, fold_right2(f, l1.tl, l2.tl, accu)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } if (l2) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.fold_right2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.fold_right2" + } + }); } return accu; } @@ -461,21 +461,21 @@ function for_all2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); } if (!l2) { return true; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.for_all2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.for_all2" + } + }); }; } @@ -493,21 +493,21 @@ function exists2(p, _l1, _l2) { continue; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); } if (!l2) { return false; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.exists2" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.exists2" + } + }); }; } @@ -551,10 +551,10 @@ function assoc(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -585,10 +585,10 @@ function assq(x, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -679,10 +679,10 @@ function find(p, _param) { continue; } throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); }; } @@ -791,21 +791,21 @@ function combine(l1, l2) { }; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } if (!l2) { return /* [] */0; } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "List.combine" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "List.combine" + } + }); } function merge(cmp, l1, l2) { @@ -843,15 +843,15 @@ function chop(_k, _l) { continue; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "listLabels.res", - 420, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "listLabels.res", + 420, + 11 + ] + } + }); }; } diff --git a/lib/js/map.js b/lib/js/map.js index 2699f8f726..62e301eb40 100644 --- a/lib/js/map.js +++ b/lib/js/map.js @@ -40,11 +40,11 @@ function Make(funarg) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -57,11 +57,11 @@ function Make(funarg) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -75,11 +75,11 @@ function Make(funarg) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -92,11 +92,11 @@ function Make(funarg) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -155,10 +155,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = funarg.compare(x, param.v); if (c === 0) { @@ -173,10 +173,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -249,10 +249,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -353,10 +353,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -391,10 +391,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -427,11 +427,11 @@ function Make(funarg) { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -720,15 +720,15 @@ function Make(funarg) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "map.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "map.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/lib/js/mapLabels.js b/lib/js/mapLabels.js index 2c62802bc7..09ef63e715 100644 --- a/lib/js/mapLabels.js +++ b/lib/js/mapLabels.js @@ -40,11 +40,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -57,11 +57,11 @@ function Make(Ord) { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -75,11 +75,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -92,11 +92,11 @@ function Make(Ord) { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -155,10 +155,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = Ord.compare(x, param.v); if (c === 0) { @@ -195,10 +195,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -271,10 +271,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -353,10 +353,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -391,10 +391,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -427,11 +427,11 @@ function Make(Ord) { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -720,15 +720,15 @@ function Make(Ord) { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "mapLabels.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "mapLabels.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); diff --git a/lib/js/moreLabels.js b/lib/js/moreLabels.js index c2031fecdb..0a88535c30 100644 --- a/lib/js/moreLabels.js +++ b/lib/js/moreLabels.js @@ -70,11 +70,11 @@ let $$Map = { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let lr = l.r; let ld = l.d; @@ -87,11 +87,11 @@ let $$Map = { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -105,11 +105,11 @@ let $$Map = { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); } let rr = r.r; let rd = r.d; @@ -122,11 +122,11 @@ let $$Map = { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.bal" + } + }); }; let is_empty = function (param) { if (typeof param !== "object") { @@ -185,10 +185,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let c = funarg.compare(x, param.v); if (c === 0) { @@ -225,10 +225,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -301,10 +301,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -383,10 +383,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -421,10 +421,10 @@ let $$Map = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -457,11 +457,11 @@ let $$Map = { let remove_min_binding = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Map.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Map.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -750,15 +750,15 @@ let $$Map = { } if (typeof s2 !== "object") { throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "mapLabels.res", - 552, - 11 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "mapLabels.res", + 552, + 11 + ] + } + }); } let v2 = s2.v; let match$1 = split(v2, s1); @@ -1016,11 +1016,11 @@ let $$Set = { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -1032,11 +1032,11 @@ let $$Set = { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -1049,11 +1049,11 @@ let $$Set = { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -1065,11 +1065,11 @@ let $$Set = { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -1148,10 +1148,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1180,10 +1180,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -1210,11 +1210,11 @@ let $$Set = { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -1611,10 +1611,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = funarg.compare(x, v); @@ -1647,10 +1647,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1713,10 +1713,10 @@ let $$Set = { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -1887,15 +1887,15 @@ let $$Set = { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "setLabels.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "setLabels.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l), l)[0]; }; diff --git a/lib/js/parsing.js b/lib/js/parsing.js index 0122d2db9d..72a439cfa8 100644 --- a/lib/js/parsing.js +++ b/lib/js/parsing.js @@ -88,10 +88,10 @@ function yyparse(tables, start, lexer, lexbuf) { continue; case "Raise_parse_error" : throw new Error(Parse_error, { - cause: { - RE_EXN_ID: Parse_error - } - }); + cause: { + RE_EXN_ID: Parse_error + } + }); case "Grow_stacks_1" : grow_stacks(); _arg = undefined; @@ -118,8 +118,8 @@ function yyparse(tables, start, lexer, lexbuf) { ]; } else { throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } _arg = match$1[1]; @@ -153,8 +153,8 @@ function yyparse(tables, start, lexer, lexbuf) { } }); throw new Error(exn$1.RE_EXN_ID, { - cause: exn$1 - }); + cause: exn$1 + }); } } diff --git a/lib/js/pervasives.js b/lib/js/pervasives.js index 2be743fc2b..adb37289e3 100644 --- a/lib/js/pervasives.js +++ b/lib/js/pervasives.js @@ -8,20 +8,20 @@ let Caml_js_exceptions = require("./caml_js_exceptions.js"); function failwith(s) { throw new Error("Failure", { - cause: { - RE_EXN_ID: "Failure", - _1: s - } - }); + cause: { + RE_EXN_ID: "Failure", + _1: s + } + }); } function invalid_arg(s) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } let Exit = /* @__PURE__ */Caml_exceptions.create("Pervasives.Exit"); @@ -59,11 +59,11 @@ function classify_float(x) { function char_of_int(n) { if (n < 0 || n > 255) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "char_of_int" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "char_of_int" + } + }); } return n; } @@ -84,11 +84,11 @@ function bool_of_string(param) { return true; default: throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "bool_of_string" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "bool_of_string" + } + }); } } @@ -112,8 +112,8 @@ function int_of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -154,8 +154,8 @@ function float_of_string_opt(s) { return; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/queue.js b/lib/js/queue.js index d61c7884b7..eaf58a010c 100644 --- a/lib/js/queue.js +++ b/lib/js/queue.js @@ -42,20 +42,20 @@ function peek(q) { return match.content; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function take(q) { let match = q.first; if (typeof match !== "object") { throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } let content = match.content; let next = match.next; diff --git a/lib/js/random.js b/lib/js/random.js index 4206c66b3d..f10fd3cdde 100644 --- a/lib/js/random.js +++ b/lib/js/random.js @@ -76,11 +76,11 @@ function bits(s) { function int(s, bound) { if (bound > 1073741823 || bound <= 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int" + } + }); } while (true) { let r = bits(s); @@ -95,11 +95,11 @@ function int(s, bound) { function int32(s, bound) { if (bound <= 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int32" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int32" + } + }); } while (true) { let b1 = bits(s); @@ -116,11 +116,11 @@ function int32(s, bound) { function int64(s, bound) { if (Caml.i64_le(bound, Caml_int64.zero)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Random.int64" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Random.int64" + } + }); } while (true) { let b1 = Caml_int64.of_int32(bits(s)); diff --git a/lib/js/runtime_deriving.js b/lib/js/runtime_deriving.js index db45cb7a89..5b1bc5652f 100644 --- a/lib/js/runtime_deriving.js +++ b/lib/js/runtime_deriving.js @@ -4,10 +4,10 @@ function raiseWhenNotFound(x) { if (x == null) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } return x; } diff --git a/lib/js/set.js b/lib/js/set.js index 6f610bb979..3c6211b669 100644 --- a/lib/js/set.js +++ b/lib/js/set.js @@ -32,11 +32,11 @@ function Make(funarg) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -48,11 +48,11 @@ function Make(funarg) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -65,11 +65,11 @@ function Make(funarg) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -81,11 +81,11 @@ function Make(funarg) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -164,10 +164,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -196,10 +196,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -226,11 +226,11 @@ function Make(funarg) { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -623,10 +623,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = funarg.compare(x, v); @@ -642,10 +642,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -706,10 +706,10 @@ function Make(funarg) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -913,15 +913,15 @@ function Make(funarg) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "set.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "set.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l$1), l$1)[0]; } else { diff --git a/lib/js/setLabels.js b/lib/js/setLabels.js index 8a28405a98..737c8d4c8f 100644 --- a/lib/js/setLabels.js +++ b/lib/js/setLabels.js @@ -32,11 +32,11 @@ function Make(Ord) { if (hl > (hr + 2 | 0)) { if (typeof l !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let lr = l.r; let lv = l.v; @@ -48,11 +48,11 @@ function Make(Ord) { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } if (hr <= (hl + 2 | 0)) { return { @@ -65,11 +65,11 @@ function Make(Ord) { } if (typeof r !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); } let rr = r.r; let rv = r.v; @@ -81,11 +81,11 @@ function Make(Ord) { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.bal" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.bal" + } + }); }; let add = function (x, param) { if (typeof param !== "object") { @@ -164,10 +164,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -196,10 +196,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let r = param.r; if (typeof r !== "object") { @@ -226,11 +226,11 @@ function Make(Ord) { let remove_min_elt = function (param) { if (typeof param !== "object") { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Set.remove_min_elt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Set.remove_min_elt" + } + }); } let l = param.l; if (typeof l !== "object") { @@ -627,10 +627,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; let c = Ord.compare(x, v); @@ -663,10 +663,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -729,10 +729,10 @@ function Make(Ord) { let param = _param; if (typeof param !== "object") { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } let v = param.v; if (f(v)) { @@ -903,15 +903,15 @@ function Make(Ord) { ]; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "setLabels.res", - 691, - 20 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "setLabels.res", + 691, + 20 + ] + } + }); }; return sub(List.length(l), l)[0]; }; diff --git a/lib/js/sort.js b/lib/js/sort.js index 27a30f77e2..c48404ca4e 100644 --- a/lib/js/sort.js +++ b/lib/js/sort.js @@ -115,11 +115,11 @@ function array(cmp, arr) { let j = hi - 1 | 0; if (!cmp(pivot, arr[hi]) || !cmp(arr[lo], pivot)) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "Sort.array" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "Sort.array" + } + }); } while (i < j) { while (!cmp(pivot, arr[i])) { diff --git a/lib/js/stack.js b/lib/js/stack.js index f46a7c700a..e90720d44c 100644 --- a/lib/js/stack.js +++ b/lib/js/stack.js @@ -40,10 +40,10 @@ function pop(s) { return match.hd; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function top(s) { @@ -52,10 +52,10 @@ function top(s) { return match.hd; } throw new Error(Empty, { - cause: { - RE_EXN_ID: Empty - } - }); + cause: { + RE_EXN_ID: Empty + } + }); } function is_empty(s) { diff --git a/lib/js/stream.js b/lib/js/stream.js index ee1af1e8e6..e6e3b32d27 100644 --- a/lib/js/stream.js +++ b/lib/js/stream.js @@ -55,15 +55,15 @@ function get_data(count, _d) { }; } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 53, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 53, + 13 + ] + } + }); case "Slazy" : _d = CamlinternalLazy.force(d._0); continue; @@ -117,15 +117,15 @@ function peek_data(s) { return Caml_option.some(d._0); } throw new Error("Assert_failure", { - cause: { - RE_EXN_ID: "Assert_failure", - _1: [ - "stream.res", - 83, - 13 - ] - } - }); + cause: { + RE_EXN_ID: "Assert_failure", + _1: [ + "stream.res", + 83, + 13 + ] + } + }); case "Slazy" : s.data = CamlinternalLazy.force(f._0); continue; @@ -235,10 +235,10 @@ function next(s) { return Caml_option.valFromOption(a); } throw new Error(Failure, { - cause: { - RE_EXN_ID: Failure - } - }); + cause: { + RE_EXN_ID: Failure + } + }); } function empty(s) { @@ -247,10 +247,10 @@ function empty(s) { return; } throw new Error(Failure, { - cause: { - RE_EXN_ID: Failure - } - }); + cause: { + RE_EXN_ID: Failure + } + }); } function iter(f, strm) { diff --git a/lib/js/string.js b/lib/js/string.js index 4a51be4c0e..d6be0fd764 100644 --- a/lib/js/string.js +++ b/lib/js/string.js @@ -91,10 +91,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -130,11 +130,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -143,11 +143,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -157,10 +157,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -177,11 +177,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -207,11 +207,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -220,11 +220,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -235,8 +235,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -247,11 +247,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -262,8 +262,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/stringLabels.js b/lib/js/stringLabels.js index 52d2761851..d66bfccf31 100644 --- a/lib/js/stringLabels.js +++ b/lib/js/stringLabels.js @@ -93,10 +93,10 @@ function index_rec(s, lim, _i, c) { let i = _i; if (i >= lim) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -132,11 +132,11 @@ function index_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from / Bytes.index_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from / Bytes.index_from" + } + }); } return index_rec(s, l, i, c); } @@ -145,11 +145,11 @@ function index_from_opt(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.index_from_opt / Bytes.index_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.index_from_opt / Bytes.index_from_opt" + } + }); } return index_rec_opt(s, l, i, c); } @@ -159,10 +159,10 @@ function rindex_rec(s, _i, c) { let i = _i; if (i < 0) { throw new Error("Not_found", { - cause: { - RE_EXN_ID: "Not_found" - } - }); + cause: { + RE_EXN_ID: "Not_found" + } + }); } if (s.codePointAt(i) === c) { return i; @@ -179,11 +179,11 @@ function rindex(s, c) { function rindex_from(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from / Bytes.rindex_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from / Bytes.rindex_from" + } + }); } return rindex_rec(s, i, c); } @@ -209,11 +209,11 @@ function rindex_opt(s, c) { function rindex_from_opt(s, i, c) { if (i < -1 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rindex_from_opt / Bytes.rindex_from_opt" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rindex_from_opt / Bytes.rindex_from_opt" + } + }); } return rindex_rec_opt(s, i, c); } @@ -222,11 +222,11 @@ function contains_from(s, i, c) { let l = s.length; if (i < 0 || i > l) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.contains_from / Bytes.contains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.contains_from / Bytes.contains_from" + } + }); } try { index_rec(s, l, i, c); @@ -237,8 +237,8 @@ function contains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } @@ -249,11 +249,11 @@ function contains(s, c) { function rcontains_from(s, i, c) { if (i < 0 || i >= s.length) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "String.rcontains_from / Bytes.rcontains_from" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "String.rcontains_from / Bytes.rcontains_from" + } + }); } try { rindex_rec(s, i, c); @@ -264,8 +264,8 @@ function rcontains_from(s, i, c) { return false; } throw new Error(exn.RE_EXN_ID, { - cause: exn - }); + cause: exn + }); } } diff --git a/lib/js/uchar.js b/lib/js/uchar.js index 87523c8fb6..43a6f0349e 100644 --- a/lib/js/uchar.js +++ b/lib/js/uchar.js @@ -17,11 +17,11 @@ function succ(u) { } if (u === 1114111) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "U+10FFFF has no successor" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "U+10FFFF has no successor" + } + }); } return u + 1 | 0; } @@ -32,11 +32,11 @@ function pred(u) { } if (u === 0) { throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: "U+0000 has no predecessor" - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: "U+0000 has no predecessor" + } + }); } return u - 1 | 0; } @@ -57,11 +57,11 @@ function of_int(i) { } let s = err_not_sv(i); throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } function is_char(u) { @@ -78,11 +78,11 @@ function to_char(u) { } let s = err_not_latin1(u); throw new Error("Invalid_argument", { - cause: { - RE_EXN_ID: "Invalid_argument", - _1: s - } - }); + cause: { + RE_EXN_ID: "Invalid_argument", + _1: s + } + }); } function unsafe_to_char(prim) { From e1fc2fdecdacb40003269298dd9cd8453162b41e Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 11:48:04 +0400 Subject: [PATCH 16/18] Update changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ae99d8d4b..aa6891b10f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,14 @@ #### :nail_care: Polish -- Improve try/catch formatting in generated js code. https://github.com/rescript-lang/rescript-compiler/pull/6930 +- Improve formatting in the generated js code. https://github.com/rescript-lang/rescript-compiler/pull/6932 + - `}\ncatch{` -> `} catch {` + - `for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){` -> `for (let i = 0, i_finish = r.length; i < i_finish; ++i) {` + - `while(true) {` -> `while (true) {` + - Fixed tabulation for `switch case` bodies + - Fixed tabulation for `throw new Error` bodies + - Removed empty line at the end of `switch` statement + - Removed empty `default` case from `switch` statement in the generated code # 12.0.0-alpha.1 From de799d5730781a0ab299febdcf64ce38ce88d2f5 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 12:11:14 +0400 Subject: [PATCH 17/18] Revert formatting changes in changelog file --- CHANGELOG.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa6891b10f..9d9f3a65c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -245,7 +245,7 @@ #### :rocket: New Feature -- Experimental support of tagged template literals, e.g. `` sql`select * from ${table} ``. https://github.com/rescript-lang/rescript-compiler/pull/6250 +- Experimental support of tagged template literals, e.g. ```sql`select * from ${table}```. https://github.com/rescript-lang/rescript-compiler/pull/6250 - Experimental support for generic/custom JSX transforms. https://github.com/rescript-lang/rescript-compiler/pull/6565 - `dict` is now a builtin type. https://github.com/rescript-lang/rescript-compiler/pull/6590 @@ -425,7 +425,7 @@ No changes compared to rc.9. #### :boom: Breaking Change -- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 +- Stop mangling object field names. If you had objects with field names containing "__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 #### :bug: Bug Fix @@ -480,7 +480,7 @@ No changes compared to rc.9. #### :rocket: New Feature -- Introduced a new `%ffi` extension (_experimental_ - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251 +- Introduced a new `%ffi` extension (*experimental* - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251 - Extended untagged variants with function types. https://github.com/rescript-lang/rescript-compiler/pull/6279 #### :boom: Breaking Change @@ -558,14 +558,14 @@ No changes compared to rc.9. #### :bug: Bug Fix -- Fix broken formatting in uncurried mode for functions with \_ placeholder args. https://github.com/rescript-lang/rescript-compiler/pull/6148 +- Fix broken formatting in uncurried mode for functions with _ placeholder args. https://github.com/rescript-lang/rescript-compiler/pull/6148 - Fix issue where spreading record types with optional labels would not have their labels preserved as optional. https://github.com/rescript-lang/rescript-compiler/pull/6154 - Fix error location to be the type with the spreads when spreading record types with duplicate labels. https://github.com/rescript-lang/rescript-compiler/pull/6157 - Disable warning on `@inline` attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152 - Support doc comments on arguments of function types. https://github.com/rescript-lang/rescript-compiler/pull/6161 - Fix issue with record type coercion and unboxed. https://github.com/rescript-lang/rescript-compiler/issues/6158 - Fixed subtype checking for record types with "@as" attributes: The subtype relationship now takes into account the compatibility of "@as" attributes between corresponding fields, ensuring correctness in runtime representation. - https://github.com/rescript-lang/rescript-compiler/issues/6158 + https://github.com/rescript-lang/rescript-compiler/issues/6158 - Emit directive above header comment. https://github.com/rescript-lang/rescript-compiler/pull/6172 - Add error message to private extension. https://github.com/rescript-lang/rescript-compiler/pull/6175 @@ -594,6 +594,7 @@ No changes compared to rc.9. - Special case generation of uncurried functions with 1 argument of unit type so they don't take a parameter. https://github.com/rescript-lang/rescript-compiler/pull/6131 + # 11.0.0-alpha.1 #### :rocket: Main New Feature @@ -604,16 +605,16 @@ No changes compared to rc.9. #### :rocket: New Feature - Add support for uncurried mode: a mode where everything is considered uncurried, whether with or without the `.`. This can be turned on with `@@uncurried` locally in a file. For project-level configuration in `bsconfig.json`, there's a boolean config `"uncurried"`, which propagates to dependencies, to turn on uncurried mode. - Since there's no syntax for partial application in this new mode, introduce `@res.partial foo(x)` to express partial application. This is temporary and will later have some surface syntax. - Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. - The `make` function of components is generated as an uncurried function. - Use best effort to determine the config when formatting a file. - https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087 +Since there's no syntax for partial application in this new mode, introduce `@res.partial foo(x)` to express partial application. This is temporary and will later have some surface syntax. +Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. +The `make` function of components is generated as an uncurried function. +Use best effort to determine the config when formatting a file. +https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087 - Customization of runtime representation of variants. This is work in progress. E.g. some restrictions on the input. See comments of the form "TODO: put restriction on the variant definitions allowed, to make sure this never happens". https://github.com/rescript-lang/rescript-compiler/pull/6095 - Introduce untagged variants https://github.com/rescript-lang/rescript-compiler/pull/6103 - Add support for unary uncurried pipe in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/5804 - Add support for partial application of uncurried functions: with uncurried application one can provide a - subset of the arguments, and return a curried type with the remaining ones https://github.com/rescript-lang/rescript-compiler/pull/5805 +subset of the arguments, and return a curried type with the remaining ones https://github.com/rescript-lang/rescript-compiler/pull/5805 - Add support for uncurried externals https://github.com/rescript-lang/rescript-compiler/pull/5815 https://github.com/rescript-lang/rescript-compiler/pull/5819 https://github.com/rescript-lang/rescript-compiler/pull/5830 https://github.com/rescript-lang/rescript-compiler/pull/5894 - Parser/Printer: unify uncurried functions of arity 0, and of arity 1 taking unit. There's now only arity 1 in the source language. https://github.com/rescript-lang/rescript-compiler/pull/5825 - Add support for default arguments in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5835 @@ -635,12 +636,12 @@ No changes compared to rc.9. - `rescript convert ` - Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) which is maintained separately. - Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore. -- Made pinned dependencies transitive: if _a_ is a pinned dependency of _b_ and _b_ is a pinned dependency of _c_, then _a_ is implicitly a pinned dependency of _c_. This change is only breaking if your build process assumes non-transitivity. +- Made pinned dependencies transitive: if *a* is a pinned dependency of *b* and *b* is a pinned dependency of *c*, then *a* is implicitly a pinned dependency of *c*. This change is only breaking if your build process assumes non-transitivity. - Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`. - Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. - These are only breaking changes for unformatted code. +Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. +These are only breaking changes for unformatted code. - Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. -- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 +- Remove unsafe ``` j`$(a)$(b)` ``` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 - Remove deprecated module `Printexc` - `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 - New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 @@ -689,21 +690,19 @@ No changes compared to rc.9. # 10.1.4 #### :bug: Bug Fix - - Fix implementation of directives https://github.com/rescript-lang/rescript-compiler/pull/6052 - Fix issue if the `lib` dir is included in the sources of bsconfig.json https://github.com/rescript-lang/rescript-compiler/pull/6055 - Fix issue with string escape in pattern match https://github.com/rescript-lang/rescript-compiler/pull/6062 - Fix issue with literal comparison of string constants https://github.com/rescript-lang/rescript-compiler/pull/6065 #### :rocket: New Feature - - Add support for toplevel `await` https://github.com/rescript-lang/rescript-compiler/pull/6054 #### :nail_care: Polish - Better error message for extension point https://github.com/rescript-lang/rescript-compiler/pull/6057 - Improve format check help https://github.com/rescript-lang/rescript-compiler/pull/6056 -- Deprecate unsafe `` j`$(a)$(b)` `` interpolation: use string templates `` `${a}${b}` `` instead https://github.com/rescript-lang/rescript-compiler/pull/6067 +- Deprecate unsafe ``` j`$(a)$(b)` ``` interpolation: use string templates ``` `${a}${b}` ``` instead https://github.com/rescript-lang/rescript-compiler/pull/6067 # 10.1.3 From e152a58f755219b13e0b1a24f8923dc5e4fa0e78 Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Sun, 4 Aug 2024 12:13:19 +0400 Subject: [PATCH 18/18] Commit output of genType tests --- .../src/NestedVariants.res.js | 31 +++++++++---------- .../src/VariantsWithPayload.res.js | 19 ++++++------ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js index 26d8c38aa9..2da39bec02 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js +++ b/jscomp/gentype_tests/typescript-react-example/src/NestedVariants.res.js @@ -123,25 +123,24 @@ function testUnboxedBinary(param) { function testInline(x) { switch (x.TAG) { case "I" : - return { - TAG: "I", - i: x.i, - j: x.j - }; + return { + TAG: "I", + i: x.i, + j: x.j + }; case "J" : - return x; + return x; case "K" : - return { - TAG: "K", - _0: x._1, - _1: x._0 - }; + return { + TAG: "K", + _0: x._1, + _1: x._0 + }; case "L" : - return { - TAG: "L", - _0: x._0 - }; - + return { + TAG: "L", + _0: x._0 + }; } } diff --git a/jscomp/gentype_tests/typescript-react-example/src/VariantsWithPayload.res.js b/jscomp/gentype_tests/typescript-react-example/src/VariantsWithPayload.res.js index 960efc433a..8f55a8e1fd 100644 --- a/jscomp/gentype_tests/typescript-react-example/src/VariantsWithPayload.res.js +++ b/jscomp/gentype_tests/typescript-react-example/src/VariantsWithPayload.res.js @@ -58,19 +58,18 @@ function printVariantWithPayloads(x) { } switch (x.TAG) { case "B" : - console.log("printVariantWithPayloads", "B(" + (String(x._0) + ")")); - return; + console.log("printVariantWithPayloads", "B(" + (String(x._0) + ")")); + return; case "C" : - console.log("printVariantWithPayloads", "C(" + (String(x._0) + (", " + (String(x._1) + ")")))); - return; + console.log("printVariantWithPayloads", "C(" + (String(x._0) + (", " + (String(x._1) + ")")))); + return; case "D" : - let match = x._0; - console.log("printVariantWithPayloads", "D((" + (String(match[0]) + (", " + (String(match[1]) + "))")))); - return; + let match = x._0; + console.log("printVariantWithPayloads", "D((" + (String(match[0]) + (", " + (String(match[1]) + "))")))); + return; case "E" : - console.log("printVariantWithPayloads", "E(" + (String(x._0) + (", " + (x._1 + (", " + (String(x._2) + ")")))))); - return; - + console.log("printVariantWithPayloads", "E(" + (String(x._0) + (", " + (x._1 + (", " + (String(x._2) + ")")))))); + return; } }