diff --git a/Changes.md b/Changes.md index ef41425b0c..a260ae9aff 100644 --- a/Changes.md +++ b/Changes.md @@ -10,6 +10,8 @@ Unreleased ([#1036](https://github.com/melange-re/melange/pull/1036)) - stdlib: fix runtime primitive for `Float.{min,max}` and related functions ([#1050](https://github.com/melange-re/melange/pull/1050)) +- core: emit `let` instead of `var` in compiled JS + ([#1019](https://github.com/melange-re/melange/pull/1019)) 3.0.0 2024-01-28 --------------- diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index db69155be0..6f4561d024 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -224,7 +224,7 @@ let pp_paren_params (cxt : cxt) (lexical : Ident.t list) : unit = id) *) let pp_var_assign cxt id = - string cxt L.var; + string cxt L.let_; space cxt; let acxt = ident cxt id in space cxt; @@ -241,7 +241,7 @@ let pp_var_assign_this cxt id = cxt let pp_var_declare cxt id = - string cxt L.var; + string cxt L.let_; space cxt; let acxt = ident cxt id in semi cxt; diff --git a/jscomp/core/js_dump_import_export.ml b/jscomp/core/js_dump_import_export.ml index bf479a94bf..a1ffb184a5 100644 --- a/jscomp/core/js_dump_import_export.ml +++ b/jscomp/core/js_dump_import_export.ml @@ -112,7 +112,7 @@ let requires require_lit cxt f (modules : (Ident.t * string * bool) list) = in P.at_least_two_lines f; List.rev_iter reversed_list (fun (s, file, default) -> - P.string f L.var; + P.string f L.let_; P.space f; P.string f s; P.space f; diff --git a/jscomp/core/js_dump_lit.ml b/jscomp/core/js_dump_lit.ml index c8a4d592d3..f63b767b69 100644 --- a/jscomp/core/js_dump_lit.ml +++ b/jscomp/core/js_dump_lit.ml @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) let function_ = "function" -let var = "var" (* should be able to switch to [let] easily*) +let let_ = "let" let return = "return" let require = "require" let import = "import" diff --git a/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_export.mjs b/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_export.mjs index 61d6f7fc9d..54f02305f4 100644 --- a/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_export.mjs +++ b/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_export.mjs @@ -1,7 +1,7 @@ // Generated by Melange -var $$default = 3; +let $$default = 3; export { $$default as default, diff --git a/jscomp/test/dist-es6/jscomp/test/mt.mjs b/jscomp/test/dist-es6/jscomp/test/mt.mjs index af485c6db8..6c96edc63d 100644 --- a/jscomp/test/dist-es6/jscomp/test/mt.mjs +++ b/jscomp/test/dist-es6/jscomp/test/mt.mjs @@ -12,15 +12,15 @@ function assert_fail(msg) { } function is_mocha(param) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (!match) { return false; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return false; } - var exec = Path.basename(match$1.hd); + let exec = Path.basename(match$1.hd); if (exec === "mocha") { return true; } else { @@ -29,11 +29,11 @@ function is_mocha(param) { } function from_suites(name, suite) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match && is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var partial_arg = param[1]; + let partial_arg = param[1]; it(param[0], (function () { return Curry._1(partial_arg, undefined); })); @@ -45,7 +45,7 @@ function from_suites(name, suite) { } function close_enough(thresholdOpt, a, b) { - var threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; + let threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; return Math.abs(a - b) < threshold; } @@ -67,8 +67,8 @@ function handleCode(spec) { Assert.ok(spec._0); return ; case /* Approx */5 : - var b = spec._1; - var a = spec._0; + let b = spec._1; + let a = spec._0; if (!close_enough(undefined, a, b)) { Assert.deepEqual(a, b); return ; @@ -76,8 +76,8 @@ function handleCode(spec) { return ; } case /* ApproxThreshold */6 : - var b$1 = spec._2; - var a$1 = spec._1; + 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 ; @@ -96,12 +96,12 @@ function handleCode(spec) { } function from_pair_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { return handleCode(Curry._1(code, undefined)); })); @@ -114,8 +114,8 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - var name = param[0]; - var _fn = Curry._1(param[1], undefined); + let name = param[0]; + let _fn = Curry._1(param[1], undefined); switch (_fn.TAG | 0) { case /* Eq */0 : console.log([ @@ -191,15 +191,15 @@ function from_pair_suites(name, suites) { } -var val_unit = Promise.resolve(undefined); +let val_unit = Promise.resolve(undefined); function from_promise_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { return code.then(function (x) { handleCode(x); diff --git a/jscomp/test/dist/jscomp/test/406_primitive_test.js b/jscomp/test/dist/jscomp/test/406_primitive_test.js index c12c90b74e..496bf481a3 100644 --- a/jscomp/test/dist/jscomp/test/406_primitive_test.js +++ b/jscomp/test/dist/jscomp/test/406_primitive_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -19,7 +19,7 @@ function eq(loc, x, y) { eq("File \"jscomp/test/406_primitive_test.ml\", line 13, characters 6-13", 32, 32); -var backend_type = /* Other */{ +let backend_type = /* Other */{ _0: "Melange" }; @@ -28,9 +28,9 @@ eq("File \"jscomp/test/406_primitive_test.ml\", line 24, characters 6-13", backe }); function f(param) { - var A = /* @__PURE__ */Caml_exceptions.create("A"); + let A = /* @__PURE__ */Caml_exceptions.create("A"); try { - for(var i = 0; i <= 200; ++i){ + for(let i = 0; i <= 200; ++i){ if (i === 10) { throw new Caml_js_exceptions.MelangeError(A, { MEL_EXN_ID: A, @@ -42,7 +42,7 @@ function f(param) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === A) { return ; } @@ -52,9 +52,9 @@ function f(param) { Mt.from_pair_suites("406_primitive_test", suites.contents); -var v = 32; +let v = 32; -var max_array_length = /* Max_wosize */2147483647; +let max_array_length = /* Max_wosize */2147483647; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/a_filename_test.js b/jscomp/test/dist/jscomp/test/a_filename_test.js index b2151d87c7..ba49fe86f6 100644 --- a/jscomp/test/dist/jscomp/test/a_filename_test.js +++ b/jscomp/test/dist/jscomp/test/a_filename_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Ext_filename_test = require("./ext_filename_test.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Ext_filename_test = require("./ext_filename_test.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/a_list_test.js b/jscomp/test/dist/jscomp/test/a_list_test.js index 6c7932958c..3c64c29528 100644 --- a/jscomp/test/dist/jscomp/test/a_list_test.js +++ b/jscomp/test/dist/jscomp/test/a_list_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Ext_list_test = require("./ext_list_test.js"); -var Mt = require("./mt.js"); +let Ext_list_test = require("./ext_list_test.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "drop", (function (param) { return { @@ -24,7 +24,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "drop1", (function (param) { @@ -104,7 +104,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/a_recursive_type.js b/jscomp/test/dist/jscomp/test/a_recursive_type.js index 96b35ec440..d6a731dec2 100644 --- a/jscomp/test/dist/jscomp/test/a_recursive_type.js +++ b/jscomp/test/dist/jscomp/test/a_recursive_type.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function g(x) { return Curry._1(x._0, x); } -var loop = g(/* A */{ +let loop = g(/* A */{ _0: g }); -var x = /* A */{ +let x = /* A */{ _0: g }; -var non_terminate = g(x); +let non_terminate = g(x); -var xx = {}; +let xx = {}; xx.xx = xx; diff --git a/jscomp/test/dist/jscomp/test/a_scope_bug.js b/jscomp/test/dist/jscomp/test/a_scope_bug.js index 63acbcb8b5..b449269d05 100644 --- a/jscomp/test/dist/jscomp/test/a_scope_bug.js +++ b/jscomp/test/dist/jscomp/test/a_scope_bug.js @@ -4,16 +4,16 @@ function odd(_z) { while(true) { - var z = _z; - var even = Math.imul(z, z); - var a = (even + 4 | 0) + even | 0; + let z = _z; + let even = Math.imul(z, z); + let a = (even + 4 | 0) + even | 0; console.log(String(a)); _z = 32; continue ; }; } -var even = odd; +let even = odd; exports.odd = odd; exports.even = even; diff --git a/jscomp/test/dist/jscomp/test/a_string_test.js b/jscomp/test/dist/jscomp/test/a_string_test.js index abb585ef70..d70bdbb96a 100644 --- a/jscomp/test/dist/jscomp/test/a_string_test.js +++ b/jscomp/test/dist/jscomp/test/a_string_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Ext_string_test = require("./ext_string_test.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Ext_string_test = require("./ext_string_test.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites_0 = [ +let suites_0 = [ "split", (function (param) { return { @@ -25,7 +25,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "split_non_empty", (function (param) { @@ -110,16 +110,16 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; Mt.from_pair_suites("A_string_test", suites); -var split = Ext_string_test.split; +let split = Ext_string_test.split; -var split_by = Ext_string_test.split_by; +let split_by = Ext_string_test.split_by; exports.split = split; exports.split_by = split_by; diff --git a/jscomp/test/dist/jscomp/test/acyc/a0_a1.js b/jscomp/test/dist/jscomp/test/acyc/a0_a1.js index a621ec9415..4e90465c67 100644 --- a/jscomp/test/dist/jscomp/test/acyc/a0_a1.js +++ b/jscomp/test/dist/jscomp/test/acyc/a0_a1.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 3; +let v = 3; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/acyc/a1_a2.js b/jscomp/test/dist/jscomp/test/acyc/a1_a2.js index 318670ecf3..8fa9e933fb 100644 --- a/jscomp/test/dist/jscomp/test/acyc/a1_a2.js +++ b/jscomp/test/dist/jscomp/test/acyc/a1_a2.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var A0_a1 = require("./a0_a1.js"); +let A0_a1 = require("./a0_a1.js"); -var v = A0_a1.v; +let v = A0_a1.v; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/acyc/a2_a3.js b/jscomp/test/dist/jscomp/test/acyc/a2_a3.js index 292bca798b..dc0d64f84c 100644 --- a/jscomp/test/dist/jscomp/test/acyc/a2_a3.js +++ b/jscomp/test/dist/jscomp/test/acyc/a2_a3.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var A1_a2 = require("./a1_a2.js"); +let A1_a2 = require("./a1_a2.js"); -var v = A1_a2.v; +let v = A1_a2.v; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/acyc/a3_a4.js b/jscomp/test/dist/jscomp/test/acyc/a3_a4.js index 9778ee01ef..68f50442df 100644 --- a/jscomp/test/dist/jscomp/test/acyc/a3_a4.js +++ b/jscomp/test/dist/jscomp/test/acyc/a3_a4.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var A2_a3 = require("./a2_a3.js"); +let A2_a3 = require("./a2_a3.js"); -var v = A2_a3.v; +let v = A2_a3.v; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/acyc/a4_a5.js b/jscomp/test/dist/jscomp/test/acyc/a4_a5.js index 04dadbb81b..0e28479538 100644 --- a/jscomp/test/dist/jscomp/test/acyc/a4_a5.js +++ b/jscomp/test/dist/jscomp/test/acyc/a4_a5.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var A3_a4 = require("./a3_a4.js"); +let A3_a4 = require("./a3_a4.js"); console.log(A3_a4.v); -var v = A3_a4.v; +let v = A3_a4.v; exports.v = v; /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/acyc/x.js b/jscomp/test/dist/jscomp/test/acyc/x.js index 628fa73a60..e6e271988c 100644 --- a/jscomp/test/dist/jscomp/test/acyc/x.js +++ b/jscomp/test/dist/jscomp/test/acyc/x.js @@ -2,25 +2,25 @@ 'use strict'; -var A0_a1 = { +let A0_a1 = { v: 3 }; -var A1_a2 = { +let A1_a2 = { v: 3 }; -var A2_a3 = { +let A2_a3 = { v: 3 }; -var A3_a4 = { +let A3_a4 = { v: 3 }; console.log(3); -var A4_a5 = { +let A4_a5 = { v: 3 }; diff --git a/jscomp/test/dist/jscomp/test/adt_optimize_test.js b/jscomp/test/dist/jscomp/test/adt_optimize_test.js index db2664edb8..4453a3edf0 100644 --- a/jscomp/test/dist/jscomp/test/adt_optimize_test.js +++ b/jscomp/test/dist/jscomp/test/adt_optimize_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(x) { return x + 1 | 0; diff --git a/jscomp/test/dist/jscomp/test/alias_test.js b/jscomp/test/dist/jscomp/test/alias_test.js index 7c2bc4c4a6..d4d850882e 100644 --- a/jscomp/test/dist/jscomp/test/alias_test.js +++ b/jscomp/test/dist/jscomp/test/alias_test.js @@ -2,21 +2,21 @@ 'use strict'; -var a10 = "hello world"; +let a10 = "hello world"; -var v = 1; +let v = 1; -var a21 = "hello worldnothello worldnot"; +let a21 = "hello worldnothello worldnot"; function ff(param) { return "cool test hello worldnothello worldnothello"; } -var a23 = ff(undefined); +let a23 = ff(undefined); -var a15 = a10; +let a15 = a10; -var b15 = 111; +let b15 = 111; exports.a15 = a15; exports.b15 = b15; diff --git a/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js b/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js index 0d646bc07e..788dd874ff 100644 --- a/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js +++ b/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); function f(b, x, _n) { while(true) { - var n = _n; + let n = _n; if (n > 100000) { return false; } @@ -19,7 +19,7 @@ function f(b, x, _n) { function or_f(b, x, _n) { while(true) { - var n = _n; + let n = _n; if (n > 100000) { return false; } @@ -31,7 +31,7 @@ function or_f(b, x, _n) { }; } -var suites_0 = [ +let suites_0 = [ "and_tail", (function (param) { return { @@ -42,7 +42,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "or_tail", (function (param) { @@ -56,7 +56,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/app_root_finder.js b/jscomp/test/dist/jscomp/test/app_root_finder.js index 65c9b148de..55e170edca 100644 --- a/jscomp/test/dist/jscomp/test/app_root_finder.js +++ b/jscomp/test/dist/jscomp/test/app_root_finder.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); -var Fs = require("fs"); -var Path = require("path"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); +let Fs = require("fs"); +let Path = require("path"); -var package_json = "package.json"; +let package_json = "package.json"; function find_package_json(_dir) { while(true) { - var dir = _dir; + let dir = _dir; if (Fs.existsSync(Path.join(dir, package_json))) { return dir; } - var new_dir = Path.dirname(dir); + let new_dir = Path.dirname(dir); if (new_dir === dir) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -25,7 +25,7 @@ function find_package_json(_dir) { }; } -var x = typeof __dirname === "undefined" ? undefined : __dirname; +let x = typeof __dirname === "undefined" ? undefined : __dirname; if (x !== undefined) { console.log(find_package_json(x)); diff --git a/jscomp/test/dist/jscomp/test/argv_test.js b/jscomp/test/dist/jscomp/test/argv_test.js index df6f9a6233..8bff6f0b9e 100644 --- a/jscomp/test/dist/jscomp/test/argv_test.js +++ b/jscomp/test/dist/jscomp/test/argv_test.js @@ -1,24 +1,24 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib__Arg = require("melange/arg.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib__Arg = require("melange/arg.js"); function anno_fun(arg) { } -var usage_msg = "Usage:\n"; +let usage_msg = "Usage:\n"; -var compile = { +let compile = { contents: false }; -var test = { +let test = { contents: true }; -var arg_spec_0 = [ +let arg_spec_0 = [ "-c", { TAG: /* Set */2, @@ -27,7 +27,7 @@ var arg_spec_0 = [ " Compile" ]; -var arg_spec_1 = { +let arg_spec_1 = { hd: [ "-d", { @@ -39,7 +39,7 @@ var arg_spec_1 = { tl: /* [] */0 }; -var arg_spec = { +let arg_spec = { hd: arg_spec_0, tl: arg_spec_1 }; diff --git a/jscomp/test/dist/jscomp/test/ari_regress_test.js b/jscomp/test/dist/jscomp/test/ari_regress_test.js index d3fd6ccbc0..7b38e2ede6 100644 --- a/jscomp/test/dist/jscomp/test/ari_regress_test.js +++ b/jscomp/test/dist/jscomp/test/ari_regress_test.js @@ -1,34 +1,34 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var g = 7; +let g = 7; -var h = { +let h = { contents: 0 }; function g1(x, y) { - var u = x + y | 0; + let u = x + y | 0; h.contents = h.contents + 1 | 0; return function (xx, yy) { return (xx + yy | 0) + u | 0; }; } -var u = 8; +let u = 8; -var x = u + 6 | 0; +let x = u + 6 | 0; -var partial_arg = g1(3, 4); +let partial_arg = g1(3, 4); function v(param) { return partial_arg(6, param); } -var suites_0 = [ +let suites_0 = [ "curry", (function (param) { return { @@ -39,7 +39,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "curry2", (function (param) { @@ -77,7 +77,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/arith_lexer.js b/jscomp/test/dist/jscomp/test/arith_lexer.js index 207be04dd2..232214e044 100644 --- a/jscomp/test/dist/jscomp/test/arith_lexer.js +++ b/jscomp/test/dist/jscomp/test/arith_lexer.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Lexing = require("melange/lexing.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Lexing = require("melange/lexing.js"); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xf6\xff\xf7\xff\xf8\xff\xf9\xff\xfa\xff\xfb\xff\xfc\xff:\0\x85\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\x01\0\xff\xff", lex_default: "\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0", @@ -22,8 +22,8 @@ var __ocaml_lex_tables = { function __ocaml_lex_lexeme_rec(lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : ___ocaml_lex_state = 0; diff --git a/jscomp/test/dist/jscomp/test/arith_parser.js b/jscomp/test/dist/jscomp/test/arith_parser.js index 735d617d1a..b56b803fbb 100644 --- a/jscomp/test/dist/jscomp/test/arith_parser.js +++ b/jscomp/test/dist/jscomp/test/arith_parser.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib__Parsing = require("melange/parsing.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib__Parsing = require("melange/parsing.js"); -var yytransl_const = [ +let yytransl_const = [ 259, 260, 261, @@ -16,35 +16,35 @@ var yytransl_const = [ 0 ]; -var yytransl_block = [ +let yytransl_block = [ 257, 258, 0 ]; -var yylhs = "\xff\xff\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\0\0"; +let yylhs = "\xff\xff\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\0\0"; -var yylen = "\x02\0\x02\0\x01\0\x01\0\x03\0\x03\0\x03\0\x03\0\x02\0\x03\0\x02\0"; +let yylen = "\x02\0\x02\0\x01\0\x01\0\x03\0\x03\0\x03\0\x03\0\x02\0\x03\0\x02\0"; -var yydefred = "\0\0\0\0\0\0\x02\0\x03\0\0\0\0\0\n\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\x01\0\t\0\0\0\0\0\x06\0\x07\0"; +let yydefred = "\0\0\0\0\0\0\x02\0\x03\0\0\0\0\0\n\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\x01\0\t\0\0\0\0\0\x06\0\x07\0"; -var yydgoto = "\x02\0\x07\0\b\0"; +let yydgoto = "\x02\0\x07\0\b\0"; -var yysindex = "\xff\xff\x10\xff\0\0\0\0\0\0\x10\xff\x10\xff\0\0\n\0\0\0\x16\xff\x10\xff\x10\xff\x10\xff\x10\xff\0\0\0\0\xff\xfe\xff\xfe\0\0\0\0"; +let yysindex = "\xff\xff\x10\xff\0\0\0\0\0\0\x10\xff\x10\xff\0\0\n\0\0\0\x16\xff\x10\xff\x10\xff\x10\xff\x10\xff\0\0\0\0\xff\xfe\xff\xfe\0\0\0\0"; -var yyrindex = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\x03\0\0\0\0\0"; +let yyrindex = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\x03\0\0\0\0\0"; -var yygindex = "\0\0\0\0\x02\0"; +let yygindex = "\0\0\0\0\x02\0"; -var yytable = "\x01\0\x04\0\0\0\x05\0\r\0\x0e\0\0\0\t\0\n\0\0\0\x0f\0\0\0\0\0\x11\0\x12\0\x13\0\x14\0\x03\0\x04\0\0\0\x05\0\0\0\0\0\0\0\x06\0\x0b\0\f\0\r\0\x0e\0\0\0\0\0\x10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\0\x04\0\x05\0\x05\0\0\0\0\0\x04\0\0\0\x05\0\x0b\0\f\0\r\0\x0e\0"; +let yytable = "\x01\0\x04\0\0\0\x05\0\r\0\x0e\0\0\0\t\0\n\0\0\0\x0f\0\0\0\0\0\x11\0\x12\0\x13\0\x14\0\x03\0\x04\0\0\0\x05\0\0\0\0\0\0\0\x06\0\x0b\0\f\0\r\0\x0e\0\0\0\0\0\x10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\0\x04\0\x05\0\x05\0\0\0\0\0\x04\0\0\0\x05\0\x0b\0\f\0\r\0\x0e\0"; -var yycheck = "\x01\0\0\0\xff\xff\0\0\x05\x01\x06\x01\xff\xff\x05\0\x06\0\xff\xff\0\0\xff\xff\xff\xff\x0b\0\f\0\r\0\x0e\0\x01\x01\x02\x01\xff\xff\x04\x01\xff\xff\xff\xff\xff\xff\b\x01\x03\x01\x04\x01\x05\x01\x06\x01\xff\xff\xff\xff\t\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x04\x01\x03\x01\x04\x01\xff\xff\xff\xff\t\x01\xff\xff\t\x01\x03\x01\x04\x01\x05\x01\x06\x01"; +let yycheck = "\x01\0\0\0\xff\xff\0\0\x05\x01\x06\x01\xff\xff\x05\0\x06\0\xff\xff\0\0\xff\xff\xff\xff\x0b\0\f\0\r\0\x0e\0\x01\x01\x02\x01\xff\xff\x04\x01\xff\xff\xff\xff\xff\xff\b\x01\x03\x01\x04\x01\x05\x01\x06\x01\xff\xff\xff\xff\t\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x04\x01\x03\x01\x04\x01\xff\xff\xff\xff\t\x01\xff\xff\t\x01\x03\x01\x04\x01\x05\x01\x06\x01"; -var yynames_const = "PLUS\0MINUS\0TIMES\0DIVIDE\0UMINUS\0LPAREN\0RPAREN\0EOF\0"; +let yynames_const = "PLUS\0MINUS\0TIMES\0DIVIDE\0UMINUS\0LPAREN\0RPAREN\0EOF\0"; -var yynames_block = "NUMERAL\0IDENT\0"; +let yynames_block = "NUMERAL\0IDENT\0"; -var yyact = [ +let yyact = [ (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -55,22 +55,22 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Numeral */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Variable */6, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Plus */1, _0: _1, @@ -78,8 +78,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Minus */2, _0: _1, @@ -87,8 +87,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Times */3, _0: _1, @@ -96,8 +96,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Divide */4, _0: _1, @@ -105,7 +105,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Negate */5, _0: _2 @@ -122,7 +122,7 @@ var yyact = [ }) ]; -var yytables = { +let yytables = { actions: yyact, transl_const: yytransl_const, transl_block: yytransl_block, @@ -145,7 +145,7 @@ function toplevel(lexfun, lexbuf) { return Stdlib__Parsing.yyparse(yytables, 1, lexfun, lexbuf); } -var yytablesize = 272; +let yytablesize = 272; exports.yytransl_const = yytransl_const; exports.yytransl_block = yytransl_block; diff --git a/jscomp/test/dist/jscomp/test/arith_syntax.js b/jscomp/test/dist/jscomp/test/arith_syntax.js index e30556eadc..7f25d9a745 100644 --- a/jscomp/test/dist/jscomp/test/arith_syntax.js +++ b/jscomp/test/dist/jscomp/test/arith_syntax.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); +let Stdlib = require("melange/stdlib.js"); function str(e) { switch (e.TAG | 0) { diff --git a/jscomp/test/dist/jscomp/test/arity_deopt.js b/jscomp/test/dist/jscomp/test/arity_deopt.js index bbfec15f6b..bbbc299e7f 100644 --- a/jscomp/test/dist/jscomp/test/arity_deopt.js +++ b/jscomp/test/dist/jscomp/test/arity_deopt.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/arity_infer.js b/jscomp/test/dist/jscomp/test/arity_infer.js index 0b601580f9..0a1fdcce46 100644 --- a/jscomp/test/dist/jscomp/test/arity_infer.js +++ b/jscomp/test/dist/jscomp/test/arity_infer.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function f0(x) { - var tmp; + let tmp; if (x > 3) { tmp = (function (x) { return x + 1 | 0; @@ -27,7 +27,7 @@ function f1(x) { } function f3(x) { - var tmp; + let tmp; switch (x) { case 0 : tmp = (function (x) { diff --git a/jscomp/test/dist/jscomp/test/arity_ml.js b/jscomp/test/dist/jscomp/test/arity_ml.js index 5181743b14..4a1f5ae5cc 100644 --- a/jscomp/test/dist/jscomp/test/arity_ml.js +++ b/jscomp/test/dist/jscomp/test/arity_ml.js @@ -2,7 +2,7 @@ 'use strict'; -var o = { +let o = { hi: (function (x, y) { return x + y | 0; }) diff --git a/jscomp/test/dist/jscomp/test/array_data_util.js b/jscomp/test/dist/jscomp/test/array_data_util.js index 3851e6c85b..b2b57d2b89 100644 --- a/jscomp/test/dist/jscomp/test/array_data_util.js +++ b/jscomp/test/dist/jscomp/test/array_data_util.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); function range(i, j) { return Belt__Belt_Array.makeBy((j - i | 0) + 1 | 0, (function (k) { @@ -10,7 +10,7 @@ function range(i, j) { } function randomRange(i, j) { - var v = Belt__Belt_Array.makeBy((j - i | 0) + 1 | 0, (function (k) { + let v = Belt__Belt_Array.makeBy((j - i | 0) + 1 | 0, (function (k) { return k + i | 0; })); Belt__Belt_Array.shuffleInPlace(v); diff --git a/jscomp/test/dist/jscomp/test/array_safe_get.js b/jscomp/test/dist/jscomp/test/array_safe_get.js index 0651b2036c..085e0f5b4e 100644 --- a/jscomp/test/dist/jscomp/test/array_safe_get.js +++ b/jscomp/test/dist/jscomp/test/array_safe_get.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); -var x = [ +let x = [ 1, 2 ]; -var y; +let y; try { y = Caml_array.get(x, 3); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { console.log(exn._1); y = 0; diff --git a/jscomp/test/dist/jscomp/test/array_subtle_test.js b/jscomp/test/dist/jscomp/test/array_subtle_test.js index 8030eb9261..16f658d34e 100644 --- a/jscomp/test/dist/jscomp/test/array_subtle_test.js +++ b/jscomp/test/dist/jscomp/test/array_subtle_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Mt = require("./mt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -31,7 +31,7 @@ function eq(loc, param) { }; } -var v = [ +let v = [ 1, 2, 3, @@ -80,7 +80,7 @@ eq("File \"jscomp/test/array_subtle_test.ml\", line 29, characters 5-12", [ ]); function f(v) { - var x = v.pop(); + let x = v.pop(); if (x !== undefined) { console.log("hi"); } else { diff --git a/jscomp/test/dist/jscomp/test/array_test.js b/jscomp/test/dist/jscomp/test/array_test.js index 6c91007743..b4f7196a0c 100644 --- a/jscomp/test/dist/jscomp/test/array_test.js +++ b/jscomp/test/dist/jscomp/test/array_test.js @@ -1,25 +1,25 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); function starts_with(xs, prefix, p) { - var H = /* @__PURE__ */Caml_exceptions.create("H"); - var len1 = xs.length; - var len2 = prefix.length; + let H = /* @__PURE__ */Caml_exceptions.create("H"); + let len1 = xs.length; + let len2 = prefix.length; if (len2 > len1) { return false; } try { - for(var i = 0; i < len2; ++i){ + for(let i = 0; i < len2; ++i){ if (!Curry._2(p, Caml_array.get(xs, i), Caml_array.get(prefix, i))) { throw new Caml_js_exceptions.MelangeError(H, { MEL_EXN_ID: H @@ -30,7 +30,7 @@ function starts_with(xs, prefix, p) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === H) { return false; } @@ -39,10 +39,10 @@ function starts_with(xs, prefix, p) { } function is_sorted(x) { - var len = x.length; - var _i = 0; + let len = x.length; + let _i = 0; while(true) { - var i = _i; + let i = _i; if (i >= (len - 1 | 0)) { return true; } @@ -54,7 +54,7 @@ function is_sorted(x) { }; } -var array_suites_0 = [ +let array_suites_0 = [ "init", (function (param) { return { @@ -73,11 +73,11 @@ var array_suites_0 = [ }) ]; -var array_suites_1 = { +let array_suites_1 = { hd: [ "toList", (function (param) { - var aux = function (xs) { + let aux = function (xs) { return Stdlib__List.fold_left((function (acc, param) { return { hd: [ @@ -88,7 +88,7 @@ var array_suites_1 = { }; }), /* [] */0, xs); }; - var match = Stdlib__List.split(aux({ + let match = Stdlib__List.split(aux({ hd: [ [], /* [] */0 @@ -184,12 +184,12 @@ var array_suites_1 = { hd: [ "blit", (function (param) { - var u = [ + let u = [ 100, 0, 0 ]; - var v = Stdlib__Array.init(3, (function (x) { + let v = Stdlib__Array.init(3, (function (x) { return (x << 1); })); Stdlib__Array.blit(v, 1, u, 1, 2); @@ -218,7 +218,7 @@ var array_suites_1 = { hd: [ "File \"jscomp/test/array_test.ml\", line 62, characters 2-9", (function (param) { - var a0 = Stdlib__Array.init(100, (function (i) { + let a0 = Stdlib__Array.init(100, (function (i) { return (i << 0); })); Stdlib__Array.blit(a0, 10, a0, 5, 20); @@ -260,7 +260,7 @@ var array_suites_1 = { hd: [ "File \"jscomp/test/array_test.ml\", line 71, characters 2-9", (function (param) { - var a0 = Stdlib__Array.init(100, (function (i) { + let a0 = Stdlib__Array.init(100, (function (i) { return (i << 0); })); Stdlib__Array.blit(a0, 5, a0, 10, 20); @@ -318,7 +318,7 @@ var array_suites_1 = { hd: [ "sort", (function (param) { - var u = [ + let u = [ 3, 0, 1 @@ -339,7 +339,7 @@ var array_suites_1 = { hd: [ "sort_large", (function (param) { - var v = Stdlib__Array.init(4, (function (i) { + let v = Stdlib__Array.init(4, (function (i) { return i % 17; })); Stdlib__Array.sort(Caml.caml_int_compare, v); @@ -362,7 +362,7 @@ var array_suites_1 = { } }; -var array_suites = { +let array_suites = { hd: array_suites_0, tl: array_suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/ast_abstract_test.js b/jscomp/test/dist/jscomp/test/ast_abstract_test.js index 46b500258a..eec41e643c 100644 --- a/jscomp/test/dist/jscomp/test/ast_abstract_test.js +++ b/jscomp/test/dist/jscomp/test/ast_abstract_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); -var Mt = require("./mt.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -46,19 +46,19 @@ function tFromJs(param) { }; } -var v0 = { +let v0 = { x: 3, y: false, z: false }; -var v1 = { +let v1 = { x: 3, y: false, z: "" }; -var _map = {"a":"a","b":"b","c":"c"}; +let _map = {"a":"a","b":"b","c":"c"}; function xToJs(param) { return param; @@ -78,7 +78,7 @@ idx("b"); idx("c"); -var jsMapperConstantArray = [ +let jsMapperConstantArray = [ 0, 3, 4 @@ -96,9 +96,9 @@ function id(x) { eq("File \"jscomp/test/ast_abstract_test.ml\", line 49, characters 8-15", aFromJs(aToJs(x)), x); } -var a0 = aToJs(/* A */0); +let a0 = aToJs(/* A */0); -var a1 = aToJs(/* B */1); +let a1 = aToJs(/* B */1); id(/* A */0); @@ -197,21 +197,21 @@ function zFromJs(param) { Mt.from_pair_suites("Ast_abstract_test", suites.contents); -var x0 = "a"; +let x0 = "a"; -var x1 = "b"; +let x1 = "b"; -var b0 = 0; +let b0 = 0; -var b1 = 1; +let b1 = 1; -var c0 = 3; +let c0 = 3; -var jsMapperEraseType = /* JsMapperEraseType */0; +let jsMapperEraseType = /* JsMapperEraseType */0; -var b = /* B */1; +let b = /* B */1; -var zXx = /* ZXx */2; +let zXx = /* ZXx */2; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/ast_js_mapper_poly_test.js b/jscomp/test/dist/jscomp/test/ast_js_mapper_poly_test.js index 8dec42b26b..adff789136 100644 --- a/jscomp/test/dist/jscomp/test/ast_js_mapper_poly_test.js +++ b/jscomp/test/dist/jscomp/test/ast_js_mapper_poly_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,9 +30,9 @@ function eq(loc, x, y) { }; } -var _map = {"D":"D","C":"C","f":"x"}; +let _map = {"D":"D","C":"C","f":"x"}; -var _revMap = {"D":"D","C":"C","x":"f"}; +let _revMap = {"D":"D","C":"C","x":"f"}; function uToJs(param) { return _map[param]; @@ -76,7 +76,7 @@ eq("File \"jscomp/test/ast_js_mapper_poly_test.ml\", line 28, characters 5-12", "x" ]); -var jsMapperConstantArray = [ +let jsMapperConstantArray = [ 0, 3, 4, @@ -251,7 +251,7 @@ eq("File \"jscomp/test/ast_js_mapper_poly_test.ml\", line 88, characters 5-12", Mt.from_pair_suites("Ast_js_mapper_poly_test", suites.contents); -var $plus$great = Stdlib__Array.append; +let $plus$great = Stdlib__Array.append; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/ast_js_mapper_test.js b/jscomp/test/dist/jscomp/test/ast_js_mapper_test.js index 5da15ad855..9a2675ef66 100644 --- a/jscomp/test/dist/jscomp/test/ast_js_mapper_test.js +++ b/jscomp/test/dist/jscomp/test/ast_js_mapper_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); +let Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); function tToJs(param) { return { @@ -19,7 +19,7 @@ function tFromJs(param) { }; } -var u = tToJs({ +let u = tToJs({ xx: 3, yy: "x", zz: [ @@ -41,10 +41,10 @@ tFromJs({ }); function searchForSureExists(xs, k) { - var _i = 0; + let _i = 0; while(true) { - var i = _i; - var match = xs[i]; + let i = _i; + let match = xs[i]; if (match[0] === k) { return match[1]; } @@ -53,7 +53,7 @@ function searchForSureExists(xs, k) { }; } -var jsMapperConstantArray = [ +let jsMapperConstantArray = [ 0, 3, 4, @@ -68,7 +68,7 @@ function aFromJs(param) { return Js__Js_mapper_runtime.fromIntAssert(4, jsMapperConstantArray, param); } -var _map = {"b0":"b0","b1":"b1","b2":"b2","b3":"b3"}; +let _map = {"b0":"b0","b1":"b1","b2":"b2","b3":"b3"}; function bToJs(param) { return param; diff --git a/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js b/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js index 69c3593284..9669104bd2 100644 --- a/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js +++ b/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); -var Mt = require("./mt.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_mapper_runtime = require("melange.js/js_mapper_runtime.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -47,7 +47,7 @@ function aFromJs(param) { return param - 0 | 0; } -var jsMapperConstantArray = [ +let jsMapperConstantArray = [ 0, 3, 4 @@ -61,7 +61,7 @@ function bFromJs(param) { return Js__Js_mapper_runtime.fromIntAssert(3, jsMapperConstantArray, param); } -var _map = {"c0":"c0","c1":"c1","c2":"c2"}; +let _map = {"c0":"c0","c1":"c1","c2":"c2"}; function cToJs(param) { return param; diff --git a/jscomp/test/dist/jscomp/test/attr_test.js b/jscomp/test/dist/jscomp/test/attr_test.js index 7413fcceb7..ee55ab1329 100644 --- a/jscomp/test/dist/jscomp/test/attr_test.js +++ b/jscomp/test/dist/jscomp/test/attr_test.js @@ -6,13 +6,13 @@ function u(x, y) { return x + y | 0; } -var h = u(1, 2); +let h = u(1, 2); function max2(x, y) { return x + y; } -var hh = max2(1, 2); +let hh = max2(1, 2); function f(x) { des(x, (function () { diff --git a/jscomp/test/dist/jscomp/test/b.js b/jscomp/test/dist/jscomp/test/b.js index 744f430490..feb04fc34a 100644 --- a/jscomp/test/dist/jscomp/test/b.js +++ b/jscomp/test/dist/jscomp/test/b.js @@ -3,8 +3,8 @@ function f(point) { - var y = point.y; - var x = point.x; + let y = point.y; + let x = point.x; return Math.pow(x * x + y * y, 2); } diff --git a/jscomp/test/dist/jscomp/test/bal_set_mini.js b/jscomp/test/dist/jscomp/test/bal_set_mini.js index 7c6d654d40..61ff197aff 100644 --- a/jscomp/test/dist/jscomp/test/bal_set_mini.js +++ b/jscomp/test/dist/jscomp/test/bal_set_mini.js @@ -11,8 +11,8 @@ function height(param) { } function create(l, v, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ _0: l, _1: v, @@ -22,15 +22,15 @@ function create(l, v, r) { } function bal(l, v, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); if (hl > (hr + 2 | 0)) { if (!l) { return /* Empty */0; } - var lr = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } else if (lr) { @@ -50,9 +50,9 @@ function bal(l, v, r) { if (!r) { return /* Empty */0; } - var rr = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } else if (rl) { @@ -81,10 +81,10 @@ function add(x, t) { _3: 1 }; } - var r = t._2; - var v = t._1; - var l = t._0; - var c = compare_int(x, v); + let r = t._2; + let v = t._1; + let l = t._0; + let c = compare_int(x, v); if (c === 0) { return t; } else if (c < 0) { @@ -96,12 +96,12 @@ function add(x, t) { function min_elt(_def, _param) { while(true) { - var param = _param; - var def = _def; + let param = _param; + let def = _def; if (!param) { return def; } - var l = param._0; + let l = param._0; if (!l) { return param._1; } @@ -126,7 +126,7 @@ function internal_merge(l, r) { if (!r) { return l; } - var rv = r._1; + let rv = r._1; return bal(l, min_elt(rv, r), remove_min_elt(r._0, rv, r._2)); } @@ -134,10 +134,10 @@ function remove(x, tree) { if (!tree) { return /* Empty */0; } - var r = tree._2; - var v = tree._1; - var l = tree._0; - var c = compare_int(x, v); + let r = tree._2; + let v = tree._1; + let l = tree._0; + let c = compare_int(x, v); if (c === 0) { return internal_merge(l, r); } else if (c < 0) { @@ -149,11 +149,11 @@ function remove(x, tree) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = compare_int(x, param._1); + let c = compare_int(x, param._1); if (c === 0) { return true; } @@ -162,24 +162,24 @@ function mem(x, _param) { }; } -var v = /* Empty */0; +let v = /* Empty */0; -for(var i = 0; i <= 100000; ++i){ +for(let i = 0; i <= 100000; ++i){ v = add(i, v); } -for(var 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(var i$2 = 0; i$2 <= 100000; ++i$2){ +for(let i$2 = 0; i$2 <= 100000; ++i$2){ v = remove(i$2, v); } -var match = v; +let match = v; if (match) { console.log("impossible"); diff --git a/jscomp/test/dist/jscomp/test/basic_module_test.js b/jscomp/test/dist/jscomp/test/basic_module_test.js index 29cd60c07d..14bc5f3f31 100644 --- a/jscomp/test/dist/jscomp/test/basic_module_test.js +++ b/jscomp/test/dist/jscomp/test/basic_module_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Offset = require("./offset.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Offset = require("./offset.js"); -var count = { +let count = { contents: 0 }; @@ -16,11 +16,11 @@ function test(set) { test(Curry._1(Offset.M.$$Set.singleton, "42")); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/bb.js b/jscomp/test/dist/jscomp/test/bb.js index c9f6d8e37a..8804db763c 100644 --- a/jscomp/test/dist/jscomp/test/bb.js +++ b/jscomp/test/dist/jscomp/test/bb.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(x) { if (x === "b") { @@ -34,7 +34,7 @@ function ff(x) { } function test(x) { - var match; + let match; switch (x) { case "a" : match = "a"; @@ -64,13 +64,13 @@ function test(x) { } } -var test_poly = "a"; +let test_poly = "a"; -var c = f("a"); +let c = f("a"); -var d = f("b"); +let d = f("b"); -var e = f("c"); +let e = f("c"); exports.f = f; exports.ff = ff; diff --git a/jscomp/test/dist/jscomp/test/bdd.js b/jscomp/test/dist/jscomp/test/bdd.js index 9cbc7f792f..3fe5d50b7a 100644 --- a/jscomp/test/dist/jscomp/test/bdd.js +++ b/jscomp/test/dist/jscomp/test/bdd.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function $$eval(_bdd, vars) { while(true) { - var bdd = _bdd; + let bdd = _bdd; if (typeof bdd === "number") { if (bdd) { return false; @@ -35,19 +35,19 @@ function getId(bdd) { } } -var nodeC = { +let nodeC = { contents: 1 }; -var sz_1 = { +let sz_1 = { contents: 8191 }; -var htab = { +let htab = { contents: Caml_array.make(sz_1.contents + 1 | 0, /* [] */0) }; -var n_items = { +let n_items = { contents: 0 }; @@ -56,16 +56,16 @@ function hashVal(x, y, v) { } function resize(newSize) { - var arr = htab.contents; - var newSz_1 = newSize - 1 | 0; - var newArr = Caml_array.make(newSize, /* [] */0); - var copyBucket = function (_bucket) { + let arr = htab.contents; + let newSz_1 = newSize - 1 | 0; + let newArr = Caml_array.make(newSize, /* [] */0); + let copyBucket = function (_bucket) { while(true) { - var bucket = _bucket; + let bucket = _bucket; if (!bucket) { return ; } - var n = bucket.hd; + let n = bucket.hd; if (typeof n === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -76,7 +76,7 @@ function resize(newSize) { ] }); } - var ind = hashVal(getId(n._0), getId(n._3), n._1) & newSz_1; + let ind = hashVal(getId(n._0), getId(n._3), n._1) & newSz_1; Caml_array.set(newArr, ind, { hd: n, tl: Caml_array.get(newArr, ind) @@ -85,7 +85,7 @@ function resize(newSize) { continue ; }; }; - for(var 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; @@ -102,7 +102,7 @@ function insert(idl, idh, v, ind, bucket, newNode) { return ; } resize((sz_1.contents + sz_1.contents | 0) + 2 | 0); - var ind$1 = hashVal(idl, idh, v) & sz_1.contents; + let ind$1 = hashVal(idl, idh, v) & sz_1.contents; Caml_array.set(htab.contents, ind$1, { hd: newNode, tl: Caml_array.get(htab.contents, ind$1) @@ -117,18 +117,18 @@ function resetUnique(param) { } function mkNode(low, v, high) { - var idl = getId(low); - var idh = getId(high); + let idl = getId(low); + let idh = getId(high); if (idl === idh) { return low; } - var ind = hashVal(idl, idh, v) & sz_1.contents; - var bucket = Caml_array.get(htab.contents, ind); - var _b = bucket; + let ind = hashVal(idl, idh, v) & sz_1.contents; + let bucket = Caml_array.get(htab.contents, ind); + let _b = bucket; while(true) { - var b = _b; + let b = _b; if (b) { - var n = b.hd; + let n = b.hd; if (typeof n === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -145,8 +145,8 @@ function mkNode(low, v, high) { _b = b.tl; continue ; } - var n_2 = (nodeC.contents = nodeC.contents + 1 | 0, nodeC.contents); - var n$1 = /* Node */{ + let n_2 = (nodeC.contents = nodeC.contents + 1 | 0, nodeC.contents); + let n$1 = /* Node */{ _0: low, _1: v, _2: n_2, @@ -171,21 +171,21 @@ function mkVar(x) { return mkNode(/* Zero */1, x, /* One */0); } -var andslot1 = Caml_array.make(1999, 0); +let andslot1 = Caml_array.make(1999, 0); -var andslot2 = Caml_array.make(1999, 0); +let andslot2 = Caml_array.make(1999, 0); -var andslot3 = Caml_array.make(1999, /* Zero */1); +let andslot3 = Caml_array.make(1999, /* Zero */1); -var xorslot1 = Caml_array.make(1999, 0); +let xorslot1 = Caml_array.make(1999, 0); -var xorslot2 = Caml_array.make(1999, 0); +let xorslot2 = Caml_array.make(1999, 0); -var xorslot3 = Caml_array.make(1999, /* Zero */1); +let xorslot3 = Caml_array.make(1999, /* Zero */1); -var notslot1 = Caml_array.make(1999, 0); +let notslot1 = Caml_array.make(1999, 0); -var notslot2 = Caml_array.make(1999, /* One */0); +let notslot2 = Caml_array.make(1999, /* One */0); function hash(x, y) { return ((x << 1) + y | 0) % 1999; @@ -199,12 +199,12 @@ function not(n) { return /* Zero */1; } } - var id = n._2; - var h = id % 1999; + let id = n._2; + let h = id % 1999; if (id === Caml_array.get(notslot1, h)) { return Caml_array.get(notslot2, h); } - var f = mkNode(not(n._0), n._1, not(n._3)); + let f = mkNode(not(n._0), n._1, not(n._3)); Caml_array.set(notslot1, h, id); Caml_array.set(notslot2, h, f); return f; @@ -218,10 +218,10 @@ function and2(n1, n2) { return n2; } } - var r1 = n1._3; - var i1 = n1._2; - var v1 = n1._1; - var l1 = n1._0; + let r1 = n1._3; + let i1 = n1._2; + let v1 = n1._1; + let l1 = n1._0; if (typeof n2 === "number") { if (n2) { return /* Zero */1; @@ -229,16 +229,16 @@ function and2(n1, n2) { return n1; } } - var r2 = n2._3; - var i2 = n2._2; - var v2 = n2._1; - var l2 = n2._0; - var h = hash(i1, i2); + let r2 = n2._3; + let i2 = n2._2; + let v2 = n2._1; + let l2 = n2._0; + let h = hash(i1, i2); if (i1 === Caml_array.get(andslot1, h) && i2 === Caml_array.get(andslot2, h)) { return Caml_array.get(andslot3, h); } - var match = cmpVar(v1, v2); - var f; + let match = cmpVar(v1, v2); + let f; switch (match) { case /* LESS */0 : f = mkNode(and2(l1, n2), v1, and2(r1, n2)); @@ -265,10 +265,10 @@ function xor(n1, n2) { return not(n2); } } - var r1 = n1._3; - var i1 = n1._2; - var v1 = n1._1; - var l1 = n1._0; + let r1 = n1._3; + let i1 = n1._2; + let v1 = n1._1; + let l1 = n1._0; if (typeof n2 === "number") { if (n2) { return n1; @@ -276,16 +276,16 @@ function xor(n1, n2) { return not(n1); } } - var r2 = n2._3; - var i2 = n2._2; - var v2 = n2._1; - var l2 = n2._0; - var h = hash(i1, i2); + let r2 = n2._3; + let i2 = n2._2; + let v2 = n2._1; + let l2 = n2._0; + let h = hash(i1, i2); if (i1 === Caml_array.get(andslot1, h) && i2 === Caml_array.get(andslot2, h)) { return Caml_array.get(andslot3, h); } - var match = cmpVar(v1, v2); - var f; + let match = cmpVar(v1, v2); + let f; switch (match) { case /* LESS */0 : f = mkNode(xor(l1, n2), v1, xor(r1, n2)); @@ -305,14 +305,14 @@ function xor(n1, n2) { } function hwb(n) { - var h = function (i, j) { + let h = function (i, j) { if (i === j) { return mkNode(/* Zero */1, i, /* One */0); } else { return xor(and2(not(mkNode(/* Zero */1, j, /* One */0)), h(i, j - 1 | 0)), and2(mkNode(/* Zero */1, j, /* One */0), g(i, j - 1 | 0))); } }; - var g = function (i, j) { + let g = function (i, j) { if (i === j) { return mkNode(/* Zero */1, i, /* One */0); } else { @@ -322,7 +322,7 @@ function hwb(n) { return h(0, n - 1 | 0); } -var seed = { +let seed = { contents: 0 }; @@ -332,8 +332,8 @@ function random(param) { } function random_vars(n) { - var vars = Caml_array.make(n, false); - for(var i = 0; i < n; ++i){ + let vars = Caml_array.make(n, false); + for(let i = 0; i < n; ++i){ Caml_array.set(vars, i, random(undefined)); } return vars; @@ -354,8 +354,8 @@ function bool_equal(a, b) { } function test_hwb(bdd, vars) { - var ntrue = 0; - for(var i = 0 ,i_finish = vars.length; i < i_finish; ++i){ + let ntrue = 0; + for(let i = 0 ,i_finish = vars.length; i < i_finish; ++i){ if (Caml_array.get(vars, i)) { ntrue = ntrue + 1 | 0; } @@ -365,9 +365,9 @@ function test_hwb(bdd, vars) { } function main(param) { - var bdd = hwb(22); - var succeeded = true; - for(var _i = 1; _i <= 100; ++_i){ + let bdd = hwb(22); + let succeeded = true; + for(let _i = 1; _i <= 100; ++_i){ succeeded = succeeded && test_hwb(bdd, random_vars(22)); } if (succeeded) { @@ -385,13 +385,13 @@ function main(param) { main(undefined); -var initSize_1 = 8191; +let initSize_1 = 8191; -var zero = /* Zero */1; +let zero = /* Zero */1; -var one = /* One */0; +let one = /* One */0; -var cacheSize = 1999; +let cacheSize = 1999; exports.$$eval = $$eval; exports.getId = getId; diff --git a/jscomp/test/dist/jscomp/test/belt_internal_test.js b/jscomp/test/dist/jscomp/test/belt_internal_test.js index 866d9b26e2..51883063a2 100644 --- a/jscomp/test/dist/jscomp/test/belt_internal_test.js +++ b/jscomp/test/dist/jscomp/test/belt_internal_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); +let Caml_option = require("melange.js/caml_option.js"); function treeHeight(n) { if (n !== undefined) { @@ -15,11 +15,11 @@ function copy(n) { if (n === undefined) { return n; } - var match = Caml_option.valFromOption(n); - var v = match.value; - var h = match.height; - var l = match.left; - var r = match.right; + let match = Caml_option.valFromOption(n); + let v = match.value; + let h = match.height; + let l = match.left; + let r = match.right; return { value: v, height: h, diff --git a/jscomp/test/dist/jscomp/test/belt_result_alias_test.js b/jscomp/test/dist/jscomp/test/belt_result_alias_test.js index 4288030826..84bcff9c7b 100644 --- a/jscomp/test/dist/jscomp/test/belt_result_alias_test.js +++ b/jscomp/test/dist/jscomp/test/belt_result_alias_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Result = require("melange.belt/belt_Result.js"); +let Belt__Belt_Result = require("melange.belt/belt_Result.js"); Belt__Belt_Result.map({ TAG: /* Ok */0, diff --git a/jscomp/test/dist/jscomp/test/bench.js b/jscomp/test/dist/jscomp/test/bench.js index ac70ca9ae0..710cdb91d9 100644 --- a/jscomp/test/dist/jscomp/test/bench.js +++ b/jscomp/test/dist/jscomp/test/bench.js @@ -1,26 +1,26 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function map(f, a) { - var f$1 = Curry.__1(f); - var l = a.length; + let f$1 = Curry.__1(f); + let l = a.length; if (l === 0) { return []; } - var r = Caml_array.make(l, f$1(a[0])); - for(var i = 1; i < l; ++i){ + let r = Caml_array.make(l, f$1(a[0])); + for(let i = 1; i < l; ++i){ r[i] = f$1(a[i]); } return r; } function init(l, f) { - var f$1 = Curry.__1(f); + let f$1 = Curry.__1(f); if (l === 0) { return []; } @@ -30,30 +30,30 @@ function init(l, f) { _1: "Array.init" }); } - var res = Caml_array.make(l, f$1(0)); - for(var i = 1; i < l; ++i){ + let res = Caml_array.make(l, f$1(0)); + for(let i = 1; i < l; ++i){ res[i] = f$1(i); } return res; } function fold_left(f, x, a) { - var f$1 = Curry.__2(f); - var r = x; - for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){ + let f$1 = Curry.__2(f); + let r = x; + for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ r = f$1(r, a[i]); } return r; } function f2(param) { - var arr = init(3000000, (function (i) { + let arr = init(3000000, (function (i) { return i; })); - var b = map((function (i) { + let b = map((function (i) { return i + i - 1; }), arr); - var v = fold_left((function (prim0, prim1) { + let v = fold_left((function (prim0, prim1) { return prim0 + prim1; }), 0, b); console.log(Stdlib.string_of_float(v)); diff --git a/jscomp/test/dist/jscomp/test/big_polyvar_test.js b/jscomp/test/dist/jscomp/test/big_polyvar_test.js index 5b995257d8..609adc6f84 100644 --- a/jscomp/test/dist/jscomp/test/big_polyvar_test.js +++ b/jscomp/test/dist/jscomp/test/big_polyvar_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var _map = {"variant0":"variant0","variant1":"variant1","variant2":"variant2","variant3":"variant3","variant4":"variant4","variant5":"variant5","variant6":"variant6","variant7":"variant7","variant8":"variant8","variant9":"variant9","variant10":"variant10","variant11":"variant11","variant12":"variant12","variant13":"variant13","variant14":"variant14","variant15":"variant15","variant16":"variant16","variant17":"variant17","variant18":"variant18","variant19":"variant19","variant20":"variant20","variant21":"variant21","variant22":"variant22","variant23":"variant23","variant24":"variant24","variant25":"variant25","variant26":"variant26","variant27":"variant27","variant28":"variant28","variant29":"variant29","variant30":"variant30","variant31":"variant31","variant32":"variant32","variant33":"variant33","variant34":"variant34","variant35":"variant35","variant36":"variant36","variant37":"variant37","variant38":"variant38","variant39":"variant39","variant40":"variant40","variant41":"variant41","variant42":"variant42","variant43":"variant43","variant44":"variant44","variant45":"variant45","variant46":"variant46","variant47":"variant47","variant48":"variant48","variant49":"variant49","variant50":"variant50","variant51":"variant51","variant52":"variant52","variant53":"variant53","variant54":"variant54","variant55":"variant55","variant56":"variant56","variant57":"variant57","variant58":"variant58","variant59":"variant59","variant60":"variant60","variant61":"variant61","variant62":"variant62","variant63":"variant63","variant64":"variant64","variant65":"variant65","variant66":"variant66","variant67":"variant67","variant68":"variant68","variant69":"variant69","variant70":"variant70","variant71":"variant71","variant72":"variant72","variant73":"variant73","variant74":"variant74","variant75":"variant75","variant76":"variant76","variant77":"variant77","variant78":"variant78","variant79":"variant79","variant80":"variant80","variant81":"variant81","variant82":"variant82","variant83":"variant83","variant84":"variant84","variant85":"variant85","variant86":"variant86","variant87":"variant87","variant88":"variant88","variant89":"variant89","variant90":"variant90","variant91":"variant91","variant92":"variant92","variant93":"variant93","variant94":"variant94","variant95":"variant95","variant96":"variant96","variant97":"variant97","variant98":"variant98","variant99":"variant99","variant100":"variant100","variant101":"variant101","variant102":"variant102","variant103":"variant103","variant104":"variant104","variant105":"variant105","variant106":"variant106","variant107":"variant107","variant108":"variant108","variant109":"variant109","variant110":"variant110","variant111":"variant111","variant112":"variant112","variant113":"variant113","variant114":"variant114","variant115":"variant115","variant116":"variant116","variant117":"variant117","variant118":"variant118","variant119":"variant119","variant120":"variant120","variant121":"variant121","variant122":"variant122","variant123":"variant123","variant124":"variant124","variant125":"variant125","variant126":"variant126","variant127":"variant127","variant128":"variant128","variant129":"variant129","variant130":"variant130","variant131":"variant131","variant132":"variant132","variant133":"variant133","variant134":"variant134","variant135":"variant135","variant136":"variant136","variant137":"variant137","variant138":"variant138","variant139":"variant139","variant140":"variant140","variant141":"variant141","variant142":"variant142","variant143":"variant143","variant144":"variant144","variant145":"variant145","variant146":"variant146","variant147":"variant147","variant148":"variant148","variant149":"variant149","variant150":"variant150","variant151":"variant151","variant152":"variant152","variant153":"variant153","variant154":"variant154","variant155":"variant155","variant156":"variant156","variant157":"variant157","variant158":"variant158","variant159":"variant159","variant160":"variant160","variant161":"variant161","variant162":"variant162","variant163":"variant163","variant164":"variant164","variant165":"variant165","variant166":"variant166","variant167":"variant167","variant168":"variant168","variant169":"variant169","variant170":"variant170","variant171":"variant171","variant172":"variant172","variant173":"variant173","variant174":"variant174","variant175":"variant175","variant176":"variant176","variant177":"variant177","variant178":"variant178","variant179":"variant179","variant180":"variant180","variant181":"variant181","variant182":"variant182","variant183":"variant183","variant184":"variant184","variant185":"variant185","variant186":"variant186","variant187":"variant187","variant188":"variant188","variant189":"variant189","variant190":"variant190","variant191":"variant191","variant192":"variant192","variant193":"variant193","variant194":"variant194","variant195":"variant195","variant196":"variant196","variant197":"variant197","variant198":"variant198","variant199":"variant199","variant200":"variant200","variant201":"variant201","variant202":"variant202","variant203":"variant203","variant204":"variant204","variant205":"variant205","variant206":"variant206","variant207":"variant207","variant208":"variant208","variant209":"variant209","variant210":"variant210","variant211":"variant211","variant212":"variant212","variant213":"variant213","variant214":"variant214","variant215":"variant215","variant216":"variant216","variant217":"variant217","variant218":"variant218","variant219":"variant219","variant220":"variant220","variant221":"variant221","variant222":"variant222","variant223":"variant223","variant224":"variant224","variant225":"variant225","variant226":"variant226","variant227":"variant227","variant228":"variant228","variant229":"variant229","variant230":"variant230","variant231":"variant231","variant232":"variant232","variant233":"variant233","variant234":"variant234","variant235":"variant235","variant236":"variant236","variant237":"variant237","variant238":"variant238","variant239":"variant239","variant240":"variant240","variant241":"variant241","variant242":"variant242","variant243":"variant243","variant244":"variant244","variant245":"variant245","variant246":"variant246","variant247":"variant247","variant248":"variant248","variant249":"variant249","variant250":"variant250","variant251":"variant251","variant252":"variant252","variant253":"variant253","variant254":"variant254","variant255":"variant255","variant256":"variant256","variant257":"variant257","variant258":"variant258","variant259":"variant259","variant260":"variant260","variant261":"variant261","variant262":"variant262","variant263":"variant263","variant264":"variant264","variant265":"variant265","variant266":"variant266","variant267":"variant267","variant268":"variant268","variant269":"variant269","variant270":"variant270","variant271":"variant271","variant272":"variant272","variant273":"variant273","variant274":"variant274","variant275":"variant275","variant276":"variant276","variant277":"variant277","variant278":"variant278","variant279":"variant279","variant280":"variant280","variant281":"variant281","variant282":"variant282","variant283":"variant283","variant284":"variant284","variant285":"variant285","variant286":"variant286","variant287":"variant287","variant288":"variant288","variant289":"variant289","variant290":"variant290","variant291":"variant291","variant292":"variant292","variant293":"variant293","variant294":"variant294","variant295":"variant295","variant296":"variant296","variant297":"variant297","variant298":"variant298","variant299":"variant299"}; +let _map = {"variant0":"variant0","variant1":"variant1","variant2":"variant2","variant3":"variant3","variant4":"variant4","variant5":"variant5","variant6":"variant6","variant7":"variant7","variant8":"variant8","variant9":"variant9","variant10":"variant10","variant11":"variant11","variant12":"variant12","variant13":"variant13","variant14":"variant14","variant15":"variant15","variant16":"variant16","variant17":"variant17","variant18":"variant18","variant19":"variant19","variant20":"variant20","variant21":"variant21","variant22":"variant22","variant23":"variant23","variant24":"variant24","variant25":"variant25","variant26":"variant26","variant27":"variant27","variant28":"variant28","variant29":"variant29","variant30":"variant30","variant31":"variant31","variant32":"variant32","variant33":"variant33","variant34":"variant34","variant35":"variant35","variant36":"variant36","variant37":"variant37","variant38":"variant38","variant39":"variant39","variant40":"variant40","variant41":"variant41","variant42":"variant42","variant43":"variant43","variant44":"variant44","variant45":"variant45","variant46":"variant46","variant47":"variant47","variant48":"variant48","variant49":"variant49","variant50":"variant50","variant51":"variant51","variant52":"variant52","variant53":"variant53","variant54":"variant54","variant55":"variant55","variant56":"variant56","variant57":"variant57","variant58":"variant58","variant59":"variant59","variant60":"variant60","variant61":"variant61","variant62":"variant62","variant63":"variant63","variant64":"variant64","variant65":"variant65","variant66":"variant66","variant67":"variant67","variant68":"variant68","variant69":"variant69","variant70":"variant70","variant71":"variant71","variant72":"variant72","variant73":"variant73","variant74":"variant74","variant75":"variant75","variant76":"variant76","variant77":"variant77","variant78":"variant78","variant79":"variant79","variant80":"variant80","variant81":"variant81","variant82":"variant82","variant83":"variant83","variant84":"variant84","variant85":"variant85","variant86":"variant86","variant87":"variant87","variant88":"variant88","variant89":"variant89","variant90":"variant90","variant91":"variant91","variant92":"variant92","variant93":"variant93","variant94":"variant94","variant95":"variant95","variant96":"variant96","variant97":"variant97","variant98":"variant98","variant99":"variant99","variant100":"variant100","variant101":"variant101","variant102":"variant102","variant103":"variant103","variant104":"variant104","variant105":"variant105","variant106":"variant106","variant107":"variant107","variant108":"variant108","variant109":"variant109","variant110":"variant110","variant111":"variant111","variant112":"variant112","variant113":"variant113","variant114":"variant114","variant115":"variant115","variant116":"variant116","variant117":"variant117","variant118":"variant118","variant119":"variant119","variant120":"variant120","variant121":"variant121","variant122":"variant122","variant123":"variant123","variant124":"variant124","variant125":"variant125","variant126":"variant126","variant127":"variant127","variant128":"variant128","variant129":"variant129","variant130":"variant130","variant131":"variant131","variant132":"variant132","variant133":"variant133","variant134":"variant134","variant135":"variant135","variant136":"variant136","variant137":"variant137","variant138":"variant138","variant139":"variant139","variant140":"variant140","variant141":"variant141","variant142":"variant142","variant143":"variant143","variant144":"variant144","variant145":"variant145","variant146":"variant146","variant147":"variant147","variant148":"variant148","variant149":"variant149","variant150":"variant150","variant151":"variant151","variant152":"variant152","variant153":"variant153","variant154":"variant154","variant155":"variant155","variant156":"variant156","variant157":"variant157","variant158":"variant158","variant159":"variant159","variant160":"variant160","variant161":"variant161","variant162":"variant162","variant163":"variant163","variant164":"variant164","variant165":"variant165","variant166":"variant166","variant167":"variant167","variant168":"variant168","variant169":"variant169","variant170":"variant170","variant171":"variant171","variant172":"variant172","variant173":"variant173","variant174":"variant174","variant175":"variant175","variant176":"variant176","variant177":"variant177","variant178":"variant178","variant179":"variant179","variant180":"variant180","variant181":"variant181","variant182":"variant182","variant183":"variant183","variant184":"variant184","variant185":"variant185","variant186":"variant186","variant187":"variant187","variant188":"variant188","variant189":"variant189","variant190":"variant190","variant191":"variant191","variant192":"variant192","variant193":"variant193","variant194":"variant194","variant195":"variant195","variant196":"variant196","variant197":"variant197","variant198":"variant198","variant199":"variant199","variant200":"variant200","variant201":"variant201","variant202":"variant202","variant203":"variant203","variant204":"variant204","variant205":"variant205","variant206":"variant206","variant207":"variant207","variant208":"variant208","variant209":"variant209","variant210":"variant210","variant211":"variant211","variant212":"variant212","variant213":"variant213","variant214":"variant214","variant215":"variant215","variant216":"variant216","variant217":"variant217","variant218":"variant218","variant219":"variant219","variant220":"variant220","variant221":"variant221","variant222":"variant222","variant223":"variant223","variant224":"variant224","variant225":"variant225","variant226":"variant226","variant227":"variant227","variant228":"variant228","variant229":"variant229","variant230":"variant230","variant231":"variant231","variant232":"variant232","variant233":"variant233","variant234":"variant234","variant235":"variant235","variant236":"variant236","variant237":"variant237","variant238":"variant238","variant239":"variant239","variant240":"variant240","variant241":"variant241","variant242":"variant242","variant243":"variant243","variant244":"variant244","variant245":"variant245","variant246":"variant246","variant247":"variant247","variant248":"variant248","variant249":"variant249","variant250":"variant250","variant251":"variant251","variant252":"variant252","variant253":"variant253","variant254":"variant254","variant255":"variant255","variant256":"variant256","variant257":"variant257","variant258":"variant258","variant259":"variant259","variant260":"variant260","variant261":"variant261","variant262":"variant262","variant263":"variant263","variant264":"variant264","variant265":"variant265","variant266":"variant266","variant267":"variant267","variant268":"variant268","variant269":"variant269","variant270":"variant270","variant271":"variant271","variant272":"variant272","variant273":"variant273","variant274":"variant274","variant275":"variant275","variant276":"variant276","variant277":"variant277","variant278":"variant278","variant279":"variant279","variant280":"variant280","variant281":"variant281","variant282":"variant282","variant283":"variant283","variant284":"variant284","variant285":"variant285","variant286":"variant286","variant287":"variant287","variant288":"variant288","variant289":"variant289","variant290":"variant290","variant291":"variant291","variant292":"variant292","variant293":"variant293","variant294":"variant294","variant295":"variant295","variant296":"variant296","variant297":"variant297","variant298":"variant298","variant299":"variant299"}; function tToJs(param) { return param; diff --git a/jscomp/test/dist/jscomp/test/block_alias_test.js b/jscomp/test/dist/jscomp/test/block_alias_test.js index a87a9a4a72..01e2cf7071 100644 --- a/jscomp/test/dist/jscomp/test/block_alias_test.js +++ b/jscomp/test/dist/jscomp/test/block_alias_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -21,36 +21,36 @@ function b(loc, x) { Mt.bool_suites(test_id, suites, loc, x); } -var Block = {}; +let Block = {}; -var v0 = { +let v0 = { TAG: /* A */1, _0: 0, _1: 1 }; -var Block$1 = {}; +let Block$1 = {}; -var v1 = { +let v1 = { TAG: /* A */1, _0: 0, _1: 1 }; -var N = { +let N = { Block: Block$1, v1: v1 }; -var Caml_obj$1 = {}; +let Caml_obj$1 = {}; -var List = {}; +let List = {}; -var V = { +let V = { List: List }; -var f = Caml_obj.caml_equal; +let f = Caml_obj.caml_equal; eq("File \"jscomp/test/block_alias_test.ml\", line 32, characters 6-13", Stdlib__List.length({ hd: 1, @@ -70,7 +70,7 @@ eq("File \"jscomp/test/block_alias_test.ml\", line 34, characters 6-13", v0, v1) Mt.from_pair_suites("Block_alias_test", suites.contents); -var h = Stdlib__List.length; +let h = Stdlib__List.length; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/boolean_test.js b/jscomp/test/dist/jscomp/test/boolean_test.js index 22f9766c69..1a122ee4e0 100644 --- a/jscomp/test/dist/jscomp/test/boolean_test.js +++ b/jscomp/test/dist/jscomp/test/boolean_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Test_bool_equal = require("./test_bool_equal.js"); +let Mt = require("./mt.js"); +let Test_bool_equal = require("./test_bool_equal.js"); Mt.from_suites("boolean", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/bs_MapInt_test.js b/jscomp/test/dist/jscomp/test/bs_MapInt_test.js index d44357d2fa..aae900c8a3 100644 --- a/jscomp/test/dist/jscomp/test/bs_MapInt_test.js +++ b/jscomp/test/dist/jscomp/test/bs_MapInt_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); +let Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); function should(b) { if (!b) { @@ -12,14 +12,14 @@ function should(b) { } function test(param) { - var m; - for(var i = 0; i <= 999999; ++i){ + let m; + for(let i = 0; i <= 999999; ++i){ m = Belt__Belt_MapInt.set(m, i, i); } - for(var i$1 = 0; i$1 <= 999999; ++i$1){ + for(let i$1 = 0; i$1 <= 999999; ++i$1){ should(Belt__Belt_MapInt.get(m, i$1) !== undefined); } - for(var i$2 = 0; i$2 <= 999999; ++i$2){ + for(let i$2 = 0; i$2 <= 999999; ++i$2){ m = Belt__Belt_MapInt.remove(m, i$2); } should(Belt__Belt_MapInt.isEmpty(m)); diff --git a/jscomp/test/dist/jscomp/test/bs_abstract_test.js b/jscomp/test/dist/jscomp/test/bs_abstract_test.js index 09f1f5ce83..cd5cc93ec5 100644 --- a/jscomp/test/dist/jscomp/test/bs_abstract_test.js +++ b/jscomp/test/dist/jscomp/test/bs_abstract_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); -var v = { +let v = { hd: 3, tl: null }; v.tl = v; -var f = { +let f = { k: (function (x, y) { return x === y; }), @@ -38,7 +38,7 @@ function uff2(f) { } function uff3(f) { - var x = f.yyyy2; + let x = f.yyyy2; if (x !== undefined) { return Curry._1(x, 0); } else { diff --git a/jscomp/test/dist/jscomp/test/bs_array_test.js b/jscomp/test/dist/jscomp/test/bs_array_test.js index a7d548fe7f..774e9d738f 100644 --- a/jscomp/test/dist/jscomp/test/bs_array_test.js +++ b/jscomp/test/dist/jscomp/test/bs_array_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); - -var suites = { +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -63,7 +63,7 @@ console.log([ return x + y | 0; }), 0)); -var v = [ +let v = [ 1, 2 ]; @@ -96,7 +96,7 @@ $$throw("File \"jscomp/test/bs_array_test.ml\", line 33, characters 8-15", (func ], 2); })); -var partial_arg = [ +let partial_arg = [ 0, 1 ]; @@ -132,7 +132,7 @@ b("File \"jscomp/test/bs_array_test.ml\", line 37, characters 4-11", !Belt__Belt 2 ], 2, 0)); -var v$1 = [ +let v$1 = [ 1, 2 ]; @@ -150,7 +150,7 @@ if (!Belt__Belt_Array.set(v$1, 0, 0)) { b("File \"jscomp/test/bs_array_test.ml\", line 38, characters 4-11", Belt__Belt_Array.getExn(v$1, 0) === 0); -var v$2 = [ +let v$2 = [ 1, 2 ]; @@ -168,14 +168,14 @@ if (!Belt__Belt_Array.set(v$2, 1, 0)) { b("File \"jscomp/test/bs_array_test.ml\", line 39, characters 4-11", Belt__Belt_Array.getExn(v$2, 1) === 0); -var v$3 = [ +let v$3 = [ 1, 2 ]; b("File \"jscomp/test/bs_array_test.ml\", line 40, characters 4-11", (Belt__Belt_Array.setExn(v$3, 0, 0), Belt__Belt_Array.getExn(v$3, 0) === 0)); -var v$4 = [ +let v$4 = [ 1, 2 ]; @@ -186,11 +186,11 @@ function add(x, y) { return x + y | 0; } -var v$5 = Belt__Belt_Array.makeBy(3000, (function (i) { +let v$5 = Belt__Belt_Array.makeBy(3000, (function (i) { return i; })); -var u = Belt__Belt_Array.shuffle(v$5); +let u = Belt__Belt_Array.shuffle(v$5); neq("File \"jscomp/test/bs_array_test.ml\", line 48, characters 6-13", u, v$5); @@ -287,10 +287,10 @@ function makeMatrixExn(sx, sy, init) { ] }); } - var res = new Array(sx); - for(var x = 0; x < sx; ++x){ - var initY = new Array(sy); - for(var y = 0; y < sy; ++y){ + let res = new Array(sx); + for(let x = 0; x < sx; ++x){ + let initY = new Array(sy); + for(let y = 0; y < sy; ++y){ initY[y] = init; } res[x] = initY; @@ -426,19 +426,19 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 111, characters 5-12", Belt__Bel 3 ]); -var v$6 = Belt__Belt_Array.makeBy(10, (function (i) { +let v$6 = Belt__Belt_Array.makeBy(10, (function (i) { return i; })); -var v0 = Belt__Belt_Array.keep(v$6, (function (x) { +let v0 = Belt__Belt_Array.keep(v$6, (function (x) { return x % 2 === 0; })); -var v1 = Belt__Belt_Array.keep(v$6, (function (x) { +let v1 = Belt__Belt_Array.keep(v$6, (function (x) { return x % 3 === 0; })); -var v2 = Belt__Belt_Array.keepMap(v$6, (function (x) { +let v2 = Belt__Belt_Array.keepMap(v$6, (function (x) { if (x % 2 === 0) { return x + 1 | 0; } @@ -468,7 +468,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 120, characters 5-12", v2, [ 9 ]); -var a = [ +let a = [ 1, 2, 3, @@ -476,7 +476,7 @@ var a = [ 5 ]; -var match = Belt__Belt_Array.partition(a, (function (x) { +let match = Belt__Belt_Array.partition(a, (function (x) { return x % 2 === 0; })); @@ -491,7 +491,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 126, characters 5-12", match[1], 5 ]); -var match$1 = Belt__Belt_Array.partition(a, (function (x) { +let match$1 = Belt__Belt_Array.partition(a, (function (x) { return x === 2; })); @@ -504,7 +504,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 129, characters 5-12", match$1[1 5 ]); -var match$2 = Belt__Belt_Array.partition([], (function (x) { +let match$2 = Belt__Belt_Array.partition([], (function (x) { return false; })); @@ -512,7 +512,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 131, characters 5-12", match$2[0 eq("File \"jscomp/test/bs_array_test.ml\", line 132, characters 5-12", match$2[1], []); -var a$1 = [ +let a$1 = [ 1, 2, 3, @@ -594,7 +594,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 150, characters 5-12", Belt__Bel eq("File \"jscomp/test/bs_array_test.ml\", line 151, characters 5-12", Belt__Belt_Array.slice(a$1, 0, -1), []); -var a$2 = [ +let a$2 = [ 1, 2, 3, @@ -631,7 +631,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 160, characters 5-12", Belt__Bel eq("File \"jscomp/test/bs_array_test.ml\", line 161, characters 5-12", Belt__Belt_Array.sliceToEnd(a$2, 6), []); -var a$3 = Belt__Belt_Array.makeBy(10, (function (x) { +let a$3 = Belt__Belt_Array.makeBy(10, (function (x) { return x; })); @@ -778,7 +778,7 @@ Belt__Belt_Array.fill(a$3, 0, -1, 2); eq("File \"jscomp/test/bs_array_test.ml\", line 185, characters 5-12", a$3.slice(0), Belt__Belt_Array.make(10, 7)); -var b$1 = [ +let b$1 = [ 1, 2, 3 @@ -800,11 +800,11 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 190, characters 5-12", b$1, [ 3 ]); -var a0 = Belt__Belt_Array.makeBy(10, (function (x) { +let a0 = Belt__Belt_Array.makeBy(10, (function (x) { return x; })); -var b0 = Belt__Belt_Array.make(10, 3); +let b0 = Belt__Belt_Array.make(10, 3); Belt__Belt_Array.blit(a0, 1, b0, 2, 5); @@ -874,7 +874,7 @@ Belt__Belt_Array.blit(a0, -11, b0, -11, 2); eq("File \"jscomp/test/bs_array_test.ml\", line 210, characters 5-12", b0.slice(0), a0); -var aa = Belt__Belt_Array.makeBy(10, (function (x) { +let aa = Belt__Belt_Array.makeBy(10, (function (x) { return x; })); @@ -942,7 +942,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 220, characters 5-12", Belt__Bel eq("File \"jscomp/test/bs_array_test.ml\", line 221, characters 5-12", Belt__Belt_Array.make(-1, 3), []); -var c = [ +let c = [ 0, 1, 2 @@ -1067,7 +1067,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 231, characters 5-12", Belt__Bel ]); function sumUsingForEach(xs) { - var v = { + let v = { contents: 0 }; Belt__Belt_Array.forEach(xs, (function (x) { @@ -1118,7 +1118,7 @@ b("File \"jscomp/test/bs_array_test.ml\", line 245, characters 4-11", !Belt__Bel return prim0 === prim1; }))); -var c$1 = { +let c$1 = { contents: 0 }; @@ -1131,7 +1131,7 @@ b("File \"jscomp/test/bs_array_test.ml\", line 246, characters 4-11", (Belt__Bel })), c$1.contents === 6)); function id(loc, x) { - var u = x.slice(0); + let u = x.slice(0); eq("File \"jscomp/test/bs_array_test.ml\", line 256, characters 5-12", Belt__Belt_Array.reverse(x), (Belt__Belt_Array.reverseInPlace(u), u)); } @@ -1158,16 +1158,16 @@ id("File \"jscomp/test/bs_array_test.ml\", line 265, characters 5-12", [ ]); function every2(xs, ys) { - var partial_arg = Belt__Belt_List.toArray(ys); - var partial_arg$1 = Belt__Belt_List.toArray(xs); + let partial_arg = Belt__Belt_List.toArray(ys); + let partial_arg$1 = Belt__Belt_List.toArray(xs); return function (param) { return Belt__Belt_Array.every2(partial_arg$1, partial_arg, param); }; } function some2(xs, ys) { - var partial_arg = Belt__Belt_List.toArray(ys); - var partial_arg$1 = Belt__Belt_List.toArray(xs); + let partial_arg = Belt__Belt_List.toArray(ys); + let partial_arg$1 = Belt__Belt_List.toArray(xs); return function (param) { return Belt__Belt_Array.some2(partial_arg$1, partial_arg, param); }; @@ -1480,7 +1480,7 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 310, characters 5-12", Belt__Bel return x > 3; })), undefined); -var arr = []; +let arr = []; arr.push(3); diff --git a/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js b/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js index 86deb3ba1d..f65b1d65ec 100644 --- a/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js +++ b/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_splice_call = require("melange.js/caml_splice_call.js"); -var Curry = require("melange.js/curry.js"); +let Caml_splice_call = require("melange.js/caml_splice_call.js"); +let Curry = require("melange.js/curry.js"); -var Curry$1 = {}; +let Curry$1 = {}; -var Block = {}; +let Block = {}; -var xbs = Array.prototype.map.call([ +let xbs = Array.prototype.map.call([ 1, 2, 3, @@ -26,7 +26,7 @@ function f(cb) { ], Curry.__1(cb)); } -var xs = Array.prototype.map.call([ +let xs = Array.prototype.map.call([ 1, 1, 2 @@ -70,7 +70,7 @@ function h(x, y, z) { } function h1(x, y, u, z) { - var partial_arg = Curry._1(z, u); + let partial_arg = Curry._1(z, u); return map2(x, y, Curry.__2(partial_arg)); } @@ -120,7 +120,7 @@ function unit_magic(param) { return 3; } -var f_unit_magic = unit_magic(undefined); +let f_unit_magic = unit_magic(undefined); function hh(xs) { return function (param) { diff --git a/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js b/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js index 3814e6365a..b071502e0e 100644 --- a/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js +++ b/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -34,7 +34,7 @@ function hi (cb){ } ; -var xs = { +let xs = { contents: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/bs_float_test.js b/jscomp/test/dist/jscomp/test/bs_float_test.js index 85122094d7..2392f3952c 100644 --- a/jscomp/test/dist/jscomp/test/bs_float_test.js +++ b/jscomp/test/dist/jscomp/test/bs_float_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Float = require("melange.belt/belt_Float.js"); -var Mt = require("./mt.js"); +let Belt__Belt_Float = require("melange.belt/belt_Float.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/bs_hashmap_test.js b/jscomp/test/dist/jscomp/test/bs_hashmap_test.js index 0ce357066a..40f774ed85 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashmap_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashmap_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_HashMap = require("melange.belt/belt_HashMap.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); -var Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_HashMap = require("melange.belt/belt_HashMap.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); +let Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,13 +31,13 @@ function eq(x, y) { return x === y; } -var hash = Stdlib__Hashtbl.hash; +let hash = Stdlib__Hashtbl.hash; -var cmp = Caml.caml_int_compare; +let cmp = Caml.caml_int_compare; -var Y = Belt__Belt_Id.hashable(hash, eq); +let Y = Belt__Belt_Id.hashable(hash, eq); -var empty = Belt__Belt_internalBucketsType.make(Y.hash, Y.eq, 30); +let empty = Belt__Belt_internalBucketsType.make(Y.hash, Y.eq, 30); function add(prim0, prim1) { return prim0 + prim1 | 0; @@ -66,31 +66,31 @@ eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 31, characters 6-13", Belt__B eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 32, characters 6-13", empty.size, 3); -var u = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); +let u = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); -var v = Belt__Belt_Array.zip(u, u); +let v = Belt__Belt_Array.zip(u, u); -var xx = Belt__Belt_HashMap.fromArray(v, Y); +let xx = Belt__Belt_HashMap.fromArray(v, Y); eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 41, characters 6-13", xx.size, 91); eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 42, characters 6-13", Belt__Belt_SortArray.stableSortBy(Belt__Belt_HashMap.keysToArray(xx), cmp), Array_data_util.range(30, 120)); -var u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); +let u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); -var v$1 = Belt__Belt_internalBucketsType.make(Y.hash, Y.eq, 40); +let v$1 = Belt__Belt_internalBucketsType.make(Y.hash, Y.eq, 40); Belt__Belt_HashMap.mergeMany(v$1, Belt__Belt_Array.zip(u$1, u$1)); eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 48, characters 6-13", v$1.size, 100001); -for(var i = 0; i <= 1000; ++i){ +for(let i = 0; i <= 1000; ++i){ Belt__Belt_HashMap.remove(v$1, i); } eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 52, characters 6-13", v$1.size, 99000); -for(var i$1 = 0; i$1 <= 2000; ++i$1){ +for(let i$1 = 0; i$1 <= 2000; ++i$1){ Belt__Belt_HashMap.remove(v$1, i$1); } @@ -102,7 +102,7 @@ b("File \"jscomp/test/bs_hashmap_test.ml\", line 57, characters 4-11", Belt__Bel Mt.from_pair_suites("Bs_hashmap_test", suites.contents); -var $plus$plus = Belt__Belt_Array.concat; +let $plus$plus = Belt__Belt_Array.concat; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js b/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js index 88709b2fad..2d28921de3 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_HashSetInt = require("melange.belt/belt_HashSetInt.js"); -var Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); -var Belt__Belt_SortArrayInt = require("melange.belt/belt_SortArrayInt.js"); -var Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_HashSetInt = require("melange.belt/belt_HashSetInt.js"); +let Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); +let Belt__Belt_SortArrayInt = require("melange.belt/belt_SortArrayInt.js"); +let Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,7 +30,7 @@ function add(x, y) { } function sum2(h) { - var v = { + let v = { contents: 0 }; Belt__Belt_HashSetInt.forEach(h, (function (x) { @@ -39,13 +39,13 @@ function sum2(h) { return v.contents; } -var u = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); +let u = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); -var v = Belt__Belt_HashSetInt.fromArray(u); +let v = Belt__Belt_HashSetInt.fromArray(u); eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 19, characters 5-12", v.size, 91); -var xs = Belt__Belt_SetInt.toArray(Belt__Belt_SetInt.fromArray(Belt__Belt_HashSetInt.toArray(v))); +let xs = Belt__Belt_SetInt.toArray(Belt__Belt_SetInt.fromArray(Belt__Belt_HashSetInt.toArray(v))); eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 21, characters 5-12", xs, Array_data_util.range(30, 120)); @@ -53,43 +53,43 @@ eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 23, characters 5-12", Belt eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 24, characters 5-12", sum2(v), 6825); -var u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); +let u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); -var v$1 = Belt__Belt_internalBucketsType.make(undefined, undefined, 40); +let v$1 = Belt__Belt_internalBucketsType.make(undefined, undefined, 40); Belt__Belt_HashSetInt.mergeMany(v$1, u$1); eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 30, characters 5-12", v$1.size, 100001); -for(var i = 0; i <= 1000; ++i){ +for(let i = 0; i <= 1000; ++i){ Belt__Belt_HashSetInt.remove(v$1, i); } eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 34, characters 5-12", v$1.size, 99000); -for(var i$1 = 0; i$1 <= 2000; ++i$1){ +for(let i$1 = 0; i$1 <= 2000; ++i$1){ Belt__Belt_HashSetInt.remove(v$1, i$1); } eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 38, characters 5-12", v$1.size, 98000); -var u0 = Belt__Belt_HashSetInt.fromArray(Array_data_util.randomRange(0, 100000)); +let u0 = Belt__Belt_HashSetInt.fromArray(Array_data_util.randomRange(0, 100000)); -var u1 = Belt__Belt_HashSetInt.copy(u0); +let u1 = Belt__Belt_HashSetInt.copy(u0); eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 46, characters 5-12", Belt__Belt_HashSetInt.toArray(u0), Belt__Belt_HashSetInt.toArray(u1)); -for(var i$2 = 0; i$2 <= 2000; ++i$2){ +for(let i$2 = 0; i$2 <= 2000; ++i$2){ Belt__Belt_HashSetInt.remove(u1, i$2); } -for(var i$3 = 0; i$3 <= 1000; ++i$3){ +for(let i$3 = 0; i$3 <= 1000; ++i$3){ Belt__Belt_HashSetInt.remove(u0, i$3); } -var v0 = Belt__Belt_Array.concat(Array_data_util.range(0, 1000), Belt__Belt_HashSetInt.toArray(u0)); +let v0 = Belt__Belt_Array.concat(Array_data_util.range(0, 1000), Belt__Belt_HashSetInt.toArray(u0)); -var v1 = Belt__Belt_Array.concat(Array_data_util.range(0, 2000), Belt__Belt_HashSetInt.toArray(u1)); +let v1 = Belt__Belt_Array.concat(Array_data_util.range(0, 2000), Belt__Belt_HashSetInt.toArray(u1)); Belt__Belt_SortArrayInt.stableSortInPlace(v0); @@ -97,15 +97,15 @@ Belt__Belt_SortArrayInt.stableSortInPlace(v1); eq("File \"jscomp/test/bs_hashset_int_test.ml\", line 57, characters 5-12", v0, v1); -var h = Belt__Belt_HashSetInt.fromArray(Array_data_util.randomRange(0, 1000000)); +let h = Belt__Belt_HashSetInt.fromArray(Array_data_util.randomRange(0, 1000000)); -var histo = Belt__Belt_HashSetInt.getBucketHistogram(h); +let histo = Belt__Belt_HashSetInt.getBucketHistogram(h); b("File \"jscomp/test/bs_hashset_int_test.ml\", line 62, characters 4-11", histo.length <= 10); Mt.from_pair_suites("Bs_hashset_int_test", suites.contents); -var $plus$plus = Belt__Belt_Array.concat; +let $plus$plus = Belt__Belt_Array.concat; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js b/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js index 2253608e3c..f7c83a60ec 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Belt__Belt_HashMap = require("melange.belt/belt_HashMap.js"); -var Belt__Belt_HashMapInt = require("melange.belt/belt_HashMapInt.js"); -var Belt__Belt_HashMapString = require("melange.belt/belt_HashMapString.js"); -var Belt__Belt_HashSetInt = require("melange.belt/belt_HashSetInt.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); -var Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); -var Caml = require("melange.js/caml.js"); -var Caml_hash_primitive = require("melange.js/caml_hash_primitive.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Belt__Belt_HashMap = require("melange.belt/belt_HashMap.js"); +let Belt__Belt_HashMapInt = require("melange.belt/belt_HashMapInt.js"); +let Belt__Belt_HashMapString = require("melange.belt/belt_HashMapString.js"); +let Belt__Belt_HashSetInt = require("melange.belt/belt_HashSetInt.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); +let Belt__Belt_internalBucketsType = require("melange.belt/belt_internalBucketsType.js"); +let Caml = require("melange.js/caml.js"); +let Caml_hash_primitive = require("melange.js/caml_hash_primitive.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); function hash_string(s) { return Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, s)); } -var hashString = (function(str){ +let hashString = (function(str){ var hash = 5381, i = str.length | 0; @@ -27,31 +27,31 @@ var hashString = (function(str){ return hash} ); -var $$String = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { +let $$String = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { return x === y; })); -var String1 = Belt__Belt_Id.hashable(hashString, (function (x, y) { +let String1 = Belt__Belt_Id.hashable(hashString, (function (x, y) { return x === y; })); -var String2 = Belt__Belt_Id.hashable((function (x) { +let String2 = Belt__Belt_Id.hashable((function (x) { return Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, x)); }), (function (x, y) { return x === y; })); -var Int = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { +let Int = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { return x === y; })); -var empty = Belt__Belt_internalBucketsType.make(Int.hash, Int.eq, 500000); +let empty = Belt__Belt_internalBucketsType.make(Int.hash, Int.eq, 500000); function bench(param) { - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashMap.set(empty, i, i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashMap.has(empty, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -68,11 +68,11 @@ function bench(param) { } function bench2(m) { - var empty = Belt__Belt_internalBucketsType.make(m.hash, m.eq, 1000000); - for(var i = 0; i <= 1000000; ++i){ + let empty = Belt__Belt_internalBucketsType.make(m.hash, m.eq, 1000000); + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashMap.set(empty, String(i), i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashMap.has(empty, String(i$1))) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -85,7 +85,7 @@ function bench2(m) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Belt__Belt_HashMap.remove(empty, String(i$2)); } if (empty.size === 0) { @@ -102,13 +102,13 @@ function bench2(m) { } function bench3(m) { - var empty_cmp = m.cmp; - var cmp = m.cmp; - var table = undefined; - for(var i = 0; i <= 1000000; ++i){ + let empty_cmp = m.cmp; + let cmp = m.cmp; + let table = undefined; + for(let i = 0; i <= 1000000; ++i){ table = Belt__Belt_MapDict.set(table, String(i), i, cmp); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_MapDict.has(table, String(i$1), cmp)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -121,7 +121,7 @@ function bench3(m) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ table = Belt__Belt_MapDict.remove(table, String(i$2), cmp); } if (Belt__Belt_MapDict.size(table) === 0) { @@ -137,14 +137,14 @@ function bench3(m) { }); } -var Sx = Belt__Belt_Id.comparable(Caml.caml_string_compare); +let Sx = Belt__Belt_Id.comparable(Caml.caml_string_compare); function bench4(param) { - var table = Belt__Belt_internalBucketsType.make(undefined, undefined, 1000000); - for(var i = 0; i <= 1000000; ++i){ + let table = Belt__Belt_internalBucketsType.make(undefined, undefined, 1000000); + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashMapString.set(table, String(i), i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashMapString.has(table, String(i$1))) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -157,7 +157,7 @@ function bench4(param) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Belt__Belt_HashMapString.remove(table, String(i$2)); } if (Belt__Belt_HashMapString.isEmpty(table)) { @@ -174,14 +174,14 @@ function bench4(param) { } function bench5(param) { - var table = Belt__Belt_internalBucketsType.make(Int.hash, Int.eq, 1000000); + let table = Belt__Belt_internalBucketsType.make(Int.hash, Int.eq, 1000000); console.time("bs_hashtbl_string_test.ml 133"); - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashMap.set(table, i, i); } console.timeEnd("bs_hashtbl_string_test.ml 133"); console.time("bs_hashtbl_string_test.ml 137"); - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashMap.has(table, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -196,7 +196,7 @@ function bench5(param) { } console.timeEnd("bs_hashtbl_string_test.ml 137"); console.time("bs_hashtbl_string_test.ml 141"); - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Belt__Belt_HashMap.remove(table, i$2); } console.timeEnd("bs_hashtbl_string_test.ml 141"); @@ -214,11 +214,11 @@ function bench5(param) { } function bench6(param) { - var table = Belt__Belt_internalBucketsType.make(undefined, undefined, 1000000); - for(var i = 0; i <= 1000000; ++i){ + let table = Belt__Belt_internalBucketsType.make(undefined, undefined, 1000000); + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashMapInt.set(table, i, i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashMapInt.has(table, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -231,7 +231,7 @@ function bench6(param) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Belt__Belt_HashMapInt.remove(table, i$2); } if (table.size === 0) { @@ -248,11 +248,11 @@ function bench6(param) { } function bench7(param) { - var table = Belt__Belt_internalBucketsType.make(undefined, undefined, 2000000); - for(var i = 0; i <= 1000000; ++i){ + let table = Belt__Belt_internalBucketsType.make(undefined, undefined, 2000000); + for(let i = 0; i <= 1000000; ++i){ Belt__Belt_HashSetInt.add(table, i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_HashSetInt.has(table, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -265,7 +265,7 @@ function bench7(param) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Belt__Belt_HashSetInt.remove(table, i$2); } if (table.size === 0) { @@ -287,9 +287,9 @@ bench7(undefined); console.timeEnd("bs_hashtbl_string_test.ml 203"); -var count = 1000000; +let count = 1000000; -var initial_size = 1000000; +let initial_size = 1000000; exports.hash_string = hash_string; exports.hashString = hashString; diff --git a/jscomp/test/dist/jscomp/test/bs_ignore_effect.js b/jscomp/test/dist/jscomp/test/bs_ignore_effect.js index 5e6267f982..68c50e83ff 100644 --- a/jscomp/test/dist/jscomp/test/bs_ignore_effect.js +++ b/jscomp/test/dist/jscomp/test/bs_ignore_effect.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -33,16 +33,16 @@ function add(x,y){ } ; -var v = { +let v = { contents: 0 }; -var h = (v.contents = v.contents + 1 | 0, { +let h = (v.contents = v.contents + 1 | 0, { hi: 2, lo: 0 }); -var z = (v.contents = v.contents + 1 | 0, add(3.0, 2.0)); +let z = (v.contents = v.contents + 1 | 0, add(3.0, 2.0)); eq("File \"jscomp/test/bs_ignore_effect.ml\", line 26, characters 5-12", v.contents, 2); diff --git a/jscomp/test/dist/jscomp/test/bs_int_test.js b/jscomp/test/dist/jscomp/test/bs_int_test.js index 21b198493d..d93c8e87b6 100644 --- a/jscomp/test/dist/jscomp/test/bs_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_int_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Int = require("melange.belt/belt_Int.js"); -var Mt = require("./mt.js"); +let Belt__Belt_Int = require("melange.belt/belt_Int.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/bs_list_test.js b/jscomp/test/dist/jscomp/test/bs_list_test.js index 12f351cbae..1a7214f28b 100644 --- a/jscomp/test/dist/jscomp/test/bs_list_test.js +++ b/jscomp/test/dist/jscomp/test/bs_list_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Caml = require("melange.js/caml.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Caml = require("melange.js/caml.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,7 +28,7 @@ function $$throw(loc, x) { } function sum(xs) { - var v = { + let v = { contents: 0 }; Belt__Belt_List.forEach(xs, (function (x) { @@ -38,7 +38,7 @@ function sum(xs) { } function sum2(xs, ys) { - var v = { + let v = { contents: 0 }; Belt__Belt_List.forEach2(xs, ys, (function (x, y) { @@ -47,7 +47,7 @@ function sum2(xs, ys) { return v.contents; } -var u = Belt__Belt_List.makeBy(5, (function (i) { +let u = Belt__Belt_List.makeBy(5, (function (i) { return Math.imul(i, i); })); @@ -55,7 +55,7 @@ function f(i) { eq("File \"jscomp/test/bs_list_test.ml\", line 26, characters 7-14", Belt__Belt_List.getExn(u, i), Math.imul(i, i)); } -for(var i = 0; i <= 4; ++i){ +for(let i = 0; i <= 4; ++i){ f(i); } @@ -761,11 +761,11 @@ function add(a, b) { return a + b | 0; } -var length_10_id = Belt__Belt_List.makeBy(10, id); +let length_10_id = Belt__Belt_List.makeBy(10, id); -var length_8_id = Belt__Belt_List.makeBy(8, id); +let length_8_id = Belt__Belt_List.makeBy(8, id); -var d = Belt__Belt_List.makeBy(10, (function (x) { +let d = Belt__Belt_List.makeBy(10, (function (x) { return (x << 1); })); @@ -801,7 +801,7 @@ eq("MAP2", Belt__Belt_List.reverse(Belt__Belt_List.mapReverse2(length_10_id, len return (x << 1); }))); -var xs = Belt__Belt_List.reverse(Belt__Belt_List.mapReverse2(length_8_id, length_10_id, add)); +let xs = Belt__Belt_List.reverse(Belt__Belt_List.mapReverse2(length_8_id, length_10_id, add)); eq("File \"jscomp/test/bs_list_test.ml\", line 144, characters 5-12", Belt__Belt_List.length(xs), 8); @@ -893,7 +893,7 @@ eq("DROP", Belt__Belt_List.drop(length_10_id, 0), length_10_id); eq("DROP", Belt__Belt_List.drop(length_8_id, -1), undefined); -var a = Belt__Belt_List.makeBy(5, id); +let a = Belt__Belt_List.makeBy(5, id); eq("SPLIT", Belt__Belt_List.splitAt(/* [] */0, 1), undefined); @@ -1305,7 +1305,7 @@ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc(/* [] */0, 2, eqx), /* [] */0); -var ll = { +let ll = { hd: [ 1, "1" @@ -1325,11 +1325,11 @@ var ll = { } }; -var ll0 = Belt__Belt_List.removeAssoc(ll, 0, eqx); +let ll0 = Belt__Belt_List.removeAssoc(ll, 0, eqx); b("File \"jscomp/test/bs_list_test.ml\", line 196, characters 5-12", ll === ll0); -var ll1 = Belt__Belt_List.setAssoc(ll, 2, "22", (function (prim0, prim1) { +let ll1 = Belt__Belt_List.setAssoc(ll, 2, "22", (function (prim0, prim1) { return prim0 === prim1; })); @@ -1353,7 +1353,7 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 198, characters 5-12", ll1, { } }); -var ll2 = Belt__Belt_List.setAssoc(ll1, 22, "2", (function (prim0, prim1) { +let ll2 = Belt__Belt_List.setAssoc(ll1, 22, "2", (function (prim0, prim1) { return prim0 === prim1; })); @@ -1929,7 +1929,7 @@ b("File \"jscomp/test/bs_list_test.ml\", line 279, characters 4-11", Belt__Belt_ return (acc + x | 0) + y | 0; })) === 6); -var a$1 = Belt__Belt_List.makeBy(10000, (function (i) { +let a$1 = Belt__Belt_List.makeBy(10000, (function (i) { return i; })); @@ -2444,11 +2444,11 @@ b("File \"jscomp/test/bs_list_test.ml\", line 340, characters 4-11", !Belt__Belt return prim0 === prim1; }))); -var u0 = Belt__Belt_List.makeBy(20, (function (x) { +let u0 = Belt__Belt_List.makeBy(20, (function (x) { return x; })); -var u1 = Belt__Belt_List.keepMap(u0, (function (x) { +let u1 = Belt__Belt_List.keepMap(u0, (function (x) { if (x % 7 === 0) { return x + 1 | 0; } diff --git a/jscomp/test/dist/jscomp/test/bs_map_set_dict_test.js b/jscomp/test/dist/jscomp/test/bs_map_set_dict_test.js index fd59e7675d..99e91e297f 100644 --- a/jscomp/test/dist/jscomp/test/bs_map_set_dict_test.js +++ b/jscomp/test/dist/jscomp/test/bs_map_set_dict_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Belt__Belt_Map = require("melange.belt/belt_Map.js"); -var Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); -var Belt__Belt_SetDict = require("melange.belt/belt_SetDict.js"); -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Belt__Belt_Map = require("melange.belt/belt_Map.js"); +let Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); +let Belt__Belt_SetDict = require("melange.belt/belt_SetDict.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -27,76 +27,76 @@ function b(loc, v) { Mt.bool_suites(test_id, suites, loc, v); } -var Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); -var Icmp2 = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let Icmp2 = Belt__Belt_Id.comparable(Caml.caml_int_compare); -var Ic3 = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let Ic3 = Belt__Belt_Id.comparable(Caml.caml_int_compare); -var m0_cmp = Icmp.cmp; +let m0_cmp = Icmp.cmp; -var m0 = { +let m0 = { cmp: m0_cmp, data: undefined }; -var m00_cmp = Ic3.cmp; +let m00_cmp = Ic3.cmp; -var m00 = { +let m00 = { cmp: m00_cmp, data: undefined }; -var I2 = Belt__Belt_Id.comparable(function (x, y) { +let I2 = Belt__Belt_Id.comparable(function (x, y) { return Caml.caml_int_compare(y, x); }); -var m_cmp = Icmp2.cmp; +let m_cmp = Icmp2.cmp; -var m = { +let m = { cmp: m_cmp, data: undefined }; -var m2_cmp = I2.cmp; +let m2_cmp = I2.cmp; -var m2 = { +let m2 = { cmp: m2_cmp, data: undefined }; -var data; +let data; Belt__Belt_Map.getId(m2); -var m_dict = Belt__Belt_Map.getId(m); +let m_dict = Belt__Belt_Map.getId(m); -for(var i = 0; i <= 100000; ++i){ +for(let i = 0; i <= 100000; ++i){ data = Belt__Belt_MapDict.set(data, i, i, m_dict.cmp); } -var data$1 = data; +let data$1 = data; -var newm_cmp = m_dict.cmp; +let newm_cmp = m_dict.cmp; -var newm = { +let newm = { cmp: newm_cmp, data: data$1 }; console.log(newm); -var m11 = Belt__Belt_MapDict.set(undefined, 1, 1, Icmp.cmp); +let m11 = Belt__Belt_MapDict.set(undefined, 1, 1, Icmp.cmp); console.log(m11); -var m_dict$1 = Belt__Belt_Map.getId(m); +let m_dict$1 = Belt__Belt_Map.getId(m); -var cmp = m_dict$1.cmp; +let cmp = m_dict$1.cmp; -var data$2; +let data$2; -for(var i$1 = 0; i$1 <= 100000; ++i$1){ +for(let i$1 = 0; i$1 <= 100000; ++i$1){ data$2 = Belt__Belt_SetDict.add(data$2, i$1, cmp); } @@ -112,14 +112,14 @@ function $eq$tilde(a, b) { }; } -var u0 = f(Belt__Belt_Array.map(Array_data_util.randomRange(0, 39), (function (x) { +let u0 = f(Belt__Belt_Array.map(Array_data_util.randomRange(0, 39), (function (x) { return [ x, x ]; }))); -var u1 = Belt__Belt_Map.set(u0, 39, 120); +let u1 = Belt__Belt_Map.set(u0, 39, 120); b("File \"jscomp/test/bs_map_set_dict_test.ml\", line 80, characters 4-11", Belt__Belt_Array.every2(Belt__Belt_MapDict.toArray(u0.data), Belt__Belt_Array.map(Array_data_util.range(0, 39), (function (x) { return [ @@ -151,7 +151,7 @@ eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 90, characters 5-12", Bel eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 91, characters 5-12", Belt__Belt_Map.get(u1, 39), 120); -var u = f(Belt__Belt_Array.makeByAndShuffle(10000, (function (x) { +let u = f(Belt__Belt_Array.makeByAndShuffle(10000, (function (x) { return [ x, x @@ -167,9 +167,9 @@ eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 97, characters 4-11", Bel Mt.from_pair_suites("Bs_map_set_dict_test", suites.contents); -var vv; +let vv; -var vv2; +let vv2; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_map_test.js b/jscomp/test/dist/jscomp/test/bs_map_test.js index 7337fe6621..2b5bbc3d60 100644 --- a/jscomp/test/dist/jscomp/test/bs_map_test.js +++ b/jscomp/test/dist/jscomp/test/bs_map_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); -var Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); -var Mt = require("./mt.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); +let Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -47,28 +47,28 @@ function b(loc, v) { }; } -var mapOfArray = Belt__Belt_MapInt.fromArray; +let mapOfArray = Belt__Belt_MapInt.fromArray; -var setOfArray = Belt__Belt_SetInt.fromArray; +let setOfArray = Belt__Belt_SetInt.fromArray; function emptyMap(param) { } -var v = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { +let v = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { return [ i, i ]; })); -var u = Belt__Belt_MapInt.fromArray(v); +let u = Belt__Belt_MapInt.fromArray(v); Belt__Belt_MapInt.checkInvariantInternal(u); -var firstHalf = Belt__Belt_Array.slice(v, 0, 2000); +let firstHalf = Belt__Belt_Array.slice(v, 0, 2000); -var xx = Belt__Belt_Array.reduce(firstHalf, u, (function (acc, param) { +let xx = Belt__Belt_Array.reduce(firstHalf, u, (function (acc, param) { return Belt__Belt_MapInt.remove(acc, param[0]); })); diff --git a/jscomp/test/dist/jscomp/test/bs_min_max_test.js b/jscomp/test/dist/jscomp/test/bs_min_max_test.js index 41041bd84b..f35d347024 100644 --- a/jscomp/test/dist/jscomp/test/bs_min_max_test.js +++ b/jscomp/test/dist/jscomp/test/bs_min_max_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Caml = require("melange.js/caml.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,7 +30,7 @@ function f2(x, y) { return Caml.caml_int_compare(x + y | 0, y); } -var f3 = Caml.caml_int_compare; +let f3 = Caml.caml_int_compare; function f4(x, y) { if (x < y) { @@ -40,9 +40,9 @@ function f4(x, y) { } } -var f5_min = Caml_obj.caml_min; +let f5_min = Caml_obj.caml_min; -var f5_max = Caml_obj.caml_max; +let f5_max = Caml_obj.caml_max; b("File \"jscomp/test/bs_min_max_test.ml\", line 28, characters 4-11", Caml.i64_eq(Caml.i64_min(Caml_int64.zero, Caml_int64.one), Caml_int64.zero)); diff --git a/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js b/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js index 541a128ba6..ac860f476a 100644 --- a/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Belt__Belt_MutableSetInt = require("melange.belt/belt_MutableSetInt.js"); -var Belt__Belt_Range = require("melange.belt/belt_Range.js"); -var Belt__Belt_internalAVLset = require("melange.belt/belt_internalAVLset.js"); -var Belt__Belt_internalSetInt = require("melange.belt/belt_internalSetInt.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Belt__Belt_MutableSetInt = require("melange.belt/belt_MutableSetInt.js"); +let Belt__Belt_Range = require("melange.belt/belt_Range.js"); +let Belt__Belt_internalAVLset = require("melange.belt/belt_internalAVLset.js"); +let Belt__Belt_internalSetInt = require("melange.belt/belt_internalSetInt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -27,9 +27,9 @@ function b(loc, x) { Mt.bool_suites(test_id, suites, loc, x); } -var xs = Array_data_util.range(0, 30); +let xs = Array_data_util.range(0, 30); -var u = { +let u = { data: Belt__Belt_internalSetInt.fromArray(xs) }; @@ -43,7 +43,7 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 23, characters 4-11", Belt_ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 24, characters 5-12", Belt__Belt_internalAVLset.size(u.data), 28); -var r = Array_data_util.randomRange(0, 30); +let r = Array_data_util.randomRange(0, 30); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 26, characters 4-11", 29 === Belt__Belt_internalAVLset.maxUndefined(u.data)); @@ -51,7 +51,7 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 27, characters 4-11", 1 === Belt__Belt_MutableSetInt.add(u, 3); -for(var i = 0 ,i_finish = r.length; i < i_finish; ++i){ +for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){ Belt__Belt_MutableSetInt.remove(u, r[i]); } @@ -69,7 +69,7 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 37, characters 5-12", Belt b("File \"jscomp/test/bs_mutable_set_test.ml\", line 38, characters 4-11", !Belt__Belt_MutableSetInt.isEmpty(u)); -for(var i$1 = 0; i$1 <= 3; ++i$1){ +for(let i$1 = 0; i$1 <= 3; ++i$1){ Belt__Belt_MutableSetInt.remove(u, i$1); } @@ -107,17 +107,17 @@ Belt__Belt_MutableSetInt.removeMany(u, Array_data_util.randomRange(10000, 30000) b("File \"jscomp/test/bs_mutable_set_test.ml\", line 58, characters 4-11", Belt__Belt_MutableSetInt.isEmpty(u)); -var xs$1 = Array_data_util.randomRange(1000, 2000); +let xs$1 = Array_data_util.randomRange(1000, 2000); -var v = { +let v = { data: Belt__Belt_internalSetInt.fromArray(xs$1) }; -var bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { +let bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { return Belt__Belt_MutableSetInt.removeCheck(v, x); })); -var indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { +let indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { if (x) { return acc + 1 | 0; } else { @@ -129,11 +129,11 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 65, characters 5-12", inde eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 66, characters 5-12", Belt__Belt_internalAVLset.size(v.data), 501); -var cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { +let cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { return Belt__Belt_MutableSetInt.addCheck(v, x); })); -var indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { +let indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { if (x) { return acc + 1 | 0; } else { @@ -175,13 +175,13 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 80, characters 5-12", Belt eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 81, characters 5-12", Belt__Belt_internalSetInt.get(v.data, 1200), 1200); -var match = Belt__Belt_MutableSetInt.split(v, 1000); +let match = Belt__Belt_MutableSetInt.split(v, 1000); -var match$1 = match[0]; +let match$1 = match[0]; -var bb = match$1[1]; +let bb = match$1[1]; -var aa = match$1[0]; +let aa = match$1[0]; b("File \"jscomp/test/bs_mutable_set_test.ml\", line 83, characters 4-11", match[1]); @@ -199,17 +199,17 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 87, characters 4-11", Belt_ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 88, characters 4-11", Belt__Belt_MutableSetInt.isEmpty(Belt__Belt_MutableSetInt.intersect(aa, bb))); -var c = Belt__Belt_MutableSetInt.removeCheck(v, 1000); +let c = Belt__Belt_MutableSetInt.removeCheck(v, 1000); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 90, characters 4-11", c); -var match$2 = Belt__Belt_MutableSetInt.split(v, 1000); +let match$2 = Belt__Belt_MutableSetInt.split(v, 1000); -var match$3 = match$2[0]; +let match$3 = match$2[0]; -var bb$1 = match$3[1]; +let bb$1 = match$3[1]; -var aa$1 = match$3[0]; +let aa$1 = match$3[0]; b("File \"jscomp/test/bs_mutable_set_test.ml\", line 92, characters 4-11", !match$2[1]); @@ -227,31 +227,31 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 96, characters 4-11", Belt_ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 97, characters 4-11", Belt__Belt_MutableSetInt.isEmpty(Belt__Belt_MutableSetInt.intersect(aa$1, bb$1))); -var xs$2 = Array_data_util.randomRange(0, 100); +let xs$2 = Array_data_util.randomRange(0, 100); -var aa$2 = { +let aa$2 = { data: Belt__Belt_internalSetInt.fromArray(xs$2) }; -var xs$3 = Array_data_util.randomRange(40, 120); +let xs$3 = Array_data_util.randomRange(40, 120); -var bb$2 = { +let bb$2 = { data: Belt__Belt_internalSetInt.fromArray(xs$3) }; -var cc = Belt__Belt_MutableSetInt.union(aa$2, bb$2); +let cc = Belt__Belt_MutableSetInt.union(aa$2, bb$2); -var xs$4 = Array_data_util.randomRange(0, 120); +let xs$4 = Array_data_util.randomRange(0, 120); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 106, characters 4-11", Belt__Belt_MutableSetInt.eq(cc, { data: Belt__Belt_internalSetInt.fromArray(xs$4) })); -var xs$5 = Array_data_util.randomRange(0, 20); +let xs$5 = Array_data_util.randomRange(0, 20); -var xs$6 = Array_data_util.randomRange(21, 40); +let xs$6 = Array_data_util.randomRange(21, 40); -var xs$7 = Array_data_util.randomRange(0, 40); +let xs$7 = Array_data_util.randomRange(0, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 108, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.union({ data: Belt__Belt_internalSetInt.fromArray(xs$5) @@ -261,17 +261,17 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 108, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$7) })); -var dd = Belt__Belt_MutableSetInt.intersect(aa$2, bb$2); +let dd = Belt__Belt_MutableSetInt.intersect(aa$2, bb$2); -var xs$8 = Array_data_util.randomRange(40, 100); +let xs$8 = Array_data_util.randomRange(40, 100); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 113, characters 4-11", Belt__Belt_MutableSetInt.eq(dd, { data: Belt__Belt_internalSetInt.fromArray(xs$8) })); -var xs$9 = Array_data_util.randomRange(0, 20); +let xs$9 = Array_data_util.randomRange(0, 20); -var xs$10 = Array_data_util.randomRange(21, 40); +let xs$10 = Array_data_util.randomRange(21, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 114, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.intersect({ data: Belt__Belt_internalSetInt.fromArray(xs$9) @@ -281,9 +281,9 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 114, characters 4-11", Belt data: undefined })); -var xs$11 = Array_data_util.randomRange(21, 40); +let xs$11 = Array_data_util.randomRange(21, 40); -var xs$12 = Array_data_util.randomRange(0, 20); +let xs$12 = Array_data_util.randomRange(0, 20); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 120, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.intersect({ data: Belt__Belt_internalSetInt.fromArray(xs$11) @@ -318,23 +318,23 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 126, characters 4-11", Belt ]) })); -var xs$13 = Array_data_util.randomRange(0, 39); +let xs$13 = Array_data_util.randomRange(0, 39); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 132, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff(aa$2, bb$2), { data: Belt__Belt_internalSetInt.fromArray(xs$13) })); -var xs$14 = Array_data_util.randomRange(101, 120); +let xs$14 = Array_data_util.randomRange(101, 120); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 134, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff(bb$2, aa$2), { data: Belt__Belt_internalSetInt.fromArray(xs$14) })); -var xs$15 = Array_data_util.randomRange(21, 40); +let xs$15 = Array_data_util.randomRange(21, 40); -var xs$16 = Array_data_util.randomRange(0, 20); +let xs$16 = Array_data_util.randomRange(0, 20); -var xs$17 = Array_data_util.randomRange(21, 40); +let xs$17 = Array_data_util.randomRange(21, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 136, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$15) @@ -344,11 +344,11 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 136, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$17) })); -var xs$18 = Array_data_util.randomRange(0, 20); +let xs$18 = Array_data_util.randomRange(0, 20); -var xs$19 = Array_data_util.randomRange(21, 40); +let xs$19 = Array_data_util.randomRange(21, 40); -var xs$20 = Array_data_util.randomRange(0, 20); +let xs$20 = Array_data_util.randomRange(0, 20); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 142, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$18) @@ -358,11 +358,11 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 142, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$20) })); -var xs$21 = Array_data_util.randomRange(0, 20); +let xs$21 = Array_data_util.randomRange(0, 20); -var xs$22 = Array_data_util.randomRange(0, 40); +let xs$22 = Array_data_util.randomRange(0, 40); -var xs$23 = Array_data_util.randomRange(0, -1); +let xs$23 = Array_data_util.randomRange(0, -1); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 149, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$21) @@ -372,27 +372,27 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 149, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$23) })); -var xs$24 = Array_data_util.randomRange(0, 1000); +let xs$24 = Array_data_util.randomRange(0, 1000); -var a0 = { +let a0 = { data: Belt__Belt_internalSetInt.fromArray(xs$24) }; -var a1 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { +let a1 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { return x % 2 === 0; })); -var a2 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { +let a2 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { return x % 2 !== 0; })); -var match$4 = Belt__Belt_MutableSetInt.partition(a0, (function (x) { +let match$4 = Belt__Belt_MutableSetInt.partition(a0, (function (x) { return x % 2 === 0; })); -var a4 = match$4[1]; +let a4 = match$4[1]; -var a3 = match$4[0]; +let a3 = match$4[0]; b("File \"jscomp/test/bs_mutable_set_test.ml\", line 164, characters 4-11", Belt__Belt_MutableSetInt.eq(a1, a3)); @@ -417,11 +417,11 @@ Belt__Belt_List.forEach({ Belt__Belt_internalAVLset.checkInvariantInternal(x.data); })); -var v$1 = { +let v$1 = { data: undefined }; -for(var i$2 = 0; i$2 <= 100000; ++i$2){ +for(let i$2 = 0; i$2 <= 100000; ++i$2){ Belt__Belt_MutableSetInt.add(v$1, i$2); } @@ -433,9 +433,9 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 178, characters 4-11", Belt eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 181, characters 5-12", Belt__Belt_internalAVLset.size(v$1.data), 100001); -var u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); +let u$1 = Belt__Belt_Array.concat(Array_data_util.randomRange(30, 100), Array_data_util.randomRange(40, 120)); -var v$2 = { +let v$2 = { data: undefined }; @@ -445,25 +445,25 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 187, characters 5-12", Bel eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 188, characters 5-12", Belt__Belt_internalAVLset.toArray(v$2.data), Array_data_util.range(30, 120)); -var u$2 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); +let u$2 = Belt__Belt_Array.concat(Array_data_util.randomRange(0, 100000), Array_data_util.randomRange(0, 100)); -var v$3 = { +let v$3 = { data: Belt__Belt_internalSetInt.fromArray(u$2) }; eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 193, characters 5-12", Belt__Belt_internalAVLset.size(v$3.data), 100001); -var u$3 = Array_data_util.randomRange(50000, 80000); +let u$3 = Array_data_util.randomRange(50000, 80000); -for(var 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__Belt_MutableSetInt.remove(v$3, i$3); } eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 200, characters 5-12", Belt__Belt_internalAVLset.size(v$3.data), 70000); -var vv = Array_data_util.randomRange(0, 100000); +let vv = Array_data_util.randomRange(0, 100000); -for(var 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__Belt_MutableSetInt.remove(v$3, Caml_array.get(vv, i$4)); } @@ -471,11 +471,11 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 206, characters 5-12", Bel b("File \"jscomp/test/bs_mutable_set_test.ml\", line 207, characters 4-11", Belt__Belt_MutableSetInt.isEmpty(v$3)); -var xs$25 = Belt__Belt_Array.makeBy(30, (function (i) { +let xs$25 = Belt__Belt_Array.makeBy(30, (function (i) { return i; })); -var v$4 = { +let v$4 = { data: Belt__Belt_internalSetInt.fromArray(xs$25) }; @@ -491,16 +491,16 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 215, characters 4-11", 1 == eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 216, characters 5-12", Belt__Belt_internalAVLset.size(v$4.data), 28); -var vv$1 = Array_data_util.randomRange(1, 28); +let vv$1 = Array_data_util.randomRange(1, 28); -for(var 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__Belt_MutableSetInt.remove(v$4, Caml_array.get(vv$1, i$5)); } eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 221, characters 5-12", Belt__Belt_internalAVLset.size(v$4.data), 0); function id(loc, x) { - var u = { + let u = { data: Belt__Belt_internalAVLset.fromSortedArrayUnsafe(x) }; Belt__Belt_internalAVLset.checkInvariantInternal(u.data); @@ -592,25 +592,25 @@ id("File \"jscomp/test/bs_mutable_set_test.ml\", line 239, characters 5-12", [ id("File \"jscomp/test/bs_mutable_set_test.ml\", line 240, characters 5-12", Array_data_util.range(0, 1000)); -var xs$26 = Array_data_util.randomRange(0, 1000); +let xs$26 = Array_data_util.randomRange(0, 1000); -var v$5 = { +let v$5 = { data: Belt__Belt_internalSetInt.fromArray(xs$26) }; -var copyV = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { +let copyV = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { return x % 8 === 0; })); -var match$5 = Belt__Belt_MutableSetInt.partition(v$5, (function (x) { +let match$5 = Belt__Belt_MutableSetInt.partition(v$5, (function (x) { return x % 8 === 0; })); -var cc$1 = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { +let cc$1 = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { return x % 8 !== 0; })); -for(var i$6 = 0; i$6 <= 200; ++i$6){ +for(let i$6 = 0; i$6 <= 200; ++i$6){ Belt__Belt_MutableSetInt.remove(v$5, i$6); } @@ -626,41 +626,41 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 253, characters 4-11", Belt b("File \"jscomp/test/bs_mutable_set_test.ml\", line 254, characters 4-11", Belt__Belt_MutableSetInt.eq(cc$1, match$5[1])); -var xs$27 = Array_data_util.randomRange(0, 1000); +let xs$27 = Array_data_util.randomRange(0, 1000); -var v$6 = { +let v$6 = { data: Belt__Belt_internalSetInt.fromArray(xs$27) }; -var match$6 = Belt__Belt_MutableSetInt.split(v$6, 400); +let match$6 = Belt__Belt_MutableSetInt.split(v$6, 400); -var match$7 = match$6[0]; +let match$7 = match$6[0]; -var xs$28 = Array_data_util.randomRange(0, 399); +let xs$28 = Array_data_util.randomRange(0, 399); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 259, characters 4-11", Belt__Belt_MutableSetInt.eq(match$7[0], { data: Belt__Belt_internalSetInt.fromArray(xs$28) })); -var xs$29 = Array_data_util.randomRange(401, 1000); +let xs$29 = Array_data_util.randomRange(401, 1000); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 260, characters 4-11", Belt__Belt_MutableSetInt.eq(match$7[1], { data: Belt__Belt_internalSetInt.fromArray(xs$29) })); -var xs$30 = Belt__Belt_Array.map(Array_data_util.randomRange(0, 1000), (function (x) { +let xs$30 = Belt__Belt_Array.map(Array_data_util.randomRange(0, 1000), (function (x) { return (x << 1); })); -var d = { +let d = { data: Belt__Belt_internalSetInt.fromArray(xs$30) }; -var match$8 = Belt__Belt_MutableSetInt.split(d, 1001); +let match$8 = Belt__Belt_MutableSetInt.split(d, 1001); -var match$9 = match$8[0]; +let match$9 = match$8[0]; -var xs$31 = Belt__Belt_Array.makeBy(501, (function (x) { +let xs$31 = Belt__Belt_Array.makeBy(501, (function (x) { return (x << 1); })); @@ -668,7 +668,7 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 263, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$31) })); -var xs$32 = Belt__Belt_Array.makeBy(500, (function (x) { +let xs$32 = Belt__Belt_Array.makeBy(500, (function (x) { return 1002 + (x << 1) | 0; })); @@ -676,31 +676,31 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 264, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$32) })); -var xs$33 = Array_data_util.randomRange(0, 100); +let xs$33 = Array_data_util.randomRange(0, 100); -var aa$3 = { +let aa$3 = { data: Belt__Belt_internalSetInt.fromArray(xs$33) }; -var xs$34 = Array_data_util.randomRange(40, 120); +let xs$34 = Array_data_util.randomRange(40, 120); -var bb$3 = { +let bb$3 = { data: Belt__Belt_internalSetInt.fromArray(xs$34) }; -var cc$2 = Belt__Belt_MutableSetInt.union(aa$3, bb$3); +let cc$2 = Belt__Belt_MutableSetInt.union(aa$3, bb$3); -var xs$35 = Array_data_util.randomRange(0, 120); +let xs$35 = Array_data_util.randomRange(0, 120); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 274, characters 4-11", Belt__Belt_MutableSetInt.eq(cc$2, { data: Belt__Belt_internalSetInt.fromArray(xs$35) })); -var xs$36 = Array_data_util.randomRange(0, 20); +let xs$36 = Array_data_util.randomRange(0, 20); -var xs$37 = Array_data_util.randomRange(21, 40); +let xs$37 = Array_data_util.randomRange(21, 40); -var xs$38 = Array_data_util.randomRange(0, 40); +let xs$38 = Array_data_util.randomRange(0, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 276, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.union({ data: Belt__Belt_internalSetInt.fromArray(xs$36) @@ -710,17 +710,17 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 276, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$38) })); -var dd$1 = Belt__Belt_MutableSetInt.intersect(aa$3, bb$3); +let dd$1 = Belt__Belt_MutableSetInt.intersect(aa$3, bb$3); -var xs$39 = Array_data_util.randomRange(40, 100); +let xs$39 = Array_data_util.randomRange(40, 100); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 281, characters 4-11", Belt__Belt_MutableSetInt.eq(dd$1, { data: Belt__Belt_internalSetInt.fromArray(xs$39) })); -var xs$40 = Array_data_util.randomRange(0, 20); +let xs$40 = Array_data_util.randomRange(0, 20); -var xs$41 = Array_data_util.randomRange(21, 40); +let xs$41 = Array_data_util.randomRange(21, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 282, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.intersect({ data: Belt__Belt_internalSetInt.fromArray(xs$40) @@ -730,9 +730,9 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 282, characters 4-11", Belt data: undefined })); -var xs$42 = Array_data_util.randomRange(21, 40); +let xs$42 = Array_data_util.randomRange(21, 40); -var xs$43 = Array_data_util.randomRange(0, 20); +let xs$43 = Array_data_util.randomRange(0, 20); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 288, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.intersect({ data: Belt__Belt_internalSetInt.fromArray(xs$42) @@ -767,23 +767,23 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 294, characters 4-11", Belt ]) })); -var xs$44 = Array_data_util.randomRange(0, 39); +let xs$44 = Array_data_util.randomRange(0, 39); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 300, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff(aa$3, bb$3), { data: Belt__Belt_internalSetInt.fromArray(xs$44) })); -var xs$45 = Array_data_util.randomRange(101, 120); +let xs$45 = Array_data_util.randomRange(101, 120); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 302, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff(bb$3, aa$3), { data: Belt__Belt_internalSetInt.fromArray(xs$45) })); -var xs$46 = Array_data_util.randomRange(21, 40); +let xs$46 = Array_data_util.randomRange(21, 40); -var xs$47 = Array_data_util.randomRange(0, 20); +let xs$47 = Array_data_util.randomRange(0, 20); -var xs$48 = Array_data_util.randomRange(21, 40); +let xs$48 = Array_data_util.randomRange(21, 40); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 304, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$46) @@ -793,11 +793,11 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 304, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$48) })); -var xs$49 = Array_data_util.randomRange(0, 20); +let xs$49 = Array_data_util.randomRange(0, 20); -var xs$50 = Array_data_util.randomRange(21, 40); +let xs$50 = Array_data_util.randomRange(21, 40); -var xs$51 = Array_data_util.randomRange(0, 20); +let xs$51 = Array_data_util.randomRange(0, 20); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 310, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$49) @@ -807,11 +807,11 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 310, characters 4-11", Belt data: Belt__Belt_internalSetInt.fromArray(xs$51) })); -var xs$52 = Array_data_util.randomRange(0, 20); +let xs$52 = Array_data_util.randomRange(0, 20); -var xs$53 = Array_data_util.randomRange(0, 40); +let xs$53 = Array_data_util.randomRange(0, 40); -var xs$54 = Array_data_util.randomRange(0, -1); +let xs$54 = Array_data_util.randomRange(0, -1); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 317, characters 4-11", Belt__Belt_MutableSetInt.eq(Belt__Belt_MutableSetInt.diff({ data: Belt__Belt_internalSetInt.fromArray(xs$52) @@ -823,15 +823,15 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 317, characters 4-11", Belt Mt.from_pair_suites("Bs_mutable_set_test", suites.contents); -var empty = Belt__Belt_MutableSetInt.make; +let empty = Belt__Belt_MutableSetInt.make; -var fromArray = Belt__Belt_MutableSetInt.fromArray; +let fromArray = Belt__Belt_MutableSetInt.fromArray; -var $plus$plus = Belt__Belt_MutableSetInt.union; +let $plus$plus = Belt__Belt_MutableSetInt.union; -var f = Belt__Belt_MutableSetInt.fromArray; +let f = Belt__Belt_MutableSetInt.fromArray; -var $eq$tilde = Belt__Belt_MutableSetInt.eq; +let $eq$tilde = Belt__Belt_MutableSetInt.eq; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_node_string_buffer_test.js b/jscomp/test/dist/jscomp/test/bs_node_string_buffer_test.js index 03afecd4cd..8bebc7cb2d 100644 --- a/jscomp/test/dist/jscomp/test/bs_node_string_buffer_test.js +++ b/jscomp/test/dist/jscomp/test/bs_node_string_buffer_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var $$Node = require("melange.node/node.js"); +let $$Node = require("melange.node/node.js"); function f(str) { - var match = $$Node.test(str); + let match = $$Node.test(str); if (match[0]) { console.log([ "buffer", diff --git a/jscomp/test/dist/jscomp/test/bs_poly_map_test.js b/jscomp/test/dist/jscomp/test/bs_poly_map_test.js index f606111f8d..8efe0b9018 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_map_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_map_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_Map = require("melange.belt/belt_Map.js"); -var Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); -var Belt__Belt_Set = require("melange.belt/belt_Set.js"); -var Caml = require("melange.js/caml.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_Map = require("melange.belt/belt_Map.js"); +let Belt__Belt_MapDict = require("melange.belt/belt_MapDict.js"); +let Belt__Belt_Set = require("melange.belt/belt_Set.js"); +let Caml = require("melange.js/caml.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -27,7 +27,7 @@ function b(loc, v) { Mt.bool_suites(test_id, suites, loc, v); } -var Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); function mapOfArray(x) { return Belt__Belt_Map.fromArray(x, Icmp); @@ -45,7 +45,7 @@ function emptyMap(param) { } function mergeInter(s1, s2) { - var m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { + let m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 !== undefined) { return Caml_option.some(undefined); } @@ -55,7 +55,7 @@ function mergeInter(s1, s2) { } function mergeUnion(s1, s2) { - var m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { + let m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined || v2 !== undefined) { return Caml_option.some(undefined); } @@ -65,7 +65,7 @@ function mergeUnion(s1, s2) { } function mergeDiff(s1, s2) { - var m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { + let m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { if (v1 !== undefined && v2 === undefined) { return Caml_option.some(undefined); } @@ -83,9 +83,9 @@ function randomRange(i, j) { })); } -var u0 = Belt__Belt_Map.fromArray(randomRange(0, 100), Icmp); +let u0 = Belt__Belt_Map.fromArray(randomRange(0, 100), Icmp); -var u1 = Belt__Belt_Map.fromArray(randomRange(30, 120), Icmp); +let u1 = Belt__Belt_Map.fromArray(randomRange(30, 120), Icmp); b("File \"jscomp/test/bs_poly_map_test.ml\", line 48, characters 4-11", Belt__Belt_Set.eq(mergeInter(u0, u1), Belt__Belt_Set.fromArray(Array_data_util.range(30, 100), Icmp))); @@ -95,13 +95,13 @@ b("File \"jscomp/test/bs_poly_map_test.ml\", line 50, characters 4-11", Belt__Be b("File \"jscomp/test/bs_poly_map_test.ml\", line 51, characters 4-11", Belt__Belt_Set.eq(mergeDiff(u1, u0), Belt__Belt_Set.fromArray(Array_data_util.range(101, 120), Icmp))); -var a0 = Belt__Belt_Map.fromArray(randomRange(0, 10), Icmp); +let a0 = Belt__Belt_Map.fromArray(randomRange(0, 10), Icmp); -var a1 = Belt__Belt_Map.set(a0, 3, 33); +let a1 = Belt__Belt_Map.set(a0, 3, 33); -var a2 = Belt__Belt_Map.remove(a1, 3); +let a2 = Belt__Belt_Map.remove(a1, 3); -var a3 = Belt__Belt_Map.update(a2, 3, (function (k) { +let a3 = Belt__Belt_Map.update(a2, 3, (function (k) { if (k !== undefined) { return k + 1 | 0; } else { @@ -109,16 +109,16 @@ var a3 = Belt__Belt_Map.update(a2, 3, (function (k) { } })); -var a4 = Belt__Belt_Map.update(a2, 3, (function (k) { +let a4 = Belt__Belt_Map.update(a2, 3, (function (k) { if (k !== undefined) { return k + 1 | 0; } })); -var a5 = Belt__Belt_Map.remove(a0, 3); +let a5 = Belt__Belt_Map.remove(a0, 3); -var a6 = Belt__Belt_Map.remove(a5, 3); +let a6 = Belt__Belt_Map.remove(a5, 3); b("File \"jscomp/test/bs_poly_map_test.ml\", line 70, characters 4-11", a5 === a6); @@ -136,7 +136,7 @@ b("File \"jscomp/test/bs_poly_map_test.ml\", line 77, characters 4-11", 11 === B b("File \"jscomp/test/bs_poly_map_test.ml\", line 78, characters 4-11", Belt__Belt_Map.getUndefined(a4, 3) === undefined); -var a7 = Belt__Belt_Map.removeMany(a0, [ +let a7 = Belt__Belt_Map.removeMany(a0, [ 7, 8, 0, @@ -155,13 +155,13 @@ eq("File \"jscomp/test/bs_poly_map_test.ml\", line 81, characters 5-12", Belt__B 10 ]); -var a8 = Belt__Belt_Map.removeMany(a7, Array_data_util.randomRange(0, 100)); +let a8 = Belt__Belt_Map.removeMany(a7, Array_data_util.randomRange(0, 100)); b("File \"jscomp/test/bs_poly_map_test.ml\", line 83, characters 4-11", Belt__Belt_MapDict.isEmpty(a8.data)); -var u0$1 = Belt__Belt_Map.fromArray(randomRange(0, 100), Icmp); +let u0$1 = Belt__Belt_Map.fromArray(randomRange(0, 100), Icmp); -var u1$1 = Belt__Belt_Map.set(u0$1, 3, 32); +let u1$1 = Belt__Belt_Map.set(u0$1, 3, 32); eq("File \"jscomp/test/bs_poly_map_test.ml\", line 90, characters 5-12", Belt__Belt_Map.get(u1$1, 3), 32); @@ -179,14 +179,14 @@ function acc(m, is) { })); } -var m_cmp = Icmp.cmp; +let m_cmp = Icmp.cmp; -var m = { +let m = { cmp: m_cmp, data: undefined }; -var m1 = acc(m, Belt__Belt_Array.concat(Array_data_util.randomRange(0, 20), Array_data_util.randomRange(10, 30))); +let m1 = acc(m, Belt__Belt_Array.concat(Array_data_util.randomRange(0, 20), Array_data_util.randomRange(10, 30))); b("File \"jscomp/test/bs_poly_map_test.ml\", line 103, characters 4-11", Belt__Belt_Map.eq(m1, Belt__Belt_Map.fromArray(Belt__Belt_Array.makeBy(31, (function (i) { return [ @@ -197,21 +197,21 @@ b("File \"jscomp/test/bs_poly_map_test.ml\", line 103, characters 4-11", Belt__B return x === y; }))); -var v0_cmp = Icmp.cmp; +let v0_cmp = Icmp.cmp; -var v0 = { +let v0 = { cmp: v0_cmp, data: undefined }; -var v1 = Belt__Belt_Map.mergeMany(v0, Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { +let v1 = Belt__Belt_Map.mergeMany(v0, Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { return [ x, x ]; }))); -var v2 = Belt__Belt_Map.fromArray(Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { +let v2 = Belt__Belt_Map.fromArray(Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { return [ x, x @@ -230,36 +230,36 @@ function inc(x) { } } -var v3 = Belt__Belt_Map.update(v1, 10, inc); +let v3 = Belt__Belt_Map.update(v1, 10, inc); -var v4 = Belt__Belt_Map.update(v3, -10, inc); +let v4 = Belt__Belt_Map.update(v3, -10, inc); -var match = Belt__Belt_Map.split(v3, 5000); +let match = Belt__Belt_Map.split(v3, 5000); -var pres = match[1]; +let pres = match[1]; -var match$1 = match[0]; +let match$1 = match[0]; -var match$2 = Belt__Belt_Map.get(v3, 10); +let match$2 = Belt__Belt_Map.get(v3, 10); b("File \"jscomp/test/bs_poly_map_test.ml\", line 126, characters 4-11", match$2 !== undefined ? match$2 === 11 : false); -var match$3 = Belt__Belt_Map.get(v3, -10); +let match$3 = Belt__Belt_Map.get(v3, -10); b("File \"jscomp/test/bs_poly_map_test.ml\", line 127, characters 4-11", match$3 === undefined); -var match$4 = Belt__Belt_Map.get(v4, -10); +let match$4 = Belt__Belt_Map.get(v4, -10); b("File \"jscomp/test/bs_poly_map_test.ml\", line 128, characters 4-11", match$4 !== undefined ? match$4 === 0 : false); -var map = Belt__Belt_Map.remove({ +let map = Belt__Belt_Map.remove({ cmp: Icmp.cmp, data: undefined }, 0); b("File \"jscomp/test/bs_poly_map_test.ml\", line 129, characters 4-11", Belt__Belt_MapDict.isEmpty(map.data)); -var map$1 = Belt__Belt_Map.removeMany({ +let map$1 = Belt__Belt_Map.removeMany({ cmp: Icmp.cmp, data: undefined }, [0]); @@ -280,11 +280,11 @@ b("File \"jscomp/test/bs_poly_map_test.ml\", line 133, characters 4-11", Belt__B return prim0 === prim1; }))); -var v7 = Belt__Belt_Map.remove(v3, 5000); +let v7 = Belt__Belt_Map.remove(v3, 5000); -var match$5 = Belt__Belt_Map.split(v7, 5000); +let match$5 = Belt__Belt_Map.split(v7, 5000); -var match$6 = match$5[0]; +let match$6 = match$5[0]; b("File \"jscomp/test/bs_poly_map_test.ml\", line 137, characters 4-11", match$5[1] === undefined); diff --git a/jscomp/test/dist/jscomp/test/bs_poly_mutable_map_test.js b/jscomp/test/dist/jscomp/test/bs_poly_mutable_map_test.js index 9e6203a1aa..c60833716c 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_mutable_map_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_mutable_map_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_MutableMap = require("melange.belt/belt_MutableMap.js"); -var Belt__Belt_Set = require("melange.belt/belt_Set.js"); -var Belt__Belt_internalAVLtree = require("melange.belt/belt_internalAVLtree.js"); -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_MutableMap = require("melange.belt/belt_MutableMap.js"); +let Belt__Belt_Set = require("melange.belt/belt_Set.js"); +let Belt__Belt_internalAVLtree = require("melange.belt/belt_internalAVLtree.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -26,7 +26,7 @@ function b(loc, v) { Mt.bool_suites(test_id, suites, loc, v); } -var Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let Icmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); function f(x) { return Belt__Belt_MutableMap.fromArray(x, Icmp); @@ -45,7 +45,7 @@ function randomRange(i, j) { })); } -var a0 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10), Icmp); +let a0 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10), Icmp); Belt__Belt_MutableMap.set(a0, 3, 33); @@ -74,7 +74,7 @@ Belt__Belt_MutableMap.removeMany(a0, Array_data_util.randomRange(0, 100)); b("File \"jscomp/test/bs_poly_mutable_map_test.ml\", line 33, characters 4-11", Belt__Belt_MutableMap.isEmpty(a0)); -var a0$1 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10000), Icmp); +let a0$1 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10000), Icmp); Belt__Belt_MutableMap.set(a0$1, 2000, 33); diff --git a/jscomp/test/dist/jscomp/test/bs_poly_mutable_set_test.js b/jscomp/test/dist/jscomp/test/bs_poly_mutable_set_test.js index ab3d8f8722..d1723db426 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_mutable_set_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_mutable_set_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Belt__Belt_MutableSet = require("melange.belt/belt_MutableSet.js"); -var Belt__Belt_internalAVLset = require("melange.belt/belt_internalAVLset.js"); -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Belt__Belt_MutableSet = require("melange.belt/belt_MutableSet.js"); +let Belt__Belt_internalAVLset = require("melange.belt/belt_internalAVLset.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -26,7 +26,7 @@ function b(loc, x) { Mt.bool_suites(test_id, suites, loc, x); } -var IntCmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let IntCmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); function fromArray(param) { return Belt__Belt_MutableSet.fromArray(param, IntCmp); @@ -39,7 +39,7 @@ function empty(param) { }; } -var u = fromArray(Array_data_util.range(0, 30)); +let u = fromArray(Array_data_util.range(0, 30)); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 18, characters 4-11", Belt__Belt_MutableSet.removeCheck(u, 0)); @@ -51,7 +51,7 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 21, characters 4-11", eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 22, characters 5-12", Belt__Belt_internalAVLset.size(u.data), 28); -var r = Array_data_util.randomRange(0, 30); +let r = Array_data_util.randomRange(0, 30); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 24, characters 4-11", 29 === Belt__Belt_internalAVLset.maxUndefined(u.data)); @@ -59,7 +59,7 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 25, characters 4-11", Belt__Belt_MutableSet.add(u, 3); -for(var i = 0 ,i_finish = r.length; i < i_finish; ++i){ +for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){ Belt__Belt_MutableSet.remove(u, r[i]); } @@ -77,7 +77,7 @@ eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 35, characters 5-12", b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 36, characters 4-11", !Belt__Belt_MutableSet.isEmpty(u)); -for(var i$1 = 0; i$1 <= 3; ++i$1){ +for(let i$1 = 0; i$1 <= 3; ++i$1){ Belt__Belt_MutableSet.remove(u, i$1); } @@ -115,13 +115,13 @@ Belt__Belt_MutableSet.removeMany(u, Array_data_util.randomRange(10000, 30000)); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 56, characters 4-11", Belt__Belt_MutableSet.isEmpty(u)); -var v = fromArray(Array_data_util.randomRange(1000, 2000)); +let v = fromArray(Array_data_util.randomRange(1000, 2000)); -var bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { +let bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { return Belt__Belt_MutableSet.removeCheck(v, x); })); -var indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { +let indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { if (x) { return acc + 1 | 0; } else { @@ -133,11 +133,11 @@ eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 63, characters 5-12", eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 64, characters 5-12", Belt__Belt_internalAVLset.size(v.data), 501); -var cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { +let cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { return Belt__Belt_MutableSet.addCheck(v, x); })); -var indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { +let indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { if (x) { return acc + 1 | 0; } else { @@ -180,13 +180,13 @@ eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 78, characters 5-12", eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 79, characters 5-12", Belt__Belt_MutableSet.get(v, 1200), 1200); -var match = Belt__Belt_MutableSet.split(v, 1000); +let match = Belt__Belt_MutableSet.split(v, 1000); -var match$1 = match[0]; +let match$1 = match[0]; -var bb = match$1[1]; +let bb = match$1[1]; -var aa = match$1[0]; +let aa = match$1[0]; b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 81, characters 4-11", match[1]); @@ -204,17 +204,17 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 85, characters 4-11", b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 86, characters 4-11", Belt__Belt_MutableSet.isEmpty(Belt__Belt_MutableSet.intersect(aa, bb))); -var c = Belt__Belt_MutableSet.removeCheck(v, 1000); +let c = Belt__Belt_MutableSet.removeCheck(v, 1000); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 88, characters 4-11", c); -var match$2 = Belt__Belt_MutableSet.split(v, 1000); +let match$2 = Belt__Belt_MutableSet.split(v, 1000); -var match$3 = match$2[0]; +let match$3 = match$2[0]; -var bb$1 = match$3[1]; +let bb$1 = match$3[1]; -var aa$1 = match$3[0]; +let aa$1 = match$3[0]; b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 90, characters 4-11", !match$2[1]); @@ -232,17 +232,17 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 94, characters 4-11", b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 95, characters 4-11", Belt__Belt_MutableSet.isEmpty(Belt__Belt_MutableSet.intersect(aa$1, bb$1))); -var aa$2 = fromArray(Array_data_util.randomRange(0, 100)); +let aa$2 = fromArray(Array_data_util.randomRange(0, 100)); -var bb$2 = fromArray(Array_data_util.randomRange(40, 120)); +let bb$2 = fromArray(Array_data_util.randomRange(40, 120)); -var cc = Belt__Belt_MutableSet.union(aa$2, bb$2); +let cc = Belt__Belt_MutableSet.union(aa$2, bb$2); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 104, characters 4-11", Belt__Belt_MutableSet.eq(cc, fromArray(Array_data_util.randomRange(0, 120)))); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 106, characters 4-11", Belt__Belt_MutableSet.eq(Belt__Belt_MutableSet.union(fromArray(Array_data_util.randomRange(0, 20)), fromArray(Array_data_util.randomRange(21, 40))), fromArray(Array_data_util.randomRange(0, 40)))); -var dd = Belt__Belt_MutableSet.intersect(aa$2, bb$2); +let dd = Belt__Belt_MutableSet.intersect(aa$2, bb$2); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 111, characters 4-11", Belt__Belt_MutableSet.eq(dd, fromArray(Array_data_util.randomRange(40, 100)))); @@ -285,23 +285,23 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 140, characters 4-11", b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 147, characters 4-11", Belt__Belt_MutableSet.eq(Belt__Belt_MutableSet.diff(fromArray(Array_data_util.randomRange(0, 20)), fromArray(Array_data_util.randomRange(0, 40))), fromArray(Array_data_util.randomRange(0, -1)))); -var a0 = fromArray(Array_data_util.randomRange(0, 1000)); +let a0 = fromArray(Array_data_util.randomRange(0, 1000)); -var a1 = Belt__Belt_MutableSet.keep(a0, (function (x) { +let a1 = Belt__Belt_MutableSet.keep(a0, (function (x) { return x % 2 === 0; })); -var a2 = Belt__Belt_MutableSet.keep(a0, (function (x) { +let a2 = Belt__Belt_MutableSet.keep(a0, (function (x) { return x % 2 !== 0; })); -var match$4 = Belt__Belt_MutableSet.partition(a0, (function (x) { +let match$4 = Belt__Belt_MutableSet.partition(a0, (function (x) { return x % 2 === 0; })); -var a4 = match$4[1]; +let a4 = match$4[1]; -var a3 = match$4[0]; +let a3 = match$4[0]; b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 162, characters 4-11", Belt__Belt_MutableSet.eq(a1, a3)); @@ -328,11 +328,11 @@ Belt__Belt_List.forEach({ Mt.from_pair_suites("Bs_poly_mutable_set_test", suites.contents); -var $plus$plus = Belt__Belt_MutableSet.union; +let $plus$plus = Belt__Belt_MutableSet.union; -var f = fromArray; +let f = fromArray; -var $eq$tilde = Belt__Belt_MutableSet.eq; +let $eq$tilde = Belt__Belt_MutableSet.eq; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_poly_set_test.js b/jscomp/test/dist/jscomp/test/bs_poly_set_test.js index 2239b7596a..f45378d3b8 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_set_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_set_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Id = require("melange.belt/belt_Id.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Belt__Belt_Set = require("melange.belt/belt_Set.js"); -var Belt__Belt_SetDict = require("melange.belt/belt_SetDict.js"); -var Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); -var Caml = require("melange.js/caml.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Id = require("melange.belt/belt_Id.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Belt__Belt_Set = require("melange.belt/belt_Set.js"); +let Belt__Belt_SetDict = require("melange.belt/belt_SetDict.js"); +let Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); +let Caml = require("melange.js/caml.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -32,53 +32,53 @@ function t(loc, x) { Mt.throw_suites(test_id, suites, loc, x); } -var IntCmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); +let IntCmp = Belt__Belt_Id.comparable(Caml.caml_int_compare); -var u0 = Belt__Belt_Set.fromArray(Array_data_util.range(0, 30), IntCmp); +let u0 = Belt__Belt_Set.fromArray(Array_data_util.range(0, 30), IntCmp); -var u1 = Belt__Belt_Set.remove(u0, 0); +let u1 = Belt__Belt_Set.remove(u0, 0); -var u2 = Belt__Belt_Set.remove(u1, 0); +let u2 = Belt__Belt_Set.remove(u1, 0); -var u3 = Belt__Belt_Set.remove(u2, 30); +let u3 = Belt__Belt_Set.remove(u2, 30); -var u4 = Belt__Belt_Set.remove(u3, 20); +let u4 = Belt__Belt_Set.remove(u3, 20); -var r = Array_data_util.randomRange(0, 30); +let r = Array_data_util.randomRange(0, 30); -var u5 = Belt__Belt_Set.add(u4, 3); +let u5 = Belt__Belt_Set.add(u4, 3); -var u6 = Belt__Belt_Set.removeMany(u5, r); +let u6 = Belt__Belt_Set.removeMany(u5, r); -var u7 = Belt__Belt_Set.mergeMany(u6, [ +let u7 = Belt__Belt_Set.mergeMany(u6, [ 0, 1, 2, 0 ]); -var u8 = Belt__Belt_Set.removeMany(u7, [ +let u8 = Belt__Belt_Set.removeMany(u7, [ 0, 1, 2, 3 ]); -var u9 = Belt__Belt_Set.mergeMany(u8, Array_data_util.randomRange(0, 20000)); +let u9 = Belt__Belt_Set.mergeMany(u8, Array_data_util.randomRange(0, 20000)); -var u10 = Belt__Belt_Set.mergeMany(u9, Array_data_util.randomRange(0, 200)); +let u10 = Belt__Belt_Set.mergeMany(u9, Array_data_util.randomRange(0, 200)); -var u11 = Belt__Belt_Set.removeMany(u10, Array_data_util.randomRange(0, 200)); +let u11 = Belt__Belt_Set.removeMany(u10, Array_data_util.randomRange(0, 200)); -var u12 = Belt__Belt_Set.removeMany(u11, Array_data_util.randomRange(0, 1000)); +let u12 = Belt__Belt_Set.removeMany(u11, Array_data_util.randomRange(0, 1000)); -var u13 = Belt__Belt_Set.removeMany(u12, Array_data_util.randomRange(0, 1000)); +let u13 = Belt__Belt_Set.removeMany(u12, Array_data_util.randomRange(0, 1000)); -var u14 = Belt__Belt_Set.removeMany(u13, Array_data_util.randomRange(1000, 10000)); +let u14 = Belt__Belt_Set.removeMany(u13, Array_data_util.randomRange(1000, 10000)); -var u15 = Belt__Belt_Set.removeMany(u14, Array_data_util.randomRange(10000, 19999)); +let u15 = Belt__Belt_Set.removeMany(u14, Array_data_util.randomRange(10000, 19999)); -var u16 = Belt__Belt_Set.removeMany(u15, Array_data_util.randomRange(20000, 21000)); +let u16 = Belt__Belt_Set.removeMany(u15, Array_data_util.randomRange(20000, 21000)); b("File \"jscomp/test/bs_poly_set_test.ml\", line 35, characters 4-11", u0 !== u1); @@ -122,38 +122,38 @@ b("File \"jscomp/test/bs_poly_set_test.ml\", line 57, characters 4-11", !Belt__B b("File \"jscomp/test/bs_poly_set_test.ml\", line 58, characters 4-11", Belt__Belt_SetDict.isEmpty(u16.data)); -var u17 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 100), IntCmp); +let u17 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 100), IntCmp); -var u18 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(59, 200), IntCmp); +let u18 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(59, 200), IntCmp); -var u19 = Belt__Belt_Set.union(u17, u18); +let u19 = Belt__Belt_Set.union(u17, u18); -var u20 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 200), IntCmp); +let u20 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 200), IntCmp); -var u21 = Belt__Belt_Set.intersect(u17, u18); +let u21 = Belt__Belt_Set.intersect(u17, u18); -var u22 = Belt__Belt_Set.diff(u17, u18); +let u22 = Belt__Belt_Set.diff(u17, u18); -var u23 = Belt__Belt_Set.diff(u18, u17); +let u23 = Belt__Belt_Set.diff(u18, u17); -var u24 = Belt__Belt_Set.union(u18, u17); +let u24 = Belt__Belt_Set.union(u18, u17); -var u25 = Belt__Belt_Set.add(u22, 59); +let u25 = Belt__Belt_Set.add(u22, 59); -var u26 = Belt__Belt_Set.add({ +let u26 = Belt__Belt_Set.add({ cmp: IntCmp.cmp, data: undefined }, 3); -var ss = Belt__Belt_Array.makeByAndShuffle(100, (function (i) { +let ss = Belt__Belt_Array.makeByAndShuffle(100, (function (i) { return (i << 1); })); -var u27 = Belt__Belt_Set.fromArray(ss, IntCmp); +let u27 = Belt__Belt_Set.fromArray(ss, IntCmp); -var u28 = Belt__Belt_Set.union(u27, u26); +let u28 = Belt__Belt_Set.union(u27, u26); -var u29 = Belt__Belt_Set.union(u26, u27); +let u29 = Belt__Belt_Set.union(u26, u27); b("File \"jscomp/test/bs_poly_set_test.ml\", line 72, characters 4-11", Belt__Belt_Set.eq(u28, u29)); @@ -196,7 +196,7 @@ b("File \"jscomp/test/bs_poly_set_test.ml\", line 91, characters 4-11", Belt__Be b("File \"jscomp/test/bs_poly_set_test.ml\", line 92, characters 4-11", Belt__Belt_SetDict.maxUndefined(undefined) === undefined); function testIterToList(xs) { - var v = { + let v = { contents: /* [] */0 }; Belt__Belt_Set.forEach(xs, (function (x) { @@ -209,7 +209,7 @@ function testIterToList(xs) { } function testIterToList2(xs) { - var v = { + let v = { contents: /* [] */0 }; Belt__Belt_SetDict.forEach(xs.data, (function (x) { @@ -221,11 +221,11 @@ function testIterToList2(xs) { return Belt__Belt_List.reverse(v.contents); } -var u0$1 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 20), IntCmp); +let u0$1 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 20), IntCmp); -var u1$1 = Belt__Belt_Set.remove(u0$1, 17); +let u1$1 = Belt__Belt_Set.remove(u0$1, 17); -var u2$1 = Belt__Belt_Set.add(u1$1, 33); +let u2$1 = Belt__Belt_Set.add(u1$1, 33); b("File \"jscomp/test/bs_poly_set_test.ml\", line 109, characters 4-11", Belt__Belt_List.every2(testIterToList(u0$1), Belt__Belt_List.makeBy(21, (function (i) { return i; @@ -275,23 +275,23 @@ b("File \"jscomp/test/bs_poly_set_test.ml\", line 118, characters 4-11", Belt__B b("File \"jscomp/test/bs_poly_set_test.ml\", line 119, characters 4-11", Belt__Belt_Set.cmp(u0$1, u1$1) > 0); -var a0 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); +let a0 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); -var a1 = Belt__Belt_Set.keep(a0, (function (x) { +let a1 = Belt__Belt_Set.keep(a0, (function (x) { return x % 2 === 0; })); -var a2 = Belt__Belt_Set.keep(a0, (function (x) { +let a2 = Belt__Belt_Set.keep(a0, (function (x) { return x % 2 !== 0; })); -var match = Belt__Belt_Set.partition(a0, (function (x) { +let match = Belt__Belt_Set.partition(a0, (function (x) { return x % 2 === 0; })); -var a4 = match[1]; +let a4 = match[1]; -var a3 = match[0]; +let a3 = match[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 129, characters 4-11", Belt__Belt_Set.eq(a1, a3)); @@ -313,9 +313,9 @@ eq("File \"jscomp/test/bs_poly_set_test.ml\", line 135, characters 5-12", Belt__ b("File \"jscomp/test/bs_poly_set_test.ml\", line 136, characters 4-11", !Belt__Belt_SetDict.isEmpty(a0.data)); -var match$1 = Belt__Belt_Set.split(a0, 200); +let match$1 = Belt__Belt_Set.split(a0, 200); -var match$2 = match$1[0]; +let match$2 = match$1[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 138, characters 4-11", match$1[1]); @@ -327,15 +327,15 @@ eq("File \"jscomp/test/bs_poly_set_test.ml\", line 140, characters 5-12", Belt__ return i + 201 | 0; }))); -var a7 = Belt__Belt_Set.remove(a0, 200); +let a7 = Belt__Belt_Set.remove(a0, 200); -var match$3 = Belt__Belt_Set.split(a7, 200); +let match$3 = Belt__Belt_Set.split(a7, 200); -var match$4 = match$3[0]; +let match$4 = match$3[0]; -var a9 = match$4[1]; +let a9 = match$4[1]; -var a8 = match$4[0]; +let a8 = match$4[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 143, characters 4-11", !match$3[1]); @@ -370,20 +370,20 @@ Belt__Belt_List.forEach({ Belt__Belt_SetDict.checkInvariantInternal(x.data); })); -var a = Belt__Belt_Set.fromArray([], IntCmp); +let a = Belt__Belt_Set.fromArray([], IntCmp); -var m = Belt__Belt_Set.keep(a, (function (x) { +let m = Belt__Belt_Set.keep(a, (function (x) { return x % 2 === 0; })); b("File \"jscomp/test/bs_poly_set_test.ml\", line 153, characters 4-11", Belt__Belt_SetDict.isEmpty(m.data)); -var match$5 = Belt__Belt_Set.split({ +let match$5 = Belt__Belt_Set.split({ cmp: IntCmp.cmp, data: undefined }, 0); -var match$6 = match$5[0]; +let match$6 = match$5[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 157, characters 4-11", Belt__Belt_SetDict.isEmpty(match$6[0].data)); diff --git a/jscomp/test/dist/jscomp/test/bs_qualified.js b/jscomp/test/dist/jscomp/test/bs_qualified.js index 16695b4b61..3c1080ace1 100644 --- a/jscomp/test/dist/jscomp/test/bs_qualified.js +++ b/jscomp/test/dist/jscomp/test/bs_qualified.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var ZZ = require("X"); -var GlMatrix = require("gl-matrix"); -var Vscode = require("vscode"); -var Z = require("z"); +let ZZ = require("X"); +let GlMatrix = require("gl-matrix"); +let Vscode = require("vscode"); +let Z = require("z"); function f(a, b, c) { Vscode.commands.executeCommands("hi", a, b, c); diff --git a/jscomp/test/dist/jscomp/test/bs_queue_test.js b/jscomp/test/dist/jscomp/test/bs_queue_test.js index f04004b1e2..651473bc8f 100644 --- a/jscomp/test/dist/jscomp/test/bs_queue_test.js +++ b/jscomp/test/dist/jscomp/test/bs_queue_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_MutableQueue = require("melange.belt/belt_MutableQueue.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); - -var suites = { +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_MutableQueue = require("melange.belt/belt_MutableQueue.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -39,7 +39,7 @@ function $plus$plus(q, x) { return q; } -var q = { +let q = { length: 0, first: undefined, last: undefined @@ -218,7 +218,7 @@ if (!does_raise(Belt__Belt_MutableQueue.popExn, q)) { }); } -var q$1 = { +let q$1 = { length: 0, first: undefined, last: undefined @@ -279,7 +279,7 @@ if (q$1.length !== 0) { }); } -var q$2 = { +let q$2 = { length: 0, first: undefined, last: undefined @@ -406,13 +406,13 @@ if (!does_raise(Belt__Belt_MutableQueue.peekExn, q$2)) { }); } -var q$3 = { +let q$3 = { length: 0, first: undefined, last: undefined }; -for(var i = 1; i <= 10; ++i){ +for(let i = 1; i <= 10; ++i){ Belt__Belt_MutableQueue.add(q$3, i); } @@ -468,17 +468,17 @@ if (Belt__Belt_MutableQueue.popExn(q$3) !== 42) { }); } -var q1 = { +let q1 = { length: 0, first: undefined, last: undefined }; -for(var i$1 = 1; i$1 <= 10; ++i$1){ +for(let i$1 = 1; i$1 <= 10; ++i$1){ Belt__Belt_MutableQueue.add(q1, i$1); } -var q2 = Belt__Belt_MutableQueue.copy(q1); +let q2 = Belt__Belt_MutableQueue.copy(q1); if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q1), [ 1, @@ -546,7 +546,7 @@ if (q2.length !== 10) { }); } -for(var i$2 = 1; i$2 <= 10; ++i$2){ +for(let i$2 = 1; i$2 <= 10; ++i$2){ if (Belt__Belt_MutableQueue.popExn(q1) !== i$2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -560,7 +560,7 @@ for(var i$2 = 1; i$2 <= 10; ++i$2){ } -for(var i$3 = 1; i$3 <= 10; ++i$3){ +for(let i$3 = 1; i$3 <= 10; ++i$3){ if (Belt__Belt_MutableQueue.popExn(q2) !== i$3) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -574,7 +574,7 @@ for(var i$3 = 1; i$3 <= 10; ++i$3){ } -var q$4 = { +let q$4 = { length: 0, first: undefined, last: undefined @@ -591,7 +591,7 @@ if (q$4.length !== 0) { }); } -for(var i$4 = 1; i$4 <= 10; ++i$4){ +for(let i$4 = 1; i$4 <= 10; ++i$4){ Belt__Belt_MutableQueue.add(q$4, i$4); if (q$4.length !== i$4) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -616,7 +616,7 @@ for(var i$4 = 1; i$4 <= 10; ++i$4){ } -for(var 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 Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -662,17 +662,17 @@ if (q$4.length !== 0) { }); } -var q$5 = { +let q$5 = { length: 0, first: undefined, last: undefined }; -for(var i$6 = 1; i$6 <= 10; ++i$6){ +for(let i$6 = 1; i$6 <= 10; ++i$6){ Belt__Belt_MutableQueue.add(q$5, i$6); } -var i$7 = { +let i$7 = { contents: 1 }; @@ -690,13 +690,13 @@ Belt__Belt_MutableQueue.forEach(q$5, (function (j) { i$7.contents = i$7.contents + 1 | 0; })); -var q1$1 = { +let q1$1 = { length: 0, first: undefined, last: undefined }; -var q2$1 = { +let q2$1 = { length: 0, first: undefined, last: undefined @@ -792,19 +792,19 @@ if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q2$1), [])) { }); } -var q1$2 = { +let q1$2 = { length: 0, first: undefined, last: undefined }; -var q2$2 = { +let q2$2 = { length: 0, first: undefined, last: undefined }; -for(var i$8 = 1; i$8 <= 4; ++i$8){ +for(let i$8 = 1; i$8 <= 4; ++i$8){ Belt__Belt_MutableQueue.add(q1$2, i$8); } @@ -908,19 +908,19 @@ if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q2$2), [ }); } -var q1$3 = { +let q1$3 = { length: 0, first: undefined, last: undefined }; -var q2$3 = { +let q2$3 = { length: 0, first: undefined, last: undefined }; -for(var i$9 = 5; i$9 <= 8; ++i$9){ +for(let i$9 = 5; i$9 <= 8; ++i$9){ Belt__Belt_MutableQueue.add(q2$3, i$9); } @@ -1024,23 +1024,23 @@ if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q2$3), [ }); } -var q1$4 = { +let q1$4 = { length: 0, first: undefined, last: undefined }; -var q2$4 = { +let q2$4 = { length: 0, first: undefined, last: undefined }; -for(var i$10 = 1; i$10 <= 4; ++i$10){ +for(let i$10 = 1; i$10 <= 4; ++i$10){ Belt__Belt_MutableQueue.add(q1$4, i$10); } -for(var i$11 = 5; i$11 <= 8; ++i$11){ +for(let i$11 = 5; i$11 <= 8; ++i$11){ Belt__Belt_MutableQueue.add(q2$4, i$11); } @@ -1122,7 +1122,7 @@ if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q1$4), [])) { }); } -var v = [ +let v = [ 5, 6, 7, @@ -1172,14 +1172,14 @@ if (Belt__Belt_MutableQueue.reduce(q2$4, 0, (function (x, y) { console.log("OK"); -var q$6 = Belt__Belt_MutableQueue.fromArray([ +let q$6 = Belt__Belt_MutableQueue.fromArray([ 1, 2, 3, 4 ]); -var q1$5 = Belt__Belt_MutableQueue.map(q$6, (function (x) { +let q1$5 = Belt__Belt_MutableQueue.map(q$6, (function (x) { return x - 1 | 0; })); @@ -1190,11 +1190,11 @@ eq("File \"jscomp/test/bs_queue_test.ml\", line 154, characters 5-12", Belt__Bel 3 ]); -var q$7 = Belt__Belt_MutableQueue.fromArray([]); +let q$7 = Belt__Belt_MutableQueue.fromArray([]); b("File \"jscomp/test/bs_queue_test.ml\", line 155, characters 4-11", q$7.length === 0); -var q$8 = Belt__Belt_MutableQueue.map(Belt__Belt_MutableQueue.fromArray([]), (function (x) { +let q$8 = Belt__Belt_MutableQueue.map(Belt__Belt_MutableQueue.fromArray([]), (function (x) { return x + 1 | 0; })); diff --git a/jscomp/test/dist/jscomp/test/bs_rbset_int_bench.js b/jscomp/test/dist/jscomp/test/bs_rbset_int_bench.js index 4a5a9d2b40..ed5abe841e 100644 --- a/jscomp/test/dist/jscomp/test/bs_rbset_int_bench.js +++ b/jscomp/test/dist/jscomp/test/bs_rbset_int_bench.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Rbset = require("./rbset.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Rbset = require("./rbset.js"); function bench(param) { - var data = /* Empty */0; + let data = /* Empty */0; console.time("bs_rbset_int_bench.ml 7"); - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ data = Rbset.add(i, data); } console.timeEnd("bs_rbset_int_bench.ml 7"); console.time("bs_rbset_int_bench.ml 11"); - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Rbset.mem(i$1, data)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -27,7 +27,7 @@ function bench(param) { } console.timeEnd("bs_rbset_int_bench.ml 11"); console.time("bs_rbset_int_bench.ml 14"); - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ data = Rbset.remove(i$2, data); } console.timeEnd("bs_rbset_int_bench.ml 14"); @@ -50,7 +50,7 @@ bench(undefined); console.timeEnd("bs_rbset_int_bench.ml 21"); -var count = 1000000; +let count = 1000000; exports.count = count; exports.bench = bench; diff --git a/jscomp/test/dist/jscomp/test/bs_rest_test.js b/jscomp/test/dist/jscomp/test/bs_rest_test.js index e1c7bd8c31..452a703265 100644 --- a/jscomp/test/dist/jscomp/test/bs_rest_test.js +++ b/jscomp/test/dist/jscomp/test/bs_rest_test.js @@ -7,13 +7,13 @@ function x(v){return [v]} x("3"); -var v = x(3); +let v = x(3); -var xxx = x; +let xxx = x; -var u = xxx(3); +let u = xxx(3); -var xx = xxx("3"); +let xx = xxx("3"); exports.v = v; exports.xxx = xxx; diff --git a/jscomp/test/dist/jscomp/test/bs_set_bench.js b/jscomp/test/dist/jscomp/test/bs_set_bench.js index a029581344..a94ddd0385 100644 --- a/jscomp/test/dist/jscomp/test/bs_set_bench.js +++ b/jscomp/test/dist/jscomp/test/bs_set_bench.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function bench(param) { - var data; + let data; console.time("bs_set_bench.ml 7"); - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ data = Belt__Belt_SetInt.add(data, i); } console.timeEnd("bs_set_bench.ml 7"); console.time("bs_set_bench.ml 11"); - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Belt__Belt_SetInt.has(data, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -27,7 +27,7 @@ function bench(param) { } console.timeEnd("bs_set_bench.ml 11"); console.time("bs_set_bench.ml 14"); - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ data = Belt__Belt_SetInt.remove(data, i$2); } console.timeEnd("bs_set_bench.ml 14"); @@ -50,7 +50,7 @@ bench(undefined); console.timeEnd("bs_set_bench.ml 21"); -var count = 1000000; +let count = 1000000; exports.count = count; exports.bench = bench; diff --git a/jscomp/test/dist/jscomp/test/bs_set_int_test.js b/jscomp/test/dist/jscomp/test/bs_set_int_test.js index 17cbb9d3b6..a72609ef36 100644 --- a/jscomp/test/dist/jscomp/test/bs_set_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_set_int_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_SetInt = require("melange.belt/belt_SetInt.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -42,7 +42,7 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 17, characters 4-11", $eq$star( 1 ])); -var u = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray([ +let u = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray([ 1, 2, 3 @@ -66,21 +66,21 @@ function revRange(i, j) { }))))); } -var v = Belt__Belt_SetInt.fromArray(Stdlib__Array.append(range(100, 1000), revRange(400, 1500))); +let v = Belt__Belt_SetInt.fromArray(Stdlib__Array.append(range(100, 1000), revRange(400, 1500))); -var i = range(100, 1500); +let i = range(100, 1500); b("File \"jscomp/test/bs_set_int_test.ml\", line 36, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i), v)); -var match = Belt__Belt_SetInt.partition(v, (function (x) { +let match = Belt__Belt_SetInt.partition(v, (function (x) { return x % 3 === 0; })); -var l; +let l; -var r; +let r; -for(var 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__Belt_SetInt.add(l, i$1); } else { @@ -88,51 +88,51 @@ for(var i$1 = 100; i$1 <= 1500; ++i$1){ } } -var nl = l; +let nl = l; -var nr = r; +let nr = r; b("File \"jscomp/test/bs_set_int_test.ml\", line 47, characters 4-11", Belt__Belt_SetInt.eq(match[0], nl)); b("File \"jscomp/test/bs_set_int_test.ml\", line 48, characters 4-11", Belt__Belt_SetInt.eq(match[1], nr)); -var i$2 = range(50, 100); +let i$2 = range(50, 100); -var s = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); +let s = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 51, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$2), s)); -var i$3 = range(1, 200); +let i$3 = range(1, 200); -var s$1 = Belt__Belt_SetInt.union(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); +let s$1 = Belt__Belt_SetInt.union(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 54, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$3), s$1)); -var i$4 = range(1, 49); +let i$4 = range(1, 49); -var s$2 = Belt__Belt_SetInt.diff(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); +let s$2 = Belt__Belt_SetInt.diff(Belt__Belt_SetInt.fromArray(range(1, 100)), Belt__Belt_SetInt.fromArray(range(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 57, characters 6-13", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$4), s$2)); -var i$5 = revRange(50, 100); +let i$5 = revRange(50, 100); -var s$3 = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); +let s$3 = Belt__Belt_SetInt.intersect(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 60, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$5), s$3)); -var i$6 = revRange(1, 200); +let i$6 = revRange(1, 200); -var s$4 = Belt__Belt_SetInt.union(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); +let s$4 = Belt__Belt_SetInt.union(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 63, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$6), s$4)); -var i$7 = revRange(1, 49); +let i$7 = revRange(1, 49); -var s$5 = Belt__Belt_SetInt.diff(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); +let s$5 = Belt__Belt_SetInt.diff(Belt__Belt_SetInt.fromArray(revRange(1, 100)), Belt__Belt_SetInt.fromArray(revRange(50, 200))); b("File \"jscomp/test/bs_set_int_test.ml\", line 66, characters 6-13", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.fromArray(i$7), s$5)); -var ss = [ +let ss = [ 1, 222, 3, @@ -143,7 +143,7 @@ var ss = [ -1 ]; -var v$1 = Belt__Belt_SetInt.fromArray([ +let v$1 = Belt__Belt_SetInt.fromArray([ 1, 222, 3, @@ -154,9 +154,9 @@ var v$1 = Belt__Belt_SetInt.fromArray([ -1 ]); -var minv = Belt__Belt_SetInt.minUndefined(v$1); +let minv = Belt__Belt_SetInt.minUndefined(v$1); -var maxv = Belt__Belt_SetInt.maxUndefined(v$1); +let maxv = Belt__Belt_SetInt.maxUndefined(v$1); function approx(loc, x, y) { b(loc, x === y); @@ -172,73 +172,73 @@ approx("File \"jscomp/test/bs_set_int_test.ml\", line 75, characters 9-16", -1, approx("File \"jscomp/test/bs_set_int_test.ml\", line 76, characters 9-16", 222, maxv); -var v$2 = Belt__Belt_SetInt.remove(v$1, 3); +let v$2 = Belt__Belt_SetInt.remove(v$1, 3); -var minv$1 = Belt__Belt_SetInt.minimum(v$2); +let minv$1 = Belt__Belt_SetInt.minimum(v$2); -var maxv$1 = Belt__Belt_SetInt.maximum(v$2); +let maxv$1 = Belt__Belt_SetInt.maximum(v$2); eq("File \"jscomp/test/bs_set_int_test.ml\", line 79, characters 5-12", minv$1, -1); eq("File \"jscomp/test/bs_set_int_test.ml\", line 80, characters 5-12", maxv$1, 222); -var v$3 = Belt__Belt_SetInt.remove(v$2, 222); +let v$3 = Belt__Belt_SetInt.remove(v$2, 222); -var minv$2 = Belt__Belt_SetInt.minimum(v$3); +let minv$2 = Belt__Belt_SetInt.minimum(v$3); -var maxv$2 = Belt__Belt_SetInt.maximum(v$3); +let maxv$2 = Belt__Belt_SetInt.maximum(v$3); eq("File \"jscomp/test/bs_set_int_test.ml\", line 83, characters 5-12", minv$2, -1); eq("File \"jscomp/test/bs_set_int_test.ml\", line 84, characters 5-12", maxv$2, 33); -var v$4 = Belt__Belt_SetInt.remove(v$3, -1); +let v$4 = Belt__Belt_SetInt.remove(v$3, -1); -var minv$3 = Belt__Belt_SetInt.minimum(v$4); +let minv$3 = Belt__Belt_SetInt.minimum(v$4); -var maxv$3 = Belt__Belt_SetInt.maximum(v$4); +let maxv$3 = Belt__Belt_SetInt.maximum(v$4); eq("File \"jscomp/test/bs_set_int_test.ml\", line 87, characters 5-12", minv$3, 0); eq("File \"jscomp/test/bs_set_int_test.ml\", line 88, characters 5-12", maxv$3, 33); -var v$5 = Belt__Belt_SetInt.remove(v$4, 0); +let v$5 = Belt__Belt_SetInt.remove(v$4, 0); -var v$6 = Belt__Belt_SetInt.remove(v$5, 33); +let v$6 = Belt__Belt_SetInt.remove(v$5, 33); -var v$7 = Belt__Belt_SetInt.remove(v$6, 2); +let v$7 = Belt__Belt_SetInt.remove(v$6, 2); -var v$8 = Belt__Belt_SetInt.remove(v$7, 3); +let v$8 = Belt__Belt_SetInt.remove(v$7, 3); -var v$9 = Belt__Belt_SetInt.remove(v$8, 4); +let v$9 = Belt__Belt_SetInt.remove(v$8, 4); -var v$10 = Belt__Belt_SetInt.remove(v$9, 1); +let v$10 = Belt__Belt_SetInt.remove(v$9, 1); b("File \"jscomp/test/bs_set_int_test.ml\", line 95, characters 4-11", Belt__Belt_SetInt.isEmpty(v$10)); -var v$11 = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { +let v$11 = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { return i; })); -var u$1 = Belt__Belt_SetInt.fromArray(v$11); +let u$1 = Belt__Belt_SetInt.fromArray(v$11); Belt__Belt_SetInt.checkInvariantInternal(u$1); -var firstHalf = Belt__Belt_Array.slice(v$11, 0, 2000); +let firstHalf = Belt__Belt_Array.slice(v$11, 0, 2000); -var xx = Belt__Belt_Array.reduce(firstHalf, u$1, Belt__Belt_SetInt.remove); +let xx = Belt__Belt_Array.reduce(firstHalf, u$1, Belt__Belt_SetInt.remove); Belt__Belt_SetInt.checkInvariantInternal(u$1); b("File \"jscomp/test/bs_set_int_test.ml\", line 106, characters 4-11", Belt__Belt_SetInt.eq(Belt__Belt_SetInt.union(Belt__Belt_SetInt.fromArray(firstHalf), xx), u$1)); -var aa = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); +let aa = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); -var bb = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 200)); +let bb = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 200)); -var cc = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(120, 200)); +let cc = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(120, 200)); -var dd = Belt__Belt_SetInt.union(aa, cc); +let dd = Belt__Belt_SetInt.union(aa, cc); b("File \"jscomp/test/bs_set_int_test.ml\", line 113, characters 4-11", Belt__Belt_SetInt.subset(aa, bb)); @@ -252,15 +252,15 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 117, characters 4-11", Belt__Be b("File \"jscomp/test/bs_set_int_test.ml\", line 118, characters 4-11", !Belt__Belt_SetInt.subset(Belt__Belt_SetInt.add(dd, 201), bb)); -var aa$1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); +let aa$1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); -var bb$1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); +let bb$1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)); -var cc$1 = Belt__Belt_SetInt.add(bb$1, 101); +let cc$1 = Belt__Belt_SetInt.add(bb$1, 101); -var dd$1 = Belt__Belt_SetInt.remove(bb$1, 99); +let dd$1 = Belt__Belt_SetInt.remove(bb$1, 99); -var ee = Belt__Belt_SetInt.add(dd$1, 101); +let ee = Belt__Belt_SetInt.add(dd$1, 101); b("File \"jscomp/test/bs_set_int_test.ml\", line 127, characters 4-11", Belt__Belt_SetInt.eq(aa$1, bb$1)); @@ -270,19 +270,19 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 129, characters 4-11", !Belt__B b("File \"jscomp/test/bs_set_int_test.ml\", line 130, characters 4-11", !Belt__Belt_SetInt.eq(bb$1, ee)); -var a1 = Belt__Belt_SetInt.mergeMany(undefined, Array_data_util.randomRange(0, 100)); +let a1 = Belt__Belt_SetInt.mergeMany(undefined, Array_data_util.randomRange(0, 100)); -var a2 = Belt__Belt_SetInt.removeMany(a1, Array_data_util.randomRange(40, 100)); +let a2 = Belt__Belt_SetInt.removeMany(a1, Array_data_util.randomRange(40, 100)); -var a3 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 39)); +let a3 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 39)); -var match$1 = Belt__Belt_SetInt.split(a1, 40); +let match$1 = Belt__Belt_SetInt.split(a1, 40); -var match$2 = match$1[0]; +let match$2 = match$1[0]; -var a5 = match$2[1]; +let a5 = match$2[1]; -var a4 = match$2[0]; +let a4 = match$2[0]; b("File \"jscomp/test/bs_set_int_test.ml\", line 138, characters 4-11", Belt__Belt_SetInt.eq(a1, Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 100)))); @@ -292,17 +292,17 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 140, characters 4-11", match$1[ b("File \"jscomp/test/bs_set_int_test.ml\", line 141, characters 4-11", Belt__Belt_SetInt.eq(a3, a4)); -var a6 = Belt__Belt_SetInt.remove(Belt__Belt_SetInt.removeMany(a1, Array_data_util.randomRange(0, 39)), 40); +let a6 = Belt__Belt_SetInt.remove(Belt__Belt_SetInt.removeMany(a1, Array_data_util.randomRange(0, 39)), 40); b("File \"jscomp/test/bs_set_int_test.ml\", line 143, characters 4-11", Belt__Belt_SetInt.eq(a5, a6)); -var a7 = Belt__Belt_SetInt.remove(a1, 40); +let a7 = Belt__Belt_SetInt.remove(a1, 40); -var match$3 = Belt__Belt_SetInt.split(a7, 40); +let match$3 = Belt__Belt_SetInt.split(a7, 40); -var match$4 = match$3[0]; +let match$4 = match$3[0]; -var a9 = match$4[1]; +let a9 = match$4[1]; b("File \"jscomp/test/bs_set_int_test.ml\", line 146, characters 4-11", !match$3[1]); @@ -310,17 +310,17 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 147, characters 4-11", Belt__Be b("File \"jscomp/test/bs_set_int_test.ml\", line 148, characters 4-11", Belt__Belt_SetInt.eq(a5, a9)); -var a10 = Belt__Belt_SetInt.removeMany(a9, Array_data_util.randomRange(42, 2000)); +let a10 = Belt__Belt_SetInt.removeMany(a9, Array_data_util.randomRange(42, 2000)); eq("File \"jscomp/test/bs_set_int_test.ml\", line 150, characters 5-12", Belt__Belt_SetInt.size(a10), 1); -var a11 = Belt__Belt_SetInt.removeMany(a9, Array_data_util.randomRange(0, 2000)); +let a11 = Belt__Belt_SetInt.removeMany(a9, Array_data_util.randomRange(0, 2000)); b("File \"jscomp/test/bs_set_int_test.ml\", line 152, characters 4-11", Belt__Belt_SetInt.isEmpty(a11)); -var match$5 = Belt__Belt_SetInt.split(undefined, 0); +let match$5 = Belt__Belt_SetInt.split(undefined, 0); -var match$6 = match$5[0]; +let match$6 = match$5[0]; b("File \"jscomp/test/bs_set_int_test.ml\", line 156, characters 4-11", Belt__Belt_SetInt.isEmpty(match$6[0])); @@ -328,24 +328,24 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 157, characters 4-11", Belt__Be b("File \"jscomp/test/bs_set_int_test.ml\", line 158, characters 4-11", !match$5[1]); -var v$12 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); +let v$12 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); -var v0 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); +let v0 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(0, 2000)); -var v1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(1, 2001)); +let v1 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(1, 2001)); -var v2 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(3, 2002)); +let v2 = Belt__Belt_SetInt.fromArray(Array_data_util.randomRange(3, 2002)); -var v3 = Belt__Belt_SetInt.removeMany(v2, [ +let v3 = Belt__Belt_SetInt.removeMany(v2, [ 2002, 2001 ]); -var us = Belt__Belt_Array.map(Array_data_util.randomRange(1000, 3000), (function (x) { +let us = Belt__Belt_Array.map(Array_data_util.randomRange(1000, 3000), (function (x) { return Belt__Belt_SetInt.has(v$12, x); })); -var counted = Belt__Belt_Array.reduce(us, 0, (function (acc, x) { +let counted = Belt__Belt_Array.reduce(us, 0, (function (acc, x) { if (x) { return acc + 1 | 0; } else { @@ -373,7 +373,7 @@ eq("File \"jscomp/test/bs_set_int_test.ml\", line 176, characters 5-12", Belt__B Mt.from_pair_suites("Bs_set_int_test", suites.contents); -var ofA = Belt__Belt_SetInt.fromArray; +let ofA = Belt__Belt_SetInt.fromArray; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/bs_sort_test.js b/jscomp/test/dist/jscomp/test/bs_sort_test.js index c1a6a9106c..1e3ae56649 100644 --- a/jscomp/test/dist/jscomp/test/bs_sort_test.js +++ b/jscomp/test/dist/jscomp/test/bs_sort_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Array_data_util = require("./array_data_util.js"); -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Range = require("melange.belt/belt_Range.js"); -var Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); -var Belt__Belt_SortArrayInt = require("melange.belt/belt_SortArrayInt.js"); -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); - -var suites = { +let Array_data_util = require("./array_data_util.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Range = require("melange.belt/belt_Range.js"); +let Belt__Belt_SortArray = require("melange.belt/belt_SortArray.js"); +let Belt__Belt_SortArrayInt = require("melange.belt/belt_SortArrayInt.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,28 +30,28 @@ function cmp(x, y) { } function unions(xs, ys) { - var lenX = xs.length; - var lenY = ys.length; - var o = new Array(lenX + lenY | 0); - var v = Belt__Belt_SortArray.union(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); + let lenX = xs.length; + let lenY = ys.length; + let o = new Array(lenX + lenY | 0); + let v = Belt__Belt_SortArray.union(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); o.length = v; return o; } function inters(xs, ys) { - var lenX = xs.length; - var lenY = ys.length; - var o = new Array(lenX); - var v = Belt__Belt_SortArray.intersect(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); + let lenX = xs.length; + let lenY = ys.length; + let o = new Array(lenX); + let v = Belt__Belt_SortArray.intersect(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); o.length = v; return o; } function diffs(xs, ys) { - var lenX = xs.length; - var lenY = ys.length; - var o = new Array(lenX); - var v = Belt__Belt_SortArray.diff(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); + let lenX = xs.length; + let lenY = ys.length; + let o = new Array(lenX); + let v = Belt__Belt_SortArray.diff(xs, 0, lenX, ys, 0, lenY, o, 0, cmp); o.length = v; return o; } @@ -93,13 +93,13 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 48, characters 5-12", diffs(Array ]); b("File \"jscomp/test/bs_sort_test.ml\", line 50, characters 4-11", Belt__Belt_Range.every(0, 200, (function (i) { - var v = Array_data_util.randomRange(0, i); + let v = Array_data_util.randomRange(0, i); Belt__Belt_SortArray.stableSortInPlaceBy(v, cmp); return Belt__Belt_SortArray.isSorted(v, cmp); }))); b("File \"jscomp/test/bs_sort_test.ml\", line 56, characters 4-11", Belt__Belt_Range.every(0, 200, (function (i) { - var v = Array_data_util.randomRange(0, i); + let v = Array_data_util.randomRange(0, i); Belt__Belt_SortArray.stableSortInPlaceBy(v, cmp); return Belt__Belt_SortArray.isSorted(v, cmp); }))); @@ -118,11 +118,11 @@ b("File \"jscomp/test/bs_sort_test.ml\", line 70, characters 4-11", !Belt__Belt_ 0 ], cmp)); -var u = Array_data_util.randomRange(0, 1000000); +let u = Array_data_util.randomRange(0, 1000000); -var u1 = u.slice(0); +let u1 = u.slice(0); -var u2 = u.slice(0); +let u2 = u.slice(0); console.time("bs_sort_test.ml 80"); @@ -148,7 +148,7 @@ console.timeEnd("bs_sort_test.ml 84"); b("File \"jscomp/test/bs_sort_test.ml\", line 85, characters 4-11", Belt__Belt_SortArray.isSorted(u1, cmp)); -var u$1 = [ +let u$1 = [ [ 1, "a" @@ -180,7 +180,7 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 90, characters 5-12", Belt__Belt_ ] ]); -var u$2 = [ +let u$2 = [ [ 1, "b" @@ -220,7 +220,7 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 96, characters 5-12", Belt__Belt_ ] ]); -var u$3 = [ +let u$3 = [ [ 1, "c" @@ -333,13 +333,13 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 116, characters 5-12", Belt__Belt 36 ], 4, cmp), 3); -var aa = Array_data_util.range(0, 1000); +let aa = Array_data_util.range(0, 1000); b("File \"jscomp/test/bs_sort_test.ml\", line 118, characters 4-11", Belt__Belt_Range.every(0, 1000, (function (i) { return Belt__Belt_SortArray.binarySearchBy(aa, i, cmp) === i; }))); -var cc = Belt__Belt_Array.map(Array_data_util.range(0, 2000), (function (x) { +let cc = Belt__Belt_Array.map(Array_data_util.range(0, 2000), (function (x) { return (x << 1); })); diff --git a/jscomp/test/dist/jscomp/test/bs_splice_partial.js b/jscomp/test/dist/jscomp/test/bs_splice_partial.js index 6c9ae64f06..d237122952 100644 --- a/jscomp/test/dist/jscomp/test/bs_splice_partial.js +++ b/jscomp/test/dist/jscomp/test/bs_splice_partial.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function test(g) { g.xx(20, 3, "xxx", 1, 2, 3); } function test_hi(x) { - var y = x.hi(1, 2, 3); + let y = x.hi(1, 2, 3); if (y !== null) { console.log(y); return 2; @@ -18,7 +18,7 @@ function test_hi(x) { } function test_hi__2(x) { - var match = x.hi__2(); + let match = x.hi__2(); if (match == null) { return 1; } else { diff --git a/jscomp/test/dist/jscomp/test/bs_stack_test.js b/jscomp/test/dist/jscomp/test/bs_stack_test.js index 4be1a85fc6..1a28e2001c 100644 --- a/jscomp/test/dist/jscomp/test/bs_stack_test.js +++ b/jscomp/test/dist/jscomp/test/bs_stack_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Belt__Belt_MutableQueue = require("melange.belt/belt_MutableQueue.js"); -var Belt__Belt_MutableStack = require("melange.belt/belt_MutableStack.js"); -var Js__Js_undefined = require("melange.js/js_undefined.js"); -var Mt = require("./mt.js"); +let Belt__Belt_MutableQueue = require("melange.belt/belt_MutableQueue.js"); +let Belt__Belt_MutableStack = require("melange.belt/belt_MutableStack.js"); +let Js__Js_undefined = require("melange.js/js_undefined.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -19,27 +19,27 @@ function eq(loc, x, y) { } function inOrder(v) { - var current = v; - var s = { + let current = v; + let s = { root: undefined }; - var q = { + let q = { length: 0, first: undefined, last: undefined }; while(current !== undefined) { - var v$1 = current; + let v$1 = current; Belt__Belt_MutableStack.push(s, v$1); current = v$1.left; }; while(s.root !== undefined) { current = Belt__Belt_MutableStack.popUndefined(s); - var v$2 = current; + let v$2 = current; Belt__Belt_MutableQueue.add(q, v$2.value); current = v$2.right; while(current !== undefined) { - var v$3 = current; + let v$3 = current; Belt__Belt_MutableStack.push(s, v$3); current = v$3.left; }; @@ -48,25 +48,25 @@ function inOrder(v) { } function inOrder3(v) { - var current = v; - var s = { + let current = v; + let s = { root: undefined }; - var q = { + let q = { length: 0, first: undefined, last: undefined }; while(current !== undefined) { - var v$1 = current; + let v$1 = current; Belt__Belt_MutableStack.push(s, v$1); current = v$1.left; }; Belt__Belt_MutableStack.dynamicPopIter(s, (function (popped) { Belt__Belt_MutableQueue.add(q, popped.value); - var current = popped.right; + let current = popped.right; while(current !== undefined) { - var v = current; + let v = current; Belt__Belt_MutableStack.push(s, v); current = v.left; }; @@ -75,24 +75,24 @@ function inOrder3(v) { } function inOrder2(v) { - var todo = true; - var cursor = v; - var s = { + let todo = true; + let cursor = v; + let s = { root: undefined }; - var q = { + let q = { length: 0, first: undefined, last: undefined }; while(todo) { if (cursor !== undefined) { - var v$1 = cursor; + let v$1 = cursor; Belt__Belt_MutableStack.push(s, v$1); cursor = v$1.left; } else if (s.root !== undefined) { cursor = Belt__Belt_MutableStack.popUndefined(s); - var current = cursor; + let current = cursor; Belt__Belt_MutableQueue.add(q, current.value); cursor = current.right; } else { @@ -109,20 +109,20 @@ function n(l, r, a) { }; } -var test1 = n(n(n(undefined, undefined, 4), n(undefined, undefined, 5), 2), n(undefined, undefined, 3), 1); +let test1 = n(n(n(undefined, undefined, 4), n(undefined, undefined, 5), 2), n(undefined, undefined, 3), 1); function pushAllLeft(st1, s1) { - var current = st1; + let current = st1; while(current !== undefined) { - var v = current; + let v = current; Belt__Belt_MutableStack.push(s1, v); current = v.left; }; } -var test2 = n(n(n(n(n(undefined, undefined, 4), undefined, 2), undefined, 5), undefined, 1), undefined, 3); +let test2 = n(n(n(n(n(undefined, undefined, 4), undefined, 2), undefined, 5), undefined, 1), undefined, 3); -var test3 = n(n(n(n(undefined, undefined, 4), undefined, 2), undefined, 5), n(undefined, undefined, 3), 1); +let test3 = n(n(n(n(undefined, undefined, 4), undefined, 2), undefined, 5), n(undefined, undefined, 3), 1); eq("File \"jscomp/test/bs_stack_test.ml\", line 137, characters 6-13", inOrder(test1), [ 4, diff --git a/jscomp/test/dist/jscomp/test/bs_string_test.js b/jscomp/test/dist/jscomp/test/bs_string_test.js index f32fa2537f..c2ed684092 100644 --- a/jscomp/test/dist/jscomp/test/bs_string_test.js +++ b/jscomp/test/dist/jscomp/test/bs_string_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/bs_unwrap_test.js b/jscomp/test/dist/jscomp/test/bs_unwrap_test.js index 0d81a43d6d..f8fa41af78 100644 --- a/jscomp/test/dist/jscomp/test/bs_unwrap_test.js +++ b/jscomp/test/dist/jscomp/test/bs_unwrap_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); console.log([ "hello world", @@ -13,14 +13,14 @@ console.log(1337); console.log("hello world"); -var arg_string = { +let arg_string = { NAME: "String", VAL: "hi runtime" }; console.log(arg_string.VAL); -var arg_pair = { +let arg_pair = { NAME: "Pair", VAL: [ "hi", @@ -40,7 +40,7 @@ console.log(3, "hi"); console.log(4, undefined); -var some_arg = { +let some_arg = { NAME: "Bool", VAL: true }; @@ -97,7 +97,7 @@ function test00(param) { }; } -var none_arg; +let none_arg; exports.arg_string = arg_string; exports.arg_pair = arg_pair; diff --git a/jscomp/test/dist/jscomp/test/buffer_test.js b/jscomp/test/dist/jscomp/test/buffer_test.js index a2e3d34a7a..029da27fee 100644 --- a/jscomp/test/dist/jscomp/test/buffer_test.js +++ b/jscomp/test/dist/jscomp/test/buffer_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Mt = require("./mt.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Mt = require("./mt.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); -var v = "gso"; +let v = "gso"; -var suites_0 = [ +let suites_0 = [ "equal", (function (param) { return { @@ -25,11 +25,11 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "equal2", (function (param) { - var u = Stdlib__Bytes.make(3, /* 'a' */97); + let u = Stdlib__Bytes.make(3, /* 'a' */97); u[0] = /* 'b' */98; return { TAG: /* Eq */0, @@ -48,8 +48,8 @@ var suites_1 = { hd: [ "buffer", (function (param) { - var v = Stdlib__Buffer.create(30); - for(var i = 0; i <= 10; ++i){ + let v = Stdlib__Buffer.create(30); + for(let i = 0; i <= 10; ++i){ Stdlib__Buffer.add_string(v, String(i)); } return { @@ -63,7 +63,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/bytes_split_gpr_743_test.js b/jscomp/test/dist/jscomp/test/bytes_split_gpr_743_test.js index 5894637394..7ca3a724aa 100644 --- a/jscomp/test/dist/jscomp/test/bytes_split_gpr_743_test.js +++ b/jscomp/test/dist/jscomp/test/bytes_split_gpr_743_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Mt = require("./mt.js"); -var Stdlib__Bytes = require("melange/bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Mt = require("./mt.js"); +let Stdlib__Bytes = require("melange/bytes.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -32,7 +32,7 @@ function eq(loc, param) { }; } -var b = [ +let b = [ 0, 0, 0 @@ -46,7 +46,7 @@ Caml_bytes.set(b, 2, /* 'c' */99); Stdlib__Bytes.blit(b, 0, b, 1, 2); -var res = Caml_bytes.bytes_to_string(b); +let res = Caml_bytes.bytes_to_string(b); console.log(res); @@ -55,7 +55,7 @@ eq("File \"jscomp/test/bytes_split_gpr_743_test.ml\", line 17, characters 5-12", res ]); -var b$1 = [ +let b$1 = [ 0, 0, 0 @@ -69,7 +69,7 @@ Caml_bytes.set(b$1, 2, /* 'c' */99); Stdlib__Bytes.blit(b$1, 1, b$1, 0, 2); -var res2 = Caml_bytes.bytes_to_string(b$1); +let res2 = Caml_bytes.bytes_to_string(b$1); console.log(res2); diff --git a/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js b/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js index a6de5b1022..e524930526 100644 --- a/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js +++ b/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); function isLessThan(title, small, big) { return { @@ -421,9 +421,9 @@ function isEqual(title, num1, num2) { }; } -var five = BigInt("5"); +let five = BigInt("5"); -var suites = Stdlib.$at(isLessThan("123 and 555555", BigInt("123"), BigInt("555555")), Stdlib.$at(isEqual("98765 and 98765", BigInt("98765"), BigInt("98765")), isEqual("same instance", five, five))); +let suites = Stdlib.$at(isLessThan("123 and 555555", BigInt("123"), BigInt("555555")), Stdlib.$at(isEqual("98765 and 98765", BigInt("98765"), BigInt("98765")), isEqual("same instance", five, five))); Mt.from_pair_suites("jscomp/test/caml_compare_bigint_test.ml", suites); diff --git a/jscomp/test/dist/jscomp/test/caml_compare_test.js b/jscomp/test/dist/jscomp/test/caml_compare_test.js index 4e805db102..4b07488d2b 100644 --- a/jscomp/test/dist/jscomp/test/caml_compare_test.js +++ b/jscomp/test/dist/jscomp/test/caml_compare_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var function_equal_test; +let function_equal_test; try { function_equal_test = Caml_obj.caml_equal((function (x) { @@ -16,11 +16,11 @@ try { })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); function_equal_test = exn.MEL_EXN_ID === Stdlib.Invalid_argument && exn._1 === "equal: functional value" ? true : false; } -var suites = { +let suites = { contents: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 9, characters 4-11", @@ -1132,7 +1132,7 @@ var suites = { } }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/caml_format_test.js b/jscomp/test/dist/jscomp/test/caml_format_test.js index 5214f4483d..82d90fbe3c 100644 --- a/jscomp/test/dist/jscomp/test/caml_format_test.js +++ b/jscomp/test/dist/jscomp/test/caml_format_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Int64 = require("melange/int64.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Int64 = require("melange/int64.js"); +let Stdlib__Printf = require("melange/printf.js"); -var of_string = [ +let of_string = [ [ 0, "0" @@ -92,8 +92,8 @@ function from_float_of_string(xs) { function from_of_string(xs) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -135,9 +135,9 @@ function u(v) { }), v); } -var to_str = Caml_format.caml_int_of_string; +let to_str = Caml_format.caml_int_of_string; -var v = Curry._1(Stdlib__Printf.sprintf(/* Format */{ +let v = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Int */4, _0: /* Int_d */0, @@ -152,7 +152,7 @@ var v = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _1: "%3d" }), 3333); -var pairs = [ +let pairs = [ [ /* FP_infinite */3, "infinity" @@ -175,7 +175,7 @@ var pairs = [ ] ]; -var pairs$1 = [ +let pairs$1 = [ [ 3232, "32_32.0" @@ -190,7 +190,7 @@ var pairs$1 = [ ] ]; -var suites = Stdlib.$at(from_of_string(of_string), Stdlib.$at({ +let suites = Stdlib.$at(from_of_string(of_string), Stdlib.$at({ hd: [ "isnan_of_string", (function (param) { @@ -203,8 +203,8 @@ var suites = Stdlib.$at(from_of_string(of_string), Stdlib.$at({ ], tl: /* [] */0 }, Stdlib.$at(Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -254,8 +254,8 @@ var suites = Stdlib.$at(from_of_string(of_string), Stdlib.$at({ tl: /* [] */0 } }, Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -292,7 +292,7 @@ function ff(param) { return Caml_format.caml_format_int("%32d", param); } -var formatter_suites_0 = [ +let formatter_suites_0 = [ "fmt_concat", (function (param) { return { @@ -361,7 +361,7 @@ var formatter_suites_0 = [ }) ]; -var formatter_suites_1 = { +let formatter_suites_1 = { hd: [ "fmt_gen", (function (param) { @@ -1593,12 +1593,12 @@ var formatter_suites_1 = { } }; -var formatter_suites = { +let formatter_suites = { hd: formatter_suites_0, tl: formatter_suites_1 }; -var float_data = [ +let float_data = [ [ "%f", 32, @@ -1888,7 +1888,7 @@ function pr_lambda(ppf, e) { } } -var string_of_lambda = Curry._1(Stdlib__Format.asprintf(/* Format */{ +let string_of_lambda = Curry._1(Stdlib__Format.asprintf(/* Format */{ _0: { TAG: /* Alpha */15, _0: /* End_of_format */0 @@ -1896,7 +1896,7 @@ var string_of_lambda = Curry._1(Stdlib__Format.asprintf(/* Format */{ _1: "%a" }), pr_lambda); -var Lambda_suites = { +let Lambda_suites = { ident: ident, kwd: kwd, pr_exp0: pr_exp0, @@ -1906,7 +1906,7 @@ var Lambda_suites = { string_of_lambda: string_of_lambda }; -var lambda_suites = [ +let lambda_suites = [ [ { TAG: /* Var */1, @@ -1972,8 +1972,8 @@ var lambda_suites = [ function from_lambda_pairs(p) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -2000,10 +2000,10 @@ function from_lambda_pairs(p) { }), lambda_suites)); } -var ksprintf_suites_0 = [ +let ksprintf_suites_0 = [ "ksprintf", (function (param) { - var f = function (fmt) { + let f = function (fmt) { return Stdlib__Format.ksprintf((function (x) { return x + x; }), fmt); @@ -2035,7 +2035,7 @@ var ksprintf_suites_0 = [ }) ]; -var ksprintf_suites_1 = { +let ksprintf_suites_1 = { hd: [ "sprintf", (function (param) { @@ -2064,12 +2064,12 @@ var ksprintf_suites_1 = { tl: /* [] */0 }; -var ksprintf_suites = { +let ksprintf_suites = { hd: ksprintf_suites_0, tl: ksprintf_suites_1 }; -var int64_suites_0 = [ +let int64_suites_0 = [ "i32_simple", (function (param) { return { @@ -2089,7 +2089,7 @@ var int64_suites_0 = [ }) ]; -var int64_suites_1 = { +let int64_suites_1 = { hd: [ "i32_simple1", (function (param) { @@ -2683,7 +2683,7 @@ var int64_suites_1 = { hd: [ "missing_newline2", (function (param) { - var buf = Stdlib__Buffer.create(30); + let buf = Stdlib__Buffer.create(30); return { TAG: /* Eq */0, _0: (Curry._1(Stdlib__Printf.bprintf(buf, /* Format */{ @@ -2736,12 +2736,12 @@ var int64_suites_1 = { } }; -var int64_suites = { +let int64_suites = { hd: int64_suites_0, tl: int64_suites_1 }; -var of_string_data = [ +let of_string_data = [ [ Caml_int64.zero, "0" @@ -2799,9 +2799,9 @@ var of_string_data = [ ]; Mt.from_pair_suites("Caml_format_test", Stdlib.$at(suites, Stdlib.$at(formatter_suites, Stdlib.$at(from_lambda_pairs(lambda_suites), Stdlib.$at(ksprintf_suites, Stdlib.$at(Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var str_result = param[2]; - var f = param[1]; - var fmt = param[0]; + let str_result = param[2]; + let f = param[1]; + let fmt = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -2826,8 +2826,8 @@ Mt.from_pair_suites("Caml_format_test", Stdlib.$at(suites, Stdlib.$at(formatter_ }) ]; }), float_data)), Stdlib.$at(int64_suites, Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -2857,19 +2857,19 @@ Mt.from_pair_suites("Caml_format_test", Stdlib.$at(suites, Stdlib.$at(formatter_ ]; }), of_string_data))))))))); -var a = Stdlib__Format.asprintf; +let a = Stdlib__Format.asprintf; -var float_suites = { +let float_suites = { hd: "float_nan", tl: /* [] */0 }; -var hh = [ +let hh = [ 214748364, 3435973836 ]; -var hhh = [ +let hhh = [ 268435456, 0 ]; diff --git a/jscomp/test/dist/jscomp/test/caml_sys_poly_fill_test.js b/jscomp/test/dist/jscomp/test/caml_sys_poly_fill_test.js index e9768307e8..a22d420749 100644 --- a/jscomp/test/dist/jscomp/test/caml_sys_poly_fill_test.js +++ b/jscomp/test/dist/jscomp/test/caml_sys_poly_fill_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var Mt = require("./mt.js"); -var Node__Node_process = require("melange.node/node_process.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Sys = require("melange/sys.js"); - -var suites = { +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let Mt = require("./mt.js"); +let Node__Node_process = require("melange.node/node_process.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Sys = require("melange/sys.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -35,25 +35,25 @@ function eq(loc, x, y) { Node__Node_process.putEnvVar("Caml_sys_poly_fill_test", "X"); -var v = Caml_sys.caml_sys_getenv("Caml_sys_poly_fill_test"); +let v = Caml_sys.caml_sys_getenv("Caml_sys_poly_fill_test"); eq("File \"jscomp/test/caml_sys_poly_fill_test.ml\", line 11, characters 5-12", "X", (Node__Node_process.deleteEnvVar("Caml_sys_poly_fill_test"), v)); Node__Node_process.putEnvVar("Caml_sys_poly_fill_test", "Y"); -var v$1 = Caml_sys.caml_sys_getenv("Caml_sys_poly_fill_test"); +let v$1 = Caml_sys.caml_sys_getenv("Caml_sys_poly_fill_test"); eq("File \"jscomp/test/caml_sys_poly_fill_test.ml\", line 17, characters 5-12", "Y", (Node__Node_process.deleteEnvVar("Caml_sys_poly_fill_test"), v$1)); Node__Node_process.deleteEnvVar("Caml_sys_poly_fill_test"); -var tmp; +let tmp; try { tmp = Caml_sys.caml_sys_getenv("Caml_sys_poly_fill_test"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { tmp = "Z"; } else { diff --git a/jscomp/test/dist/jscomp/test/chain_code_test.js b/jscomp/test/dist/jscomp/test/chain_code_test.js index 0334c0c89d..5e8b9dcfb4 100644 --- a/jscomp/test/dist/jscomp/test/chain_code_test.js +++ b/jscomp/test/dist/jscomp/test/chain_code_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/chn_test.js b/jscomp/test/dist/jscomp/test/chn_test.js index 5179a5ddbc..401d9f4b5f 100644 --- a/jscomp/test/dist/jscomp/test/chn_test.js +++ b/jscomp/test/dist/jscomp/test/chn_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -37,7 +37,7 @@ console.log("\x3f\u003f\b\t\n\v\f\r\0\"'"); function convert(s) { return Stdlib__Array.to_list(Array.from(s, (function (x) { - var x$1 = x.codePointAt(0); + let x$1 = x.codePointAt(0); if (x$1 !== undefined) { return x$1; } diff --git a/jscomp/test/dist/jscomp/test/class3_test.js b/jscomp/test/dist/jscomp/test/class3_test.js index b827317a74..460e9c098e 100644 --- a/jscomp/test/dist/jscomp/test/class3_test.js +++ b/jscomp/test/dist/jscomp/test/class3_test.js @@ -1,81 +1,81 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); - -var shared = [ +let Caml_array = require("melange.js/caml_array.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); + +let shared = [ "move", "get_x" ]; -var shared$1 = [ +let shared$1 = [ "register", "n", "len" ]; -var shared$2 = ["move"]; +let shared$2 = ["move"]; -var shared$3 = [ +let shared$3 = [ "move", "get_x", "get_offset" ]; -var shared$4 = [ +let shared$4 = [ "move", "get_offset" ]; -var shared$5 = [ +let shared$5 = [ "move", "get_offset", "get_x" ]; -var shared$6 = [ +let shared$6 = [ "bump", "move", "get_x" ]; -var shared$7 = [ +let shared$7 = [ "bump", "get_x", "move" ]; -var shared$8 = ["x"]; +let shared$8 = ["x"]; -var shared$9 = [ +let shared$9 = [ "print", "move", "get_x" ]; -var shared$10 = [ +let shared$10 = [ "move", "print", "get_x" ]; -var shared$11 = [ +let shared$11 = [ "move", "get_x", "bump" ]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -97,10 +97,10 @@ function eq(loc, x, y) { } function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$8); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$8); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -112,25 +112,25 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var point = CamlinternalOO.make_class(shared, point_init); +let point = CamlinternalOO.make_class(shared, point_init); -var p = Curry._2(point[0], undefined, 7); +let p = Curry._2(point[0], undefined, 7); eq("File \"jscomp/test/class3_test.ml\", line 17, characters 12-19", Caml_oo_curry.js1(291546447, 1, p), 7); function adjusted_point_init($$class) { - var origin = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.new_methods_variables($$class, shared$3, shared$8); - var move = ids[0]; - var get_x = ids[1]; - var get_offset = ids[2]; - var x = ids[3]; + let origin = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.new_methods_variables($$class, shared$3, shared$8); + let move = ids[0]; + let get_x = ids[1]; + let get_offset = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$2) { @@ -146,17 +146,17 @@ function adjusted_point_init($$class) { }) ]); return function (env, self, x_init) { - var origin$1 = Math.imul(x_init / 10 | 0, 10); - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let origin$1 = Math.imul(x_init / 10 | 0, 10); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[origin] = origin$1; self$1[x] = origin$1; return self$1; }; } -var adjusted_point = CamlinternalOO.make_class(shared$5, adjusted_point_init); +let adjusted_point = CamlinternalOO.make_class(shared$5, adjusted_point_init); -var tmp = Curry._2(adjusted_point[0], undefined, 31); +let tmp = Curry._2(adjusted_point[0], undefined, 31); eq("File \"jscomp/test/class3_test.ml\", line 28, characters 13-20", Caml_oo_curry.js1(291546447, 2, tmp), 30); @@ -164,43 +164,43 @@ function new_init(obj_init, self, x_init) { return Curry._2(obj_init, self, Math.imul(x_init / 10 | 0, 10)); } -var partial_arg = point[0]; +let partial_arg = point[0]; function adjusted_point2_0(param, param$1) { return new_init(partial_arg, param, param$1); } function adjusted_point2_1(table) { - var env_init = Curry._1(point[1], table); + let env_init = Curry._1(point[1], table); return function (envs) { - var partial_arg = Curry._1(env_init, envs); + let partial_arg = Curry._1(env_init, envs); return function (param, param$1) { return new_init(partial_arg, param, param$1); }; }; } -var adjusted_point2_2 = point[2]; +let adjusted_point2_2 = point[2]; -var adjusted_point2_3 = point[3]; +let adjusted_point2_3 = point[3]; -var adjusted_point2 = [ +let adjusted_point2 = [ adjusted_point2_0, adjusted_point2_1, adjusted_point2_2, adjusted_point2_3 ]; -var tmp$1 = Curry._2(adjusted_point2_0, undefined, 31); +let tmp$1 = Curry._2(adjusted_point2_0, undefined, 31); eq("File \"jscomp/test/class3_test.ml\", line 33, characters 12-19", Caml_oo_curry.js1(291546447, 3, tmp$1), 30); function printable_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$9, shared$8); - var print = ids[0]; - var move = ids[1]; - var get_x = ids[2]; - var x = ids[3]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$9, shared$8); + let print = ids[0]; + let move = ids[1]; + let get_x = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$4) { @@ -216,31 +216,31 @@ function printable_point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var printable_point = CamlinternalOO.make_class(shared$10, printable_point_init); +let printable_point = CamlinternalOO.make_class(shared$10, printable_point_init); -var p$1 = Curry._2(printable_point[0], undefined, 7); +let p$1 = Curry._2(printable_point[0], undefined, 7); eq("File \"jscomp/test/class3_test.ml\", line 49, characters 11-18", Caml_oo_curry.js1(-930392019, 4, p$1), 7); -var ints = { +let ints = { contents: /* [] */0 }; -var $$class = CamlinternalOO.create_table(shared$1); +let $$class = CamlinternalOO.create_table(shared$1); -var ids = CamlinternalOO.get_method_labels($$class, shared$1); +let ids = CamlinternalOO.get_method_labels($$class, shared$1); -var register = ids[0]; +let register = ids[0]; -var n = ids[1]; +let n = ids[1]; -var len = ids[2]; +let len = ids[2]; CamlinternalOO.set_methods($$class, [ n, @@ -262,7 +262,7 @@ CamlinternalOO.set_methods($$class, [ CamlinternalOO.init_class($$class); -var my_int = CamlinternalOO.create_object_opt(undefined, $$class); +let my_int = CamlinternalOO.create_object_opt(undefined, $$class); Caml_oo_curry.js1(-794843549, 5, my_int); @@ -270,17 +270,17 @@ Caml_oo_curry.js1(-794843549, 6, my_int); console.log(Caml_oo_curry.js1(5393365, 7, my_int)); -var v = [ +let v = [ 0, 3 ]; function printable_point2_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$9, shared$8); - var print = ids[0]; - var move = ids[1]; - var get_x = ids[2]; - var x = ids[3]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$9, shared$8); + let print = ids[0]; + let move = ids[1]; + let get_x = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { @@ -300,14 +300,14 @@ function printable_point2_init($$class) { return Caml_array.set(v, 0, self$6[x]); })); return function (env, self, x_init) { - var origin = Math.imul(x_init / 10 | 0, 10); - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let origin = Math.imul(x_init / 10 | 0, 10); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = origin; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var printable_point2 = CamlinternalOO.make_class(shared$10, printable_point2_init); +let printable_point2 = CamlinternalOO.make_class(shared$10, printable_point2_init); Curry._2(printable_point2[0], undefined, 31); @@ -317,21 +317,21 @@ eq("File \"jscomp/test/class3_test.ml\", line 81, characters 12-19", v, [ ]); function abstract_point_1($$class) { - var x_init = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, shared$3); - var get_x = ids[1]; - var get_offset = ids[2]; + let x_init = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, shared$3); + let get_x = ids[1]; + let get_offset = ids[2]; CamlinternalOO.set_method($$class, get_offset, (function (self$7) { return Curry._1(self$7[0][get_x], self$7) - self$7[x_init] | 0; })); return function (env, self, x_init$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; return self$1; }; } -var abstract_point = [ +let abstract_point = [ undefined, abstract_point_1, undefined, @@ -339,12 +339,12 @@ var abstract_point = [ ]; function vpoint_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$3, shared$8); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[3]; - var inh = CamlinternalOO.inherits($$class, 0, shared, ["get_offset"], abstract_point, true); - var obj_init = inh[0]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$3, shared$8); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[3]; + let inh = CamlinternalOO.inherits($$class, 0, shared, ["get_offset"], abstract_point, true); + let obj_init = inh[0]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$8) { @@ -356,27 +356,27 @@ function vpoint_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x_init); self$1[x] = x_init; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var vpoint = CamlinternalOO.make_class(shared$5, vpoint_init); +let vpoint = CamlinternalOO.make_class(shared$5, vpoint_init); -var h = Curry._2(vpoint[0], undefined, 3); +let h = Curry._2(vpoint[0], undefined, 3); Caml_oo_curry.js2(-933174511, 8, h, 32); -var v$1 = Caml_oo_curry.js1(-792262820, 9, h); +let v$1 = Caml_oo_curry.js1(-792262820, 9, h); eq("File \"jscomp/test/class3_test.ml\", line 107, characters 12-19", v$1, 32); function abstract_point2_1($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$2, shared$8); - var move = ids[0]; - var x = ids[1]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$2, shared$8); + let move = ids[0]; + let x = ids[1]; CamlinternalOO.set_method($$class, move, (function (self$9, d) { self$9[x] = self$9[x] + d | 0; })); @@ -385,7 +385,7 @@ function abstract_point2_1($$class) { }; } -var abstract_point2 = [ +let abstract_point2 = [ undefined, abstract_point2_1, undefined, @@ -393,17 +393,17 @@ var abstract_point2 = [ ]; function point2_init($$class) { - var x_init = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, shared$4); - var get_offset = ids[1]; - var inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$2, abstract_point2, true); - var obj_init = inh[0]; - var x = inh[1]; + let x_init = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, shared$4); + let get_offset = ids[1]; + let inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$2, abstract_point2, true); + let obj_init = inh[0]; + let x = inh[1]; CamlinternalOO.set_method($$class, get_offset, (function (self$10) { return self$10[x] - self$10[x_init] | 0; })); return function (env, self, x_init$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; Curry._1(obj_init, self$1); self$1[x] = x_init$1; @@ -411,22 +411,22 @@ function point2_init($$class) { }; } -var point2 = CamlinternalOO.make_class(shared$4, point2_init); +let point2 = CamlinternalOO.make_class(shared$4, point2_init); -var h$1 = Curry._2(point2[0], undefined, 3); +let h$1 = Curry._2(point2[0], undefined, 3); Caml_oo_curry.js2(-933174511, 10, h$1, 32); -var vv = Caml_oo_curry.js1(-792262820, 11, h$1); +let vv = Caml_oo_curry.js1(-792262820, 11, h$1); eq("File \"jscomp/test/class3_test.ml\", line 128, characters 12-19", vv, 32); function restricted_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$11, shared$8); - var move = ids[0]; - var get_x = ids[1]; - var bump = ids[2]; - var x = ids[3]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$11, shared$8); + let move = ids[0]; + let get_x = ids[1]; + let bump = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$11) { @@ -442,39 +442,39 @@ function restricted_point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var restricted_point = CamlinternalOO.make_class([ +let restricted_point = CamlinternalOO.make_class([ "bump", "get_x" ], restricted_point_init); -var p$2 = Curry._2(restricted_point[0], undefined, 0); +let p$2 = Curry._2(restricted_point[0], undefined, 0); Caml_oo_curry.js1(-1054863370, 12, p$2); -var h$2 = Caml_oo_curry.js1(291546447, 13, p$2); +let h$2 = Caml_oo_curry.js1(291546447, 13, p$2); eq("File \"jscomp/test/class3_test.ml\", line 144, characters 12-19", h$2, 1); function point_again_init($$class) { CamlinternalOO.get_method_labels($$class, shared$11); - var inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); - var obj_init = inh[0]; + let inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); + let obj_init = inh[0]; return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var point_again = CamlinternalOO.make_class(shared$6, point_again_init); +let point_again = CamlinternalOO.make_class(shared$6, point_again_init); -var p$3 = Curry._2(point_again[0], undefined, 3); +let p$3 = Curry._2(point_again[0], undefined, 3); Caml_oo_curry.js2(-933174511, 14, p$3, 3); @@ -482,24 +482,24 @@ Caml_oo_curry.js1(-1054863370, 15, p$3); Caml_oo_curry.js1(-1054863370, 16, p$3); -var hh = Caml_oo_curry.js1(291546447, 17, p$3); +let hh = Caml_oo_curry.js1(291546447, 17, p$3); eq("File \"jscomp/test/class3_test.ml\", line 161, characters 12-19", hh, 8); function point_again2_init($$class) { CamlinternalOO.get_method_labels($$class, shared$11); - var inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); - var obj_init = inh[0]; + let inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); + let obj_init = inh[0]; return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var point_again2 = CamlinternalOO.make_class(shared$6, point_again2_init); +let point_again2 = CamlinternalOO.make_class(shared$6, point_again2_init); -var p$4 = Curry._2(point_again2[0], undefined, 3); +let p$4 = Curry._2(point_again2[0], undefined, 3); Caml_oo_curry.js2(-933174511, 18, p$4, 30); @@ -507,27 +507,27 @@ Caml_oo_curry.js1(-1054863370, 19, p$4); Caml_oo_curry.js1(-1054863370, 20, p$4); -var hhh = Caml_oo_curry.js1(291546447, 21, p$4); +let hhh = Caml_oo_curry.js1(291546447, 21, p$4); eq("File \"jscomp/test/class3_test.ml\", line 177, characters 12-19", hhh, 35); function point_again3_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, shared$11); - var move = ids[0]; - var inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); - var obj_init = inh[0]; - var move$1 = inh[4]; + let ids = CamlinternalOO.get_method_labels($$class, shared$11); + let move = ids[0]; + let inh = CamlinternalOO.inherits($$class, shared$8, 0, shared$7, restricted_point, true); + let obj_init = inh[0]; + let move$1 = inh[4]; CamlinternalOO.set_method($$class, move, Curry.__1(move$1)); return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var point_again3 = CamlinternalOO.make_class(shared$6, point_again3_init); +let point_again3 = CamlinternalOO.make_class(shared$6, point_again3_init); -var p$5 = Curry._2(point_again3[0], undefined, 3); +let p$5 = Curry._2(point_again3[0], undefined, 3); Caml_oo_curry.js2(-933174511, 22, p$5, 300); @@ -535,7 +535,7 @@ Caml_oo_curry.js1(-1054863370, 23, p$5); Caml_oo_curry.js1(-1054863370, 24, p$5); -var hhhh = Caml_oo_curry.js1(291546447, 25, p$5); +let hhhh = Caml_oo_curry.js1(291546447, 25, p$5); eq("File \"jscomp/test/class3_test.ml\", line 195, characters 12-19", hhhh, 305); diff --git a/jscomp/test/dist/jscomp/test/class4_test.js b/jscomp/test/dist/jscomp/test/class4_test.js index 28838991c5..11394b1a56 100644 --- a/jscomp/test/dist/jscomp/test/class4_test.js +++ b/jscomp/test/dist/jscomp/test/class4_test.js @@ -1,29 +1,29 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = [ +let shared = [ "bump", "get_x" ]; -var shared$1 = [ +let shared$1 = [ "move", "get_x", "get_offset" ]; -var shared$2 = ["x"]; +let shared$2 = ["x"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -45,15 +45,15 @@ function eq(loc, x, y) { } function restricted_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "move", "get_x", "bump" ], shared$2); - var move = ids[0]; - var get_x = ids[1]; - var bump = ids[2]; - var x = ids[3]; + let move = ids[0]; + let get_x = ids[1]; + let bump = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -69,54 +69,54 @@ function restricted_point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var restricted_point = CamlinternalOO.make_class(shared, restricted_point_init); +let restricted_point = CamlinternalOO.make_class(shared, restricted_point_init); function restricted_point$p_init($$class) { - var inh = CamlinternalOO.inherits($$class, 0, 0, shared, restricted_point, true); - var obj_init = inh[0]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared, restricted_point, true); + let obj_init = inh[0]; return function (env, self, x) { return Curry._2(obj_init, self, x); }; } -var restricted_point$p = CamlinternalOO.make_class(shared, restricted_point$p_init); +let restricted_point$p = CamlinternalOO.make_class(shared, restricted_point$p_init); function restricted_point2$p_init($$class) { - var inh = CamlinternalOO.inherits($$class, 0, 0, shared, restricted_point, true); - var obj_init = inh[0]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared, restricted_point, true); + let obj_init = inh[0]; return function (env, self, x) { return Curry._2(obj_init, self, x); }; } -var restricted_point2$p = CamlinternalOO.make_class(shared, restricted_point2$p_init); +let restricted_point2$p = CamlinternalOO.make_class(shared, restricted_point2$p_init); -var Point = { +let Point = { restricted_point$p: restricted_point }; function abstract_point_1($$class) { - var x_init = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, shared$1); - var get_x = ids[1]; - var get_offset = ids[2]; + let x_init = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, shared$1); + let get_x = ids[1]; + let get_offset = ids[2]; CamlinternalOO.set_method($$class, get_offset, (function (self$5) { return Curry._1(self$5[0][get_x], self$5) - self$5[x_init] | 0; })); return function (env, self, x_init$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; return self$1; }; } -var abstract_point = [ +let abstract_point = [ undefined, abstract_point_1, undefined, @@ -124,15 +124,15 @@ var abstract_point = [ ]; function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared$2); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[3]; - var inh = CamlinternalOO.inherits($$class, 0, [ + let ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared$2); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[3]; + let inh = CamlinternalOO.inherits($$class, 0, [ "move", "get_x" ], ["get_offset"], abstract_point, true); - var obj_init = inh[0]; + let obj_init = inh[0]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { @@ -144,53 +144,53 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x_init); self$1[x] = x_init; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var point = CamlinternalOO.make_class([ +let point = CamlinternalOO.make_class([ "move", "get_offset", "get_x" ], point_init); function colored_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "move", "get_x", "get_offset", "color" ], ["c"]); - var color = ids[3]; - var c = ids[4]; - var inh = CamlinternalOO.inherits($$class, shared$2, 0, [ + let color = ids[3]; + let c = ids[4]; + let inh = CamlinternalOO.inherits($$class, shared$2, 0, [ "get_offset", "get_x", "move" ], point, true); - var obj_init = inh[0]; + let obj_init = inh[0]; CamlinternalOO.set_method($$class, color, (function (self$7) { return self$7[c]; })); return function (env, self, x, c$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); self$1[c] = c$1; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var colored_point = CamlinternalOO.make_class([ +let colored_point = CamlinternalOO.make_class([ "move", "color", "get_offset", "get_x" ], colored_point_init); -var p$p = Curry._3(colored_point[0], undefined, 5, "red"); +let p$p = Curry._3(colored_point[0], undefined, 5, "red"); eq("File \"jscomp/test/class4_test.ml\", line 67, characters 5-12", [ 5, diff --git a/jscomp/test/dist/jscomp/test/class5_test.js b/jscomp/test/dist/jscomp/test/class5_test.js index 195154f59d..f8c445b839 100644 --- a/jscomp/test/dist/jscomp/test/class5_test.js +++ b/jscomp/test/dist/jscomp/test/class5_test.js @@ -1,31 +1,31 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); - -var shared = [ +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); + +let shared = [ "move", "get_x" ]; -var shared$1 = [ +let shared$1 = [ "fold", "empty" ]; -var shared$2 = ["x"]; +let shared$2 = ["x"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -47,15 +47,15 @@ function eq(loc, x, y) { } function printable_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "print", "move", "get_x" ], shared$2); - var print = ids[0]; - var move = ids[1]; - var get_x = ids[2]; - var x = ids[3]; + let print = ids[0]; + let move = ids[1]; + let get_x = ids[2]; + let x = ids[3]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -71,68 +71,68 @@ function printable_point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var printable_point = CamlinternalOO.make_class([ +let printable_point = CamlinternalOO.make_class([ "move", "print", "get_x" ], printable_point_init); function printable_colored_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "print", "move", "get_x", "color" ], ["c"]); - var print = ids[0]; - var color = ids[3]; - var c = ids[4]; + let print = ids[0]; + let color = ids[3]; + let c = ids[4]; CamlinternalOO.set_method($$class, color, (function (self$2) { return self$2[c]; })); - var inh = CamlinternalOO.inherits($$class, shared$2, 0, [ + let inh = CamlinternalOO.inherits($$class, shared$2, 0, [ "get_x", "move", "print" ], printable_point, true); - var obj_init = inh[0]; - var print$1 = inh[4]; + let obj_init = inh[0]; + let print$1 = inh[4]; CamlinternalOO.set_method($$class, print, (function (self$2) { return "(" + (Curry._1(print$1, self$2) + (", " + (Curry._1(self$2[0][color], self$2) + ")"))); })); return function (env, self, y, c$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[c] = c$1; Curry._2(obj_init, self$1, y); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var printable_colored_point = CamlinternalOO.make_class([ +let printable_colored_point = CamlinternalOO.make_class([ "move", "print", "color", "get_x" ], printable_colored_point_init); -var p = Curry._3(printable_colored_point[0], undefined, 17, "red"); +let p = Curry._3(printable_colored_point[0], undefined, 17, "red"); eq("File \"jscomp/test/class5_test.ml\", line 32, characters 12-19", Caml_oo_curry.js1(-930392019, 1, p), "(17, red)"); function ref_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "set", "get" ], shared$2); - var set = ids[0]; - var get = ids[1]; - var x = ids[2]; + let set = ids[0]; + let get = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get, (function (self$3) { @@ -144,30 +144,30 @@ function ref_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var ref = CamlinternalOO.make_class([ +let ref = CamlinternalOO.make_class([ "get", "set" ], ref_init); -var r = Curry._2(ref[0], undefined, 1); +let r = Curry._2(ref[0], undefined, 1); Caml_oo_curry.js2(5741474, 2, r, 2); -var v = Caml_oo_curry.js1(5144726, 3, r); +let v = Caml_oo_curry.js1(5144726, 3, r); eq("File \"jscomp/test/class5_test.ml\", line 43, characters 12-19", v, 2); function intlist_init($$class) { - var l = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, shared$1); - var fold = ids[0]; - var empty = ids[1]; + let l = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, shared$1); + let fold = ids[0]; + let empty = ids[1]; CamlinternalOO.set_methods($$class, [ empty, (function (self$4) { @@ -179,15 +179,15 @@ function intlist_init($$class) { }) ]); return function (env, self, l$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[l] = l$1; return self$1; }; } -var intlist = CamlinternalOO.make_class(shared$1, intlist_init); +let intlist = CamlinternalOO.make_class(shared$1, intlist_init); -var l = Curry._2(intlist[0], undefined, { +let l = Curry._2(intlist[0], undefined, { hd: 1, tl: { hd: 2, @@ -203,10 +203,10 @@ eq("File \"jscomp/test/class5_test.ml\", line 54, characters 5-12", 6, Caml_oo_c }), 0)); function intlist2_init($$class) { - var l = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, shared$1); - var fold = ids[0]; - var empty = ids[1]; + let l = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, shared$1); + let fold = ids[0]; + let empty = ids[1]; CamlinternalOO.set_methods($$class, [ empty, (function (self$5) { @@ -218,15 +218,15 @@ function intlist2_init($$class) { }) ]); return function (env, self, l$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[l] = l$1; return self$1; }; } -var intlist2 = CamlinternalOO.make_class(shared$1, intlist2_init); +let intlist2 = CamlinternalOO.make_class(shared$1, intlist2_init); -var l$1 = Curry._2(intlist2[0], undefined, { +let l$1 = Curry._2(intlist2[0], undefined, { hd: 1, tl: { hd: 2, @@ -250,10 +250,10 @@ eq("File \"jscomp/test/class5_test.ml\", line 67, characters 5-12", [ ]); function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { @@ -265,48 +265,48 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var point = CamlinternalOO.make_class(shared, point_init); +let point = CamlinternalOO.make_class(shared, point_init); function distance_point_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "move", "get_x", "distance" ]); - var distance = ids[2]; - var inh = CamlinternalOO.inherits($$class, shared$2, 0, [ + let distance = ids[2]; + let inh = CamlinternalOO.inherits($$class, shared$2, 0, [ "get_x", "move" ], point, true); - var obj_init = inh[0]; - var x = inh[1]; + let obj_init = inh[0]; + let x = inh[1]; CamlinternalOO.set_method($$class, distance, (function (self$7, other) { return Stdlib.abs(Caml_oo_curry.js1(291546447, 7, other) - self$7[x] | 0); })); return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var distance_point = CamlinternalOO.make_class([ +let distance_point = CamlinternalOO.make_class([ "move", "distance", "get_x" ], distance_point_init); -var p$1 = Curry._2(distance_point[0], undefined, 3); +let p$1 = Curry._2(distance_point[0], undefined, 3); -var a = Caml_oo_curry.js2(-335965387, 8, p$1, Curry._2(point[0], undefined, 8)); +let a = Caml_oo_curry.js2(-335965387, 8, p$1, Curry._2(point[0], undefined, 8)); -var b = Caml_oo_curry.js2(-335965387, 9, p$1, Curry._3(printable_colored_point[0], undefined, 1, "blue")); +let b = Caml_oo_curry.js2(-335965387, 9, p$1, Curry._3(printable_colored_point[0], undefined, 1, "blue")); eq("File \"jscomp/test/class5_test.ml\", line 94, characters 5-12", [ 5, diff --git a/jscomp/test/dist/jscomp/test/class6_test.js b/jscomp/test/dist/jscomp/test/class6_test.js index d8b473dadf..c44678ddfc 100644 --- a/jscomp/test/dist/jscomp/test/class6_test.js +++ b/jscomp/test/dist/jscomp/test/class6_test.js @@ -1,29 +1,29 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo = require("melange.js/caml_oo.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); - -var shared = [ +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo = require("melange.js/caml_oo.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); + +let shared = [ "move", "get_x" ]; -var shared$1 = ["m"]; +let shared$1 = ["m"]; -var shared$2 = ["x"]; +let shared$2 = ["x"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -45,10 +45,10 @@ function eq(loc, x, y) { } function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -60,39 +60,39 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var point = CamlinternalOO.make_class(shared, point_init); +let point = CamlinternalOO.make_class(shared, point_init); function colored_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "move", "get_x", "color" ], ["c"]); - var color = ids[2]; - var c = ids[3]; - var inh = CamlinternalOO.inherits($$class, shared$2, 0, [ + let color = ids[2]; + let c = ids[3]; + let inh = CamlinternalOO.inherits($$class, shared$2, 0, [ "get_x", "move" ], point, true); - var obj_init = inh[0]; + let obj_init = inh[0]; CamlinternalOO.set_method($$class, color, (function (self$2) { return self$2[c]; })); return function (env, self, x, c$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); self$1[c] = c$1; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var colored_point = CamlinternalOO.make_class([ +let colored_point = CamlinternalOO.make_class([ "move", "color", "get_x" @@ -102,15 +102,15 @@ function colored_point_to_point(cp) { return cp; } -var p = Curry._2(point[0], undefined, 3); +let p = Curry._2(point[0], undefined, 3); -var q = Curry._3(colored_point[0], undefined, 4, "blue"); +let q = Curry._3(colored_point[0], undefined, 4, "blue"); function lookup_obj(obj, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var obj$p = param.hd; + let obj$p = param.hd; if (Caml_obj.caml_equal(obj, obj$p)) { return obj$p; } @@ -124,7 +124,7 @@ function lookup_obj(obj, _param) { } function c_init($$class) { - var m = CamlinternalOO.get_method_label($$class, "m"); + let m = CamlinternalOO.get_method_label($$class, "m"); CamlinternalOO.set_method($$class, m, (function (self$3) { return 1; })); @@ -133,18 +133,18 @@ function c_init($$class) { }; } -var c = CamlinternalOO.make_class(shared$1, c_init); +let c = CamlinternalOO.make_class(shared$1, c_init); function d_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "n", "m", "as_c" ]); - var n = ids[0]; - var as_c = ids[2]; - var inh = CamlinternalOO.inherits($$class, 0, 0, shared$1, c, true); - var obj_init = inh[0]; + let n = ids[0]; + let as_c = ids[2]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared$1, c, true); + let obj_init = inh[0]; CamlinternalOO.set_methods($$class, [ n, (function (self$4) { @@ -156,25 +156,25 @@ function d_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var table = CamlinternalOO.create_table([ +let table = CamlinternalOO.create_table([ "as_c", "m", "n" ]); -var env_init = d_init(table); +let env_init = d_init(table); CamlinternalOO.init_class(table); -var d_0 = Curry._1(env_init, undefined); +let d_0 = Curry._1(env_init, undefined); -var d = [ +let d = [ d_0, d_init, env_init, @@ -188,7 +188,7 @@ function c2$p_1($$class) { }; } -var c2$p = [ +let c2$p = [ undefined, c2$p_1, undefined, @@ -196,10 +196,10 @@ var c2$p = [ ]; function functional_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { @@ -207,23 +207,23 @@ function functional_point_init($$class) { }), move, (function (self$6, d) { - var copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$6)); + let copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$6)); copy[x] = self$6[x] + d | 0; return copy; }) ]); return function (env, self, y) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = y; return self$1; }; } -var functional_point = CamlinternalOO.make_class(shared, functional_point_init); +let functional_point = CamlinternalOO.make_class(shared, functional_point_init); -var p$1 = Curry._2(functional_point[0], undefined, 7); +let p$1 = Curry._2(functional_point[0], undefined, 7); -var tmp = Caml_oo_curry.js2(-933174511, 2, p$1, 3); +let tmp = Caml_oo_curry.js2(-933174511, 2, p$1, 3); eq("File \"jscomp/test/class6_test.ml\", line 60, characters 5-12", [ 7, @@ -236,10 +236,10 @@ eq("File \"jscomp/test/class6_test.ml\", line 60, characters 5-12", [ ]); function bad_functional_point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$7) { @@ -251,30 +251,30 @@ function bad_functional_point_init($$class) { }) ]); return function (env, self, y) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = y; return self$1; }; } -var table$1 = CamlinternalOO.create_table(shared); +let table$1 = CamlinternalOO.create_table(shared); -var env_init$1 = bad_functional_point_init(table$1); +let env_init$1 = bad_functional_point_init(table$1); CamlinternalOO.init_class(table$1); -var bad_functional_point_0 = Curry._1(env_init$1, undefined); +let bad_functional_point_0 = Curry._1(env_init$1, undefined); -var bad_functional_point = [ +let bad_functional_point = [ bad_functional_point_0, bad_functional_point_init, env_init$1, undefined ]; -var p$2 = Curry._2(bad_functional_point_0, undefined, 7); +let p$2 = Curry._2(bad_functional_point_0, undefined, 7); -var tmp$1 = Caml_oo_curry.js2(-933174511, 6, p$2, 3); +let tmp$1 = Caml_oo_curry.js2(-933174511, 6, p$2, 3); eq("File \"jscomp/test/class6_test.ml\", line 74, characters 5-12", [ 7, diff --git a/jscomp/test/dist/jscomp/test/class7_test.js b/jscomp/test/dist/jscomp/test/class7_test.js index dd11eea60f..f9f5051dee 100644 --- a/jscomp/test/dist/jscomp/test/class7_test.js +++ b/jscomp/test/dist/jscomp/test/class7_test.js @@ -1,42 +1,42 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo = require("melange.js/caml_oo.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var Caml_option = require("melange.js/caml_option.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo = require("melange.js/caml_oo.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let Caml_option = require("melange.js/caml_option.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = ["copy"]; +let shared = ["copy"]; -var shared$1 = [ +let shared$1 = [ "move", "get_x" ]; -var shared$2 = [ +let shared$2 = [ "save", "restore" ]; -var shared$3 = [ +let shared$3 = [ "get", "set" ]; -var shared$4 = ["window"]; +let shared$4 = ["window"]; -var shared$5 = ["x"]; +let shared$5 = ["x"]; -var shared$6 = ["top_widget"]; +let shared$6 = ["top_widget"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -58,10 +58,10 @@ function eq(loc, x, y) { } function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared$5); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared$5); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -73,17 +73,17 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var point = CamlinternalOO.make_class(shared$1, point_init); +let point = CamlinternalOO.make_class(shared$1, point_init); -var p = Curry._2(point[0], undefined, 55); +let p = Curry._2(point[0], undefined, 55); -var q = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(p)); +let q = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(p)); Caml_oo_curry.js2(-933174511, 1, q, 7); @@ -96,13 +96,13 @@ eq("File \"jscomp/test/class7_test.ml\", line 22, characters 5-12", [ ]); function ref_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "set", "get" ], shared$5); - var set = ids[0]; - var get = ids[1]; - var x = ids[2]; + let set = ids[0]; + let get = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get, (function (self$2) { @@ -114,28 +114,28 @@ function ref_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var ref = CamlinternalOO.make_class(shared$3, ref_init); +let ref = CamlinternalOO.make_class(shared$3, ref_init); function backup_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$2, shared); - var save = ids[0]; - var restore = ids[1]; - var copy = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$2, shared); + let save = ids[0]; + let restore = ids[1]; + let copy = ids[2]; CamlinternalOO.set_methods($$class, [ save, (function (self$3) { - var copy$1 = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); + let copy$1 = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); self$3[copy] = Caml_option.some((copy$1[copy] = undefined, copy$1)); }), restore, (function (self$3) { - var x = self$3[copy]; + let x = self$3[copy]; if (x !== undefined) { return Caml_option.valFromOption(x); } else { @@ -144,13 +144,13 @@ function backup_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[copy] = undefined; return self$1; }; } -var backup = CamlinternalOO.make_class(shared$2, backup_init); +let backup = CamlinternalOO.make_class(shared$2, backup_init); function backup_ref_init($$class) { CamlinternalOO.get_method_labels($$class, [ @@ -159,22 +159,22 @@ function backup_ref_init($$class) { "restore", "get" ]); - var inh = CamlinternalOO.inherits($$class, shared$5, 0, shared$3, ref, true); - var obj_init = inh[0]; - var inh$1 = CamlinternalOO.inherits($$class, shared, 0, [ + let inh = CamlinternalOO.inherits($$class, shared$5, 0, shared$3, ref, true); + let obj_init = inh[0]; + let inh$1 = CamlinternalOO.inherits($$class, shared, 0, [ "restore", "save" ], backup, true); - var obj_init$1 = inh$1[0]; + let obj_init$1 = inh$1[0]; return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); Curry._1(obj_init$1, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var backup_ref = CamlinternalOO.make_class([ +let backup_ref = CamlinternalOO.make_class([ "save", "restore", "get", @@ -183,8 +183,8 @@ var backup_ref = CamlinternalOO.make_class([ function get(_p, _n) { while(true) { - var n = _n; - var p = _p; + let n = _n; + let p = _p; if (n === 0) { return Caml_oo_curry.js1(5144726, 6, p); } @@ -194,7 +194,7 @@ function get(_p, _n) { }; } -var p$1 = Curry._2(backup_ref[0], undefined, 0); +let p$1 = Curry._2(backup_ref[0], undefined, 0); Caml_oo_curry.js1(-867333315, 8, p$1); @@ -219,15 +219,15 @@ eq("File \"jscomp/test/class7_test.ml\", line 47, characters 5-12", [ ]); function backup2_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "save", "restore", "clear" ], shared); - var save = ids[0]; - var restore = ids[1]; - var clear = ids[2]; - var copy = ids[3]; + let save = ids[0]; + let restore = ids[1]; + let clear = ids[2]; + let copy = ids[3]; CamlinternalOO.set_methods($$class, [ save, (function (self$5) { @@ -235,7 +235,7 @@ function backup2_init($$class) { }), restore, (function (self$5) { - var x = self$5[copy]; + let x = self$5[copy]; if (x !== undefined) { return Caml_option.valFromOption(x); } else { @@ -248,13 +248,13 @@ function backup2_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[copy] = undefined; return self$1; }; } -var backup2 = CamlinternalOO.make_class([ +let backup2 = CamlinternalOO.make_class([ "clear", "save", "restore" @@ -268,23 +268,23 @@ function backup_ref2_init($$class) { "get", "clear" ]); - var inh = CamlinternalOO.inherits($$class, shared$5, 0, shared$3, ref, true); - var obj_init = inh[0]; - var inh$1 = CamlinternalOO.inherits($$class, shared, 0, [ + let inh = CamlinternalOO.inherits($$class, shared$5, 0, shared$3, ref, true); + let obj_init = inh[0]; + let inh$1 = CamlinternalOO.inherits($$class, shared, 0, [ "clear", "restore", "save" ], backup2, true); - var obj_init$1 = inh$1[0]; + let obj_init$1 = inh$1[0]; return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); Curry._1(obj_init$1, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var backup_ref2 = CamlinternalOO.make_class([ +let backup_ref2 = CamlinternalOO.make_class([ "clear", "save", "restore", @@ -292,7 +292,7 @@ var backup_ref2 = CamlinternalOO.make_class([ "set" ], backup_ref2_init); -var p$2 = Curry._2(backup_ref2[0], undefined, 0); +let p$2 = Curry._2(backup_ref2[0], undefined, 0); Caml_oo_curry.js1(-867333315, 12, p$2); @@ -317,36 +317,36 @@ eq("File \"jscomp/test/class7_test.ml\", line 63, characters 5-12", [ ]); function window_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$6, shared$6); - var top_widget = ids[0]; - var top_widget$1 = ids[1]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$6, shared$6); + let top_widget = ids[0]; + let top_widget$1 = ids[1]; CamlinternalOO.set_method($$class, top_widget, (function (self$7) { return self$7[top_widget$1]; })); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[top_widget$1] = undefined; return self$1; }; } -var $$window = CamlinternalOO.make_class(shared$6, window_init); +let $$window = CamlinternalOO.make_class(shared$6, window_init); function widget_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$4, shared$4); - var $$window = ids[0]; - var $$window$1 = ids[1]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$4, shared$4); + let $$window = ids[0]; + let $$window$1 = ids[1]; CamlinternalOO.set_method($$class, $$window, (function (self$8) { return self$8[$$window$1]; })); return function (env, self, w) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[$$window$1] = w; return self$1; }; } -var widget = CamlinternalOO.make_class(shared$4, widget_init); +let widget = CamlinternalOO.make_class(shared$4, widget_init); Mt.from_pair_suites("Class7_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/class8_test.js b/jscomp/test/dist/jscomp/test/class8_test.js index 9c81dcf26e..c3c452b29e 100644 --- a/jscomp/test/dist/jscomp/test/class8_test.js +++ b/jscomp/test/dist/jscomp/test/class8_test.js @@ -1,25 +1,25 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo = require("melange.js/caml_oo.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo = require("melange.js/caml_oo.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = ["repr"]; +let shared = ["repr"]; -var shared$1 = [ +let shared$1 = [ "leq", "value" ]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -34,7 +34,7 @@ function comparable_1($$class) { }; } -var comparable = [ +let comparable = [ undefined, comparable_1, undefined, @@ -42,15 +42,15 @@ var comparable = [ ]; function money_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "value", "leq" ], shared); - var value = ids[0]; - var leq = ids[1]; - var repr = ids[2]; - var inh = CamlinternalOO.inherits($$class, 0, ["leq"], 0, comparable, true); - var obj_init = inh[0]; + let value = ids[0]; + let leq = ids[1]; + let repr = ids[2]; + let inh = CamlinternalOO.inherits($$class, 0, ["leq"], 0, comparable, true); + let obj_init = inh[0]; CamlinternalOO.set_methods($$class, [ value, (function (self$2) { @@ -62,38 +62,38 @@ function money_init($$class) { }) ]); return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); self$1[repr] = x; return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var money = CamlinternalOO.make_class(shared$1, money_init); +let money = CamlinternalOO.make_class(shared$1, money_init); function money2_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "value", "times", "leq" ]); - var times = ids[1]; - var inh = CamlinternalOO.inherits($$class, shared, 0, shared$1, money, true); - var obj_init = inh[0]; - var repr = inh[1]; + let times = ids[1]; + let inh = CamlinternalOO.inherits($$class, shared, 0, shared$1, money, true); + let obj_init = inh[0]; + let repr = inh[1]; CamlinternalOO.set_method($$class, times, (function (self$3, k) { - var copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); + let copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); copy[repr] = k * self$3[repr]; return copy; })); return function (env, self, x) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var money2 = CamlinternalOO.make_class([ +let money2 = CamlinternalOO.make_class([ "leq", "times", "value" @@ -107,11 +107,11 @@ function min(x, y) { } } -var tmp = min(Curry._2(money[0], undefined, 1.0), Curry._2(money[0], undefined, 3.0)); +let tmp = min(Curry._2(money[0], undefined, 1.0), Curry._2(money[0], undefined, 3.0)); eq("File \"jscomp/test/class8_test.ml\", line 30, characters 5-12", 1, Caml_oo_curry.js1(834174833, 3, tmp)); -var tmp$1 = min(Curry._2(money2[0], undefined, 5.0), Curry._2(money2[0], undefined, 3)); +let tmp$1 = min(Curry._2(money2[0], undefined, 5.0), Curry._2(money2[0], undefined, 3)); eq("File \"jscomp/test/class8_test.ml\", line 35, characters 5-12", 3, Caml_oo_curry.js1(834174833, 4, tmp$1)); diff --git a/jscomp/test/dist/jscomp/test/class_fib_open_recursion_test.js b/jscomp/test/dist/jscomp/test/class_fib_open_recursion_test.js index a82cbfe60a..fe55d52da6 100644 --- a/jscomp/test/dist/jscomp/test/class_fib_open_recursion_test.js +++ b/jscomp/test/dist/jscomp/test/class_fib_open_recursion_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); -var shared = ["calc"]; +let shared = ["calc"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -37,7 +37,7 @@ function eq(loc, x, y) { } function fib_init($$class) { - var calc = CamlinternalOO.get_method_label($$class, "calc"); + let calc = CamlinternalOO.get_method_label($$class, "calc"); CamlinternalOO.set_method($$class, calc, (function (self$1, x) { if (x === 0 || x === 1) { return 1; @@ -50,23 +50,23 @@ function fib_init($$class) { }; } -var fib = CamlinternalOO.make_class(shared, fib_init); +let fib = CamlinternalOO.make_class(shared, fib_init); function memo_fib_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, ["cache"]); - var calc = ids[0]; - var cache = ids[1]; - var inh = CamlinternalOO.inherits($$class, 0, 0, shared, fib, true); - var obj_init = inh[0]; - var calc$1 = inh[1]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, ["cache"]); + let calc = ids[0]; + let cache = ids[1]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared, fib, true); + let obj_init = inh[0]; + let calc$1 = inh[1]; CamlinternalOO.set_method($$class, calc, (function (self$2, x) { try { return Stdlib__Hashtbl.find(self$2[cache], x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var v = Curry._2(calc$1, self$2, x); + let v = Curry._2(calc$1, self$2, x); Stdlib__Hashtbl.add(self$2[cache], x, v); return v; } @@ -74,16 +74,16 @@ function memo_fib_init($$class) { } })); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[cache] = Stdlib__Hashtbl.create(undefined, 31); Curry._1(obj_init, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var memo_fib = CamlinternalOO.make_class(shared, memo_fib_init); +let memo_fib = CamlinternalOO.make_class(shared, memo_fib_init); -var tmp = Curry._1(memo_fib[0], undefined); +let tmp = Curry._1(memo_fib[0], undefined); eq("File \"jscomp/test/class_fib_open_recursion_test.ml\", line 33, characters 5-12", Caml_oo_curry.js2(-1044768619, 1, tmp, 40), 165580141); diff --git a/jscomp/test/dist/jscomp/test/class_repr.js b/jscomp/test/dist/jscomp/test/class_repr.js index 30a4eca2b9..99ddfdf711 100644 --- a/jscomp/test/dist/jscomp/test/class_repr.js +++ b/jscomp/test/dist/jscomp/test/class_repr.js @@ -1,53 +1,53 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo = require("melange.js/caml_oo.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Sys = require("melange/sys.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo = require("melange.js/caml_oo.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Sys = require("melange/sys.js"); -var shared = ["get_x"]; +let shared = ["get_x"]; -var shared$1 = [ +let shared$1 = [ "incr", "get_money" ]; -var shared$2 = ["x"]; +let shared$2 = ["x"]; function x0_init($$class) { - var x = CamlinternalOO.new_variable($$class, "x"); + let x = CamlinternalOO.new_variable($$class, "x"); return function (env, self, v) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = v + 2 | 0; return self$1; }; } -var x0 = CamlinternalOO.make_class(0, x0_init); +let x0 = CamlinternalOO.make_class(0, x0_init); function x_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); - var get_x = ids[0]; - var x = ids[1]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$2); + let get_x = ids[0]; + let x = ids[1]; CamlinternalOO.set_method($$class, get_x, (function (self$2) { return self$2[x]; })); return function (env, self, v) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = v; return self$1; }; } -var x = CamlinternalOO.make_class(shared, x_init); +let x = CamlinternalOO.make_class(shared, x_init); -var v = Curry._2(x[0], undefined, 3); +let v = Curry._2(x[0], undefined, 3); -var u = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(v)); +let u = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(v)); if (Caml_oo_curry.js1(291546447, 1, v) !== 3) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -72,11 +72,11 @@ if (Caml_oo_curry.js1(291546447, 2, u) !== 3) { } function xx_init($$class) { - var x = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.new_methods_variables($$class, shared$1, ["money"]); - var incr = ids[0]; - var get_money = ids[1]; - var money = ids[2]; + let x = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.new_methods_variables($$class, shared$1, ["money"]); + let incr = ids[0]; + let get_money = ids[1]; + let money = ids[2]; CamlinternalOO.set_methods($$class, [ get_money, (function (self$3) { @@ -84,24 +84,24 @@ function xx_init($$class) { }), incr, (function (self$3) { - var copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); + let copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); copy[money] = 2 * self$3[x] + Curry._1(self$3[0][get_money], self$3); return copy; }) ]); return function (env, self, x$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x$1; self$1[money] = x$1; return self$1; }; } -var xx = CamlinternalOO.make_class(shared$1, xx_init); +let xx = CamlinternalOO.make_class(shared$1, xx_init); -var v1 = Curry._2(xx[0], undefined, 3); +let v1 = Curry._2(xx[0], undefined, 3); -var v2 = Caml_oo_curry.js1(-977586732, 3, v1); +let v2 = Caml_oo_curry.js1(-977586732, 3, v1); if (Caml_oo_curry.js1(-804710761, 4, v1) !== 3) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -133,13 +133,13 @@ if (Caml_oo_curry.js1(-804710761, 9, v2) !== 9) { } function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "get_x5", "get_x" ], shared$2); - var get_x5 = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let get_x5 = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$4) { @@ -151,18 +151,18 @@ function point_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = 0; return self$1; }; } -var point = CamlinternalOO.make_class([ +let point = CamlinternalOO.make_class([ "get_x", "get_x5" ], point_init); -var v$1 = Curry._1(point[0], undefined); +let v$1 = Curry._1(point[0], undefined); if (Caml_oo_curry.js1(590348294, 10, v$1) !== 5) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -176,19 +176,19 @@ if (Caml_oo_curry.js1(590348294, 10, v$1) !== 5) { } function xx0_init($$class) { - var x = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.new_methods_variables($$class, shared$1, [ + let x = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.new_methods_variables($$class, shared$1, [ "money", "a0", "a1", "a2" ]); - var incr = ids[0]; - var get_money = ids[1]; - var money = ids[2]; - var a0 = ids[3]; - var a1 = ids[4]; - var a2 = ids[5]; + let incr = ids[0]; + let get_money = ids[1]; + let money = ids[2]; + let a0 = ids[3]; + let a1 = ids[4]; + let a2 = ids[5]; CamlinternalOO.set_methods($$class, [ get_money, (function (self$5) { @@ -196,14 +196,14 @@ function xx0_init($$class) { }), incr, (function (self$5) { - var copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$5)); + let copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$5)); copy[money] = 2 * self$5[x] + Curry._1(self$5[0][get_money], self$5); copy[a0] = 2; return copy; }) ]); return function (env, self, x$1) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x$1; self$1[money] = x$1; self$1[a0] = 0; @@ -213,7 +213,7 @@ function xx0_init($$class) { }; } -var xx0 = CamlinternalOO.make_class(shared$1, xx0_init); +let xx0 = CamlinternalOO.make_class(shared$1, xx0_init); exports.x0 = x0; exports.x = x; diff --git a/jscomp/test/dist/jscomp/test/class_test.js b/jscomp/test/dist/jscomp/test/class_test.js index e22f34ca36..d73ae8cdab 100644 --- a/jscomp/test/dist/jscomp/test/class_test.js +++ b/jscomp/test/dist/jscomp/test/class_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = [ +let shared = [ "move", "get_x" ]; -var shared$1 = ["x"]; +let shared$1 = ["x"]; function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$1); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$1); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -29,31 +29,31 @@ function point_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = 0; return self$1; }; } -var point = CamlinternalOO.make_class(shared, point_init); +let point = CamlinternalOO.make_class(shared, point_init); -var p = Curry._1(point[0], undefined); +let p = Curry._1(point[0], undefined); -var zero = Caml_oo_curry.js1(291546447, 1, p); +let zero = Caml_oo_curry.js1(291546447, 1, p); Caml_oo_curry.js2(-933174511, 2, p, 3); -var three = Caml_oo_curry.js1(291546447, 3, p); +let three = Caml_oo_curry.js1(291546447, 3, p); -var x0 = { +let x0 = { contents: 0 }; function point2_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, shared$1); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, shared$1); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$2) { @@ -65,27 +65,27 @@ function point2_init($$class) { }) ]); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); x0.contents = x0.contents + 1 | 0; self$1[x] = x0.contents; return self$1; }; } -var point2 = CamlinternalOO.make_class(shared, point2_init); +let point2 = CamlinternalOO.make_class(shared, point2_init); -var tmp = Curry._1(point2[0], undefined); +let tmp = Curry._1(point2[0], undefined); -var one = Caml_oo_curry.js1(291546447, 4, tmp); +let one = Caml_oo_curry.js1(291546447, 4, tmp); -var tmp$1 = Curry._1(point2[0], undefined); +let tmp$1 = Curry._1(point2[0], undefined); -var two = Caml_oo_curry.js1(291546447, 5, tmp$1); +let two = Caml_oo_curry.js1(291546447, 5, tmp$1); -var u = { +let u = { x: 3, getX: (function () { - var self = this ; + let self = this ; return self.x; }) }; diff --git a/jscomp/test/dist/jscomp/test/class_type_ffi_test.js b/jscomp/test/dist/jscomp/test/class_type_ffi_test.js index 56608a0771..174feff0c2 100644 --- a/jscomp/test/dist/jscomp/test/class_type_ffi_test.js +++ b/jscomp/test/dist/jscomp/test/class_type_ffi_test.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function sum_float_array(arr) { - var v = 0; - for(var i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + let v = 0; + for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ v = v + arr.case(i); } return v; } function sum_int_array(arr) { - var v = 0; - for(var i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + let v = 0; + for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ v = v + arr.case(i) | 0; } return v; } function sum_poly(zero, add, arr) { - var v = zero; - for(var i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + let v = zero; + for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ v = add(v, arr.case(i)); } return v; diff --git a/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js b/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js index 57b3fdc154..e63710e323 100644 --- a/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js @@ -1,31 +1,31 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__List = require("melange/list.js"); function l(prim) { console.log(prim); } -var C$p = Stdlib__Char; +let C$p = Stdlib__Char; -var prim = Stdlib__Char.chr(66); +let prim = Stdlib__Char.chr(66); console.log(prim); -var prim$1 = Stdlib__Char.chr(66); +let prim$1 = Stdlib__Char.chr(66); console.log(prim$1); -var C3 = Stdlib__Char; +let C3 = Stdlib__Char; -var prim$2 = Stdlib__Char.chr(66); +let prim$2 = Stdlib__Char.chr(66); console.log(prim$2); -var f = Stdlib__List.length; +let f = Stdlib__List.length; function g(x) { return Stdlib__List.length(Stdlib__List.map((function (prim) { @@ -37,9 +37,9 @@ function F(X) { return Stdlib__Char; } -var C4 = Stdlib__Char; +let C4 = Stdlib__Char; -var prim$3 = Stdlib__Char.chr(66); +let prim$3 = Stdlib__Char.chr(66); console.log(prim$3); @@ -47,52 +47,52 @@ function G(X) { return X; } -var M = {}; +let M = {}; -var N = { +let N = { x: 1 }; -var M$p = { +let M$p = { N: N }; console.log(1); -var M$p$p = { +let M$p$p = { N$p: N }; console.log(M$p$p.N$p.x); -var M2 = { +let M2 = { N: N }; -var M3 = { +let M3 = { N$p: N }; console.log(M3.N$p.x); -var M3$p = { +let M3$p = { N$p: N }; console.log(M3$p.N$p.x); -var N$1 = { +let N$1 = { x: 1 }; -var M4 = { +let M4 = { N$p: N$1 }; console.log(M4.N$p.x); function F0(X) { - var N = { + let N = { x: 1 }; return { @@ -100,32 +100,32 @@ function F0(X) { }; } -var N$2 = { +let N$2 = { x: 1 }; -var M5 = { +let M5 = { N$p: N$2 }; console.log(M5.N$p.x); -var D = { +let D = { y: 3 }; -var N$3 = { +let N$3 = { x: 1 }; -var M6 = { +let M6 = { D: D, N: N$3 }; console.log(1); -var M7 = { +let M7 = { N$p: N$3 }; @@ -133,30 +133,30 @@ console.log(M7.N$p.x); console.log(1); -var M8 = {}; +let M8 = {}; -var M9 = { +let M9 = { C: Stdlib__Char }; -var prim$4 = Curry._1(M9.C.chr, 66); +let prim$4 = Curry._1(M9.C.chr, 66); console.log(prim$4); -var M10 = { +let M10 = { C$p: Stdlib__Char }; -var prim$5 = Curry._1(M10.C$p.chr, 66); +let prim$5 = Curry._1(M10.C$p.chr, 66); console.log(prim$5); -var C$p$p$p = C$p; +let C$p$p$p = C$p; -var C$p$p = Stdlib__Char; +let C$p$p = Stdlib__Char; function G0(funarg) { - var N = { + let N = { x: 1 }; return { @@ -164,7 +164,7 @@ function G0(funarg) { }; } -var M1 = { +let M1 = { N: N$3 }; diff --git a/jscomp/test/dist/jscomp/test/complex_if_test.js b/jscomp/test/dist/jscomp/test/complex_if_test.js index 32bb7829e3..eda8461ff0 100644 --- a/jscomp/test/dist/jscomp/test/complex_if_test.js +++ b/jscomp/test/dist/jscomp/test/complex_if_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Mt = require("./mt.js"); -var Stdlib__Bytes = require("melange/bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Mt = require("./mt.js"); +let Stdlib__Bytes = require("melange/bytes.js"); function fib(n) { if (n !== 1 && n !== 23) { @@ -14,9 +14,9 @@ function fib(n) { } function escaped(s) { - var n = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ - var match = s[i]; + let n = 0; + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let match = s[i]; n = n + ( match >= 32 ? ( match > 92 || match < 34 ? ( @@ -36,11 +36,11 @@ function escaped(s) { if (n === s.length) { return Stdlib__Bytes.copy(s); } - var s$p = Caml_bytes.caml_create_bytes(n); + let s$p = Caml_bytes.caml_create_bytes(n); n = 0; - for(var i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ - var c = s[i$1]; - var exit = 0; + 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) { if (c !== 92) { if (c >= 127) { @@ -122,7 +122,7 @@ function string_escaped(s) { return Stdlib__Bytes.to_string(escaped(Stdlib__Bytes.of_string(s))); } -var suites_0 = [ +let suites_0 = [ "complete_escape", (function (param) { return { @@ -133,7 +133,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/complex_test.js b/jscomp/test/dist/jscomp/test/complex_test.js index 258f237ff2..35ebb51504 100644 --- a/jscomp/test/dist/jscomp/test/complex_test.js +++ b/jscomp/test/dist/jscomp/test/complex_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib__Complex = require("melange/complex.js"); +let Mt = require("./mt.js"); +let Stdlib__Complex = require("melange/complex.js"); -var suites_0 = [ +let suites_0 = [ "basic_add", (function (param) { return { @@ -18,7 +18,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/complex_while_loop.js b/jscomp/test/dist/jscomp/test/complex_while_loop.js index d0b86aded3..83591c2b5b 100644 --- a/jscomp/test/dist/jscomp/test/complex_while_loop.js +++ b/jscomp/test/dist/jscomp/test/complex_while_loop.js @@ -3,9 +3,9 @@ function f(param) { - var n = 0; + let n = 0; while((function () { - var fib = function (n) { + let fib = function (n) { if (n === 0 || n === 1) { return 1; } else { @@ -21,7 +21,7 @@ function f(param) { function ff(param) { while((function () { - var b = 9; + let b = 9; return (3 + b | 0) > 10; })()) { diff --git a/jscomp/test/dist/jscomp/test/config2_test.js b/jscomp/test/dist/jscomp/test/config2_test.js index 1ec72c5a88..9e7a693d9d 100644 --- a/jscomp/test/dist/jscomp/test/config2_test.js +++ b/jscomp/test/dist/jscomp/test/config2_test.js @@ -7,7 +7,7 @@ function test_v(x) { } function test_vv(h) { - var hey = h.hey; + let hey = h.hey; return hey(1, 2); } diff --git a/jscomp/test/dist/jscomp/test/console_log_test.js b/jscomp/test/dist/jscomp/test/console_log_test.js index f1c7fad1c9..400edab01b 100644 --- a/jscomp/test/dist/jscomp/test/console_log_test.js +++ b/jscomp/test/dist/jscomp/test/console_log_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); +let Caml_obj = require("melange.js/caml_obj.js"); function min_int(prim0, prim1) { return Math.min(prim0, prim1); @@ -11,7 +11,7 @@ function say(prim0, prim1) { return prim1.say(prim0); } -var v = Caml_obj.caml_compare; +let v = Caml_obj.caml_compare; exports.min_int = min_int; exports.say = say; diff --git a/jscomp/test/dist/jscomp/test/const_block_test.js b/jscomp/test/dist/jscomp/test/const_block_test.js index 68a2206a0c..baccea0050 100644 --- a/jscomp/test/dist/jscomp/test/const_block_test.js +++ b/jscomp/test/dist/jscomp/test/const_block_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Mt = require("./mt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Mt = require("./mt.js"); -var a = [ +let a = [ 0, 1, 2 ]; -var b = [ +let b = [ 0, 1, 2 ]; -var c = [ +let c = [ 0, 1, 2, @@ -49,12 +49,12 @@ function g(param) { }; } -var suites_0 = [ +let suites_0 = [ "const_block_test", g ]; -var suites_1 = { +let suites_1 = { hd: [ "avoid_mutable_inline_test", (function (param) { @@ -77,14 +77,14 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; Mt.from_pair_suites("Const_block_test", suites); -var v = [ +let v = [ 0, 1, 2, diff --git a/jscomp/test/dist/jscomp/test/const_defs.js b/jscomp/test/dist/jscomp/test/const_defs.js index 7c0f6e4db2..f6bc42b8d9 100644 --- a/jscomp/test/dist/jscomp/test/const_defs.js +++ b/jscomp/test/dist/jscomp/test/const_defs.js @@ -2,7 +2,7 @@ 'use strict'; -var v = true; +let v = true; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/const_defs_test.js b/jscomp/test/dist/jscomp/test/const_defs_test.js index 2e54947c8c..492d1de331 100644 --- a/jscomp/test/dist/jscomp/test/const_defs_test.js +++ b/jscomp/test/dist/jscomp/test/const_defs_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var u = 3; +let u = 3; function f(param) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { diff --git a/jscomp/test/dist/jscomp/test/const_test.js b/jscomp/test/dist/jscomp/test/const_test.js index 4d88bb9651..ad0de23b1c 100644 --- a/jscomp/test/dist/jscomp/test/const_test.js +++ b/jscomp/test/dist/jscomp/test/const_test.js @@ -11,7 +11,7 @@ function ff(x) { } function fff(x) { - var x$1 = { + let x$1 = { TAG: /* A */0, _0: x }; @@ -40,7 +40,7 @@ function hh(param) { return 3; } -var g = h("A"); +let g = h("A"); exports.f = f; exports.ff = ff; diff --git a/jscomp/test/dist/jscomp/test/cps_test.js b/jscomp/test/dist/jscomp/test/cps_test.js index 2ab099b2e3..43894cd1e9 100644 --- a/jscomp/test/dist/jscomp/test/cps_test.js +++ b/jscomp/test/dist/jscomp/test/cps_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); function test(param) { - var v = { + let v = { contents: 0 }; - var f = function (_n, _acc) { + let f = function (_n, _acc) { while(true) { - var acc = _acc; - var n = _n; + let acc = _acc; + let n = _n; if (n === 0) { return Curry._1(acc, undefined); } @@ -34,13 +34,13 @@ function test(param) { } function test_closure(param) { - var v = { + let v = { contents: 0 }; - var arr = Caml_array.make(6, (function (x) { + let arr = Caml_array.make(6, (function (x) { return x; })); - for(var i = 0; i <= 5; ++i){ + for(let i = 0; i <= 5; ++i){ Caml_array.set(arr, i, (function(i){ return function (param) { return i; @@ -54,14 +54,14 @@ function test_closure(param) { } function test_closure2(param) { - var v = { + let v = { contents: 0 }; - var arr = Caml_array.make(6, (function (x) { + let arr = Caml_array.make(6, (function (x) { return x; })); - for(var i = 0; i <= 5; ++i){ - var j = i + i | 0; + for(let i = 0; i <= 5; ++i){ + let j = i + i | 0; Caml_array.set(arr, i, (function(j){ return function (param) { return j; diff --git a/jscomp/test/dist/jscomp/test/cross_module_inline_test.js b/jscomp/test/dist/jscomp/test/cross_module_inline_test.js index 2831d8f11d..3385ae53a2 100644 --- a/jscomp/test/dist/jscomp/test/cross_module_inline_test.js +++ b/jscomp/test/dist/jscomp/test/cross_module_inline_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Test_char = require("./test_char.js"); +let Test_char = require("./test_char.js"); -var v = Test_char.caml_is_printable(/* 'a' */97); +let v = Test_char.caml_is_printable(/* 'a' */97); exports.v = v; /* v Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/custom_error_test.js b/jscomp/test/dist/jscomp/test/custom_error_test.js index 28a2089a35..6d881ef292 100644 --- a/jscomp/test/dist/jscomp/test/custom_error_test.js +++ b/jscomp/test/dist/jscomp/test/custom_error_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); function test_js_error(param) { - var e; + let e; try { e = JSON.parse(" {\"x\" : }"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Js__Js_exn.$$Error) { console.log(exn._1.stack); return ; @@ -26,7 +26,7 @@ function test_js_error2(param) { return JSON.parse(" {\"x\" : }"); } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { console.log(e._1.stack); throw new Caml_js_exceptions.MelangeError(e.MEL_EXN_ID, e); @@ -36,12 +36,12 @@ function test_js_error2(param) { } function example1(param) { - var v; + let v; try { v = JSON.parse(" {\"x\" }"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Js__Js_exn.$$Error) { console.log(exn._1.stack); return ; @@ -56,7 +56,7 @@ function example2(param) { return Caml_option.some(JSON.parse(" {\"x\"}")); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Js__Js_exn.$$Error) { return ; } diff --git a/jscomp/test/dist/jscomp/test/debug_mode_value.js b/jscomp/test/dist/jscomp/test/debug_mode_value.js index b7d5828470..6e4fd44849 100644 --- a/jscomp/test/dist/jscomp/test/debug_mode_value.js +++ b/jscomp/test/dist/jscomp/test/debug_mode_value.js @@ -2,12 +2,12 @@ 'use strict'; -var u = /* A */{ +let u = /* A */{ _0: 1, _1: 2 }; -var h = { +let h = { hd: 1, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/debugger_test.js b/jscomp/test/dist/jscomp/test/debugger_test.js index 386b955760..94d6e06d6d 100644 --- a/jscomp/test/dist/jscomp/test/debugger_test.js +++ b/jscomp/test/dist/jscomp/test/debugger_test.js @@ -21,7 +21,7 @@ function g(param) { function exterme_g(param) { f(1, 2); debugger; - var v; + let v; console.log(v); f(1, 2); debugger; diff --git a/jscomp/test/dist/jscomp/test/default_export_test.js b/jscomp/test/dist/jscomp/test/default_export_test.js index 419db2317e..061fe88268 100644 --- a/jscomp/test/dist/jscomp/test/default_export_test.js +++ b/jscomp/test/dist/jscomp/test/default_export_test.js @@ -2,7 +2,7 @@ 'use strict'; -var $$default = "xx"; +let $$default = "xx"; exports.default = $$default; exports.__esModule = true; diff --git a/jscomp/test/dist/jscomp/test/defunctor_make_test.js b/jscomp/test/dist/jscomp/test/defunctor_make_test.js index e1d47091dc..6ba2ea9e88 100644 --- a/jscomp/test/dist/jscomp/test/defunctor_make_test.js +++ b/jscomp/test/dist/jscomp/test/defunctor_make_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function getcompare(x) { return x; @@ -12,7 +12,7 @@ function Make(M) { return M; } -var Comparable = { +let Comparable = { getcompare: getcompare, Make: Make }; @@ -26,8 +26,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ _0: l, _1: x, @@ -38,14 +38,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l._4 : 0; - var hr = r ? r._4 : 0; + let hl = l ? l._4 : 0; + let hr = r ? r._4 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -72,10 +72,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r._3; - var rd = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._3; + let rd = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -103,11 +103,11 @@ function add(x, data, compare, param) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = compare(x, v); if (c === 0) { return /* Node */{ _0: l, @@ -124,7 +124,7 @@ function add(x, data, compare, param) { } function add$1(x, data, v) { - var X = v.compare; + let X = v.compare; return { compare: v.compare, data: add(x, data, X.compare, v.data) @@ -138,29 +138,29 @@ function empty(v) { }; } -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var V0 = { +let V0 = { compare: compare }; -var compare$1 = Caml.caml_int_compare; +let compare$1 = Caml.caml_int_compare; -var V1 = { +let V1 = { compare: compare$1 }; -var v0 = { +let v0 = { compare: V0, data: /* Empty */0 }; -var v1 = { +let v1 = { compare: V1, data: /* Empty */0 }; -var v3 = add$1(3, "a", v0); +let v3 = add$1(3, "a", v0); console.log(v3); diff --git a/jscomp/test/dist/jscomp/test/demo.js b/jscomp/test/dist/jscomp/test/demo.js index 42f8263839..080009f378 100644 --- a/jscomp/test/dist/jscomp/test/demo.js +++ b/jscomp/test/dist/jscomp/test/demo.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var BUI = require("@blp/ui"); -var Runtime = require("@runtime"); -var UI = require("@ui"); -var Curry = require("melange.js/curry.js"); +let BUI = require("@blp/ui"); +let Runtime = require("@runtime"); +let UI = require("@ui"); +let Curry = require("melange.js/curry.js"); -var data = [ +let data = [ { ticker: "GOOG", price: 700.0 @@ -22,20 +22,20 @@ var data = [ ]; function ui_layout(compile, lookup, appContext) { - var init = Curry._1(compile, "bid - ask"); - var computeFunction = { + let init = Curry._1(compile, "bid - ask"); + let computeFunction = { contents: (function (env) { return Curry._1(init, (function (key) { return Curry._2(lookup, env, key); })); }) }; - var hw1 = new BUI.HostedWindow(); - var hc = new BUI.HostedContent(); - var stackPanel = new UI.StackPanel(); - var inputCode = new UI.TextArea(); - var button = new UI.Button(); - var grid = new UI.Grid(); + let hw1 = new BUI.HostedWindow(); + let hc = new BUI.HostedContent(); + let stackPanel = new UI.StackPanel(); + let inputCode = new UI.TextArea(); + let button = new UI.Button(); + let grid = new UI.Grid(); hw1.appContext = appContext; hw1.title = "Test Application From OCaml"; hw1.content = hc; @@ -47,14 +47,14 @@ function ui_layout(compile, lookup, appContext) { stackPanel.addChild(grid); stackPanel.addChild(inputCode); stackPanel.addChild(button); - var mk_titleRow = function (text) { + let mk_titleRow = function (text) { return { label: { text: text } }; }; - var u = { + let u = { width: 200 }; grid.minHeight = 300; @@ -92,7 +92,7 @@ function ui_layout(compile, lookup, appContext) { button.minHeight = 20; button.on("click", (function (_event) { try { - var hot_function = Curry._1(compile, inputCode.text); + let hot_function = Curry._1(compile, inputCode.text); computeFunction.contents = (function (env) { return Curry._1(hot_function, (function (key) { return Curry._2(lookup, env, key); @@ -106,10 +106,10 @@ function ui_layout(compile, lookup, appContext) { })); Runtime.setInterval((function () { grid.dataSource = Array.prototype.map.call(data, (function (param) { - var price = param.price; - var bid = price + 20 * Math.random(); - var ask = price + 20 * Math.random(); - var result = Curry._1(computeFunction.contents, { + let price = param.price; + let bid = price + 20 * Math.random(); + let ask = price + 20 * Math.random(); + let result = Curry._1(computeFunction.contents, { bid: bid, ask: ask }); diff --git a/jscomp/test/dist/jscomp/test/demo_int_map.js b/jscomp/test/dist/jscomp/test/demo_int_map.js index 02da225859..a322917c8b 100644 --- a/jscomp/test/dist/jscomp/test/demo_int_map.js +++ b/jscomp/test/dist/jscomp/test/demo_int_map.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function compare(x, y) { return x - y | 0; } -var funarg = { +let funarg = { compare: compare }; @@ -22,8 +22,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -34,14 +34,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -68,10 +68,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -99,11 +99,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -118,14 +118,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -135,9 +135,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -151,11 +151,11 @@ function find(x, _param) { } function test(param) { - var m = /* Empty */0; - for(var i = 0; i <= 1000000; ++i){ + let m = /* Empty */0; + for(let i = 0; i <= 1000000; ++i){ m = Curry._3(add, i, i, m); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ Curry._2(find, i$1, m); } } diff --git a/jscomp/test/dist/jscomp/test/demo_page.js b/jscomp/test/dist/jscomp/test/demo_page.js index 2850748acb..903c316287 100644 --- a/jscomp/test/dist/jscomp/test/demo_page.js +++ b/jscomp/test/dist/jscomp/test/demo_page.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var React = require("react"); -var ReactDom = require("react-dom"); +let Curry = require("melange.js/curry.js"); +let React = require("react"); +let ReactDom = require("react-dom"); function fib(n) { if (n === 2 || n === 1) { @@ -14,8 +14,8 @@ function fib(n) { } function sum(n) { - var v = 0; - for(var i = 0; i <= n; ++i){ + let v = 0; + for(let i = 0; i <= n; ++i){ v = v + i | 0; } return v; diff --git a/jscomp/test/dist/jscomp/test/derive_projector_test.js b/jscomp/test/dist/jscomp/test/derive_projector_test.js index 14cb9364e1..994bc72bc0 100644 --- a/jscomp/test/dist/jscomp/test/derive_projector_test.js +++ b/jscomp/test/dist/jscomp/test/derive_projector_test.js @@ -51,12 +51,12 @@ function d(param) { return param.d; } -var v = { +let v = { TAG: /* D_int */0, _0: 3 }; -var h_1 = { +let h_1 = { hd: { TAG: /* D_int */0, _0: 3 @@ -86,7 +86,7 @@ var h_1 = { } }; -var h = { +let h = { hd: /* D_empty */0, tl: h_1 }; @@ -103,9 +103,9 @@ function a(param_0) { }; } -var d_empty = /* D_empty */0; +let d_empty = /* D_empty */0; -var hei = /* Hei */0; +let hei = /* Hei */0; exports.u_x = u_x; exports.b_x = b_x; diff --git a/jscomp/test/dist/jscomp/test/digest_test.js b/jscomp/test/dist/jscomp/test/digest_test.js index 29a112684d..29449ec71a 100644 --- a/jscomp/test/dist/jscomp/test/digest_test.js +++ b/jscomp/test/dist/jscomp/test/digest_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Curry = require("melange.js/curry.js"); -var Ext_array_test = require("./ext_array_test.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Digest = require("melange/digest.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Curry = require("melange.js/curry.js"); +let Ext_array_test = require("./ext_array_test.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Digest = require("melange/digest.js"); +let Stdlib__Printf = require("melange/printf.js"); function f(x) { return Stdlib__Digest.to_hex(Stdlib__Digest.string(x)); } -var ref = [ +let ref = [ "d41d8cd98f00b204e9800998ecf8427e", "0cc175b9c0f1b6a831c399e269772661", "4124bc0a9335c27f086f24ba207a4912", diff --git a/jscomp/test/dist/jscomp/test/div_by_zero_test.js b/jscomp/test/dist/jscomp/test/div_by_zero_test.js index 2fbf917171..6d42f11698 100644 --- a/jscomp/test/dist/jscomp/test/div_by_zero_test.js +++ b/jscomp/test/dist/jscomp/test/div_by_zero_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_int32 = require("melange.js/caml_int32.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Mt = require("./mt.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/dollar_escape_test.js b/jscomp/test/dist/jscomp/test/dollar_escape_test.js index 3ebc8d7c49..4046146c49 100644 --- a/jscomp/test/dist/jscomp/test/dollar_escape_test.js +++ b/jscomp/test/dist/jscomp/test/dollar_escape_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -42,9 +42,9 @@ eq("File \"jscomp/test/dollar_escape_test.ml\", line 21, characters 6-13", 3, 3) Mt.from_pair_suites("Dollar_escape_test", suites.contents); -var v = 3; +let v = 3; -var u = 3; +let u = 3; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/earger_curry_test.js b/jscomp/test/dist/jscomp/test/earger_curry_test.js index dc7ebeac60..ce09753f5d 100644 --- a/jscomp/test/dist/jscomp/test/earger_curry_test.js +++ b/jscomp/test/dist/jscomp/test/earger_curry_test.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); function map(f, a) { - var f$1 = Curry.__1(f); - var l = a.length; + let f$1 = Curry.__1(f); + let l = a.length; if (l === 0) { return []; } - var r = Caml_array.make(l, f$1(a[0])); - for(var i = 1; i < l; ++i){ + let r = Caml_array.make(l, f$1(a[0])); + for(let i = 1; i < l; ++i){ r[i] = f$1(a[i]); } return r; } function init(l, f) { - var f$1 = Curry.__1(f); + let f$1 = Curry.__1(f); if (l === 0) { return []; } @@ -31,30 +31,30 @@ function init(l, f) { _1: "Array.init" }); } - var res = Caml_array.make(l, f$1(0)); - for(var i = 1; i < l; ++i){ + let res = Caml_array.make(l, f$1(0)); + for(let i = 1; i < l; ++i){ res[i] = f$1(i); } return res; } function fold_left(f, x, a) { - var f$1 = Curry.__2(f); - var r = x; - for(var i = 0 ,i_finish = a.length; i < i_finish; ++i){ + let f$1 = Curry.__2(f); + let r = x; + for(let i = 0 ,i_finish = a.length; i < i_finish; ++i){ r = f$1(r, a[i]); } return r; } function f2(param) { - var arr = init(30000000, (function (i) { + let arr = init(30000000, (function (i) { return i; })); - var b = map((function (i) { + let b = map((function (i) { return i + i - 1; }), arr); - var v = fold_left((function (prim0, prim1) { + let v = fold_left((function (prim0, prim1) { return prim0 + prim1; }), 0, b); console.log(Stdlib.string_of_float(v)); @@ -62,11 +62,11 @@ function f2(param) { f2(undefined); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -87,11 +87,11 @@ function eq(loc, x, y) { }; } -var v = { +let v = { contents: 0 }; -var all_v = { +let all_v = { contents: /* [] */0 }; @@ -112,9 +112,9 @@ function add5(a0, a1, a2, a3, a4) { function f(x) { v.contents = v.contents + 1 | 0; - var partial_arg = 2; + let partial_arg = 2; v.contents = v.contents + 1 | 0; - var partial_arg$1 = 1; + let partial_arg$1 = 1; return function (param, param$1) { return add5(x, partial_arg$1, partial_arg, param, param$1); }; @@ -122,10 +122,10 @@ function f(x) { function g(x) { v.contents = v.contents + 1 | 0; - var partial_arg = 2; + let partial_arg = 2; v.contents = v.contents + 1 | 0; - var partial_arg$1 = 1; - var u = function (param, param$1) { + let partial_arg$1 = 1; + let u = function (param, param$1) { return add5(x, partial_arg$1, partial_arg, param, param$1); }; all_v.contents = { @@ -135,13 +135,13 @@ function g(x) { return u; } -var a = f(0)(3, 4); +let a = f(0)(3, 4); -var b = f(0)(3, 5); +let b = f(0)(3, 5); -var c = Curry._2(g(0), 3, 4); +let c = Curry._2(g(0), 3, 4); -var d = Curry._2(g(0), 3, 5); +let d = Curry._2(g(0), 3, 5); eq("File \"jscomp/test/earger_curry_test.ml\", line 118, characters 7-14", a, 10); diff --git a/jscomp/test/dist/jscomp/test/effect.js b/jscomp/test/dist/jscomp/test/effect.js index b6e6a2f296..666ea84c15 100644 --- a/jscomp/test/dist/jscomp/test/effect.js +++ b/jscomp/test/dist/jscomp/test/effect.js @@ -6,11 +6,11 @@ console.log("hello"); console.log("hey"); -var a = 3; +let a = 3; -var b = 4; +let b = 4; -var c = 3; +let c = 3; exports.a = a; exports.b = b; diff --git a/jscomp/test/dist/jscomp/test/empty_obj.js b/jscomp/test/dist/jscomp/test/empty_obj.js index c359c3e272..5b2052f570 100644 --- a/jscomp/test/dist/jscomp/test/empty_obj.js +++ b/jscomp/test/dist/jscomp/test/empty_obj.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var CamlinternalOO = require("melange/camlinternalOO.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); -var $$class = CamlinternalOO.create_table(0); +let $$class = CamlinternalOO.create_table(0); CamlinternalOO.init_class($$class); -var v = CamlinternalOO.create_object_opt(undefined, $$class); +let v = CamlinternalOO.create_object_opt(undefined, $$class); exports.v = v; /* class Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/epsilon_test.js b/jscomp/test/dist/jscomp/test/epsilon_test.js index 8c06007cf2..59d4d914bf 100644 --- a/jscomp/test/dist/jscomp/test/epsilon_test.js +++ b/jscomp/test/dist/jscomp/test/epsilon_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var v = (Number.EPSILON?Number.EPSILON:2.220446049250313e-16 +let v = (Number.EPSILON?Number.EPSILON:2.220446049250313e-16 ); -var suites_0 = [ +let suites_0 = [ "epsilon", (function (param) { return { @@ -18,7 +18,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "raw_epsilon", (function (param) { @@ -32,7 +32,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/equal_box_test.js b/jscomp/test/dist/jscomp/test/equal_box_test.js index 2082340cc9..b1d2024c80 100644 --- a/jscomp/test/dist/jscomp/test/equal_box_test.js +++ b/jscomp/test/dist/jscomp/test/equal_box_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var aa = Caml_obj.caml_equal_null; +let aa = Caml_obj.caml_equal_null; -var bb = Caml_obj.caml_equal_undefined; +let bb = Caml_obj.caml_equal_undefined; -var cc = Caml_obj.caml_equal_nullable; +let cc = Caml_obj.caml_equal_nullable; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -59,7 +59,7 @@ b("File \"jscomp/test/equal_box_test.ml\", line 31, characters 4-11", Caml_obj.c b("File \"jscomp/test/equal_box_test.ml\", line 32, characters 4-11", !Caml_obj.caml_equal_null(3, undefined)); -var v = null; +let v = null; b("File \"jscomp/test/equal_box_test.ml\", line 36, characters 4-11", 3 !== v); diff --git a/jscomp/test/dist/jscomp/test/equal_exception_test.js b/jscomp/test/dist/jscomp/test/equal_exception_test.js index 23fa8535dd..c03c4f142a 100644 --- a/jscomp/test/dist/jscomp/test/equal_exception_test.js +++ b/jscomp/test/dist/jscomp/test/equal_exception_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Bytes = require("melange/bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Bytes = require("melange/bytes.js"); -var v = "gso"; +let v = "gso"; function is_equal(param) { if (Caml_bytes.get(Stdlib__Bytes.make(3, /* 'a' */97), 0) !== /* 'a' */97) { @@ -32,7 +32,7 @@ function is_equal(param) { ] }); } - var u = Stdlib__Bytes.make(3, /* 'a' */97); + let u = Stdlib__Bytes.make(3, /* 'a' */97); u[0] = /* 'b' */98; if (u[0] !== /* 'b' */98) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -54,7 +54,7 @@ function is_exception(param) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -63,8 +63,8 @@ function is_exception(param) { } function is_normal_exception(_x) { - var A = /* @__PURE__ */Caml_exceptions.create("A"); - var v = { + let A = /* @__PURE__ */Caml_exceptions.create("A"); + let v = { MEL_EXN_ID: A, _1: 3 }; @@ -72,7 +72,7 @@ function is_normal_exception(_x) { throw new Caml_js_exceptions.MelangeError(v.MEL_EXN_ID, v); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === A) { if (exn._1 === 3) { return ; @@ -84,7 +84,7 @@ function is_normal_exception(_x) { } function is_arbitrary_exception(param) { - var A = /* @__PURE__ */Caml_exceptions.create("A"); + let A = /* @__PURE__ */Caml_exceptions.create("A"); try { throw new Caml_js_exceptions.MelangeError(A, { MEL_EXN_ID: A @@ -95,12 +95,12 @@ function is_arbitrary_exception(param) { } } -var suites_0 = [ +let suites_0 = [ "is_equal", is_equal ]; -var suites_1 = { +let suites_1 = { hd: [ "is_exception", is_exception @@ -120,12 +120,12 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; -var e = { +let e = { MEL_EXN_ID: Stdlib.Not_found }; @@ -133,7 +133,7 @@ function eq(param) { return param.MEL_EXN_ID === Stdlib.Not_found; } -var Not_found = /* @__PURE__ */Caml_exceptions.create("Equal_exception_test.Not_found"); +let Not_found = /* @__PURE__ */Caml_exceptions.create("Equal_exception_test.Not_found"); if (Caml_obj.caml_equal(e, { MEL_EXN_ID: Not_found diff --git a/jscomp/test/dist/jscomp/test/equal_test.js b/jscomp/test/dist/jscomp/test/equal_test.js index c7f65fa855..119f8b645c 100644 --- a/jscomp/test/dist/jscomp/test/equal_test.js +++ b/jscomp/test/dist/jscomp/test/equal_test.js @@ -6,13 +6,13 @@ function str_equal(x, y) { return x === y; } -var str_b = true; +let str_b = true; function int_equal(x, y) { return x === y; } -var v = false; +let v = false; exports.str_equal = str_equal; exports.str_b = str_b; diff --git a/jscomp/test/dist/jscomp/test/escape_esmodule.js b/jscomp/test/dist/jscomp/test/escape_esmodule.js index bf80f06217..d7b068239a 100644 --- a/jscomp/test/dist/jscomp/test/escape_esmodule.js +++ b/jscomp/test/dist/jscomp/test/escape_esmodule.js @@ -2,9 +2,9 @@ 'use strict'; -var $$__esModule = false; +let $$__esModule = false; -var $$default = 4; +let $$default = 4; exports.$$__esModule = $$__esModule; exports.default = $$default; diff --git a/jscomp/test/dist/jscomp/test/event_ffi.js b/jscomp/test/dist/jscomp/test/event_ffi.js index a2847be6fd..4db7f76c64 100644 --- a/jscomp/test/dist/jscomp/test/event_ffi.js +++ b/jscomp/test/dist/jscomp/test/event_ffi.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); function h0(x) { return x(); @@ -35,7 +35,7 @@ function h34(x) { } function ocaml_run(b, c) { - var x = 1; + let x = 1; return (x + b | 0) + c | 0; } @@ -63,7 +63,7 @@ function xx(param) { }; } -var test_as = Stdlib__List.map; +let test_as = Stdlib__List.map; exports.h0 = h0; exports.h00 = h00; diff --git a/jscomp/test/dist/jscomp/test/exception_alias.js b/jscomp/test/dist/jscomp/test/exception_alias.js index 6153bf96e8..8fb68b565f 100644 --- a/jscomp/test/dist/jscomp/test/exception_alias.js +++ b/jscomp/test/dist/jscomp/test/exception_alias.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var a0 = { +let a0 = { MEL_EXN_ID: Stdlib.Not_found }; -var b = Stdlib__List.length({ +let b = Stdlib__List.length({ hd: 1, tl: { hd: 2, @@ -16,7 +16,7 @@ var b = Stdlib__List.length({ } }); -var List = { +let List = { compare_lengths: Stdlib__List.compare_lengths, compare_length_with: Stdlib__List.compare_length_with, is_empty: Stdlib__List.is_empty, @@ -85,15 +85,15 @@ var List = { length: 3 }; -var a1 = a0; +let a1 = a0; -var a2 = a0; +let a2 = a0; -var a3 = a0; +let a3 = a0; -var a4 = a0; +let a4 = a0; -var a5 = a0; +let a5 = a0; exports.a0 = a0; exports.a1 = a1; diff --git a/jscomp/test/dist/jscomp/test/exception_def.js b/jscomp/test/dist/jscomp/test/exception_def.js index 19d4766839..d183a7e6ae 100644 --- a/jscomp/test/dist/jscomp/test/exception_def.js +++ b/jscomp/test/dist/jscomp/test/exception_def.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Printexc = require("melange/printexc.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Printexc = require("melange/printexc.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,54 +18,54 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var A = /* @__PURE__ */Caml_exceptions.create("Exception_def.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exception_def.A"); -var A$1 = /* @__PURE__ */Caml_exceptions.create("Exception_def.U.A"); +let A$1 = /* @__PURE__ */Caml_exceptions.create("Exception_def.U.A"); -var U = { +let U = { A: A$1 }; -var H = {}; +let H = {}; -var Bx = /* @__PURE__ */Caml_exceptions.create("Exception_def.Bx"); +let Bx = /* @__PURE__ */Caml_exceptions.create("Exception_def.Bx"); -var u = { +let u = { MEL_EXN_ID: Bx }; -var Ax = /* @__PURE__ */Caml_exceptions.create("Exception_def.Ax"); +let Ax = /* @__PURE__ */Caml_exceptions.create("Exception_def.Ax"); -var XXX = /* @__PURE__ */Caml_exceptions.create("Exception_def.XXX"); +let XXX = /* @__PURE__ */Caml_exceptions.create("Exception_def.XXX"); -var v_1 = [ +let v_1 = [ "", 0, 0 ]; -var v = { +let v = { MEL_EXN_ID: Stdlib.Match_failure, _1: v_1 }; -var H1 = /* @__PURE__ */Caml_exceptions.create("Exception_def.H1"); +let H1 = /* @__PURE__ */Caml_exceptions.create("Exception_def.H1"); -var H2 = /* @__PURE__ */Caml_exceptions.create("Exception_def.H2"); +let H2 = /* @__PURE__ */Caml_exceptions.create("Exception_def.H2"); -var h2 = { +let h2 = { MEL_EXN_ID: H2 }; -var h3 = { +let h3 = { MEL_EXN_ID: H2 }; -var h4 = { +let h4 = { MEL_EXN_ID: Stdlib.Not_found }; -var h5 = { +let h5 = { MEL_EXN_ID: Stdlib.Invalid_argument, _1: "xx" }; @@ -118,15 +118,15 @@ eq("File \"jscomp/test/exception_def.ml\", line 59, characters 6-13", p({ Mt.from_pair_suites("jscomp/test/exception_def.ml", suites.contents); -var a = 3; +let a = 3; -var Aa = Stdlib.Match_failure; +let Aa = Stdlib.Match_failure; -var H0 = Stdlib.Not_found; +let H0 = Stdlib.Not_found; -var H3 = H2; +let H3 = H2; -var H4 = Stdlib.Invalid_argument; +let H4 = Stdlib.Invalid_argument; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/exception_raise_test.js b/jscomp/test/dist/jscomp/test/exception_raise_test.js index 405f6018b1..ccc4b568d7 100644 --- a/jscomp/test/dist/jscomp/test/exception_raise_test.js +++ b/jscomp/test/dist/jscomp/test/exception_raise_test.js @@ -1,29 +1,29 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var Local = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.Local"); +let Local = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.Local"); -var B = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.B"); -var C = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.C"); +let C = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.C"); -var D = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.D"); +let D = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.D"); function appf(g, x) { - var A = /* @__PURE__ */Caml_exceptions.create("A"); + let A = /* @__PURE__ */Caml_exceptions.create("A"); try { return Curry._1(g, x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Local) { return 3; } @@ -42,15 +42,15 @@ function appf(g, x) { return 4; } } - var match = exn._1; + let match = exn._1; if (!match) { return 4; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return 4; } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return match$2.hd; } else { @@ -59,49 +59,49 @@ function appf(g, x) { } } -var A = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exception_raise_test.A"); -var f; +let f; try { f = (function () {throw (new Error ("x"))} () ); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); f = exn.MEL_EXN_ID === A ? exn._1 : 2; } -var ff; +let ff; try { ff = (function () {throw 3} () ); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); ff = exn$1.MEL_EXN_ID === A ? exn$1._1 : 2; } -var fff; +let fff; try { fff = (function () {throw 2} () ); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); fff = exn$2.MEL_EXN_ID === A ? exn$2._1 : 2; } -var a0; +let a0; try { a0 = (function (){throw 2} () ); } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === A || exn$3.MEL_EXN_ID === Js__Js_exn.$$Error) { a0 = exn$3._1; } else { @@ -116,7 +116,7 @@ catch (raw_exn$3){ } } -var a1; +let a1; try { a1 = (function (){throw 2} () @@ -126,7 +126,7 @@ catch (raw_e){ a1 = Caml_js_exceptions.internalToOCamlException(raw_e); } -var a2; +let a2; try { a2 = (function (){throw (new Error("x"))} () @@ -136,7 +136,7 @@ catch (raw_e$1){ a2 = Caml_js_exceptions.internalToOCamlException(raw_e$1); } -var suites = { +let suites = { contents: { hd: [ "File \"jscomp/test/exception_raise_test.ml\", line 114, characters 4-11", @@ -184,7 +184,7 @@ var suites = { } }; -var test_id = { +let test_id = { contents: 0 }; @@ -197,7 +197,7 @@ try { )()); } catch (raw_e$2){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e$2); + let e = Caml_js_exceptions.internalToOCamlException(raw_e$2); eq("File \"jscomp/test/exception_raise_test.ml\", line 131, characters 7-14", Caml_js_exceptions.caml_as_js_exn(e) !== undefined, true); } @@ -207,12 +207,12 @@ try { }); } catch (raw_e$3){ - var e$1 = Caml_js_exceptions.internalToOCamlException(raw_e$3); + let e$1 = Caml_js_exceptions.internalToOCamlException(raw_e$3); eq("File \"jscomp/test/exception_raise_test.ml\", line 138, characters 7-14", Caml_js_exceptions.caml_as_js_exn(e$1) !== undefined, false); } function fff0(x, g) { - var val; + let val; try { val = Curry._1(x, undefined); } @@ -224,8 +224,8 @@ function fff0(x, g) { function input_lines(ic, _acc) { while(true) { - var acc = _acc; - var line; + let acc = _acc; + let line; try { line = Stdlib.input_line(ic); } diff --git a/jscomp/test/dist/jscomp/test/exception_rebind_test.js b/jscomp/test/dist/jscomp/test/exception_rebind_test.js index e2de6f99c1..f75498cc59 100644 --- a/jscomp/test/dist/jscomp/test/exception_rebind_test.js +++ b/jscomp/test/dist/jscomp/test/exception_rebind_test.js @@ -1,41 +1,41 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Exception_def = require("./exception_def.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Exception_def = require("./exception_def.js"); +let Stdlib = require("melange/stdlib.js"); -var E = /* @__PURE__ */Caml_exceptions.create("Exception_rebind_test.A.E"); +let E = /* @__PURE__ */Caml_exceptions.create("Exception_rebind_test.A.E"); -var A = { +let A = { E: E }; -var B = { +let B = { F: E }; -var A0 = /* @__PURE__ */Caml_exceptions.create("Exception_rebind_test.A0"); +let A0 = /* @__PURE__ */Caml_exceptions.create("Exception_rebind_test.A0"); -var u0 = { +let u0 = { MEL_EXN_ID: Stdlib.Invalid_argument, _1: "x" }; -var u1 = { +let u1 = { MEL_EXN_ID: Stdlib.Invalid_argument, _1: "x" }; -var u2 = { +let u2 = { MEL_EXN_ID: Stdlib.Not_found }; -var H = Exception_def.A; +let H = Exception_def.A; -var H0 = Stdlib.Invalid_argument; +let H0 = Stdlib.Invalid_argument; -var H1 = Stdlib.Invalid_argument; +let H1 = Stdlib.Invalid_argument; exports.A = A; exports.B = B; diff --git a/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js b/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js index f2f9f0d7af..6fc4157382 100644 --- a/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js +++ b/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -32,11 +32,11 @@ function eq(loc, x, y) { }; } -var A = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.B"); -var C = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.C"); +let C = /* @__PURE__ */Caml_exceptions.create("Exception_rebound_err_test.C"); function test_js_error4(param) { try { @@ -44,7 +44,7 @@ function test_js_error4(param) { return 1; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.MEL_EXN_ID === Stdlib.Not_found) { return 2; } @@ -72,7 +72,7 @@ function f(g) { return Curry._1(g, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return 1; } diff --git a/jscomp/test/dist/jscomp/test/exception_repr_test.js b/jscomp/test/dist/jscomp/test/exception_repr_test.js index ccdf4ea02e..e1b3a34b92 100644 --- a/jscomp/test/dist/jscomp/test/exception_repr_test.js +++ b/jscomp/test/dist/jscomp/test/exception_repr_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Exception_def = require("./exception_def.js"); -var Mt = require("./mt.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Printexc = require("melange/printexc.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Exception_def = require("./exception_def.js"); +let Mt = require("./mt.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Printexc = require("melange/printexc.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -33,11 +33,11 @@ function eq(loc, x, y) { }; } -var Hi = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.Hi"); +let Hi = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.Hi"); -var Hello = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.Hello"); +let Hello = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.Hello"); -var A = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exception_repr_test.A"); Stdlib__Printexc.register_printer(function (param) { if (param.MEL_EXN_ID === Hi) { @@ -86,7 +86,7 @@ eq("File \"jscomp/test/exception_repr_test.ml\", line 27, characters 7-14", "A", Mt.from_pair_suites("Exception_repr_test", suites.contents); -var AAA = Exception_def.A; +let AAA = Exception_def.A; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/exception_value_test.js b/jscomp/test/dist/jscomp/test/exception_value_test.js index e44a176d00..0ba9ff657d 100644 --- a/jscomp/test/dist/jscomp/test/exception_value_test.js +++ b/jscomp/test/dist/jscomp/test/exception_value_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Stdlib = require("melange/stdlib.js"); function f(param) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -33,13 +33,13 @@ function hh(param) { }); } -var A = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.B"); -var C = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.C"); +let C = /* @__PURE__ */Caml_exceptions.create("Exception_value_test.C"); -var u = { +let u = { MEL_EXN_ID: A, _1: 3 }; @@ -49,7 +49,7 @@ function test_not_found(f, param) { return Curry._1(f, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return 2; } @@ -62,7 +62,7 @@ function test_js_error2(param) { return JSON.parse(" {\"x\" : }"); } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { console.log(e._1.stack); throw new Caml_js_exceptions.MelangeError(e.MEL_EXN_ID, e); diff --git a/jscomp/test/dist/jscomp/test/exn_error_pattern.js b/jscomp/test/dist/jscomp/test/exn_error_pattern.js index 5ce9a9d0b2..72622217dd 100644 --- a/jscomp/test/dist/jscomp/test/exn_error_pattern.js +++ b/jscomp/test/dist/jscomp/test/exn_error_pattern.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); function f(match) { if (Caml_exceptions.caml_is_extension(match)) { @@ -22,9 +22,9 @@ function f(match) { } -var A = /* @__PURE__ */Caml_exceptions.create("Exn_error_pattern.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Exn_error_pattern.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Exn_error_pattern.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Exn_error_pattern.B"); function g(match) { if (Caml_exceptions.caml_is_extension(match)) { @@ -41,11 +41,11 @@ function g(match) { } -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -71,7 +71,7 @@ eq("File \"jscomp/test/exn_error_pattern.ml\", line 33, characters 5-12", f({ _1: "" }), 2); -var tmp; +let tmp; try { throw new Caml_js_exceptions.MelangeError(new Error("x").MEL_EXN_ID, new Error("x")); diff --git a/jscomp/test/dist/jscomp/test/export_keyword.js b/jscomp/test/dist/jscomp/test/export_keyword.js index e4e75a8533..3ba8cea66d 100644 --- a/jscomp/test/dist/jscomp/test/export_keyword.js +++ b/jscomp/test/dist/jscomp/test/export_keyword.js @@ -2,11 +2,11 @@ 'use strict'; -var $$case = 3; +let $$case = 3; -var $$window = 2; +let $$window = 2; -var $$switch = 3; +let $$switch = 3; exports.$$case = $$case; exports.$$window = $$window; diff --git a/jscomp/test/dist/jscomp/test/ext_array_test.js b/jscomp/test/dist/jscomp/test/ext_array_test.js index c917a36e50..29787f8bce 100644 --- a/jscomp/test/dist/jscomp/test/ext_array_test.js +++ b/jscomp/test/dist/jscomp/test/ext_array_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); function reverse_range(a, i, len) { if (len === 0) { return ; } - for(var k = 0 ,k_finish = (len - 1 | 0) / 2 | 0; k <= k_finish; ++k){ - var t = a[i + k | 0]; + 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; } @@ -24,12 +24,12 @@ function reverse_in_place(a) { } function reverse(a) { - var b_len = a.length; + let b_len = a.length; if (b_len === 0) { return []; } - var b = Stdlib__Array.copy(a); - for(var i = 0; i < b_len; ++i){ + let b = Stdlib__Array.copy(a); + for(let i = 0; i < b_len; ++i){ b[i] = a[(b_len - 1 | 0) - i | 0]; } return b; @@ -39,13 +39,13 @@ function reverse_of_list(l) { if (!l) { return []; } - var len = Stdlib__List.length(l); - var a = Caml_array.make(len, l.hd); - var _i = 0; - var _param = l.tl; + let len = Stdlib__List.length(l); + let a = Caml_array.make(len, l.hd); + let _i = 0; + let _param = l.tl; while(true) { - var param = _param; - var i = _i; + let param = _param; + let i = _i; if (!param) { return a; } @@ -57,16 +57,16 @@ function reverse_of_list(l) { } function filter(f, a) { - var arr_len = a.length; - var _acc = /* [] */0; - var _i = 0; + let arr_len = a.length; + let _acc = /* [] */0; + let _i = 0; while(true) { - var i = _i; - var acc = _acc; + let i = _i; + let acc = _acc; if (i === arr_len) { return reverse_of_list(acc); } - var v = a[i]; + let v = a[i]; if (Curry._1(f, v)) { _i = i + 1 | 0; _acc = { @@ -81,17 +81,17 @@ function filter(f, a) { } function filter_map(f, a) { - var arr_len = a.length; - var _acc = /* [] */0; - var _i = 0; + let arr_len = a.length; + let _acc = /* [] */0; + let _i = 0; while(true) { - var i = _i; - var acc = _acc; + let i = _i; + let acc = _acc; if (i === arr_len) { return reverse_of_list(acc); } - var v = a[i]; - var v$1 = Curry._1(f, v); + let v = a[i]; + let v$1 = Curry._1(f, v); if (v$1 !== undefined) { _i = i + 1 | 0; _acc = { @@ -118,7 +118,7 @@ function range(from, to_) { } function map2i(f, a, b) { - var len = a.length; + let len = a.length; if (len !== b.length) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -132,13 +132,13 @@ function map2i(f, a, b) { function tolist_aux(a, f, _i, _res) { while(true) { - var res = _res; - var i = _i; + let res = _res; + let i = _i; if (i < 0) { return res; } - var v = a[i]; - var v$1 = Curry._1(f, v); + let v = a[i]; + let v$1 = Curry._1(f, v); _res = v$1 !== undefined ? ({ hd: Caml_option.valFromOption(v$1), tl: res @@ -160,15 +160,15 @@ function of_list_map(f, a) { if (!a) { return []; } - var tl = a.tl; - var hd = Curry._1(f, a.hd); - var len = Stdlib__List.length(tl) + 1 | 0; - var arr = Caml_array.make(len, hd); - var _i = 1; - var _param = tl; + let tl = a.tl; + let hd = Curry._1(f, a.hd); + let len = Stdlib__List.length(tl) + 1 | 0; + let arr = Caml_array.make(len, hd); + let _i = 1; + let _param = tl; while(true) { - var param = _param; - var i = _i; + let param = _param; + let i = _i; if (!param) { return arr; } @@ -180,10 +180,10 @@ function of_list_map(f, a) { } function rfind_with_index(arr, cmp, v) { - var len = arr.length; - var _i = len - 1 | 0; + let len = arr.length; + let _i = len - 1 | 0; while(true) { - var i = _i; + let i = _i; if (i < 0) { return i; } @@ -196,7 +196,7 @@ function rfind_with_index(arr, cmp, v) { } function rfind_and_split(arr, cmp, v) { - var i = rfind_with_index(arr, cmp, v); + let i = rfind_with_index(arr, cmp, v); if (i < 0) { return "No_split"; } else { @@ -211,10 +211,10 @@ function rfind_and_split(arr, cmp, v) { } function find_with_index(arr, cmp, v) { - var len = arr.length; - var _i = 0; + let len = arr.length; + let _i = 0; while(true) { - var i = _i; + let i = _i; if (i >= len) { return -1; } @@ -227,7 +227,7 @@ function find_with_index(arr, cmp, v) { } function find_and_split(arr, cmp, v) { - var i = find_with_index(arr, cmp, v); + let i = find_with_index(arr, cmp, v); if (i < 0) { return "No_split"; } else { @@ -242,10 +242,10 @@ function find_and_split(arr, cmp, v) { } function exists(p, a) { - var n = a.length; - var _i = 0; + let n = a.length; + let _i = 0; while(true) { - var i = _i; + let i = _i; if (i === n) { return false; } @@ -263,7 +263,7 @@ function is_empty(arr) { function unsafe_loop(_index, len, p, xs, ys) { while(true) { - var index = _index; + let index = _index; if (index >= len) { return true; } @@ -276,8 +276,8 @@ function unsafe_loop(_index, len, p, xs, ys) { } function for_all2_no_exn(p, xs, ys) { - var len_xs = xs.length; - var len_ys = ys.length; + let len_xs = xs.length; + let len_ys = ys.length; if (len_xs === len_ys) { return unsafe_loop(0, len_xs, p, xs, ys); } else { diff --git a/jscomp/test/dist/jscomp/test/ext_bytes_test.js b/jscomp/test/dist/jscomp/test/ext_bytes_test.js index 47ec5a44af..6b61a9897c 100644 --- a/jscomp/test/dist/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/dist/jscomp/test/ext_bytes_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); - -var suites = { +let Caml = require("melange.js/caml.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -23,9 +23,9 @@ function eq(loc, x, y) { } function escaped(s) { - var n = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ - var match = s[i]; + let n = 0; + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let match = s[i]; n = n + ( match >= 32 ? ( match > 92 || match < 34 ? ( @@ -45,11 +45,11 @@ function escaped(s) { if (n === s.length) { return Stdlib__Bytes.copy(s); } - var s$p = Caml_bytes.caml_create_bytes(n); + let s$p = Caml_bytes.caml_create_bytes(n); n = 0; - for(var i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ - var c = s[i$1]; - var exit = 0; + 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) { if (c !== 92) { if (c >= 127) { @@ -128,14 +128,14 @@ function escaped(s) { } function starts_with(xs, prefix, p) { - var H = /* @__PURE__ */Caml_exceptions.create("H"); - var len1 = xs.length; - var len2 = prefix.length; + let H = /* @__PURE__ */Caml_exceptions.create("H"); + let len1 = xs.length; + let len2 = prefix.length; if (len2 > len1) { return false; } try { - for(var i = 0; i < len2; ++i){ + for(let i = 0; i < len2; ++i){ if (!Curry._2(p, Caml_bytes.get(xs, i), Caml_bytes.get(prefix, i))) { throw new Caml_js_exceptions.MelangeError(H, { MEL_EXN_ID: H @@ -146,7 +146,7 @@ function starts_with(xs, prefix, p) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === H) { return false; } @@ -154,23 +154,23 @@ function starts_with(xs, prefix, p) { } } -var a = Stdlib__Bytes.init(100, Stdlib__Char.chr); +let a = Stdlib__Bytes.init(100, Stdlib__Char.chr); Stdlib__Bytes.blit(a, 5, a, 10, 10); eq("File \"jscomp/test/ext_bytes_test.ml\", line 96, characters 7-14", a, Stdlib__Bytes.of_string("\0\x01\x02\x03\x04\x05\x06\x07\b\t\x05\x06\x07\b\t\n\x0b\f\r\x0e\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abc")); -var a$1 = Stdlib__Bytes.init(100, Stdlib__Char.chr); +let a$1 = Stdlib__Bytes.init(100, Stdlib__Char.chr); Stdlib__Bytes.blit(a$1, 10, a$1, 5, 10); eq("File \"jscomp/test/ext_bytes_test.ml\", line 102, characters 7-14", a$1, Stdlib__Bytes.of_string("\0\x01\x02\x03\x04\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abc")); -var f = Stdlib__Char.chr; +let f = Stdlib__Char.chr; -var a$2 = Caml_bytes.bytes_to_string(Stdlib__Bytes.init(100, f)); +let a$2 = Caml_bytes.bytes_to_string(Stdlib__Bytes.init(100, f)); -var b = Stdlib__Bytes.init(100, (function (i) { +let b = Stdlib__Bytes.init(100, (function (i) { return /* '\000' */0; })); @@ -178,13 +178,13 @@ Stdlib__Bytes.blit_string(a$2, 10, b, 5, 10); eq("File \"jscomp/test/ext_bytes_test.ml\", line 109, characters 7-14", b, Stdlib__Bytes.of_string("\0\0\0\0\0\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")); -var s = Stdlib__Bytes.init(50000, (function (i) { +let s = Stdlib__Bytes.init(50000, (function (i) { return Stdlib__Char.chr(i % 137); })); -var s1 = Stdlib__Bytes.to_string(s); +let s1 = Stdlib__Bytes.to_string(s); -var s2 = Stdlib__Bytes.of_string(s1); +let s2 = Stdlib__Bytes.of_string(s1); eq("File \"jscomp/test/ext_bytes_test.ml\", line 115, characters 7-14", s, s2); diff --git a/jscomp/test/dist/jscomp/test/ext_filename_test.js b/jscomp/test/dist/jscomp/test/ext_filename_test.js index f85d2cc777..6793962c05 100644 --- a/jscomp/test/dist/jscomp/test/ext_filename_test.js +++ b/jscomp/test/dist/jscomp/test/ext_filename_test.js @@ -1,30 +1,30 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Ext_pervasives_test = require("./ext_pervasives_test.js"); -var Ext_string_test = require("./ext_string_test.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); -var Test_literals = require("./test_literals.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Ext_pervasives_test = require("./ext_pervasives_test.js"); +let Ext_string_test = require("./ext_string_test.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); +let Test_literals = require("./test_literals.js"); -var node_sep = "/"; +let node_sep = "/"; -var node_parent = ".."; +let node_parent = ".."; -var node_current = "."; +let node_current = "."; -var cwd = { +let cwd = { LAZY_DONE: false, VAL: (function () { return Caml_sys.caml_sys_getcwd(undefined); @@ -40,12 +40,12 @@ function path_as_directory(x) { } function absolute_path(s) { - var s$1 = Curry._1(Stdlib__Filename.is_relative, s) ? Stdlib__Filename.concat(CamlinternalLazy.force(cwd), s) : s; - var aux = function (_s) { + let s$1 = Curry._1(Stdlib__Filename.is_relative, s) ? Stdlib__Filename.concat(CamlinternalLazy.force(cwd), s) : s; + let aux = function (_s) { while(true) { - var s = _s; - var base = Curry._1(Stdlib__Filename.basename, s); - var dir = Curry._1(Stdlib__Filename.dirname, s); + let s = _s; + let base = Curry._1(Stdlib__Filename.basename, s); + let dir = Curry._1(Stdlib__Filename.dirname, s); if (dir === s) { return dir; } @@ -64,12 +64,12 @@ function absolute_path(s) { } function chop_extension(locOpt, name) { - var loc = locOpt !== undefined ? locOpt : ""; + let loc = locOpt !== undefined ? locOpt : ""; try { return Stdlib__Filename.chop_extension(name); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { return Curry._2(Stdlib__Format.ksprintf(Stdlib.invalid_arg, /* Format */{ _0: { @@ -105,7 +105,7 @@ function chop_extension_if_any(fname) { return Stdlib__Filename.chop_extension(fname); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { return fname; } @@ -113,17 +113,17 @@ function chop_extension_if_any(fname) { } } -var os_path_separator_char = Stdlib__Filename.dir_sep.charCodeAt(0); +let os_path_separator_char = Stdlib__Filename.dir_sep.charCodeAt(0); function relative_path(file_or_dir_1, file_or_dir_2) { - var relevant_dir1 = file_or_dir_1.NAME === "File" ? Curry._1(Stdlib__Filename.dirname, file_or_dir_1.VAL) : file_or_dir_1.VAL; - var relevant_dir2 = file_or_dir_2.NAME === "File" ? Curry._1(Stdlib__Filename.dirname, file_or_dir_2.VAL) : file_or_dir_2.VAL; - var dir1 = Ext_string_test.split(undefined, relevant_dir1, os_path_separator_char); - var dir2 = Ext_string_test.split(undefined, relevant_dir2, os_path_separator_char); - var go = function (_dir1, _dir2) { + let relevant_dir1 = file_or_dir_1.NAME === "File" ? Curry._1(Stdlib__Filename.dirname, file_or_dir_1.VAL) : file_or_dir_1.VAL; + let relevant_dir2 = file_or_dir_2.NAME === "File" ? Curry._1(Stdlib__Filename.dirname, file_or_dir_2.VAL) : file_or_dir_2.VAL; + 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) { - var dir2 = _dir2; - var dir1 = _dir1; + let dir2 = _dir2; + let dir1 = _dir1; if (dir1 && dir2 && dir1.hd === dir2.hd) { _dir2 = dir2.tl; _dir1 = dir1.tl; @@ -134,7 +134,7 @@ function relative_path(file_or_dir_1, file_or_dir_2) { }), dir2), dir1); }; }; - var ys = go(dir1, dir2); + let ys = go(dir1, dir2); if (ys && ys.hd === node_parent) { return Stdlib__String.concat(node_sep, ys); } else { @@ -146,9 +146,9 @@ function relative_path(file_or_dir_1, file_or_dir_2) { } function node_relative_path(node_modules_shorten, file1, dep_file) { - var file2 = dep_file.VAL; - var v = Ext_string_test.find(undefined, Test_literals.node_modules, file2); - var len = file2.length; + let file2 = dep_file.VAL; + let v = Ext_string_test.find(undefined, Test_literals.node_modules, file2); + let len = file2.length; if (!(node_modules_shorten && v >= 0)) { return relative_path(dep_file.NAME === "File" ? ({ NAME: "File", @@ -164,9 +164,9 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { VAL: absolute_path(file1.VAL) })) + (node_sep + Curry._1(Stdlib__Filename.basename, file2)); } - var skip = function (_i) { + let skip = function (_i) { while(true) { - var i = _i; + let i = _i; if (i >= len) { return Curry._1(Ext_pervasives_test.failwithf("File \"jscomp/test/ext_filename_test.ml\", line 162, characters 43-50", /* Format */{ _0: { @@ -181,7 +181,7 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { _1: "invalid path: %s" }), file2); } - var curr_char = file2.charCodeAt(i); + let curr_char = file2.charCodeAt(i); if (!(curr_char === os_path_separator_char || curr_char === /* '.' */46)) { return i; } @@ -194,11 +194,11 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { function find_root_filename(_cwd, filename) { while(true) { - var cwd = _cwd; + let cwd = _cwd; if (Caml_external_polyfill.resolve("caml_sys_file_exists")(Stdlib__Filename.concat(cwd, filename))) { return cwd; } - var cwd$p = Curry._1(Stdlib__Filename.dirname, cwd); + let cwd$p = Curry._1(Stdlib__Filename.dirname, cwd); if (cwd$p.length >= cwd.length) { return Curry._2(Ext_pervasives_test.failwithf("File \"jscomp/test/ext_filename_test.ml\", line 205, characters 13-20", /* Format */{ _0: { @@ -226,21 +226,21 @@ function find_package_json_dir(cwd) { return find_root_filename(cwd, Test_literals.bsconfig_json); } -var package_dir = { +let package_dir = { LAZY_DONE: false, VAL: (function () { - var cwd$1 = CamlinternalLazy.force(cwd); + let cwd$1 = CamlinternalLazy.force(cwd); return find_root_filename(cwd$1, Test_literals.bsconfig_json); }) }; function module_name_of_file(file) { - var s = Stdlib__Filename.chop_extension(Curry._1(Stdlib__Filename.basename, file)); + let s = Stdlib__Filename.chop_extension(Curry._1(Stdlib__Filename.basename, file)); return Caml_bytes.bytes_to_string(Stdlib__Bytes.capitalize_ascii(Caml_bytes.bytes_of_string(s))); } function module_name_of_file_if_any(file) { - var s = chop_extension_if_any(Curry._1(Stdlib__Filename.basename, file)); + let s = chop_extension_if_any(Curry._1(Stdlib__Filename.basename, file)); return Caml_bytes.bytes_to_string(Stdlib__Bytes.capitalize_ascii(Caml_bytes.bytes_of_string(s))); } @@ -257,19 +257,19 @@ function combine(p1, p2) { } function split_aux(p) { - var _p = p; - var _acc = /* [] */0; + let _p = p; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var p$1 = _p; - var dir = Curry._1(Stdlib__Filename.dirname, p$1); + let acc = _acc; + let p$1 = _p; + let dir = Curry._1(Stdlib__Filename.dirname, p$1); if (dir === p$1) { return [ dir, acc ]; } - var new_path = Curry._1(Stdlib__Filename.basename, p$1); + let new_path = Curry._1(Stdlib__Filename.basename, p$1); if (new_path === Stdlib__Filename.dir_sep) { _p = dir; continue ; @@ -284,17 +284,17 @@ function split_aux(p) { } function rel_normalized_absolute_path(from, to_) { - var match = split_aux(from); - var match$1 = split_aux(to_); - var root2 = match$1[0]; + let match = split_aux(from); + let match$1 = split_aux(to_); + let root2 = match$1[0]; if (match[0] !== root2) { return root2; } - var _xss = match[1]; - var _yss = match$1[1]; + let _xss = match[1]; + let _yss = match$1[1]; while(true) { - var yss = _yss; - var xss = _xss; + let yss = _yss; + let xss = _xss; if (!xss) { if (yss) { return Stdlib__List.fold_left(Stdlib__Filename.concat, yss.hd, yss.tl); @@ -302,7 +302,7 @@ function rel_normalized_absolute_path(from, to_) { return Ext_string_test.empty; } } - var xs = xss.tl; + let xs = xss.tl; if (!yss) { return Stdlib__List.fold_left((function (acc, param) { return Stdlib__Filename.concat(acc, Ext_string_test.parent_dir_lit); @@ -313,7 +313,7 @@ function rel_normalized_absolute_path(from, to_) { _xss = xs; continue ; } - var start = Stdlib__List.fold_left((function (acc, param) { + let start = Stdlib__List.fold_left((function (acc, param) { return Stdlib__Filename.concat(acc, Ext_string_test.parent_dir_lit); }), Ext_string_test.parent_dir_lit, xs); return Stdlib__List.fold_left(Stdlib__Filename.concat, start, yss); @@ -321,22 +321,22 @@ function rel_normalized_absolute_path(from, to_) { } function normalize_absolute_path(x) { - var drop_if_exist = function (xs) { + let drop_if_exist = function (xs) { if (xs) { return xs.tl; } else { return /* [] */0; } }; - var normalize_list = function (_acc, _paths) { + let normalize_list = function (_acc, _paths) { while(true) { - var paths = _paths; - var acc = _acc; + let paths = _paths; + let acc = _acc; if (!paths) { return acc; } - var xs = paths.tl; - var x = paths.hd; + let xs = paths.tl; + let x = paths.hd; if (x === Ext_string_test.current_dir_lit) { _paths = xs; continue ; @@ -354,15 +354,15 @@ function normalize_absolute_path(x) { continue ; }; }; - var match = split_aux(x); - var root = match[0]; - var rev_paths = normalize_list(/* [] */0, match[1]); + let match = split_aux(x); + let root = match[0]; + let rev_paths = normalize_list(/* [] */0, match[1]); if (rev_paths) { - var _acc = rev_paths.hd; - var _rev_paths = rev_paths.tl; + let _acc = rev_paths.hd; + let _rev_paths = rev_paths.tl; while(true) { - var rev_paths$1 = _rev_paths; - var acc = _acc; + let rev_paths$1 = _rev_paths; + let acc = _acc; if (!rev_paths$1) { return Stdlib__Filename.concat(root, acc); } @@ -376,7 +376,7 @@ function normalize_absolute_path(x) { } function get_extension(x) { - var pos = Ext_string_test.rindex_neg(x, /* '.' */46); + let pos = Ext_string_test.rindex_neg(x, /* '.' */46); if (pos < 0) { return ""; } else { @@ -384,7 +384,7 @@ function get_extension(x) { } } -var simple_convert_node_path_to_os_path; +let simple_convert_node_path_to_os_path; if (Stdlib__Sys.unix) { simple_convert_node_path_to_os_path = (function (x) { @@ -393,14 +393,14 @@ if (Stdlib__Sys.unix) { } else if (Stdlib__Sys.win32 || false) { simple_convert_node_path_to_os_path = Ext_string_test.replace_slash_backward; } else { - var s = "Unknown OS : " + Stdlib__Sys.os_type; + let s = "Unknown OS : " + Stdlib__Sys.os_type; throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: s }); } -var $slash$slash = Stdlib__Filename.concat; +let $slash$slash = Stdlib__Filename.concat; exports.node_sep = node_sep; exports.node_parent = node_parent; diff --git a/jscomp/test/dist/jscomp/test/ext_list_test.js b/jscomp/test/dist/jscomp/test/ext_list_test.js index e95f3aa282..ae66413322 100644 --- a/jscomp/test/dist/jscomp/test/ext_list_test.js +++ b/jscomp/test/dist/jscomp/test/ext_list_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Ext_string_test = require("./ext_string_test.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Ext_string_test = require("./ext_string_test.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); function filter_map(f, _xs) { while(true) { - var xs = _xs; + let xs = _xs; if (!xs) { return /* [] */0; } - var ys = xs.tl; - var z = Curry._1(f, xs.hd); + let ys = xs.tl; + let z = Curry._1(f, xs.hd); if (z !== undefined) { return { hd: Caml_option.valFromOption(z), @@ -29,18 +29,18 @@ function filter_map(f, _xs) { } function excludes(p, l) { - var excluded = { + let excluded = { contents: false }; - var aux = function (_accu, _param) { + let aux = function (_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return Stdlib__List.rev(accu); } - var l = param.tl; - var x = param.hd; + let l = param.tl; + let x = param.hd; if (Curry._1(p, x)) { excluded.contents = true; _param = l; @@ -54,7 +54,7 @@ function excludes(p, l) { continue ; }; }; - var v = aux(/* [] */0, l); + let v = aux(/* [] */0, l); if (excluded.contents) { return [ true, @@ -69,18 +69,18 @@ function excludes(p, l) { } function exclude_with_fact(p, l) { - var excluded = { + let excluded = { contents: undefined }; - var aux = function (_accu, _param) { + let aux = function (_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return Stdlib__List.rev(accu); } - var l = param.tl; - var x = param.hd; + let l = param.tl; + let x = param.hd; if (Curry._1(p, x)) { excluded.contents = Caml_option.some(x); _param = l; @@ -94,7 +94,7 @@ function exclude_with_fact(p, l) { continue ; }; }; - var v = aux(/* [] */0, l); + let v = aux(/* [] */0, l); return [ excluded.contents, excluded.contents !== undefined ? v : l @@ -102,21 +102,21 @@ function exclude_with_fact(p, l) { } function exclude_with_fact2(p1, p2, l) { - var excluded1 = { + let excluded1 = { contents: undefined }; - var excluded2 = { + let excluded2 = { contents: undefined }; - var aux = function (_accu, _param) { + let aux = function (_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return Stdlib__List.rev(accu); } - var l = param.tl; - var x = param.hd; + let l = param.tl; + let x = param.hd; if (Curry._1(p1, x)) { excluded1.contents = Caml_option.some(x); _param = l; @@ -135,7 +135,7 @@ function exclude_with_fact2(p1, p2, l) { continue ; }; }; - var v = aux(/* [] */0, l); + let v = aux(/* [] */0, l); return [ excluded1.contents, excluded2.contents, @@ -145,8 +145,8 @@ function exclude_with_fact2(p1, p2, l) { function same_length(_xs, _ys) { while(true) { - var ys = _ys; - var xs = _xs; + let ys = _ys; + let xs = _xs; if (!xs) { if (ys) { return false; @@ -164,15 +164,15 @@ function same_length(_xs, _ys) { } function filter_mapi(f, xs) { - var aux = function (_i, _xs) { + let aux = function (_i, _xs) { while(true) { - var xs = _xs; - var i = _i; + let xs = _xs; + let i = _i; if (!xs) { return /* [] */0; } - var ys = xs.tl; - var z = Curry._2(f, i, xs.hd); + let ys = xs.tl; + let z = Curry._2(f, i, xs.hd); if (z !== undefined) { return { hd: Caml_option.valFromOption(z), @@ -189,13 +189,13 @@ function filter_mapi(f, xs) { function filter_map2(f, _xs, _ys) { while(true) { - var ys = _ys; - var xs = _xs; + let ys = _ys; + let xs = _xs; if (xs) { if (ys) { - var vs = ys.tl; - var us = xs.tl; - var z = Curry._2(f, xs.hd, ys.hd); + let vs = ys.tl; + let us = xs.tl; + let z = Curry._2(f, xs.hd, ys.hd); if (z !== undefined) { return { hd: Caml_option.valFromOption(z), @@ -222,16 +222,16 @@ function filter_map2(f, _xs, _ys) { } function filter_map2i(f, xs, ys) { - var aux = function (_i, _xs, _ys) { + let aux = function (_i, _xs, _ys) { while(true) { - var ys = _ys; - var xs = _xs; - var i = _i; + let ys = _ys; + let xs = _xs; + let i = _i; if (xs) { if (ys) { - var vs = ys.tl; - var us = xs.tl; - var z = Curry._3(f, i, xs.hd, ys.hd); + let vs = ys.tl; + let us = xs.tl; + let z = Curry._3(f, i, xs.hd, ys.hd); if (z !== undefined) { return { hd: Caml_option.valFromOption(z), @@ -262,8 +262,8 @@ function filter_map2i(f, xs, ys) { function rev_map_append(f, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { return l2; } @@ -277,13 +277,13 @@ function rev_map_append(f, _l1, _l2) { } function flat_map2(f, lx, ly) { - var _acc = /* [] */0; - var _lx = lx; - var _ly = ly; + let _acc = /* [] */0; + let _lx = lx; + let _ly = ly; while(true) { - var ly$1 = _ly; - var lx$1 = _lx; - var acc = _acc; + let ly$1 = _ly; + let lx$1 = _lx; + let acc = _acc; if (lx$1) { if (ly$1) { _ly = ly$1.tl; @@ -308,8 +308,8 @@ function flat_map2(f, lx, ly) { function flat_map_aux(f, _acc, append, _lx) { while(true) { - var lx = _lx; - var acc = _acc; + let lx = _lx; + let acc = _acc; if (!lx) { return Stdlib__List.rev_append(acc, append); } @@ -329,8 +329,8 @@ function flat_map_acc(f, append, lx) { function map2_last(f, l1, l2) { if (l1) { - var l1$1 = l1.tl; - var u = l1.hd; + let l1$1 = l1.tl; + let u = l1.hd; if (!l1$1) { if (l2) { if (!l2.tl) { @@ -348,7 +348,7 @@ function map2_last(f, l1, l2) { } } if (l2) { - var r = Curry._3(f, false, u, l2.hd); + let r = Curry._3(f, false, u, l2.hd); return { hd: r, tl: map2_last(f, l1$1, l2.tl) @@ -372,14 +372,14 @@ function map_last(f, l1) { if (!l1) { return /* [] */0; } - var u = l1.hd; + let u = l1.hd; if (!l1.tl) { return { hd: Curry._2(f, true, u), tl: /* [] */0 }; } - var r = Curry._2(f, false, u); + let r = Curry._2(f, false, u); return { hd: r, tl: map_last(f, l1.tl) @@ -388,8 +388,8 @@ function map_last(f, l1) { function fold_right2_last(f, l1, l2, accu) { if (l1) { - var l1$1 = l1.tl; - var last1 = l1.hd; + let l1$1 = l1.tl; + let last1 = l1.hd; if (!l1$1) { if (l2) { if (!l2.tl) { @@ -425,8 +425,8 @@ function init(n, f) { } function take(n, l) { - var arr = Stdlib__Array.of_list(l); - var arr_length = arr.length; + let arr = Stdlib__Array.of_list(l); + let arr_length = arr.length; if (arr_length < n) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -440,8 +440,8 @@ function take(n, l) { } function try_take(n, l) { - var arr = Stdlib__Array.of_list(l); - var arr_length = arr.length; + let arr = Stdlib__Array.of_list(l); + let arr_length = arr.length; if (arr_length <= n) { return [ l, @@ -459,8 +459,8 @@ function try_take(n, l) { function length_compare(_l, _n) { while(true) { - var n = _n; - var l = _l; + let n = _n; + let l = _l; if (n < 0) { return "Gt"; } @@ -479,8 +479,8 @@ function length_compare(_l, _n) { function length_larger_than_n(n, _xs, _ys) { while(true) { - var ys = _ys; - var xs = _xs; + let ys = _ys; + let xs = _xs; if (!ys) { return Caml_obj.caml_equal(length_compare(xs, n), "Eq"); } @@ -494,13 +494,13 @@ function length_larger_than_n(n, _xs, _ys) { } function exclude_tail(x) { - var _acc = /* [] */0; - var _x = x; + let _acc = /* [] */0; + let _x = x; while(true) { - var x$1 = _x; - var acc = _acc; + let x$1 = _x; + let acc = _acc; if (x$1) { - var x$2 = x$1.hd; + let x$2 = x$1.hd; if (!x$1.tl) { return [ x$2, @@ -539,8 +539,8 @@ function aux(cmp, x, xss) { tl: /* [] */0 }; } - var ys = xss.tl; - var y = xss.hd; + let ys = xss.tl; + let y = xss.hd; if (Curry._2(cmp, x, Stdlib__List.hd(y))) { return { hd: { @@ -563,8 +563,8 @@ function stable_group(cmp, lst) { function drop(_n, _h) { while(true) { - var h = _h; - var n = _n; + let h = _h; + let n = _n; if (n < 0) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -588,11 +588,11 @@ function drop(_n, _h) { function find_first_not(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var a = param.hd; + let a = param.hd; if (!Curry._1(p, a)) { return Caml_option.some(a); } @@ -603,11 +603,11 @@ function find_first_not(p, _param) { function for_all_opt(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = Curry._1(p, param.hd); + let v = Curry._1(p, param.hd); if (v !== undefined) { return v; } @@ -623,11 +623,11 @@ function fold(f, l, init) { } function rev_map_acc(acc, f, l) { - var _accu = acc; - var _param = l; + let _accu = acc; + let _param = l; while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -661,8 +661,8 @@ function rev_iter(f, xs) { function for_all2_no_exn(p, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -684,11 +684,11 @@ function for_all2_no_exn(p, _l1, _l2) { function find_no_exn(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var x = param.hd; + let x = param.hd; if (Curry._1(p, x)) { return Caml_option.some(x); } @@ -699,11 +699,11 @@ function find_no_exn(p, _param) { function find_opt(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = Curry._1(p, param.hd); + let v = Curry._1(p, param.hd); if (v !== undefined) { return v; } @@ -713,20 +713,20 @@ function find_opt(p, _param) { } function split_map(f, xs) { - var _bs = /* [] */0; - var _cs = /* [] */0; - var _xs = xs; + let _bs = /* [] */0; + let _cs = /* [] */0; + let _xs = xs; while(true) { - var xs$1 = _xs; - var cs = _cs; - var bs = _bs; + let xs$1 = _xs; + let cs = _cs; + let bs = _bs; if (!xs$1) { return [ Stdlib__List.rev(bs), Stdlib__List.rev(cs) ]; } - var match = Curry._1(f, xs$1.hd); + let match = Curry._1(f, xs$1.hd); _xs = xs$1.tl; _cs = { hd: match[1], @@ -741,7 +741,7 @@ function split_map(f, xs) { } function reduce_from_right(fn, lst) { - var match = Stdlib__List.rev(lst); + let match = Stdlib__List.rev(lst); if (match) { return Stdlib__List.fold_left((function (x, y) { return Curry._2(fn, y, x); @@ -770,7 +770,7 @@ function create_ref_empty(param) { } function ref_top(x) { - var match = x.contents; + let match = x.contents; if (match) { return match.hd; } @@ -781,7 +781,7 @@ function ref_top(x) { } function ref_empty(x) { - var match = x.contents; + let match = x.contents; if (match) { return false; } else { @@ -797,7 +797,7 @@ function ref_push(x, refs) { } function ref_pop(refs) { - var match = refs.contents; + let match = refs.contents; if (match) { refs.contents = match.tl; return match.hd; @@ -809,13 +809,13 @@ function ref_pop(refs) { } function rev_except_last(xs) { - var _acc = /* [] */0; - var _xs = xs; + let _acc = /* [] */0; + let _xs = xs; while(true) { - var xs$1 = _xs; - var acc = _acc; + let xs$1 = _xs; + let acc = _acc; if (xs$1) { - var x = xs$1.hd; + let x = xs$1.hd; if (!xs$1.tl) { return [ acc, @@ -837,14 +837,14 @@ function rev_except_last(xs) { } function sort_via_array(cmp, lst) { - var arr = Stdlib__Array.of_list(lst); + let arr = Stdlib__Array.of_list(lst); Stdlib__Array.sort(cmp, arr); return Stdlib__Array.to_list(arr); } function last(_xs) { while(true) { - var xs = _xs; + let xs = _xs; if (xs) { if (!xs.tl) { return xs.hd; @@ -861,9 +861,9 @@ function last(_xs) { function assoc_by_string(def, k, _lst) { while(true) { - var lst = _lst; + let lst = _lst; if (lst) { - var match = lst.hd; + let match = lst.hd; if (match[0] === k) { return match[1]; } @@ -886,9 +886,9 @@ function assoc_by_string(def, k, _lst) { function assoc_by_int(def, k, _lst) { while(true) { - var lst = _lst; + let lst = _lst; if (lst) { - var match = lst.hd; + let match = lst.hd; if (match[0] === k) { return match[1]; } diff --git a/jscomp/test/dist/jscomp/test/ext_log_test.js b/jscomp/test/dist/jscomp/test/ext_log_test.js index f84fffc704..172ebbbfed 100644 --- a/jscomp/test/dist/jscomp/test/ext_log_test.js +++ b/jscomp/test/dist/jscomp/test/ext_log_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Format = require("melange/format.js"); +let CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Format = require("melange/format.js"); function $caret$caret(param, param$1) { return /* Format */{ diff --git a/jscomp/test/dist/jscomp/test/ext_pervasives_test.js b/jscomp/test/dist/jscomp/test/ext_pervasives_test.js index fdbec24a2a..1c40cd1935 100644 --- a/jscomp/test/dist/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/dist/jscomp/test/ext_pervasives_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Arg = require("melange/arg.js"); -var Stdlib__Format = require("melange/format.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Arg = require("melange/arg.js"); +let Stdlib__Format = require("melange/format.js"); function $$finally(v, action, f) { - var e; + let e; try { e = Curry._1(f, v); } @@ -28,21 +28,21 @@ function with_file_as_chan(filename, f) { function with_file_as_pp(filename, f) { return $$finally(Stdlib.open_out_bin(filename), Stdlib.close_out, (function (chan) { - var fmt = Stdlib__Format.formatter_of_out_channel(chan); - var v = Curry._1(f, fmt); + let fmt = Stdlib__Format.formatter_of_out_channel(chan); + let v = Curry._1(f, fmt); Stdlib__Format.pp_print_flush(fmt, undefined); return v; })); } function is_pos_pow(n) { - var E = /* @__PURE__ */Caml_exceptions.create("E"); + let E = /* @__PURE__ */Caml_exceptions.create("E"); try { - var _c = 0; - var _n = n; + let _c = 0; + let _n = n; while(true) { - var n$1 = _n; - var c = _c; + let n$1 = _n; + let c = _c; if (n$1 <= 0) { return -2; } @@ -60,7 +60,7 @@ function is_pos_pow(n) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === E) { return -1; } @@ -70,7 +70,7 @@ function is_pos_pow(n) { function failwithf(loc, fmt) { return Stdlib__Format.ksprintf((function (s) { - var s$1 = loc + s; + let s$1 = loc + s; throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: s$1 @@ -92,8 +92,8 @@ function bad_argf(fmt) { } function hash_variant(s) { - var accu = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let accu = 0; + 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/dist/jscomp/test/ext_string_test.js b/jscomp/test/dist/jscomp/test/ext_string_test.js index 8f892ff18b..71300e7f5e 100644 --- a/jscomp/test/dist/jscomp/test/ext_string_test.js +++ b/jscomp/test/dist/jscomp/test/ext_string_test.js @@ -1,26 +1,26 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Ext_bytes_test = require("./ext_bytes_test.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Ext_bytes_test = require("./ext_bytes_test.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); function split_by(keep_emptyOpt, is_delim, str) { - var keep_empty = keep_emptyOpt !== undefined ? keep_emptyOpt : false; - var len = str.length; - var _acc = /* [] */0; - var _last_pos = len; - var _pos = len - 1 | 0; + let keep_empty = keep_emptyOpt !== undefined ? keep_emptyOpt : false; + let len = str.length; + let _acc = /* [] */0; + let _last_pos = len; + let _pos = len - 1 | 0; while(true) { - var pos = _pos; - var last_pos = _last_pos; - var acc = _acc; + let pos = _pos; + let last_pos = _last_pos; + let acc = _acc; if (pos === -1) { if (last_pos === 0 && !keep_empty) { return acc; @@ -32,9 +32,9 @@ function split_by(keep_emptyOpt, is_delim, str) { } } if (Curry._1(is_delim, Caml_string.get(str, pos))) { - var new_len = (last_pos - pos | 0) - 1 | 0; + let new_len = (last_pos - pos | 0) - 1 | 0; if (new_len !== 0 || keep_empty) { - var v = Stdlib__String.sub(str, pos + 1 | 0, new_len); + let v = Stdlib__String.sub(str, pos + 1 | 0, new_len); _pos = pos - 1 | 0; _last_pos = pos; _acc = { @@ -53,23 +53,23 @@ function split_by(keep_emptyOpt, is_delim, str) { } function trim(s) { - var i = 0; - var j = s.length; + let i = 0; + let j = s.length; while((function () { - var tmp = false; + let tmp = false; if (i < j) { - var u = s.charCodeAt(i); + let u = s.charCodeAt(i); tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; } return tmp; })()) { i = i + 1 | 0; }; - var k = j - 1 | 0; + let k = j - 1 | 0; while((function () { - var tmp = false; + let tmp = false; if (k >= i) { - var u = s.charCodeAt(k); + let u = s.charCodeAt(k); tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; } return tmp; @@ -100,12 +100,12 @@ function quick_split_by_ws(str) { } function starts_with(s, beg) { - var beg_len = beg.length; - var s_len = s.length; + let beg_len = beg.length; + let s_len = s.length; if (beg_len > s_len) { return false; } - var i = 0; + let i = 0; while(i < beg_len && s[i] === beg[i]) { i = i + 1 | 0; }; @@ -113,16 +113,16 @@ function starts_with(s, beg) { } function ends_with_index(s, end_) { - var s_finish = s.length - 1 | 0; - var s_beg = end_.length - 1 | 0; + let s_finish = s.length - 1 | 0; + let s_beg = end_.length - 1 | 0; if (s_beg > s_finish) { return -1; } - var _j = s_finish; - var _k = s_beg; + let _j = s_finish; + let _k = s_beg; while(true) { - var k = _k; - var j = _j; + let k = _k; + let j = _j; if (k < 0) { return j + 1 | 0; } @@ -140,7 +140,7 @@ function ends_with(s, end_) { } function ends_with_then_chop(s, beg) { - var i = ends_with_index(s, beg); + let i = ends_with_index(s, beg); if (i >= 0) { return Stdlib__String.sub(s, 0, i); } @@ -154,13 +154,13 @@ function check_any_suffix_case(s, suffixes) { } function check_any_suffix_case_then_chop(s, suffixes) { - var _suffixes = suffixes; + let _suffixes = suffixes; while(true) { - var suffixes$1 = _suffixes; + let suffixes$1 = _suffixes; if (!suffixes$1) { return ; } - var id = ends_with_index(s, suffixes$1.hd); + let id = ends_with_index(s, suffixes$1.hd); if (id >= 0) { return Stdlib__String.sub(s, 0, id); } @@ -170,13 +170,13 @@ function check_any_suffix_case_then_chop(s, suffixes) { } function escaped(s) { - var needs_escape = function (_i) { + let needs_escape = function (_i) { while(true) { - var i = _i; + let i = _i; if (i >= s.length) { return false; } - var match = s.charCodeAt(i); + let match = s.charCodeAt(i); if (match < 32) { return true; } @@ -203,7 +203,7 @@ function escaped(s) { function unsafe_for_all_range(s, _start, finish, p) { while(true) { - var start = _start; + let start = _start; if (start > finish) { return true; } @@ -216,7 +216,7 @@ function unsafe_for_all_range(s, _start, finish, p) { } function for_all_range(s, start, finish, p) { - var len = s.length; + let len = s.length; if (start < 0 || finish >= len) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -235,9 +235,9 @@ function is_empty(s) { } function repeat(n, s) { - var len = s.length; - var res = Caml_bytes.caml_create_bytes(Math.imul(n, len)); - for(var i = 0; i < n; ++i){ + let len = s.length; + let res = Caml_bytes.caml_create_bytes(Math.imul(n, len)); + for(let i = 0; i < n; ++i){ Stdlib__String.blit(s, 0, res, Math.imul(i, len), len); } return Stdlib__Bytes.to_string(res); @@ -245,9 +245,9 @@ function repeat(n, s) { function unsafe_is_sub(sub, i, s, j, len) { if ((j + len | 0) <= s.length) { - var _k = 0; + let _k = 0; while(true) { - var k = _k; + let k = _k; if (k === len) { return true; } @@ -262,13 +262,13 @@ function unsafe_is_sub(sub, i, s, j, len) { } } -var Local_exit = /* @__PURE__ */Caml_exceptions.create("Ext_string_test.Local_exit"); +let Local_exit = /* @__PURE__ */Caml_exceptions.create("Ext_string_test.Local_exit"); function find(startOpt, sub, s) { - var start = startOpt !== undefined ? startOpt : 0; - var n = sub.length; - var s_len = s.length; - var i = start; + let start = startOpt !== undefined ? startOpt : 0; + let n = sub.length; + let s_len = s.length; + let i = start; try { while((i + n | 0) <= s_len) { if (unsafe_is_sub(sub, 0, s, i, n)) { @@ -281,7 +281,7 @@ function find(startOpt, sub, s) { return -1; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Local_exit) { return i; } @@ -294,19 +294,19 @@ function contain_substring(s, sub) { } function non_overlap_count(sub, s) { - var sub_len = sub.length; + let sub_len = sub.length; if (sub.length === 0) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", _1: "Ext_string_test.non_overlap_count" }); } - var _acc = 0; - var _off = 0; + let _acc = 0; + let _off = 0; while(true) { - var off = _off; - var acc = _acc; - var i = find(off, sub, s); + let off = _off; + let acc = _acc; + let i = find(off, sub, s); if (i < 0) { return acc; } @@ -317,8 +317,8 @@ function non_overlap_count(sub, s) { } function rfind(sub, s) { - var n = sub.length; - var i = s.length - n | 0; + let n = sub.length; + let i = s.length - n | 0; try { while(i >= 0) { if (unsafe_is_sub(sub, 0, s, i, n)) { @@ -331,7 +331,7 @@ function rfind(sub, s) { return -1; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Local_exit) { return i; } @@ -340,11 +340,11 @@ function rfind(sub, s) { } function tail_from(s, x) { - var len = s.length; + let len = s.length; if (x <= len) { return Stdlib__String.sub(s, x, len - x | 0); } - var s$1 = "Ext_string_test.tail_from " + (s + (" : " + String(x))); + let s$1 = "Ext_string_test.tail_from " + (s + (" : " + String(x))); throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", _1: s$1 @@ -352,11 +352,11 @@ function tail_from(s, x) { } function digits_of_str(s, offset, x) { - var _i = 0; - var _acc = 0; + let _i = 0; + let _acc = 0; while(true) { - var acc = _acc; - var i = _i; + let acc = _acc; + let i = _i; if (i >= x) { return acc; } @@ -367,13 +367,13 @@ function digits_of_str(s, offset, x) { } function starts_with_and_number(s, offset, beg) { - var beg_len = beg.length; - var s_len = s.length; - var finish_delim = offset + beg_len | 0; + let beg_len = beg.length; + let s_len = s.length; + let finish_delim = offset + beg_len | 0; if (finish_delim > s_len) { return -1; } - var i = offset; + let i = offset; while(i < finish_delim && s[i] === beg[i - offset | 0]) { i = i + 1 | 0; }; @@ -392,16 +392,16 @@ function unsafe_concat_with_length(len, sep, l) { if (!l) { return ""; } - var hd = l.hd; - var r = Caml_bytes.caml_create_bytes(len); - var hd_len = hd.length; - var sep_len = sep.length; + let hd = l.hd; + let r = Caml_bytes.caml_create_bytes(len); + let hd_len = hd.length; + let sep_len = sep.length; Caml_bytes.caml_blit_string(hd, 0, r, 0, hd_len); - var pos = { + let pos = { contents: hd_len }; Stdlib__List.iter((function (s) { - var s_len = s.length; + let s_len = s.length; Caml_bytes.caml_blit_string(sep, 0, r, pos.contents, sep_len); pos.contents = pos.contents + sep_len | 0; Caml_bytes.caml_blit_string(s, 0, r, pos.contents, s_len); @@ -412,7 +412,7 @@ function unsafe_concat_with_length(len, sep, l) { function rindex_rec(s, _i, c) { while(true) { - var i = _i; + let i = _i; if (i < 0) { return i; } @@ -426,7 +426,7 @@ function rindex_rec(s, _i, c) { function rindex_rec_opt(s, _i, c) { while(true) { - var i = _i; + let i = _i; if (i < 0) { return ; } @@ -447,11 +447,11 @@ function rindex_opt(s, c) { } function is_valid_module_file(s) { - var len = s.length; + let len = s.length; if (len <= 0) { return false; } - var match = s.charCodeAt(0); + let match = s.charCodeAt(0); if (match >= 91) { if (match > 122 || match < 97) { return false; @@ -476,14 +476,14 @@ function is_valid_module_file(s) { } function is_valid_npm_package_name(s) { - var len = s.length; + let len = s.length; if (len > 214) { return false; } if (len <= 0) { return false; } - var match = s.charCodeAt(0); + let match = s.charCodeAt(0); if (match >= 97) { if (match >= 123) { return false; @@ -508,7 +508,7 @@ function is_valid_npm_package_name(s) { } function is_valid_source_name(name) { - var x = check_any_suffix_case_then_chop(name, { + let x = check_any_suffix_case_then_chop(name, { hd: ".ml", tl: { hd: ".re", @@ -534,7 +534,7 @@ function is_valid_source_name(name) { function unsafe_no_char(x, ch, _i, last_idx) { while(true) { - var i = _i; + let i = _i; if (i > last_idx) { return true; } @@ -548,7 +548,7 @@ function unsafe_no_char(x, ch, _i, last_idx) { function unsafe_no_char_idx(x, ch, _i, last_idx) { while(true) { - var i = _i; + let i = _i; if (i > last_idx) { return -1; } @@ -561,7 +561,7 @@ function unsafe_no_char_idx(x, ch, _i, last_idx) { } function no_char(x, ch, i, len) { - var str_len = x.length; + let str_len = x.length; if (i < 0 || i >= str_len || len >= str_len) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -580,7 +580,7 @@ function no_slash_idx(x) { } function replace_slash_backward(x) { - var len = x.length; + let len = x.length; if (unsafe_no_char(x, /* '/' */47, 0, len - 1 | 0)) { return x; } else { @@ -595,7 +595,7 @@ function replace_slash_backward(x) { } function replace_backward_slash(x) { - var len = x.length; + let len = x.length; if (unsafe_no_char(x, /* '\\' */92, 0, len - 1 | 0)) { return x; } else { @@ -609,33 +609,33 @@ function replace_backward_slash(x) { } } -var empty = ""; +let empty = ""; -var single_space = " "; +let single_space = " "; function concat_array(sep, s) { - var s_len = s.length; + let s_len = s.length; if (s_len === 0) { return empty; } if (s_len === 1) { return s[0]; } - var sep_len = sep.length; - var len = 0; - for(var i = 0; i < s_len; ++i){ + let sep_len = sep.length; + let len = 0; + for(let i = 0; i < s_len; ++i){ len = len + s[i].length | 0; } - var target = Caml_bytes.caml_create_bytes(len + Math.imul(s_len - 1 | 0, sep_len) | 0); - var hd = s[0]; - var hd_len = hd.length; + let target = Caml_bytes.caml_create_bytes(len + Math.imul(s_len - 1 | 0, sep_len) | 0); + let hd = s[0]; + let hd_len = hd.length; Caml_bytes.caml_blit_string(hd, 0, target, 0, hd_len); - var current_offset = hd_len; - for(var i$1 = 1; i$1 < s_len; ++i$1){ + let current_offset = hd_len; + for(let i$1 = 1; i$1 < s_len; ++i$1){ Caml_bytes.caml_blit_string(sep, 0, target, current_offset, sep_len); - var cur = s[i$1]; - var cur_len = cur.length; - var new_off_set = current_offset + sep_len | 0; + let cur = s[i$1]; + let cur_len = cur.length; + let new_off_set = current_offset + sep_len | 0; Caml_bytes.caml_blit_string(cur, 0, target, new_off_set, cur_len); current_offset = new_off_set + cur_len | 0; } @@ -643,11 +643,11 @@ function concat_array(sep, s) { } function concat3(a, b, c) { - var a_len = a.length; - var b_len = b.length; - var c_len = c.length; - var len = (a_len + b_len | 0) + c_len | 0; - var target = Caml_bytes.caml_create_bytes(len); + let a_len = a.length; + let b_len = b.length; + let c_len = c.length; + let len = (a_len + b_len | 0) + c_len | 0; + let target = Caml_bytes.caml_create_bytes(len); Caml_bytes.caml_blit_string(a, 0, target, 0, a_len); Caml_bytes.caml_blit_string(b, 0, target, a_len, b_len); Caml_bytes.caml_blit_string(c, 0, target, a_len + b_len | 0, c_len); @@ -655,12 +655,12 @@ function concat3(a, b, c) { } function concat4(a, b, c, d) { - var a_len = a.length; - var b_len = b.length; - var c_len = c.length; - var d_len = d.length; - var len = ((a_len + b_len | 0) + c_len | 0) + d_len | 0; - var target = Caml_bytes.caml_create_bytes(len); + let a_len = a.length; + let b_len = b.length; + let c_len = c.length; + let d_len = d.length; + let len = ((a_len + b_len | 0) + c_len | 0) + d_len | 0; + let target = Caml_bytes.caml_create_bytes(len); Caml_bytes.caml_blit_string(a, 0, target, 0, a_len); Caml_bytes.caml_blit_string(b, 0, target, a_len, b_len); Caml_bytes.caml_blit_string(c, 0, target, a_len + b_len | 0, c_len); @@ -669,13 +669,13 @@ function concat4(a, b, c, d) { } function concat5(a, b, c, d, e) { - var a_len = a.length; - var b_len = b.length; - var c_len = c.length; - var d_len = d.length; - var e_len = e.length; - var len = (((a_len + b_len | 0) + c_len | 0) + d_len | 0) + e_len | 0; - var target = Caml_bytes.caml_create_bytes(len); + let a_len = a.length; + let b_len = b.length; + let c_len = c.length; + let d_len = d.length; + let e_len = e.length; + let len = (((a_len + b_len | 0) + c_len | 0) + d_len | 0) + e_len | 0; + let target = Caml_bytes.caml_create_bytes(len); Caml_bytes.caml_blit_string(a, 0, target, 0, a_len); Caml_bytes.caml_blit_string(b, 0, target, a_len, b_len); Caml_bytes.caml_blit_string(c, 0, target, a_len + b_len | 0, c_len); @@ -701,15 +701,15 @@ function inter4(a, b, c, d) { ]); } -var check_suffix_case = ends_with; +let check_suffix_case = ends_with; -var check_suffix_case_then_chop = ends_with_then_chop; +let check_suffix_case_then_chop = ends_with_then_chop; -var single_colon = ":"; +let single_colon = ":"; -var parent_dir_lit = ".."; +let parent_dir_lit = ".."; -var current_dir_lit = "."; +let current_dir_lit = "."; exports.split_by = split_by; exports.trim = trim; diff --git a/jscomp/test/dist/jscomp/test/ext_sys_test.js b/jscomp/test/dist/jscomp/test/ext_sys_test.js index 15a0fdcabd..eaca059514 100644 --- a/jscomp/test/dist/jscomp/test/ext_sys_test.js +++ b/jscomp/test/dist/jscomp/test/ext_sys_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__Sys = require("melange/sys.js"); +let Stdlib__Sys = require("melange/sys.js"); -var is_windows_or_cygwin = Stdlib__Sys.win32 || false; +let is_windows_or_cygwin = Stdlib__Sys.win32 || false; exports.is_windows_or_cygwin = is_windows_or_cygwin; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/extensible_variant_test.js b/jscomp/test/dist/jscomp/test/extensible_variant_test.js index 7865d359e5..ffe08d061f 100644 --- a/jscomp/test/dist/jscomp/test/extensible_variant_test.js +++ b/jscomp/test/dist/jscomp/test/extensible_variant_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); -var Str = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.Str"); +let Str = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.Str"); -var Int = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.N.Int"); +let Int = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.N.Int"); -var N = { +let N = { Int: Int }; -var Int$1 = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.Int"); +let Int$1 = /* @__PURE__ */Caml_exceptions.create("Extensible_variant_test.Int"); function to_int(x) { if (x.MEL_EXN_ID === Str) { @@ -35,7 +35,7 @@ function to_int(x) { }); } -var suites_0 = [ +let suites_0 = [ "test_int", (function (param) { return { @@ -50,7 +50,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "test_int2", (function (param) { @@ -83,7 +83,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/external_polyfill_test.js b/jscomp/test/dist/jscomp/test/external_polyfill_test.js index 3c3ea02266..cd63f2bdd7 100644 --- a/jscomp/test/dist/jscomp/test/external_polyfill_test.js +++ b/jscomp/test/dist/jscomp/test/external_polyfill_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Mt = require("./mt.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -22,7 +22,7 @@ require('melange.js/caml_external_polyfill.js') }) ; -var h = Caml_external_polyfill.resolve("caml_fancy_add")(1, 2); +let h = Caml_external_polyfill.resolve("caml_fancy_add")(1, 2); eq("File \"jscomp/test/external_polyfill_test.ml\", line 20, characters 5-12", h, 12); diff --git a/jscomp/test/dist/jscomp/test/external_ppx.js b/jscomp/test/dist/jscomp/test/external_ppx.js index aea2cc9c1c..d9f3657673 100644 --- a/jscomp/test/dist/jscomp/test/external_ppx.js +++ b/jscomp/test/dist/jscomp/test/external_ppx.js @@ -2,7 +2,7 @@ 'use strict'; -var u = { +let u = { hi: 2, lo: 3, lo2: {hi:-3 }, diff --git a/jscomp/test/dist/jscomp/test/ffi_arity_test.js b/jscomp/test/dist/jscomp/test/ffi_arity_test.js index 12b5daa48c..55b2c24032 100644 --- a/jscomp/test/dist/jscomp/test/ffi_arity_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_arity_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); function f(v) { if (v % 2 === 0) { @@ -16,7 +16,7 @@ function f(v) { } } -var v = [ +let v = [ 1, 2, 3 @@ -24,7 +24,7 @@ var v = [ return f(a)(b); }); -var vv = [ +let vv = [ 1, 2, 3 @@ -32,7 +32,7 @@ var vv = [ return a + b | 0; }); -var hh = [ +let hh = [ "1", "2", "3" @@ -44,7 +44,7 @@ function u() { return 3; } -var vvv = { +let vvv = { contents: 0 }; @@ -64,7 +64,7 @@ function abc(x, y, z) { return (x + y | 0) + z | 0; } -var abc_u = abc; +let abc_u = abc; g(); diff --git a/jscomp/test/dist/jscomp/test/ffi_array_test.js b/jscomp/test/dist/jscomp/test/ffi_array_test.js index ec57177047..8193b9a51c 100644 --- a/jscomp/test/dist/jscomp/test/ffi_array_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_array_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/ffi_js_test.js b/jscomp/test/dist/jscomp/test/ffi_js_test.js index 52c061ed2a..57b30e2d02 100644 --- a/jscomp/test/dist/jscomp/test/ffi_js_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_js_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var keys = (function (x){return Object.keys(x)} +let keys = (function (x){return Object.keys(x)} ); function $$higher_order(x){ @@ -13,17 +13,17 @@ function $$higher_order(x){ } ; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -40,12 +40,12 @@ function eq(loc, param) { }; } -var int_config = { +let int_config = { hi: 3, low: 32 }; -var string_config = { +let string_config = { hi: 3, low: "32" }; @@ -55,7 +55,7 @@ eq("File \"jscomp/test/ffi_js_test.ml\", line 32, characters 5-12", [ $$higher_order(1)(2, 3) ]); -var same_type_0 = { +let same_type_0 = { hd: int_config, tl: { hd: { @@ -66,7 +66,7 @@ var same_type_0 = { } }; -var same_type_1 = { +let same_type_1 = { hd: string_config, tl: { hd: { @@ -77,12 +77,12 @@ var same_type_1 = { } }; -var same_type = [ +let same_type = [ same_type_0, same_type_1 ]; -var v_obj = { +let v_obj = { hi: (function () { console.log("hei"); }) @@ -108,11 +108,11 @@ eq("File \"jscomp/test/ffi_js_test.ml\", line 47, characters 5-12", [ 0 ]); -var u = { +let u = { contents: 3 }; -var side_effect_config = (u.contents = u.contents + 1 | 0, { +let side_effect_config = (u.contents = u.contents + 1 | 0, { hi: 3, low: 32 }); @@ -156,15 +156,15 @@ function ffff(x) { "3", 3 ]; - var match = x[3]; + let match = x[3]; console.log([ match[0], match[1] ]); console.log(x.getGADT); - var match$1 = x.getGADT2; + let match$1 = x.getGADT2; console.log(match$1[0], match$1[1]); - var match$2 = x[0]; + let match$2 = x[0]; console.log(match$2[0], match$2[1]); x[0] = [ 1, diff --git a/jscomp/test/dist/jscomp/test/ffi_splice_test.js b/jscomp/test/dist/jscomp/test/ffi_splice_test.js index 990ac7dbed..34d997706a 100644 --- a/jscomp/test/dist/jscomp/test/ffi_splice_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_splice_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -52,9 +52,9 @@ function f(x) { return x.test("a", "b").test("a", "b"); } -var v = new Make(1, 2, 3, 4); +let v = new Make(1, 2, 3, 4); -var u = v.sum(); +let u = v.sum(); eq("File \"jscomp/test/ffi_splice_test.ml\", line 61, characters 12-19", u, 10); diff --git a/jscomp/test/dist/jscomp/test/ffi_test.js b/jscomp/test/dist/jscomp/test/ffi_test.js index 8d9fa07dd4..955a0f0c72 100644 --- a/jscomp/test/dist/jscomp/test/ffi_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_test.js @@ -6,29 +6,29 @@ function u(param) { return xx(3); } -var Textarea = {}; +let Textarea = {}; -var $$Int32Array = {}; +let $$Int32Array = {}; function v(param) { - var u = new TextArea(); + let u = new TextArea(); u.minHeight = 3; return u.minHeight; } function f(param) { - var v = new Int32Array(32); + let v = new Int32Array(32); v[0] = 3; return v[0]; } -var a = true; +let a = true; -var b = false; +let b = false; -var c = null; +let c = null; -var d; +let d; exports.u = u; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/fib.js b/jscomp/test/dist/jscomp/test/fib.js index 43a24e55f1..a292b1b1a9 100644 --- a/jscomp/test/dist/jscomp/test/fib.js +++ b/jscomp/test/dist/jscomp/test/fib.js @@ -11,13 +11,13 @@ function fib(n) { } function fib2(n) { - var _a = 1; - var _b = 1; - var _i = 0; + let _a = 1; + let _b = 1; + let _i = 0; while(true) { - var i = _i; - var b = _b; - var a = _a; + let i = _i; + let b = _b; + let a = _a; if (n === i) { return a; } @@ -29,10 +29,10 @@ function fib2(n) { } function fib3(n) { - var a = 1; - var b = 1; - for(var _i = 1; _i <= n; ++_i){ - var tmp = a; + let a = 1; + let b = 1; + for(let _i = 1; _i <= n; ++_i){ + let tmp = a; a = b; b = b + tmp | 0; } diff --git a/jscomp/test/dist/jscomp/test/flattern_order_test.js b/jscomp/test/dist/jscomp/test/flattern_order_test.js index 57536395cb..908a71ba4a 100644 --- a/jscomp/test/dist/jscomp/test/flattern_order_test.js +++ b/jscomp/test/dist/jscomp/test/flattern_order_test.js @@ -4,7 +4,7 @@ function even(_n) { while(true) { - var n = _n; + let n = _n; if (n === 0) { return true; } @@ -17,7 +17,7 @@ function even2(n) { if (n === 0) { return true; } else { - var n$1 = n - 1 | 0; + let n$1 = n - 1 | 0; if (n$1 === 1) { return true; } else { @@ -26,7 +26,7 @@ function even2(n) { } } -var v = { +let v = { contents: 0 }; @@ -38,7 +38,7 @@ function obj_set(i) { v.contents = i; } -var obj = { +let obj = { get: obj_get, set: obj_set }; diff --git a/jscomp/test/dist/jscomp/test/flexible_array_test.js b/jscomp/test/dist/jscomp/test/flexible_array_test.js index 0928e68f4c..726f0eea7e 100644 --- a/jscomp/test/dist/jscomp/test/flexible_array_test.js +++ b/jscomp/test/dist/jscomp/test/flexible_array_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Format = require("melange/format.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Format = require("melange/format.js"); function sub(_tr, _k) { while(true) { - var k = _k; - var tr = _tr; + let k = _k; + let tr = _tr; if (tr) { if (k === 1) { return tr._0; @@ -34,8 +34,8 @@ function sub(_tr, _k) { function update(tr, k, w) { if (tr) { - var r = tr._2; - var l = tr._1; + let r = tr._2; + let l = tr._1; if (k === 1) { return /* Br */{ _0: w, @@ -43,7 +43,7 @@ function update(tr, k, w) { _2: r }; } - var v = tr._0; + let v = tr._0; if (k % 2 === 0) { return /* Br */{ _0: v, @@ -75,9 +75,9 @@ function $$delete(tr, n) { if (n === 1) { return /* Lf */0; } - var r = tr._2; - var l = tr._1; - var v = tr._0; + let r = tr._2; + let l = tr._1; + let v = tr._0; if (n % 2 === 0) { return /* Br */{ _0: v, @@ -115,7 +115,7 @@ function loext(tr, w) { function lorem(tr) { if (tr) { - var l = tr._1; + let l = tr._1; if (l) { return /* Br */{ _0: l._0, @@ -140,7 +140,7 @@ function lorem(tr) { }); } -var empty = [ +let empty = [ /* Lf */0, 0 ]; @@ -160,7 +160,7 @@ function get(param, i) { } function set(param, i, v) { - var k = param[1]; + let k = param[1]; if (i >= 0 && i < k) { return [ update(param[0], i + 1 | 0, v), @@ -181,7 +181,7 @@ function push_front(param, v) { } function pop_front(param) { - var k = param[1]; + let k = param[1]; if (k > 0) { return [ lorem(param[0]), @@ -195,7 +195,7 @@ function pop_front(param) { } function push_back(param, v) { - var k = param[1]; + let k = param[1]; return [ update(param[0], k + 1 | 0, v), k + 1 | 0 @@ -203,7 +203,7 @@ function push_back(param, v) { } function pop_back(param) { - var k = param[1]; + let k = param[1]; if (k > 0) { return [ $$delete(param[0], k), @@ -217,8 +217,8 @@ function pop_back(param) { } function pp(fmt, s) { - var v = "[ "; - for(var i = 0 ,i_finish = length(s); i < i_finish; ++i){ + let v = "[ "; + for(let i = 0 ,i_finish = length(s); i < i_finish; ++i){ v = v + (", " + String(get(s, i))); } v = v + "]"; @@ -233,9 +233,9 @@ function pp(fmt, s) { } function filter_from(i, p, s) { - var u = empty; - for(var i$1 = i ,i_finish = length(s); i$1 < i_finish; ++i$1){ - var ele = get(s, i$1); + let u = empty; + for(let i$1 = i ,i_finish = length(s); i$1 < i_finish; ++i$1){ + let ele = get(s, i$1); if (Curry._1(p, ele)) { u = push_back(u, ele); } @@ -245,42 +245,42 @@ function filter_from(i, p, s) { } function append(a, b) { - var empty$1 = empty; - for(var i = 0 ,i_finish = length(a); i < i_finish; ++i){ + let empty$1 = empty; + for(let i = 0 ,i_finish = length(a); i < i_finish; ++i){ empty$1 = push_back(empty$1, get(a, i)); } - for(var 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; } function sort(s) { - var size = length(s); + let size = length(s); if (size <= 1) { return s; } - var head = get(s, 0); - var larger = sort(filter_from(1, (function (x) { + let head = get(s, 0); + let larger = sort(filter_from(1, (function (x) { return Caml_obj.caml_greaterthan(x, head); }), s)); - var smaller = sort(filter_from(1, (function (x) { + let smaller = sort(filter_from(1, (function (x) { return Caml_obj.caml_lessequal(x, head); }), s)); return append(smaller, push_front(larger, head)); } function of_array(arr) { - var v = empty; - for(var i = 0 ,i_finish = arr.length; i < i_finish; ++i){ + let v = empty; + for(let i = 0 ,i_finish = arr.length; i < i_finish; ++i){ v = push_back(v, Caml_array.get(arr, i)); } return v; } -var equal = Caml_obj.caml_equal; +let equal = Caml_obj.caml_equal; -var Int_array = { +let Int_array = { empty: empty, get: get, set: set, @@ -299,7 +299,7 @@ function $eq$tilde(x, y) { return Caml_obj.caml_equal(x, of_array(y)); } -var u = of_array([ +let u = of_array([ 1, 2, 2, @@ -308,7 +308,7 @@ var u = of_array([ 6 ]); -var x = sort(u); +let x = sort(u); if (!Caml_obj.caml_equal(x, of_array([ 1, @@ -328,15 +328,15 @@ if (!Caml_obj.caml_equal(x, of_array([ }); } -var v = Stdlib__Array.init(500, (function (i) { +let v = Stdlib__Array.init(500, (function (i) { return 500 - i | 0; })); -var y = Stdlib__Array.init(500, (function (i) { +let y = Stdlib__Array.init(500, (function (i) { return i + 1 | 0; })); -var x$1 = sort(of_array(v)); +let x$1 = sort(of_array(v)); Caml_obj.caml_equal(x$1, of_array(y)); diff --git a/jscomp/test/dist/jscomp/test/float_of_bits_test.js b/jscomp/test/dist/jscomp/test/float_of_bits_test.js index cf52bdbc45..dfabea7ee6 100644 --- a/jscomp/test/dist/jscomp/test/float_of_bits_test.js +++ b/jscomp/test/dist/jscomp/test/float_of_bits_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_float = require("melange.js/caml_float.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_float = require("melange.js/caml_float.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); -var one_float = [ +let one_float = [ 1072693248, 0 ]; -var int32_pairs = [ +let int32_pairs = [ [ 32, 4.48415508583941463e-44 @@ -28,8 +28,8 @@ var int32_pairs = [ function from_pairs(pair) { return Stdlib__List.concat(Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var f = param[1]; - var i32 = param[0]; + let f = param[1]; + let i32 = param[0]; return { hd: [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ @@ -84,7 +84,7 @@ function from_pairs(pair) { }), int32_pairs))); } -var suites = Stdlib.$at({ +let suites = Stdlib.$at({ hd: [ "one", (function (param) { diff --git a/jscomp/test/dist/jscomp/test/float_test.js b/jscomp/test/dist/jscomp/test/float_test.js index f45cb658e7..4a889bf01f 100644 --- a/jscomp/test/dist/jscomp/test/float_test.js +++ b/jscomp/test/dist/jscomp/test/float_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_float = require("melange.js/caml_float.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Float = require("melange/float.js"); -var Stdlib__Printf = require("melange/printf.js"); - -var test_id = { +let Caml = require("melange.js/caml.js"); +let Caml_float = require("melange.js/caml_float.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Float = require("melange/float.js"); +let Stdlib__Printf = require("melange/printf.js"); + +let test_id = { contents: 0 }; -var suites = { +let suites = { contents: /* [] */0 }; @@ -33,18 +33,18 @@ function approx(loc) { }; } -var epsilon_float = Caml_int64.float_of_bits([ +let epsilon_float = Caml_int64.float_of_bits([ 1018167296, 0 ]); -var match = Caml_float.caml_frexp_float(12.0); +let match = Caml_float.caml_frexp_float(12.0); -var match$1 = Caml_float.caml_frexp_float(0); +let match$1 = Caml_float.caml_frexp_float(0); -var match$2 = Caml_float.caml_frexp_float(-12.0); +let match$2 = Caml_float.caml_frexp_float(-12.0); -var results = Stdlib__Array.append([ +let results = Stdlib__Array.append([ [ Math.log10(2), 0.301029995663981198 @@ -126,8 +126,8 @@ var results = Stdlib__Array.append([ function from_pairs(ps) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[1]; - var a = param[0]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -154,45 +154,45 @@ function from_pairs(ps) { }), ps)); } -var float_compare = Caml.caml_float_compare; +let float_compare = Caml.caml_float_compare; -var generic_compare = Caml_obj.caml_compare; +let generic_compare = Caml_obj.caml_compare; function float_equal(x, y) { return x === y; } -var generic_equal = Caml_obj.caml_equal; +let generic_equal = Caml_obj.caml_equal; function float_notequal(x, y) { return x !== y; } -var generic_notequal = Caml_obj.caml_notequal; +let generic_notequal = Caml_obj.caml_notequal; function float_lessthan(x, y) { return x < y; } -var generic_lessthan = Caml_obj.caml_lessthan; +let generic_lessthan = Caml_obj.caml_lessthan; function float_greaterthan(x, y) { return x > y; } -var generic_greaterthan = Caml_obj.caml_greaterthan; +let generic_greaterthan = Caml_obj.caml_greaterthan; function float_lessequal(x, y) { return x <= y; } -var generic_lessequal = Caml_obj.caml_lessequal; +let generic_lessequal = Caml_obj.caml_lessequal; function float_greaterequal(x, y) { return x >= y; } -var generic_greaterequal = Caml_obj.caml_greaterequal; +let generic_greaterequal = Caml_obj.caml_greaterequal; Mt_global.collect_eq(test_id, suites, "File \"jscomp/test/float_test.ml\", line 58, characters 5-12", Stdlib.classify_float(3), /* FP_normal */0); @@ -201,7 +201,7 @@ Mt_global.collect_eq(test_id, suites, "File \"jscomp/test/float_test.ml\", line -3 ]); -var match$3 = Caml_float.caml_modf_float(Number.NaN); +let match$3 = Caml_float.caml_modf_float(Number.NaN); Mt_global.collect_eq(test_id, suites, "File \"jscomp/test/float_test.ml\", line 60, characters 5-12", [ Number.isNaN(match$3[0]), @@ -340,11 +340,11 @@ Mt_global.collect_eq(test_id, suites, "File \"jscomp/test/float_test.ml\", line Mt_global.collect_eq(test_id, suites, "File \"jscomp/test/float_test.ml\", line 116, characters 5-12", false || -1 >= 0 && 1 < 0 ? 1 : -1, -1); -var match$4 = Caml_float.caml_modf_float(32.3); +let match$4 = Caml_float.caml_modf_float(32.3); -var b = match$4[1]; +let b = match$4[1]; -var a = match$4[0]; +let a = match$4[0]; Mt.from_pair_suites("Float_test", Stdlib.$at({ hd: [ diff --git a/jscomp/test/dist/jscomp/test/floatarray_test.js b/jscomp/test/dist/jscomp/test/floatarray_test.js index 0730003e79..887a3c2daf 100644 --- a/jscomp/test/dist/jscomp/test/floatarray_test.js +++ b/jscomp/test/dist/jscomp/test/floatarray_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Mt = require("./mt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,9 +16,9 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var v = Caml_array.make_float(5); +let v = Caml_array.make_float(5); -for(var i = 0; i <= 4; ++i){ +for(let i = 0; i <= 4; ++i){ v[i] = 0; } diff --git a/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js b/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js index bb8f9781b8..0f85570d1b 100644 --- a/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js +++ b/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js @@ -1,33 +1,33 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_module = require("melange.js/caml_module.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Queue = require("melange/queue.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); -var Fs = require("fs"); -var Path = require("path"); - -var none = { +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_module = require("melange.js/caml_module.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Queue = require("melange/queue.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); +let Fs = require("fs"); +let Path = require("path"); + +let none = { source: undefined, start: { line: 0, @@ -58,13 +58,13 @@ function from_lb_p(source, start, _end) { } function from_lb(source, lb) { - var start = lb.lex_start_p; - var _end = lb.lex_curr_p; + let start = lb.lex_start_p; + let _end = lb.lex_curr_p; return from_lb_p(source, start, _end); } function from_curr_lb(source, lb) { - var curr = lb.lex_curr_p; + let curr = lb.lex_curr_p; return from_lb_p(source, curr, curr); } @@ -117,7 +117,7 @@ function source_cmp(a, b) { if (b === undefined) { return -1; } - var k = order_of_filename(a) - order_of_filename(b) | 0; + let k = order_of_filename(a) - order_of_filename(b) | 0; if (k !== 0) { return k; } else { @@ -136,11 +136,11 @@ function pos_cmp(a, b) { } function compare(loc1, loc2) { - var k = source_cmp(loc1.source, loc2.source); + let k = source_cmp(loc1.source, loc2.source); if (k !== 0) { return k; } - var k$1 = pos_cmp(loc1.start, loc2.start); + let k$1 = pos_cmp(loc1.start, loc2.start); if (k$1 === 0) { return pos_cmp(loc1._end, loc2._end); } else { @@ -148,7 +148,7 @@ function compare(loc1, loc2) { } } -var $$Error = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Parse_error.Error"); +let $$Error = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Parse_error.Error"); function error(param) { if (typeof param === "number") { @@ -340,7 +340,7 @@ function error(param) { } } -var Literal = Caml_module.init_mod([ +let Literal = Caml_module.init_mod([ "spider_monkey_ast.ml", 44, 6 @@ -355,7 +355,7 @@ var Literal = Caml_module.init_mod([ ]] }); -var Type = Caml_module.init_mod([ +let Type = Caml_module.init_mod([ "spider_monkey_ast.ml", 191, 6 @@ -467,7 +467,7 @@ var Type = Caml_module.init_mod([ ] }); -var Statement = Caml_module.init_mod([ +let Statement = Caml_module.init_mod([ "spider_monkey_ast.ml", 493, 6 @@ -689,7 +689,7 @@ var Statement = Caml_module.init_mod([ ] }); -var Expression = Caml_module.init_mod([ +let Expression = Caml_module.init_mod([ "spider_monkey_ast.ml", 758, 6 @@ -866,7 +866,7 @@ var Expression = Caml_module.init_mod([ ] }); -var JSX = Caml_module.init_mod([ +let JSX = Caml_module.init_mod([ "spider_monkey_ast.ml", 861, 6 @@ -939,7 +939,7 @@ var JSX = Caml_module.init_mod([ ] }); -var Pattern = Caml_module.init_mod([ +let Pattern = Caml_module.init_mod([ "spider_monkey_ast.ml", 919, 6 @@ -991,7 +991,7 @@ var Pattern = Caml_module.init_mod([ ] }); -var Class = Caml_module.init_mod([ +let Class = Caml_module.init_mod([ "spider_monkey_ast.ml", 978, 6 @@ -1940,7 +1940,7 @@ function token_to_string(param) { function yyback(n, lexbuf) { lexbuf.lex_curr_pos = lexbuf.lex_curr_pos - n | 0; - var currp = lexbuf.lex_curr_p; + let currp = lexbuf.lex_curr_p; lexbuf.lex_curr_p = { pos_fname: currp.pos_fname, pos_lnum: currp.pos_lnum, @@ -1950,11 +1950,11 @@ function yyback(n, lexbuf) { } function back(lb) { - var n = lb.lex_curr_p.pos_cnum - lb.lex_start_p.pos_cnum | 0; + let n = lb.lex_curr_p.pos_cnum - lb.lex_start_p.pos_cnum | 0; yyback(n, lb); } -var empty_lex_state = { +let empty_lex_state = { lex_errors_acc: /* [] */0, lex_comments_acc: /* [] */0 }; @@ -1970,8 +1970,8 @@ function new_lex_env(lex_source, lex_lb, enable_types_in_comments) { } function get_and_clear_state(env) { - var state = env.lex_state; - var env$1 = state !== empty_lex_state ? ({ + let state = env.lex_state; + let env$1 = state !== empty_lex_state ? ({ lex_source: env.lex_source, lex_lb: env.lex_lb, lex_in_comment_syntax: env.lex_in_comment_syntax, @@ -2009,25 +2009,25 @@ function in_comment_syntax(is_in, env) { } function get_result_and_clear_state(param) { - var lex_token = param[1]; - var match = get_and_clear_state(param[0]); - var state = match[1]; - var env = match[0]; - var match$1; - var exit = 0; + let lex_token = param[1]; + let match = get_and_clear_state(param[0]); + let state = match[1]; + let env = match[0]; + let match$1; + let exit = 0; if (typeof lex_token === "number") { exit = 2; } else { switch (lex_token.TAG | 0) { case /* T_TEMPLATE_PART */2 : - var match$2 = lex_token._0; + let match$2 = lex_token._0; match$1 = [ match$2[0], match$2[1].literal ]; break; case /* T_REGEXP */3 : - var match$3 = lex_token._0; + let match$3 = lex_token._0; match$1 = [ match$3[0], "/" + (match$3[1] + ("/" + match$3[2])) @@ -2043,7 +2043,7 @@ function get_result_and_clear_state(param) { } switch (exit) { case 1 : - var match$4 = lex_token._0; + let match$4 = lex_token._0; match$1 = [ match$4[0], match$4[2] @@ -2070,16 +2070,16 @@ function get_result_and_clear_state(param) { } function lex_error(env, loc, err) { - var lex_errors_acc_0 = [ + let lex_errors_acc_0 = [ loc, err ]; - var lex_errors_acc_1 = env.lex_state.lex_errors_acc; - var lex_errors_acc = { + let lex_errors_acc_1 = env.lex_state.lex_errors_acc; + let lex_errors_acc = { hd: lex_errors_acc_0, tl: lex_errors_acc_1 }; - var init = env.lex_state; + let init = env.lex_state; return { lex_source: env.lex_source, lex_lb: env.lex_lb, @@ -2108,9 +2108,9 @@ function unexpected_error_w_suggest(env, loc, value, suggest) { } function illegal_number(env, lexbuf, word, token) { - var loc = from_lb(env.lex_source, lexbuf); + let loc = from_lb(env.lex_source, lexbuf); yyback(word.length, lexbuf); - var env$1 = lex_error(env, loc, { + let env$1 = lex_error(env, loc, { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -2120,10 +2120,10 @@ function illegal_number(env, lexbuf, word, token) { ]; } -var No_good = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Lexer_flow.FloatOfString.No_good"); +let No_good = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Lexer_flow.FloatOfString.No_good"); function eat(f) { - var match = f.todo; + let match = f.todo; if (match) { return { negative: f.negative, @@ -2139,7 +2139,7 @@ function eat(f) { } function start(str) { - var todo = { + let todo = { contents: /* [] */0 }; Stdlib__String.iter((function (c) { @@ -2158,7 +2158,7 @@ function start(str) { } function parse_sign(f) { - var match = f.todo; + let match = f.todo; if (!match) { return f; } @@ -2168,7 +2168,7 @@ function parse_sign(f) { case 44 : return f; case 45 : - var init = eat(f); + let init = eat(f); return { negative: true, mantissa: init.mantissa, @@ -2182,16 +2182,16 @@ function parse_sign(f) { } function parse_hex_symbol(f) { - var match = f.todo; + let match = f.todo; if (match) { if (match.hd !== 48) { throw new Caml_js_exceptions.MelangeError(No_good, { MEL_EXN_ID: No_good }); } - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var match$2 = match$1.hd; + let match$2 = match$1.hd; if (match$2 === 88) { return eat(eat(f)); } @@ -2212,13 +2212,13 @@ function parse_hex_symbol(f) { } function parse_exponent(f) { - var todo_str = Stdlib__String.concat("", Stdlib__List.map(Stdlib__Char.escaped, f.todo)); - var exponent; + let todo_str = Stdlib__String.concat("", Stdlib__List.map(Stdlib__Char.escaped, f.todo)); + let exponent; try { exponent = Caml_format.caml_int_of_string(todo_str); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError(No_good, { MEL_EXN_ID: No_good @@ -2237,12 +2237,12 @@ function parse_exponent(f) { function parse_body(_f) { while(true) { - var f = _f; - var match = f.todo; + let f = _f; + let match = f.todo; if (!match) { return f; } - var c = match.hd; + let c = match.hd; if (c >= 81) { if (c !== 95) { if (c === 112) { @@ -2260,7 +2260,7 @@ function parse_body(_f) { } else { if (f.decimal_exponent === undefined) { - var init = eat(f); + let init = eat(f); _f = { negative: init.negative, mantissa: init.mantissa, @@ -2274,7 +2274,7 @@ function parse_body(_f) { MEL_EXN_ID: No_good }); } - var ref_char_code; + let ref_char_code; if (c >= /* '0' */48 && c <= /* '9' */57) { ref_char_code = /* '0' */48; } else if (c >= /* 'A' */65 && c <= /* 'F' */70) { @@ -2286,11 +2286,11 @@ function parse_body(_f) { MEL_EXN_ID: No_good }); } - var value = c - ref_char_code | 0; - var e = f.decimal_exponent; - var decimal_exponent = e !== undefined ? e - 4 | 0 : undefined; - var mantissa = (f.mantissa << 4) + value | 0; - var init$1 = eat(f); + let value = c - ref_char_code | 0; + let e = f.decimal_exponent; + let decimal_exponent = e !== undefined ? e - 4 | 0 : undefined; + let mantissa = (f.mantissa << 4) + value | 0; + let init$1 = eat(f); _f = { negative: init$1.negative, mantissa: mantissa, @@ -2309,7 +2309,7 @@ function float_of_string(str) { catch (e){ if (Stdlib__Sys.win32) { try { - var f = parse_body(parse_hex_symbol(parse_sign(start(str)))); + let f = parse_body(parse_hex_symbol(parse_sign(start(str)))); if (!Caml_obj.caml_equal(f.todo, /* [] */0)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -2320,10 +2320,10 @@ function float_of_string(str) { ] }); } - var ret = f.mantissa; - var decimal_exponent = f.decimal_exponent; - var exponent = decimal_exponent !== undefined ? f.exponent + decimal_exponent | 0 : f.exponent; - var ret$1 = exponent === 0 ? ret : Math.pow(ret, exponent); + let ret = f.mantissa; + let decimal_exponent = f.decimal_exponent; + let exponent = decimal_exponent !== undefined ? f.exponent + decimal_exponent | 0 : f.exponent; + let ret$1 = exponent === 0 ? ret : Math.pow(ret, exponent); if (f.negative) { return - ret$1; } else { @@ -2331,7 +2331,7 @@ function float_of_string(str) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === No_good) { throw new Caml_js_exceptions.MelangeError(e.MEL_EXN_ID, e); } @@ -2344,25 +2344,25 @@ function float_of_string(str) { } function save_comment(env, start, _end, buf, multiline) { - var loc = btwn(start, _end); - var s = Stdlib__Buffer.contents(buf); - var c = multiline ? ({ + let loc = btwn(start, _end); + let s = Stdlib__Buffer.contents(buf); + let c = multiline ? ({ TAG: /* Block */0, _0: s }) : ({ TAG: /* Line */1, _0: s }); - var lex_comments_acc_0 = [ + let lex_comments_acc_0 = [ loc, c ]; - var lex_comments_acc_1 = env.lex_state.lex_comments_acc; - var lex_comments_acc = { + let lex_comments_acc_1 = env.lex_state.lex_comments_acc; + let lex_comments_acc = { hd: lex_comments_acc_0, tl: lex_comments_acc_1 }; - var init = env.lex_state; + let init = env.lex_state; return { lex_source: env.lex_source, lex_lb: env.lex_lb, @@ -2376,23 +2376,23 @@ function save_comment(env, start, _end, buf, multiline) { } function unicode_fix_cols(lb) { - var count = function (_start, stop, _acc) { + let count = function (_start, stop, _acc) { while(true) { - var acc = _acc; - var start = _start; + let acc = _acc; + let start = _start; if (start === stop) { return acc; } - var c = Caml_bytes.get(lb.lex_buffer, start); - var acc$1 = (c & 192) === 128 ? acc + 1 | 0 : acc; + let c = Caml_bytes.get(lb.lex_buffer, start); + let acc$1 = (c & 192) === 128 ? acc + 1 | 0 : acc; _acc = acc$1; _start = start + 1 | 0; continue ; }; }; - var bytes = count(lb.lex_start_pos, lb.lex_curr_pos, 0); - var new_bol = lb.lex_curr_p.pos_bol + bytes | 0; - var init = lb.lex_curr_p; + let bytes = count(lb.lex_start_pos, lb.lex_curr_pos, 0); + let new_bol = lb.lex_curr_p.pos_bol + bytes | 0; + let init = lb.lex_curr_p; lb.lex_curr_p = { pos_fname: init.pos_fname, pos_lnum: init.pos_lnum, @@ -2482,7 +2482,7 @@ function utf16to8(code) { } function mk_num_singleton(number_type, num, neg) { - var value; + let value; if (number_type) { switch (number_type) { case /* LEGACY_OCTAL */1 : @@ -2499,7 +2499,7 @@ function mk_num_singleton(number_type, num, neg) { } else { value = Caml_format.caml_int_of_string(num); } - var value$1 = neg === "" ? value : - value; + let value$1 = neg === "" ? value : - value; return { TAG: /* T_NUMBER_SINGLETON_TYPE */5, _0: number_type, @@ -2507,9 +2507,9 @@ function mk_num_singleton(number_type, num, neg) { }; } -var keywords = Stdlib__Hashtbl.create(undefined, 53); +let keywords = Stdlib__Hashtbl.create(undefined, 53); -var type_keywords = Stdlib__Hashtbl.create(undefined, 53); +let type_keywords = Stdlib__Hashtbl.create(undefined, 53); Stdlib__List.iter((function (param) { Stdlib__Hashtbl.add(keywords, param[0], param[1]); @@ -2885,7 +2885,7 @@ Stdlib__List.iter((function (param) { } }); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xb2\xff\xb3\xff\xb9\xffB\0C\0T\0W\0F\0I\0J\0K\0M\0e\0\xdd\xff\xde\xff\xdf\xff\xe0\xff\xe3\xff\xe4\xff\xe5\xff\xe6\xff\xe7\xff\xe8\xff\xc0\0L\0e\0\x17\x01n\x01\xf6\xff\xf7\xffl\0u\0v\0\0\0\x0e\0\x0f\0\x07\x003\x01\xfe\xff\xff\xff\x01\0\x12\0(\0\f\0\x15\0*\0\f\0=\0-\0\t\0\xb6\xff\xf9\xff\xe0\x01B\0u\0\x0f\x000\x004\0\x17\0\xe5\x01(\x008\0\x1a\0K\0:\0\x17\0\xfb\xffh\0a\0\xac\0q\0m\0y\0q\0i\0{\0{\0\xa8\0\xca\xff\xfa\xff\xc9\xff\xf8\xff\x0b\x02\xa5\x02\xfc\x02S\x03\xaa\x03\x01\x04X\x04\xaf\x04\x06\x05]\x05\xb4\x05\x0b\x06b\x06\xb9\x06\xc3\x01\x10\x07g\x07\xbe\x07\x15\bl\b\xc3\b\x1a\tq\t\xc8\t\xb8\0\xe2\xffE\x02\xc7\xff\xdc\xff\xc6\xff\xdb\xff\xb7\xff\xaa\0\xda\xff\xab\0\xd9\xff\xac\0\xd8\xff\xd2\xff\xad\0\xd7\xff\xb0\0\xd0\xff\xcf\xff\xcc\xff\xd4\xff\xcb\xff\xd3\xff\xc8\xff\xc5\xff:\n\xcf\xff\xd0\xff\xd2\xff\xd6\xff\xd7\xff\xb0\0\xdc\xff\xdd\xff\xe0\xff\xe1\xff\xe2\xff\xe3\xff\xe6\xff\xe7\xff\xe8\xff\xe9\xff\xea\xff\xeb\xff\x94\n\xfa\n\xd6\x01Q\x0b\xa8\x0b\x1a\f\xf9\xff\xcc\0\xf1\0A\0}\0~\0\xa3\0\xc4\x0b\xff\xffa\0\x9d\0\xc1\0\xa4\0\x90\0\xc6\0\xb2\0\xcb\t\xd2\0\x95\0\xfa\xff\x1f\f\xe9\0\x1c\x01\x9c\0\xf2\0\xf3\0\xf9\0$\f\xe7\0\xf7\0\xf5\0\xdf\x0b\x15\x01\xd7\0\xfc\xff(\x01!\x01m\x012\x01/\x01E\x01=\x015\x01G\x01G\x01\xfb\xff\xf3\x01\xf2\0.\x01I\x01P\x01K\f=\x01L\x01/\x01\xec\x0bk\x010\x01x\f\xff\fV\r\xad\r\0\x02\x04\x0e[\x0e\xb2\x0e\t\x0f`\x0f\xb7\x0f\x0e\x10e\x10\xbc\x10\x13\x11j\x11\xc1\x11\x18\x12o\x12\xc6\x12\x1d\x13t\x13\xcb\x13\"\x14\xcf\x01\xe5\xffy\x14\xd0\x14'\x15~\x15\xd4\xff\x1b\f\xfc\xff\xfd\xff\xfe\xff\xff\xff\xcf\x15\xee\xff\x01\0\xef\xff\x18\x16\xf4\xff\xf5\xff\xf6\xff\xf7\xff\xf8\xff\xf9\xff\xf1\x02H\x03>\x16\xfe\xff\xff\xffU\x16\xfd\xff\x9f\x03\xfc\xff{\x16\x92\x16\xb8\x16\xcf\x16\xf2\xff\xf5\x16\xf1\xff\xd7\x02\xfb\xff\xd2\x01\xfe\xff\xff\xff\xcf\x01\xfd\xff\xfc\xff;\x02\xfd\xff\xfe\xff\xff\xff\0\x17\xf9\xff\xe8\x01G\x01\x83\x01\x90\x01y\x01)\fC\x15\xfe\xff\xff\xff]\x01\x9b\x01\x9c\x01*\x02\x90\x01\xa0\x01\x82\x01\x87\x15\xad\x01o\x01\xfb\xff\xfc\xff\x0b\x16\xf8\xff\x04\0\xf9\xff\xfa\xff8\x17,\x03\xff\xff\xfd\xff\x05\0\xfe\xff\xc0\x17\x96\t\xfb\xff\xfc\xff\xeb\x01\xff\xff\xfd\xff\xfe\xff2\x18\xf1\xff\xf2\xff\x8a\x18\xf4\xff\xf5\xff\xf6\xff\xf7\xff\xf8\xff\xfa\xff<\x02\x7f\x01\xc9\x01\xe7\x01+\x02\x88\x167\x18\xfe\xff\xff\xff\x8f\x01 \x02!\x023\x02\x15\x02%\x02!\x02\xbd\x16L\x02\x0f\x02\xfb\xff\xfc\xff|\f\xfb\xff\xfc\xff\xfd\xff\xfe\xff\x06\0\xff\xff\xfc\x18\xf9\xff\xf8\x18\x07\0\xfd\xff\xfe\xff\xff\xffO\x19\xdf\n_\f\x84\x17\x9c\x19\xfc\xff\xfb\xff\xd3\x19\xfa\xff*\x1a\x81\x1a\xd8\x1a/\x1b\x86\x1b\x96\x02\xf8\x1b\xfa\xff\xfb\xff\xb5\x02%\x02b\x02\x82\x02\xf3\x02\x04\x19K\x1b\xff\xff(\x02e\x02\xa9\x02J\x03r\x02\x85\x02\x8c\x02\xc9\x16\xb7\x02y\x02\xfc\xff\xfd\xff\xc3\x16\xf9\xff\xfa\xff\b\0\xfc\xff\xbf\x02\xfe\xff\xff\xff\xfd\xff\xfb\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xff\xff\xffD\0A\0>\0=\0<\0;\0E\0G\0B\0C\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\0K\0\x1e\0\x15\0\x15\0\xff\xff\xff\xffM\0?\0J\0M\0M\0M\0M\0\x02\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\0\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff@\0\xff\xff\xff\xff\xff\xff\xff\xff\x14\0\x14\0\x15\0\x14\0\x0f\0\x14\0\x14\0\x0b\0\n\0\r\0\f\0\x0e\0\x0e\0\x0e\0\xff\xff\x0e\0\x0e\0\x13\0\x12\0\x11\0\x10\0\x15\0\x13\0\x12\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff)\0\xff\xff*\0\xff\xff.\0\xff\xff\xff\xff2\0\xff\xff1\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff$\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\0\x13\0\x1b\0\x12\0\x12\0.\0\xff\xff&\x000\x000\x000\x000\x000\0\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\0\x11\0\x11\0\x10\0\xff\xff\x10\0\x0f\0\x0f\0\x12\0\x11\0\f\0\x11\0\x11\0\b\0\x07\0\n\0\t\0\x0b\0\x0b\0\x0b\0\x0b\0\x0b\0\x0e\0\r\0\xff\xff\xff\xff\x13\0\x13\0\x13\0\x13\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\0\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\f\0\x05\0\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\0\x06\0\x06\0\x06\0\x06\0\x02\0\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x06\0\xff\xff\xff\xff\x04\0\x07\0\xff\xff\xff\xff\x01\0\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x06\0\x0e\0\x0e\0\x0e\0\x0e\0\x02\0\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\x06\0\x02\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\0\x05\0\x05\0\x05\0\x05\0\x01\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\0\xff\xff\x06\0\xff\xff\xff\xff\xff\xff\xff\xff", lex_default: "\x01\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xf8\0\0\0\0\0\0\0\0\0\xfd\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\x18\x01\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0 \x01\0\0\0\0\0\0$\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0;\x01\0\0\xff\xff\0\0\0\0\xff\xffB\x01\0\0\0\0\xff\xff\0\0\xff\xffG\x01\0\0\0\0\xff\xff\0\0\0\0\0\0N\x01\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0m\x01\0\0\0\0\0\0\0\0\xff\xff\0\0t\x01\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8a\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xa1\x01\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0", @@ -2901,16 +2901,16 @@ var __ocaml_lex_tables = { function token(env, lexbuf) { lexbuf.lex_mem = Caml_array.make(8, -1); - var ___ocaml_lex_state = 0; + let ___ocaml_lex_state = 0; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : Stdlib__Lexing.new_line(lexbuf); return token(env, lexbuf); case 1 : - var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -2919,24 +2919,24 @@ function token(env, lexbuf) { unicode_fix_cols(lexbuf); return token(env, lexbuf); case 3 : - var start = from_lb(env.lex_source, lexbuf); - var buf = Stdlib__Buffer.create(127); - var match = comment(env, buf, lexbuf); - var env$2 = save_comment(match[0], start, match[1], buf, true); + let start = from_lb(env.lex_source, lexbuf); + let buf = Stdlib__Buffer.create(127); + let match = comment(env, buf, lexbuf); + let env$2 = save_comment(match[0], start, match[1], buf, true); return token(env$2, lexbuf); case 4 : - var sp = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, Caml_array.get(lexbuf.lex_mem, 0)); - var escape_type = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); - var pattern = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let sp = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, Caml_array.get(lexbuf.lex_mem, 0)); + let escape_type = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let pattern = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); if (env.lex_enable_comment_syntax) { - var env$3; + let env$3; if (env.lex_in_comment_syntax) { - var loc = from_lb(env.lex_source, lexbuf); + let loc = from_lb(env.lex_source, lexbuf); env$3 = unexpected_error(env, loc, pattern); } else { env$3 = env; } - var env$4 = in_comment_syntax(true, env$3); + let env$4 = in_comment_syntax(true, env$3); if (escape_type === ":") { return [ env$4, @@ -2946,16 +2946,16 @@ function token(env, lexbuf) { return token(env$4, lexbuf); } } - var start$1 = from_lb(env.lex_source, lexbuf); - var buf$1 = Stdlib__Buffer.create(127); + let start$1 = from_lb(env.lex_source, lexbuf); + let buf$1 = Stdlib__Buffer.create(127); Stdlib__Buffer.add_string(buf$1, sp); Stdlib__Buffer.add_string(buf$1, escape_type); - var match$1 = comment(env, buf$1, lexbuf); - var env$5 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); + let match$1 = comment(env, buf$1, lexbuf); + let env$5 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); return token(env$5, lexbuf); case 5 : if (env.lex_in_comment_syntax) { - var env$6 = in_comment_syntax(false, env); + let env$6 = in_comment_syntax(false, env); return token(env$6, lexbuf); } yyback(1, lexbuf); @@ -2964,10 +2964,10 @@ function token(env, lexbuf) { /* T_MULT */97 ]; case 6 : - var start$2 = from_lb(env.lex_source, lexbuf); - var buf$2 = Stdlib__Buffer.create(127); - var match$2 = line_comment(env, buf$2, lexbuf); - var env$7 = save_comment(match$2[0], start$2, match$2[1], buf$2, false); + let start$2 = from_lb(env.lex_source, lexbuf); + let buf$2 = Stdlib__Buffer.create(127); + let match$2 = line_comment(env, buf$2, lexbuf); + let env$7 = save_comment(match$2[0], start$2, match$2[1], buf$2, false); return token(env$7, lexbuf); case 7 : if (lexbuf.lex_start_pos !== 0) { @@ -2976,15 +2976,15 @@ function token(env, lexbuf) { /* T_ERROR */104 ]; } - var match$3 = line_comment(env, Stdlib__Buffer.create(127), lexbuf); + let match$3 = line_comment(env, Stdlib__Buffer.create(127), lexbuf); return token(match$3[0], lexbuf); case 8 : - var quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var start$3 = from_lb(env.lex_source, lexbuf); - var buf$3 = Stdlib__Buffer.create(127); - var raw = Stdlib__Buffer.create(127); + let quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let start$3 = from_lb(env.lex_source, lexbuf); + let buf$3 = Stdlib__Buffer.create(127); + let raw = Stdlib__Buffer.create(127); Stdlib__Buffer.add_char(raw, quote); - var match$4 = string_quote(env, quote, buf$3, raw, false, lexbuf); + let match$4 = string_quote(env, quote, buf$3, raw, false, lexbuf); return [ match$4[0], { @@ -2998,12 +2998,12 @@ function token(env, lexbuf) { } ]; case 9 : - var cooked = Stdlib__Buffer.create(127); - var raw$1 = Stdlib__Buffer.create(127); - var literal = Stdlib__Buffer.create(127); + let cooked = Stdlib__Buffer.create(127); + let raw$1 = Stdlib__Buffer.create(127); + let literal = Stdlib__Buffer.create(127); Stdlib__Buffer.add_string(literal, Stdlib__Lexing.lexeme(lexbuf)); - var start$4 = from_lb(env.lex_source, lexbuf); - var match$5 = template_part(env, start$4, cooked, raw$1, literal, lexbuf); + let start$4 = from_lb(env.lex_source, lexbuf); + let match$5 = template_part(env, start$4, cooked, raw$1, literal, lexbuf); return [ match$5[0], { @@ -3020,7 +3020,7 @@ function token(env, lexbuf) { } ]; case 10 : - var w = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let w = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w, { TAG: /* T_NUMBER */0, _0: /* BINARY */0 @@ -3034,7 +3034,7 @@ function token(env, lexbuf) { } ]; case 12 : - var w$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let w$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$1, { TAG: /* T_NUMBER */0, _0: /* OCTAL */2 @@ -3048,7 +3048,7 @@ function token(env, lexbuf) { } ]; case 14 : - var w$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let w$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$2, { TAG: /* T_NUMBER */0, _0: /* LEGACY_OCTAL */1 @@ -3076,7 +3076,7 @@ function token(env, lexbuf) { } ]; case 22 : - var word = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let word = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); unicode_fix_cols(lexbuf); try { return [ @@ -3085,7 +3085,7 @@ function token(env, lexbuf) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return [ env, @@ -3360,9 +3360,9 @@ function token(env, lexbuf) { /* T_AT */12 ]; case 76 : - var env$8; + let env$8; if (env.lex_in_comment_syntax) { - var loc$1 = from_lb(env.lex_source, lexbuf); + let loc$1 = from_lb(env.lex_source, lexbuf); env$8 = lex_error(env, loc$1, /* UnexpectedEOS */4); } else { env$8 = env; @@ -3372,7 +3372,7 @@ function token(env, lexbuf) { /* T_EOF */105 ]; case 77 : - var env$9 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$9 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -3385,7 +3385,7 @@ function token(env, lexbuf) { ___ocaml_lex_state = __ocaml_lex_state$1; continue ; } - var w$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let w$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$3, { TAG: /* T_NUMBER */0, _0: /* NORMAL */3 @@ -3394,10 +3394,10 @@ function token(env, lexbuf) { } function regexp_class(env, buf, lexbuf) { - var ___ocaml_lex_state = 326; + let ___ocaml_lex_state = 326; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return env; @@ -3405,11 +3405,11 @@ function regexp_class(env, buf, lexbuf) { case 2 : break; case 3 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c); return env; case 4 : - var c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c$1); return regexp_class(env, buf, lexbuf); default: @@ -3417,38 +3417,38 @@ function regexp_class(env, buf, lexbuf) { ___ocaml_lex_state = __ocaml_lex_state$1; continue ; } - var s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); + let s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); Stdlib__Buffer.add_string(buf, s); return regexp_class(env, buf, lexbuf); }; } function regexp_body(env, buf, lexbuf) { - var ___ocaml_lex_state = 314; + let ___ocaml_lex_state = 314; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var loc = from_lb(env.lex_source, lexbuf); - var env$1 = lex_error(env, loc, /* UnterminatedRegExp */13); + let loc = from_lb(env.lex_source, lexbuf); + let env$1 = lex_error(env, loc, /* UnterminatedRegExp */13); return [ env$1, "" ]; case 1 : - var loc$1 = from_lb(env.lex_source, lexbuf); - var env$2 = lex_error(env, loc$1, /* UnterminatedRegExp */13); + let loc$1 = from_lb(env.lex_source, lexbuf); + let env$2 = lex_error(env, loc$1, /* UnterminatedRegExp */13); return [ env$2, "" ]; case 2 : - var s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); + let s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); Stdlib__Buffer.add_string(buf, s); return regexp_body(env, buf, lexbuf); case 3 : - var flags = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 1 | 0, lexbuf.lex_curr_pos); + let flags = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 1 | 0, lexbuf.lex_curr_pos); return [ env, flags @@ -3459,19 +3459,19 @@ function regexp_body(env, buf, lexbuf) { "" ]; case 5 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c); - var env$3 = regexp_class(env, buf, lexbuf); + let env$3 = regexp_class(env, buf, lexbuf); return regexp_body(env$3, buf, lexbuf); case 6 : - var loc$2 = from_lb(env.lex_source, lexbuf); - var env$4 = lex_error(env, loc$2, /* UnterminatedRegExp */13); + let loc$2 = from_lb(env.lex_source, lexbuf); + let env$4 = lex_error(env, loc$2, /* UnterminatedRegExp */13); return [ env$4, "" ]; case 7 : - var c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c$1); return regexp_body(env, buf, lexbuf); default: @@ -3484,9 +3484,9 @@ function regexp_body(env, buf, lexbuf) { function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var env = _env; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let env = _env; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return [ @@ -3502,18 +3502,18 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 333; continue ; case 3 : - var start = from_lb(env.lex_source, lexbuf); - var buf = Stdlib__Buffer.create(127); - var match = line_comment(env, buf, lexbuf); - var env$1 = save_comment(match[0], start, match[1], buf, true); + let start = from_lb(env.lex_source, lexbuf); + let buf = Stdlib__Buffer.create(127); + let match = line_comment(env, buf, lexbuf); + let env$1 = save_comment(match[0], start, match[1], buf, true); ___ocaml_lex_state = 333; _env = env$1; continue ; case 4 : - var start$1 = from_lb(env.lex_source, lexbuf); - var buf$1 = Stdlib__Buffer.create(127); - var match$1 = comment(env, buf$1, lexbuf); - var env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); + let start$1 = from_lb(env.lex_source, lexbuf); + let buf$1 = Stdlib__Buffer.create(127); + let match$1 = comment(env, buf$1, lexbuf); + let env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); ___ocaml_lex_state = 333; _env = env$2; continue ; @@ -3559,16 +3559,16 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { /* T_JSX_IDENTIFIER */106 ]; case 13 : - var quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var start$2 = from_lb(env.lex_source, lexbuf); - var buf$2 = Stdlib__Buffer.create(127); - var raw = Stdlib__Buffer.create(127); + let quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let start$2 = from_lb(env.lex_source, lexbuf); + let buf$2 = Stdlib__Buffer.create(127); + let raw = Stdlib__Buffer.create(127); Stdlib__Buffer.add_char(raw, quote); - var mode = quote === /* '\'' */39 ? /* JSX_SINGLE_QUOTED_TEXT */0 : /* JSX_DOUBLE_QUOTED_TEXT */1; - var match$2 = jsx_text(env, mode, buf$2, raw, lexbuf); + let mode = quote === /* '\'' */39 ? /* JSX_SINGLE_QUOTED_TEXT */0 : /* JSX_DOUBLE_QUOTED_TEXT */1; + let match$2 = jsx_text(env, mode, buf$2, raw, lexbuf); Stdlib__Buffer.add_char(raw, quote); - var value = Stdlib__Buffer.contents(buf$2); - var raw$1 = Stdlib__Buffer.contents(raw); + let value = Stdlib__Buffer.contents(buf$2); + let raw$1 = Stdlib__Buffer.contents(raw); return [ match$2[0], { @@ -3594,13 +3594,13 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { } function comment(env, buf, lexbuf) { - var ___ocaml_lex_state = 279; + let ___ocaml_lex_state = 279; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -3613,8 +3613,8 @@ function comment(env, buf, lexbuf) { Stdlib__Buffer.add_char(buf, /* '\n' */10); return comment(env, buf, lexbuf); case 2 : - var loc = from_lb(env.lex_source, lexbuf); - var env$2 = env.lex_in_comment_syntax ? unexpected_error_w_suggest(env, loc, "*/", "*-/") : env; + let loc = from_lb(env.lex_source, lexbuf); + let env$2 = env.lex_in_comment_syntax ? unexpected_error_w_suggest(env, loc, "*/", "*-/") : env; return [ env$2, loc @@ -3630,7 +3630,7 @@ function comment(env, buf, lexbuf) { return comment(env, buf, lexbuf); } case 4 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c); return comment(env, buf, lexbuf); default: @@ -3642,10 +3642,10 @@ function comment(env, buf, lexbuf) { } function line_comment(env, buf, lexbuf) { - var ___ocaml_lex_state = 287; + let ___ocaml_lex_state = 287; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return [ @@ -3653,13 +3653,13 @@ function line_comment(env, buf, lexbuf) { from_lb(env.lex_source, lexbuf) ]; case 1 : - var match = from_lb(env.lex_source, lexbuf); - var match$1 = match._end; + let match = from_lb(env.lex_source, lexbuf); + let match$1 = match._end; Stdlib__Lexing.new_line(lexbuf); - var _end_line = match$1.line; - var _end_column = match$1.column - 1 | 0; - var _end_offset = match$1.offset - 1 | 0; - var _end = { + let _end_line = match$1.line; + let _end_column = match$1.column - 1 | 0; + let _end_offset = match$1.offset - 1 | 0; + let _end = { line: _end_line, column: _end_column, offset: _end_offset @@ -3673,7 +3673,7 @@ function line_comment(env, buf, lexbuf) { } ]; case 2 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c); return line_comment(env, buf, lexbuf); default: @@ -3686,9 +3686,9 @@ function line_comment(env, buf, lexbuf) { function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var env = _env; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let env = _env; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return [ @@ -3704,28 +3704,28 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 291; continue ; case 3 : - var start = from_lb(env.lex_source, lexbuf); - var buf = Stdlib__Buffer.create(127); - var match = line_comment(env, buf, lexbuf); - var env$1 = save_comment(match[0], start, match[1], buf, true); + let start = from_lb(env.lex_source, lexbuf); + let buf = Stdlib__Buffer.create(127); + let match = line_comment(env, buf, lexbuf); + let env$1 = save_comment(match[0], start, match[1], buf, true); ___ocaml_lex_state = 291; _env = env$1; continue ; case 4 : - var start$1 = from_lb(env.lex_source, lexbuf); - var buf$1 = Stdlib__Buffer.create(127); - var match$1 = comment(env, buf$1, lexbuf); - var env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); + let start$1 = from_lb(env.lex_source, lexbuf); + let buf$1 = Stdlib__Buffer.create(127); + let match$1 = comment(env, buf$1, lexbuf); + let env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); ___ocaml_lex_state = 291; _env = env$2; continue ; case 5 : - var start$2 = from_lb(env.lex_source, lexbuf); - var buf$2 = Stdlib__Buffer.create(127); - var match$2 = regexp_body(env, buf$2, lexbuf); - var env$3 = match$2[0]; - var end_ = from_lb(env$3.lex_source, lexbuf); - var loc = btwn(start$2, end_); + let start$2 = from_lb(env.lex_source, lexbuf); + let buf$2 = Stdlib__Buffer.create(127); + let match$2 = regexp_body(env, buf$2, lexbuf); + let env$3 = match$2[0]; + let end_ = from_lb(env$3.lex_source, lexbuf); + let loc = btwn(start$2, end_); return [ env$3, { @@ -3738,7 +3738,7 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { } ]; case 6 : - var env$4 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$4 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -3755,13 +3755,13 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { } function jsx_text(env, mode, buf, raw, lexbuf) { - var ___ocaml_lex_state = 371; + let ___ocaml_lex_state = 371; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); switch (mode) { case /* JSX_SINGLE_QUOTED_TEXT */0 : if (c === 39) { @@ -3780,7 +3780,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { } break; case /* JSX_CHILD_TEXT */2 : - var exit = 0; + let exit = 0; if (!(c !== 60 && c !== 123)) { exit = 2; } @@ -3798,7 +3798,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { Stdlib__Buffer.add_char(buf, c); return jsx_text(env, mode, buf, raw, lexbuf); case 1 : - var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -3807,34 +3807,34 @@ function jsx_text(env, mode, buf, raw, lexbuf) { from_lb(env$1.lex_source, lexbuf) ]; case 2 : - var lt = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let lt = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, lt); Stdlib__Buffer.add_string(buf, lt); Stdlib__Lexing.new_line(lexbuf); return jsx_text(env, mode, buf, raw, lexbuf); case 3 : - var n = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 3 | 0, lexbuf.lex_curr_pos - 1 | 0); - var s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let n = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 3 | 0, lexbuf.lex_curr_pos - 1 | 0); + let s = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, s); - var code = Caml_format.caml_int_of_string("0x" + n); + let code = Caml_format.caml_int_of_string("0x" + n); Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code)); return jsx_text(env, mode, buf, raw, lexbuf); case 4 : - var n$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); - var s$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let n$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); + let s$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, s$1); - var code$1 = Caml_format.caml_int_of_string(n$1); + let code$1 = Caml_format.caml_int_of_string(n$1); Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$1)); return jsx_text(env, mode, buf, raw, lexbuf); case 5 : - var entity = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 1 | 0, lexbuf.lex_curr_pos - 1 | 0); - var s$2 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let entity = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 1 | 0, lexbuf.lex_curr_pos - 1 | 0); + let s$2 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, s$2); - var code$2; + let code$2; switch (entity) { case "'int'" : code$2 = 8747; @@ -4607,7 +4607,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { } return jsx_text(env, mode, buf, raw, lexbuf); case 6 : - var c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, c$1); Stdlib__Buffer.add_char(buf, c$1); return jsx_text(env, mode, buf, raw, lexbuf); @@ -4620,13 +4620,13 @@ function jsx_text(env, mode, buf, raw, lexbuf) { } function template_part(env, start, cooked, raw, literal, lexbuf) { - var ___ocaml_lex_state = 416; + let ___ocaml_lex_state = 416; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -4652,27 +4652,27 @@ function template_part(env, start, cooked, raw, literal, lexbuf) { case 3 : Stdlib__Buffer.add_char(raw, /* '\\' */92); Stdlib__Buffer.add_char(literal, /* '\\' */92); - var match = string_escape(env, cooked, lexbuf); - var str = Stdlib__Lexing.lexeme(lexbuf); + let match = string_escape(env, cooked, lexbuf); + let str = Stdlib__Lexing.lexeme(lexbuf); Stdlib__Buffer.add_string(raw, str); Stdlib__Buffer.add_string(literal, str); return template_part(match[0], start, cooked, raw, literal, lexbuf); case 4 : - var lf = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); + let lf = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_start_pos + 2 | 0); Stdlib__Buffer.add_string(raw, lf); Stdlib__Buffer.add_string(literal, lf); Stdlib__Buffer.add_string(cooked, "\n"); Stdlib__Lexing.new_line(lexbuf); return template_part(env, start, cooked, raw, literal, lexbuf); case 5 : - var lf$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let lf$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, lf$1); Stdlib__Buffer.add_char(literal, lf$1); Stdlib__Buffer.add_char(cooked, /* '\n' */10); Stdlib__Lexing.new_line(lexbuf); return template_part(env, start, cooked, raw, literal, lexbuf); case 6 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, c); Stdlib__Buffer.add_char(literal, c); Stdlib__Buffer.add_char(cooked, c); @@ -4687,9 +4687,9 @@ function template_part(env, start, cooked, raw, literal, lexbuf) { function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var env = _env; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let env = _env; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : Stdlib__Lexing.new_line(lexbuf); @@ -4700,28 +4700,28 @@ function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 393; continue ; case 2 : - var start = from_lb(env.lex_source, lexbuf); - var buf = Stdlib__Buffer.create(127); - var match = line_comment(env, buf, lexbuf); - var env$1 = save_comment(match[0], start, match[1], buf, true); + let start = from_lb(env.lex_source, lexbuf); + let buf = Stdlib__Buffer.create(127); + let match = line_comment(env, buf, lexbuf); + let env$1 = save_comment(match[0], start, match[1], buf, true); ___ocaml_lex_state = 393; _env = env$1; continue ; case 3 : - var start$1 = from_lb(env.lex_source, lexbuf); - var buf$1 = Stdlib__Buffer.create(127); - var match$1 = comment(env, buf$1, lexbuf); - var env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); + let start$1 = from_lb(env.lex_source, lexbuf); + let buf$1 = Stdlib__Buffer.create(127); + let match$1 = comment(env, buf$1, lexbuf); + let env$2 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); ___ocaml_lex_state = 393; _env = env$2; continue ; case 4 : - var start$2 = from_lb(env.lex_source, lexbuf); - var cooked = Stdlib__Buffer.create(127); - var raw = Stdlib__Buffer.create(127); - var literal = Stdlib__Buffer.create(127); + let start$2 = from_lb(env.lex_source, lexbuf); + let cooked = Stdlib__Buffer.create(127); + let raw = Stdlib__Buffer.create(127); + let literal = Stdlib__Buffer.create(127); Stdlib__Buffer.add_string(literal, "}"); - var match$2 = template_part(env, start$2, cooked, raw, literal, lexbuf); + let match$2 = template_part(env, start$2, cooked, raw, literal, lexbuf); return [ match$2[0], { @@ -4738,7 +4738,7 @@ function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { } ]; case 5 : - var env$3 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$3 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -4766,13 +4766,13 @@ function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { } function string_quote(env, q, buf, raw, octal, lexbuf) { - var ___ocaml_lex_state = 247; + let ___ocaml_lex_state = 247; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var q$p = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let q$p = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, q$p); if (q === q$p) { return [ @@ -4785,16 +4785,16 @@ function string_quote(env, q, buf, raw, octal, lexbuf) { return string_quote(env, q, buf, raw, octal, lexbuf); } case 1 : - var e = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let e = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, e); - var match = string_escape(env, buf, lexbuf); - var octal$1 = match[1] || octal; + let match = string_escape(env, buf, lexbuf); + let octal$1 = match[1] || octal; Stdlib__Buffer.add_string(raw, Stdlib__Lexing.lexeme(lexbuf)); return string_quote(match[0], q, buf, raw, octal$1, lexbuf); case 2 : - var x = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let x = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, x); - var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -4805,7 +4805,7 @@ function string_quote(env, q, buf, raw, octal, lexbuf) { octal ]; case 3 : - var x$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let x$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, x$1); Stdlib__Buffer.add_char(buf, x$1); return string_quote(env, q, buf, raw, octal, lexbuf); @@ -4818,10 +4818,10 @@ function string_quote(env, q, buf, raw, octal, lexbuf) { } function string_escape(env, buf, lexbuf) { - var ___ocaml_lex_state = 252; + let ___ocaml_lex_state = 252; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return [ @@ -4835,9 +4835,9 @@ function string_escape(env, buf, lexbuf) { false ]; case 2 : - var a = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); - var b = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); - var code = (hexa_to_int(a) << 4) + hexa_to_int(b) | 0; + let a = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); + let b = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); + let code = (hexa_to_int(a) << 4) + hexa_to_int(b) | 0; Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code)); @@ -4846,16 +4846,16 @@ function string_escape(env, buf, lexbuf) { false ]; case 3 : - var a$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var b$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); - var code$1 = ((oct_to_int(a$1) << 6) + (oct_to_int(b$1) << 3) | 0) + oct_to_int(c) | 0; + let a$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let b$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); + let code$1 = ((oct_to_int(a$1) << 6) + (oct_to_int(b$1) << 3) | 0) + oct_to_int(c) | 0; if (code$1 < 256) { Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$1)); } else { - var code$2 = (oct_to_int(a$1) << 3) + oct_to_int(b$1) | 0; + let code$2 = (oct_to_int(a$1) << 3) + oct_to_int(b$1) | 0; Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$2)); @@ -4866,9 +4866,9 @@ function string_escape(env, buf, lexbuf) { true ]; case 4 : - var a$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var b$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); - var code$3 = (oct_to_int(a$2) << 3) + oct_to_int(b$2) | 0; + let a$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let b$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); + let code$3 = (oct_to_int(a$2) << 3) + oct_to_int(b$2) | 0; Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$3)); @@ -4919,8 +4919,8 @@ function string_escape(env, buf, lexbuf) { false ]; case 12 : - var a$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var code$4 = oct_to_int(a$3); + let a$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let code$4 = oct_to_int(a$3); Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$4)); @@ -4929,11 +4929,11 @@ function string_escape(env, buf, lexbuf) { true ]; case 13 : - var a$4 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); - var b$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); - var c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 3 | 0); - var d = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 4 | 0); - var code$5 = (((hexa_to_int(a$4) << 12) + (hexa_to_int(b$3) << 8) | 0) + (hexa_to_int(c$1) << 4) | 0) + hexa_to_int(d) | 0; + let a$4 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); + let b$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); + let c$1 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 3 | 0); + let d = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 4 | 0); + let code$5 = (((hexa_to_int(a$4) << 12) + (hexa_to_int(b$3) << 8) | 0) + (hexa_to_int(c$1) << 4) | 0) + hexa_to_int(d) | 0; Stdlib__List.iter((function (param) { return Stdlib__Buffer.add_char(buf, param); }), utf16to8(code$5)); @@ -4942,9 +4942,9 @@ function string_escape(env, buf, lexbuf) { false ]; case 14 : - var hex_code = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); - var code$6 = Caml_format.caml_int_of_string("0x" + hex_code); - var env$1 = code$6 > 1114111 ? lex_error(env, from_lb(env.lex_source, lexbuf), { + let hex_code = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); + let code$6 = Caml_format.caml_int_of_string("0x" + hex_code); + let env$1 = code$6 > 1114111 ? lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }) : env; @@ -4956,8 +4956,8 @@ function string_escape(env, buf, lexbuf) { false ]; case 15 : - var c$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var env$2 = lex_error(env, from_lb(env.lex_source, lexbuf), { + let c$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let env$2 = lex_error(env, from_lb(env.lex_source, lexbuf), { TAG: /* UnexpectedToken */1, _0: "ILLEGAL" }); @@ -4973,7 +4973,7 @@ function string_escape(env, buf, lexbuf) { false ]; case 17 : - var c$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(buf, c$3); return [ env, @@ -5003,10 +5003,10 @@ function type_token(env, lexbuf) { Caml_array.set(lexbuf.lex_mem, 6, lexbuf.lex_curr_pos); Caml_array.set(lexbuf.lex_mem, 5, lexbuf.lex_curr_pos); Caml_array.set(lexbuf.lex_mem, 4, lexbuf.lex_curr_pos); - var ___ocaml_lex_state = 133; + let ___ocaml_lex_state = 133; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : Stdlib__Lexing.new_line(lexbuf); @@ -5015,24 +5015,24 @@ function type_token(env, lexbuf) { unicode_fix_cols(lexbuf); return type_token(env, lexbuf); case 2 : - var start = from_lb(env.lex_source, lexbuf); - var buf = Stdlib__Buffer.create(127); - var match = comment(env, buf, lexbuf); - var env$1 = save_comment(match[0], start, match[1], buf, true); + let start = from_lb(env.lex_source, lexbuf); + let buf = Stdlib__Buffer.create(127); + let match = comment(env, buf, lexbuf); + let env$1 = save_comment(match[0], start, match[1], buf, true); return type_token(env$1, lexbuf); case 3 : - var sp = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, Caml_array.get(lexbuf.lex_mem, 0)); - var escape_type = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); - var pattern = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let sp = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, Caml_array.get(lexbuf.lex_mem, 0)); + let escape_type = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let pattern = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); if (env.lex_enable_comment_syntax) { - var env$2; + let env$2; if (env.lex_in_comment_syntax) { - var loc = from_lb(env.lex_source, lexbuf); + let loc = from_lb(env.lex_source, lexbuf); env$2 = unexpected_error(env, loc, pattern); } else { env$2 = env; } - var env$3 = in_comment_syntax(true, env$2); + let env$3 = in_comment_syntax(true, env$2); if (escape_type === ":") { return [ env$3, @@ -5042,16 +5042,16 @@ function type_token(env, lexbuf) { return type_token(env$3, lexbuf); } } - var start$1 = from_lb(env.lex_source, lexbuf); - var buf$1 = Stdlib__Buffer.create(127); + let start$1 = from_lb(env.lex_source, lexbuf); + let buf$1 = Stdlib__Buffer.create(127); Stdlib__Buffer.add_string(buf$1, sp); Stdlib__Buffer.add_string(buf$1, escape_type); - var match$1 = comment(env, buf$1, lexbuf); - var env$4 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); + let match$1 = comment(env, buf$1, lexbuf); + let env$4 = save_comment(match$1[0], start$1, match$1[1], buf$1, true); return type_token(env$4, lexbuf); case 4 : if (env.lex_in_comment_syntax) { - var env$5 = in_comment_syntax(false, env); + let env$5 = in_comment_syntax(false, env); return type_token(env$5, lexbuf); } yyback(1, lexbuf); @@ -5060,18 +5060,18 @@ function type_token(env, lexbuf) { /* T_MULT */97 ]; case 5 : - var start$2 = from_lb(env.lex_source, lexbuf); - var buf$2 = Stdlib__Buffer.create(127); - var match$2 = line_comment(env, buf$2, lexbuf); - var env$6 = save_comment(match$2[0], start$2, match$2[1], buf$2, true); + let start$2 = from_lb(env.lex_source, lexbuf); + let buf$2 = Stdlib__Buffer.create(127); + let match$2 = line_comment(env, buf$2, lexbuf); + let env$6 = save_comment(match$2[0], start$2, match$2[1], buf$2, true); return type_token(env$6, lexbuf); case 6 : - var quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); - var start$3 = from_lb(env.lex_source, lexbuf); - var buf$3 = Stdlib__Buffer.create(127); - var raw = Stdlib__Buffer.create(127); + let quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let start$3 = from_lb(env.lex_source, lexbuf); + let buf$3 = Stdlib__Buffer.create(127); + let raw = Stdlib__Buffer.create(127); Stdlib__Buffer.add_char(raw, quote); - var match$3 = string_quote(env, quote, buf$3, raw, false, lexbuf); + let match$3 = string_quote(env, quote, buf$3, raw, false, lexbuf); return [ match$3[0], { @@ -5085,46 +5085,46 @@ function type_token(env, lexbuf) { } ]; case 7 : - var neg = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let neg = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w, mk_num_singleton(/* BINARY */0, num, neg)); case 8 : - var neg$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let neg$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, mk_num_singleton(/* BINARY */0, num$1, neg$1) ]; case 9 : - var neg$2 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let neg$2 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w$1 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$1, mk_num_singleton(/* OCTAL */2, num$2, neg$2)); case 10 : - var neg$3 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let neg$3 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, mk_num_singleton(/* OCTAL */2, num$3, neg$3) ]; case 11 : - var neg$4 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$4 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let neg$4 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$4 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w$2 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$2, mk_num_singleton(/* LEGACY_OCTAL */1, num$4, neg$4)); case 12 : - var neg$5 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$5 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let neg$5 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$5 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, mk_num_singleton(/* LEGACY_OCTAL */1, num$5, neg$5) ]; case 13 : - var neg$6 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$6 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - var match$4; + let neg$6 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$6 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w$3 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let match$4; try { match$4 = [ env, @@ -5133,8 +5133,8 @@ function type_token(env, lexbuf) { } catch (exn){ if (Stdlib__Sys.win32) { - var loc$1 = from_lb(env.lex_source, lexbuf); - var env$7 = lex_error(env, loc$1, /* WindowsFloatOfString */59); + let loc$1 = from_lb(env.lex_source, lexbuf); + let env$7 = lex_error(env, loc$1, /* WindowsFloatOfString */59); match$4 = [ env$7, { @@ -5149,8 +5149,8 @@ function type_token(env, lexbuf) { } return illegal_number(match$4[0], lexbuf, w$3, match$4[1]); case 14 : - var neg$7 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$7 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let neg$7 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$7 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); try { return [ env, @@ -5159,8 +5159,8 @@ function type_token(env, lexbuf) { } catch (exn$1){ if (Stdlib__Sys.win32) { - var loc$2 = from_lb(env.lex_source, lexbuf); - var env$8 = lex_error(env, loc$2, /* WindowsFloatOfString */59); + let loc$2 = from_lb(env.lex_source, lexbuf); + let env$8 = lex_error(env, loc$2, /* WindowsFloatOfString */59); return [ env$8, { @@ -5173,31 +5173,31 @@ function type_token(env, lexbuf) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } case 15 : - var neg$8 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$8 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w$4 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let neg$8 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$8 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w$4 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$4, mk_num_singleton(/* NORMAL */3, num$8, neg$8)); case 16 : - var neg$9 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$9 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let neg$9 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$9 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, mk_num_singleton(/* NORMAL */3, num$9, neg$9) ]; case 17 : - var neg$10 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); - var num$10 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var w$5 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); + let neg$10 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); + let num$10 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let w$5 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$5, mk_num_singleton(/* NORMAL */3, num$10, neg$10)); case 18 : - var neg$11 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), Caml_array.get(lexbuf.lex_mem, 0)); - var num$11 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); + let neg$11 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), Caml_array.get(lexbuf.lex_mem, 0)); + let num$11 = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); return [ env, mk_num_singleton(/* NORMAL */3, num$11, neg$11) ]; case 19 : - var word = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let word = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); unicode_fix_cols(lexbuf); try { return [ @@ -5206,7 +5206,7 @@ function type_token(env, lexbuf) { ]; } catch (raw_exn){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { return [ env, @@ -5331,9 +5331,9 @@ function type_token(env, lexbuf) { /* T_MINUS */95 ]; case 47 : - var env$9; + let env$9; if (env.lex_in_comment_syntax) { - var loc$3 = from_lb(env.lex_source, lexbuf); + let loc$3 = from_lb(env.lex_source, lexbuf); env$9 = lex_error(env, loc$3, /* UnexpectedEOS */4); } else { env$9 = env; @@ -5356,19 +5356,19 @@ function type_token(env, lexbuf) { } function jsx_child(env, start, buf, raw, lexbuf) { - var ___ocaml_lex_state = 364; + let ___ocaml_lex_state = 364; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var lt = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let lt = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); Stdlib__Buffer.add_string(raw, lt); Stdlib__Buffer.add_string(buf, lt); Stdlib__Lexing.new_line(lexbuf); - var match = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); - var value = Stdlib__Buffer.contents(buf); - var raw$1 = Stdlib__Buffer.contents(raw); + let match = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); + let value = Stdlib__Buffer.contents(buf); + let raw$1 = Stdlib__Buffer.contents(raw); return [ match[0], { @@ -5396,12 +5396,12 @@ function jsx_child(env, start, buf, raw, lexbuf) { /* T_LCURLY */1 ]; case 4 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); Stdlib__Buffer.add_char(raw, c); Stdlib__Buffer.add_char(buf, c); - var match$1 = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); - var value$1 = Stdlib__Buffer.contents(buf); - var raw$2 = Stdlib__Buffer.contents(raw); + let match$1 = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); + let value$1 = Stdlib__Buffer.contents(buf); + let raw$2 = Stdlib__Buffer.contents(raw); return [ match$1[0], { @@ -5426,10 +5426,10 @@ function regexp(env) { } function jsx_child$1(env) { - var start = from_curr_lb(env.lex_source, env.lex_lb); - var buf = Stdlib__Buffer.create(127); - var raw = Stdlib__Buffer.create(127); - var match = jsx_child(env, start, buf, raw, env.lex_lb); + let start = from_curr_lb(env.lex_source, env.lex_lb); + let buf = Stdlib__Buffer.create(127); + let raw = Stdlib__Buffer.create(127); + let match = jsx_child(env, start, buf, raw, env.lex_lb); return get_result_and_clear_state([ match[0], match[1] @@ -5452,7 +5452,7 @@ function token$1(env) { return get_result_and_clear_state(token(env, env.lex_lb)); } -var funarg = { +let funarg = { compare: Stdlib__String.compare }; @@ -5465,8 +5465,8 @@ function height(param) { } function create(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -5476,13 +5476,13 @@ function create(l, v, r) { } function bal(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -5508,9 +5508,9 @@ function bal(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -5537,22 +5537,22 @@ function add(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add(x, l); + let ll = add(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = add(x, r); + let rr = add(x, r); if (r === rr) { return t; } else { @@ -5562,11 +5562,11 @@ function add(x, t) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -5576,8 +5576,8 @@ function mem(x, _param) { } function create$1(lex_env, mode) { - var lexbuf = lex_env.lex_lb; - var lexbuf$1 = { + let lexbuf = lex_env.lex_lb; + let lexbuf$1 = { refill_buff: lexbuf.refill_buff, lex_buffer: lexbuf.lex_buffer, lex_buffer_len: lexbuf.lex_buffer_len, @@ -5591,7 +5591,7 @@ function create$1(lex_env, mode) { lex_start_p: lexbuf.lex_start_p, lex_curr_p: lexbuf.lex_curr_p }; - var lex_env$1 = with_lexbuf(lexbuf$1, lex_env); + let lex_env$1 = with_lexbuf(lexbuf$1, lex_env); return { la_results: [], la_num_lexed: 0, @@ -5601,9 +5601,9 @@ function create$1(lex_env, mode) { } function next_power_of_two(n) { - var _i = 1; + let _i = 1; while(true) { - var i = _i; + let i = _i; if (i >= n) { return i; } @@ -5616,21 +5616,21 @@ function grow(t, n) { if (t.la_results.length >= n) { return ; } - var new_size = next_power_of_two(n); - var filler = function (i) { + let new_size = next_power_of_two(n); + let filler = function (i) { if (i < t.la_results.length) { return Caml_array.get(t.la_results, i); } }; - var new_arr = Stdlib__Array.init(new_size, filler); + let new_arr = Stdlib__Array.init(new_size, filler); t.la_results = new_arr; } function lex(t) { - var lex_env = t.la_lex_env; - var match = t.la_lex_mode; - var match$1; + let lex_env = t.la_lex_env; + let match = t.la_lex_mode; + let match$1; switch (match) { case /* TYPE */1 : match$1 = type_token$1(lex_env); @@ -5653,9 +5653,9 @@ function lex(t) { break; } - var lex_env$1 = match$1[0]; - var lexbuf = lex_env$1.lex_lb; - var lexbuf$1 = { + let lex_env$1 = match$1[0]; + let lexbuf = lex_env$1.lex_lb; + let lexbuf$1 = { refill_buff: lexbuf.refill_buff, lex_buffer: lexbuf.lex_buffer, lex_buffer_len: lexbuf.lex_buffer_len, @@ -5669,7 +5669,7 @@ function lex(t) { lex_start_p: lexbuf.lex_start_p, lex_curr_p: lexbuf.lex_curr_p }; - var cloned_env = with_lexbuf(lexbuf$1, lex_env$1); + let cloned_env = with_lexbuf(lexbuf$1, lex_env$1); t.la_lex_env = lex_env$1; Caml_array.set(t.la_results, t.la_num_lexed, [ cloned_env, @@ -5685,7 +5685,7 @@ function lex_until(t, i) { }; } -var default_parse_options = { +let default_parse_options = { esproposal_class_instance_fields: false, esproposal_class_static_fields: false, esproposal_decorators: false, @@ -5695,11 +5695,11 @@ var default_parse_options = { }; function init_env(token_sinkOpt, parse_optionsOpt, source, content) { - var token_sink = token_sinkOpt !== undefined ? Caml_option.valFromOption(token_sinkOpt) : undefined; - var parse_options = parse_optionsOpt !== undefined ? Caml_option.valFromOption(parse_optionsOpt) : undefined; - var lb = Stdlib__Lexing.from_string(undefined, content); + let token_sink = token_sinkOpt !== undefined ? Caml_option.valFromOption(token_sinkOpt) : undefined; + let parse_options = parse_optionsOpt !== undefined ? Caml_option.valFromOption(parse_optionsOpt) : undefined; + let lb = Stdlib__Lexing.from_string(undefined, content); if (source !== undefined && typeof source !== "number") { - var init = lb.lex_curr_p; + let init = lb.lex_curr_p; lb.lex_curr_p = { pos_fname: source._0, pos_lnum: init.pos_lnum, @@ -5707,9 +5707,9 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { pos_cnum: init.pos_cnum }; } - var parse_options$1 = parse_options !== undefined ? parse_options : default_parse_options; - var enable_types_in_comments = parse_options$1.types; - var lex_env = new_lex_env(source, lb, enable_types_in_comments); + let parse_options$1 = parse_options !== undefined ? parse_options : default_parse_options; + let enable_types_in_comments = parse_options$1.types; + let lex_env = new_lex_env(source, lb, enable_types_in_comments); return { errors: { contents: /* [] */0 @@ -5756,7 +5756,7 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { } function error_at(env, param) { - var e = param[1]; + let e = param[1]; env.errors.contents = { hd: [ param[0], @@ -5764,7 +5764,7 @@ function error_at(env, param) { ], tl: env.errors.contents }; - var callback = env.error_callback; + let callback = env.error_callback; if (callback !== undefined) { return Curry._2(callback, env, e); } @@ -5783,8 +5783,8 @@ function comment_list(env) { } function record_export(env, param) { - var export_name = param[1]; - var $$exports = env.exports.contents; + let export_name = param[1]; + let $$exports = env.exports.contents; if (Curry._2(mem, export_name, $$exports)) { return error_at(env, [ param[0], @@ -5800,7 +5800,7 @@ function record_export(env, param) { } function lookahead(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; if (i >= 2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -5811,9 +5811,9 @@ function lookahead(iOpt, env) { ] }); } - var t = env.lookahead.contents; + let t = env.lookahead.contents; lex_until(t, i); - var match = Caml_array.get(t.la_results, i); + let match = Caml_array.get(t.la_results, i); if (match !== undefined) { return match[1]; } @@ -5824,61 +5824,61 @@ function lookahead(iOpt, env) { } function with_strict(in_strict_mode, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.in_strict_mode = in_strict_mode; return newrecord; } function with_in_function(in_function, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.in_function = in_function; return newrecord; } function with_allow_yield(allow_yield, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.allow_yield = allow_yield; return newrecord; } function with_no_let(no_let, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.no_let = no_let; return newrecord; } function with_in_loop(in_loop, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.in_loop = in_loop; return newrecord; } function with_no_in(no_in, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.no_in = no_in; return newrecord; } function with_in_switch(in_switch, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.in_switch = in_switch; return newrecord; } function with_in_export(in_export, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.in_export = in_export; return newrecord; } function with_no_call(no_call, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.no_call = no_call; return newrecord; } function with_error_callback(error_callback, env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.error_callback = error_callback; return newrecord; } @@ -5892,19 +5892,19 @@ function error_list(env) { } function without_error_callback(env) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.error_callback = undefined; return newrecord; } function add_label(env, label) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.labels = Curry._2(add, label, env.labels); return newrecord; } function enter_function(env, async, generator) { - var newrecord = Caml_obj.caml_obj_dup(env); + let newrecord = Caml_obj.caml_obj_dup(env); newrecord.allow_await = async; newrecord.allow_yield = generator; newrecord.in_function = true; @@ -5949,35 +5949,35 @@ function is_restricted(param) { } function token$2(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; return lookahead(i, env).lex_token; } function value(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; return lookahead(i, env).lex_value; } function loc(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; return lookahead(i, env).lex_loc; } function errors(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; return lookahead(i, env).lex_errors; } function comments(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; return lookahead(i, env).lex_comments; } function lex_env(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; - var t = env.lookahead.contents; + let i = iOpt !== undefined ? iOpt : 0; + let t = env.lookahead.contents; lex_until(t, i); - var match = Caml_array.get(t.la_results, i); + let match = Caml_array.get(t.la_results, i); if (match !== undefined) { return match[0]; } @@ -5988,7 +5988,7 @@ function lex_env(iOpt, env) { } function is_line_terminator(env) { - var loc$p = env.last_loc.contents; + let loc$p = env.last_loc.contents; if (loc$p !== undefined) { return loc(undefined, env).start.line > loc$p.start.line; } else { @@ -5997,7 +5997,7 @@ function is_line_terminator(env) { } function is_implicit_semicolon(env) { - var match = token$2(undefined, env); + let match = token$2(undefined, env); if (typeof match === "number") { if (match > 104 || match < 3) { if (match > 105 || match < 2) { @@ -6016,7 +6016,7 @@ function is_implicit_semicolon(env) { } function semicolon_loc(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; if (Caml_obj.caml_equal(token$2(i, env), /* T_SEMICOLON */7)) { return loc(i, env); } @@ -6024,9 +6024,9 @@ function semicolon_loc(iOpt, env) { } function is_identifier(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; - var name = value(i, env); - var match = token$2(i, env); + let i = iOpt !== undefined ? iOpt : 0; + let name = value(i, env); + let match = token$2(i, env); if (is_strict_reserved(name) || is_restricted(name) || is_future_reserved(name)) { return true; } else if (typeof match === "number") { @@ -6041,7 +6041,7 @@ function is_identifier(iOpt, env) { } function is_function(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; + let i = iOpt !== undefined ? iOpt : 0; if (Caml_obj.caml_equal(token$2(i, env), /* T_FUNCTION */13)) { return true; } else if (Caml_obj.caml_equal(token$2(i, env), /* T_ASYNC */61)) { @@ -6052,8 +6052,8 @@ function is_function(iOpt, env) { } function is_class(iOpt, env) { - var i = iOpt !== undefined ? iOpt : 0; - var match = token$2(i, env); + let i = iOpt !== undefined ? iOpt : 0; + let match = token$2(i, env); if (typeof match === "number") { if (match !== 12) { return match === 38; @@ -6066,7 +6066,7 @@ function is_class(iOpt, env) { } function error$1(env, e) { - var loc$1 = loc(undefined, env); + let loc$1 = loc(undefined, env); error_at(env, [ loc$1, e @@ -6074,7 +6074,7 @@ function error$1(env, e) { } function get_unexpected_error(param) { - var tmp = param[0]; + let tmp = param[0]; if (typeof tmp === "number") { switch (tmp) { case /* T_IDENTIFIER */0 : @@ -6095,7 +6095,7 @@ function get_unexpected_error(param) { } } - var word = param[1]; + let word = param[1]; if (is_future_reserved(word)) { return /* UnexpectedReserved */3; } else if (is_strict_reserved(word)) { @@ -6145,11 +6145,11 @@ function strict_error_at(env, param) { } function token$3(env) { - var token_sink = env.token_sink.contents; + let token_sink = env.token_sink.contents; if (token_sink !== undefined) { - var token_loc = loc(undefined, env); - var token$4 = token$2(undefined, env); - var token_value = value(undefined, env); + let token_loc = loc(undefined, env); + let token$4 = token$2(undefined, env); + let token_value = value(undefined, env); Curry._1(token_sink, { token_loc: token_loc, token: token$4, @@ -6161,7 +6161,7 @@ function token$3(env) { error_list(env)(errors(undefined, env)); comment_list(env)(comments(undefined, env)); env.last_loc.contents = loc(undefined, env); - var t = env.lookahead.contents; + let t = env.lookahead.contents; lex_until(t, 0); if (t.la_num_lexed > 1) { Stdlib__Array.blit(t.la_results, 1, t.la_results, 0, t.la_num_lexed - 1 | 0); @@ -6179,8 +6179,8 @@ function push_lex_mode(env, mode) { } function pop_lex_mode(env) { - var match = env.lex_mode_stack.contents; - var new_stack; + let match = env.lex_mode_stack.contents; + let new_stack; if (match) { new_stack = match.tl; } else { @@ -6194,10 +6194,10 @@ function pop_lex_mode(env) { } function double_pop_lex_mode(env) { - var match = env.lex_mode_stack.contents; - var new_stack; + let match = env.lex_mode_stack.contents; + let new_stack; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { new_stack = match$1.tl; } else { @@ -6250,13 +6250,13 @@ function contextual(env, str) { token$3(env); } -var Rollback = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Parser_env.Try.Rollback"); +let Rollback = /* @__PURE__ */Caml_exceptions.create("Flow_parser_reg_test.Parser_env.Try.Rollback"); function save_state(env) { - var orig_token_sink = env.token_sink.contents; - var token_buffer; + let orig_token_sink = env.token_sink.contents; + let token_buffer; if (orig_token_sink !== undefined) { - var buffer = { + let buffer = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -6285,7 +6285,7 @@ function reset_token_sink(flush, env, token_buffer_info) { if (token_buffer_info === undefined) { return ; } - var orig_token_sink = token_buffer_info[0]; + let orig_token_sink = token_buffer_info[0]; env.token_sink.contents = orig_token_sink; if (flush) { return Stdlib__Queue.iter(orig_token_sink, token_buffer_info[1]); @@ -6294,16 +6294,16 @@ function reset_token_sink(flush, env, token_buffer_info) { } function to_parse(env, parse) { - var saved_state = save_state(env); + let saved_state = save_state(env); try { - var result = Curry._1(parse, env); + let result = Curry._1(parse, env); reset_token_sink(true, env, saved_state.token_buffer); return /* ParsedSuccessfully */{ _0: result }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Rollback) { reset_token_sink(false, env, saved_state.token_buffer); env.errors.contents = saved_state.saved_errors; @@ -6318,7 +6318,7 @@ function to_parse(env, parse) { } } -var Parser_env_Peek = { +let Parser_env_Peek = { token: token$2, value: value, loc: loc, @@ -6332,12 +6332,12 @@ var Parser_env_Peek = { is_class: is_class }; -var Parser_env_Try = { +let Parser_env_Try = { Rollback: Rollback, to_parse: to_parse }; -var funarg$1 = { +let funarg$1 = { compare: Stdlib__String.compare }; @@ -6350,8 +6350,8 @@ function height$1(param) { } function create$2(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -6361,13 +6361,13 @@ function create$2(l, v, r) { } function bal$1(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$2(ll, lv, create$2(lr, v, r)); } @@ -6393,9 +6393,9 @@ function bal$1(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$2(create$2(l, v, rl), rv, rr); } @@ -6422,22 +6422,22 @@ function add$1(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$1(x, l); + let ll = add$1(x, l); if (l === ll) { return t; } else { return bal$1(ll, v, r); } } - var rr = add$1(x, r); + let rr = add$1(x, r); if (r === rr) { return t; } else { @@ -6447,11 +6447,11 @@ function add$1(x, t) { function mem$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return true; } @@ -6460,7 +6460,7 @@ function mem$1(x, _param) { }; } -var funarg$2 = { +let funarg$2 = { compare: Stdlib__String.compare }; @@ -6473,8 +6473,8 @@ function height$2(param) { } function create$3(l, x, d, r) { - var hl = height$2(l); - var hr = height$2(r); + let hl = height$2(l); + let hr = height$2(r); return /* Node */{ l: l, v: x, @@ -6485,14 +6485,14 @@ function create$3(l, x, d, r) { } function bal$2(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$2(ll) >= height$2(lr)) { return create$3(ll, lv, ld, create$3(lr, x, d, r)); } @@ -6519,10 +6519,10 @@ function bal$2(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$2(rr) >= height$2(rl)) { return create$3(create$3(l, x, d, rl), rv, rd, rr); } @@ -6550,11 +6550,11 @@ function add$2(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -6569,14 +6569,14 @@ function add$2(x, data, m) { } } if (c < 0) { - var ll = add$2(x, data, l); + let ll = add$2(x, data, l); if (l === ll) { return m; } else { return bal$2(ll, v, d, r); } } - var rr = add$2(x, data, r); + let rr = add$2(x, data, r); if (r === rr) { return m; } else { @@ -6586,9 +6586,9 @@ function add$2(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$2.compare, x, param.v); + let c = Curry._2(funarg$2.compare, x, param.v); if (c === 0) { return param.d; } @@ -6602,7 +6602,7 @@ function find(x, _param) { } function compare$1(param, param$1) { - var loc = compare(param[0], param$1[0]); + let loc = compare(param[0], param$1[0]); if (loc === 0) { return Caml_obj.caml_compare(param[1], param$1[1]); } else { @@ -6610,7 +6610,7 @@ function compare$1(param, param$1) { } } -var funarg$3 = { +let funarg$3 = { compare: compare$1 }; @@ -6623,8 +6623,8 @@ function height$3(param) { } function create$4(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -6634,13 +6634,13 @@ function create$4(l, v, r) { } function bal$3(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$3(ll) >= height$3(lr)) { return create$4(ll, lv, create$4(lr, v, r)); } @@ -6666,9 +6666,9 @@ function bal$3(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$3(rr) >= height$3(rl)) { return create$4(create$4(l, v, rl), rv, rr); } @@ -6695,22 +6695,22 @@ function add$3(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$3.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$3.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$3(x, l); + let ll = add$3(x, l); if (l === ll) { return t; } else { return bal$3(ll, v, r); } } - var rr = add$3(x, r); + let rr = add$3(x, r); if (r === rr) { return t; } else { @@ -6720,11 +6720,11 @@ function add$3(x, t) { function mem$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$3.compare, x, param.v); + let c = Curry._2(funarg$3.compare, x, param.v); if (c === 0) { return true; } @@ -6734,10 +6734,10 @@ function mem$2(x, _param) { } function filter_duplicate_errors(errs) { - var errs$1 = Stdlib__List.rev(errs); - var match = Stdlib__List.fold_left((function (param, err) { - var deduped = param[1]; - var set = param[0]; + let errs$1 = Stdlib__List.rev(errs); + let match = Stdlib__List.fold_left((function (param, err) { + let deduped = param[1]; + let set = param[0]; if (Curry._2(mem$2, err, set)) { return [ set, @@ -6760,10 +6760,10 @@ function filter_duplicate_errors(errs) { } function with_loc(fn, env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var result = Curry._1(fn, env); - var loc = env.last_loc.contents; - var end_loc = loc !== undefined ? loc : (error$1(env, { + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let result = Curry._1(fn, env); + let loc = env.last_loc.contents; + let end_loc = loc !== undefined ? loc : (error$1(env, { TAG: /* Assertion */0, _0: "did not consume any tokens" }), Curry._2(Parser_env_Peek.loc, undefined, env)); @@ -6773,7 +6773,7 @@ function with_loc(fn, env) { ]; } -var Parse = Caml_module.init_mod([ +let Parse = Caml_module.init_mod([ "parser_flow.ml", 95, 6 @@ -6877,15 +6877,15 @@ var Parse = Caml_module.init_mod([ function union(env) { maybe(env, /* T_BIT_OR */80); - var left = intersection(env); + let left = intersection(env); return Curry._2(union_with, env, left); } function param_list_or_type(env) { token$4(env, /* T_LPAREN */3); - var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); - var ret; - var exit = 0; + let token$5 = Curry._2(Parser_env_Peek.token, undefined, env); + let ret; + let exit = 0; if (typeof token$5 === "number") { if (token$5 !== 105) { if (token$5 >= 12) { @@ -6934,28 +6934,28 @@ function param_list_or_type(env) { exit = 1; } if (exit === 1) { - var match = primitive(token$5); + let match = primitive(token$5); if (match !== undefined) { - var match$1 = Curry._2(Parser_env_Peek.token, 1, env); + let match$1 = Curry._2(Parser_env_Peek.token, 1, env); if (typeof match$1 === "number" && (match$1 === 77 || match$1 === 76)) { - var match$2 = Curry._1(Parse.identifier_or_reserved_keyword, env); - var name = match$2[0]; + let match$2 = Curry._1(Parse.identifier_or_reserved_keyword, env); + let name = match$2[0]; if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAnnotation */6); } - var optional = maybe(env, /* T_PLING */76); + let optional = maybe(env, /* T_PLING */76); token$4(env, /* T_COLON */77); - var typeAnnotation = union(env); + let typeAnnotation = union(env); if (Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RPAREN */4)) { token$4(env, /* T_COMMA */8); } - var param_0 = btwn(name[0], typeAnnotation[0]); - var param_1 = { + let param_0 = btwn(name[0], typeAnnotation[0]); + let param_1 = { name: name, typeAnnotation: typeAnnotation, optional: optional }; - var param = [ + let param = [ param_0, param_1 ]; @@ -7009,10 +7009,10 @@ function primitive(param) { } function function_param_or_generic_type(env) { - var id = Curry._2(Parse.identifier, undefined, env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let id = Curry._2(Parse.identifier, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number" && (match === 77 || match === 76)) { - var param = function_param_with_id(env, id); + let param = function_param_with_id(env, id); maybe(env, /* T_COMMA */8); return { TAG: /* ParamList */0, @@ -7032,9 +7032,9 @@ function function_param_with_id(env, name) { if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAnnotation */6); } - var optional = maybe(env, /* T_PLING */76); + let optional = maybe(env, /* T_PLING */76); token$4(env, /* T_COLON */77); - var typeAnnotation = union(env); + let typeAnnotation = union(env); return [ btwn(name[0], typeAnnotation[0]), { @@ -7050,13 +7050,13 @@ function generic(env) { } function primary(env) { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let token$5 = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof token$5 === "number") { switch (token$5) { case /* T_IDENTIFIER */0 : - var match = generic(env); + let match = generic(env); return [ match[0], { @@ -7065,7 +7065,7 @@ function primary(env) { } ]; case /* T_LCURLY */1 : - var match$1 = Curry._2(_object, undefined, env); + let match$1 = Curry._2(_object, undefined, env); return [ match$1[0], { @@ -7074,15 +7074,15 @@ function primary(env) { } ]; case /* T_LPAREN */3 : - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var _type = param_list_or_type(env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let _type = param_list_or_type(env); if (_type.TAG !== /* ParamList */0) { return _type._0; } - var match$2 = _type._0; + let match$2 = _type._0; token$4(env, /* T_ARROW */10); - var returnType = union(env); - var end_loc = returnType[0]; + let returnType = union(env); + let end_loc = returnType[0]; return [ btwn(start_loc, end_loc), { @@ -7096,10 +7096,10 @@ function primary(env) { } ]; case /* T_LBRACKET */5 : - var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LBRACKET */5); - var tl = types(env, /* [] */0); - var end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); + let tl = types(env, /* [] */0); + let end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); return [ btwn(start_loc$1, end_loc$1), @@ -7113,9 +7113,9 @@ function primary(env) { exit = 2; break; case /* T_TYPEOF */44 : - var start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_TYPEOF */44); - var t = primary(env); + let t = primary(env); return [ btwn(start_loc$2, t[0]), { @@ -7124,12 +7124,12 @@ function primary(env) { } ]; case /* T_LESS_THAN */89 : - var start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); - var typeParameters = Curry._2(type_parameter_declaration, false, env); - var match$3 = function_param_list(env); + let start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); + let typeParameters = Curry._2(type_parameter_declaration, false, env); + let match$3 = function_param_list(env); token$4(env, /* T_ARROW */10); - var returnType$1 = union(env); - var end_loc$2 = returnType$1[0]; + let returnType$1 = union(env); + let end_loc$2 = returnType$1[0]; return [ btwn(start_loc$3, end_loc$2), { @@ -7154,11 +7154,11 @@ function primary(env) { } else { switch (token$5.TAG | 0) { case /* T_STRING */1 : - var match$4 = token$5._0; - var octal = match$4[3]; - var raw = match$4[2]; - var value = match$4[1]; - var loc$1 = match$4[0]; + let match$4 = token$5._0; + let octal = match$4[3]; + let raw = match$4[2]; + let value = match$4[1]; + let loc$1 = match$4[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -7182,9 +7182,9 @@ function primary(env) { } ]; case /* T_NUMBER_SINGLETON_TYPE */5 : - var value$1 = token$5._1; - var number_type = token$5._0; - var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); + let value$1 = token$5._1; + let number_type = token$5._0; + let raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, { TAG: /* T_NUMBER_SINGLETON_TYPE */5, _0: number_type, @@ -7209,7 +7209,7 @@ function primary(env) { } switch (exit) { case 1 : - var t$1 = primitive(token$5); + let t$1 = primitive(token$5); if (t$1 !== undefined) { token$4(env, token$5); return [ @@ -7224,9 +7224,9 @@ function primary(env) { ]; } case 2 : - var raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); + let raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, token$5); - var value$2 = Caml_obj.caml_equal(token$5, /* T_TRUE */29); + let value$2 = Caml_obj.caml_equal(token$5, /* T_TRUE */29); return [ loc, { @@ -7243,26 +7243,26 @@ function primary(env) { function function_param_list(env) { token$4(env, /* T_LPAREN */3); - var ret = Curry._2(function_param_list_without_parens, env, /* [] */0); + let ret = Curry._2(function_param_list_without_parens, env, /* [] */0); token$4(env, /* T_RPAREN */4); return ret; } function intersection(env) { maybe(env, /* T_BIT_AND */82); - var left = prefix(env); + let left = prefix(env); return Curry._2(intersection_with, env, left); } function prefix(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 76) { - var t = primary(env); + let t = primary(env); return postfix_with(env, t); } - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_PLING */76); - var t$1 = prefix(env); + let t$1 = prefix(env); return [ btwn(loc, t$1[0]), { @@ -7274,18 +7274,18 @@ function prefix(env) { function postfix_with(env, _t) { while(true) { - var t = _t; + let t = _t; if (!(!Curry._1(Parser_env_Peek.is_line_terminator, env) && maybe(env, /* T_LBRACKET */5))) { return t; } - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); - var loc = btwn(t[0], end_loc); - var t_1 = { + let loc = btwn(t[0], end_loc); + let t_1 = { TAG: /* Array */3, _0: t }; - var t$1 = [ + let t$1 = [ loc, t_1 ]; @@ -7295,7 +7295,7 @@ function postfix_with(env, _t) { } function rev_nonempty_acc(acc) { - var end_loc; + let end_loc; if (acc) { end_loc = acc.hd[0]; } else { @@ -7308,8 +7308,8 @@ function rev_nonempty_acc(acc) { ] }); } - var acc$1 = Stdlib__List.rev(acc); - var start_loc; + let acc$1 = Stdlib__List.rev(acc); + let start_loc; if (acc$1) { start_loc = acc$1.hd[0]; } else { @@ -7329,7 +7329,7 @@ function rev_nonempty_acc(acc) { } function generic_type_with_identifier(env, id) { - var match = Curry._2(raw_generic_with_identifier, env, id); + let match = Curry._2(raw_generic_with_identifier, env, id); return [ match[0], { @@ -7340,17 +7340,17 @@ function generic_type_with_identifier(env, id) { } function param(env) { - var match = Curry._1(Parse.identifier_or_reserved_keyword, env); + let match = Curry._1(Parse.identifier_or_reserved_keyword, env); return function_param_with_id(env, match[0]); } function function_param_list_without_parens(env) { return function (param$1) { - var _acc = param$1; + let _acc = param$1; while(true) { - var acc = _acc; - var t = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let acc = _acc; + let t = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; exit = typeof t === "number" ? ( t > 11 || t < 4 ? ( t !== 105 ? 1 : 2 @@ -7360,8 +7360,8 @@ function function_param_list_without_parens(env) { ) : 1; switch (exit) { case 1 : - var acc_0 = param(env); - var acc$1 = { + let acc_0 = param(env); + let acc$1 = { hd: acc_0, tl: acc }; @@ -7371,7 +7371,7 @@ function function_param_list_without_parens(env) { _acc = acc$1; continue ; case 2 : - var rest = Caml_obj.caml_equal(t, /* T_ELLIPSIS */11) ? (token$4(env, /* T_ELLIPSIS */11), param(env)) : undefined; + let rest = Caml_obj.caml_equal(t, /* T_ELLIPSIS */11) ? (token$4(env, /* T_ELLIPSIS */11), param(env)) : undefined; return [ rest, Stdlib__List.rev(acc) @@ -7384,8 +7384,8 @@ function function_param_list_without_parens(env) { function types(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 6) { return Stdlib__List.rev(acc); @@ -7395,8 +7395,8 @@ function types(env, _acc) { } } - var acc_0 = union(env); - var acc$1 = { + let acc_0 = union(env); + let acc$1 = { hd: acc_0, tl: acc }; @@ -7409,11 +7409,11 @@ function types(env, _acc) { } function methodish(env, start_loc) { - var typeParameters = Curry._2(type_parameter_declaration, false, env); - var match = function_param_list(env); + let typeParameters = Curry._2(type_parameter_declaration, false, env); + let match = function_param_list(env); token$4(env, /* T_COLON */77); - var returnType = union(env); - var loc = btwn(start_loc, returnType[0]); + let returnType = union(env); + let loc = btwn(start_loc, returnType[0]); return [ loc, { @@ -7426,13 +7426,13 @@ function methodish(env, start_loc) { } function method_property(env, start_loc, $$static, key) { - var value = methodish(env, start_loc); - var value_0 = value[0]; - var value_1 = { + let value = methodish(env, start_loc); + let value_0 = value[0]; + let value_1 = { TAG: /* Function */1, _0: value[1] }; - var value$1 = [ + let value$1 = [ value_0, value_1 ]; @@ -7449,7 +7449,7 @@ function method_property(env, start_loc, $$static, key) { } function call_property(env, start_loc, $$static) { - var value = methodish(env, Curry._2(Parser_env_Peek.loc, undefined, env)); + let value = methodish(env, Curry._2(Parser_env_Peek.loc, undefined, env)); return [ btwn(start_loc, value[0]), { @@ -7463,9 +7463,9 @@ function property(env, start_loc, $$static, key) { if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAnnotation */6); } - var optional = maybe(env, /* T_PLING */76); + let optional = maybe(env, /* T_PLING */76); token$4(env, /* T_COLON */77); - var value = union(env); + let value = union(env); return [ btwn(start_loc, value[0]), { @@ -7480,12 +7480,12 @@ function property(env, start_loc, $$static, key) { function indexer_property(env, start_loc, $$static) { token$4(env, /* T_LBRACKET */5); - var match = Curry._1(Parse.identifier_or_reserved_keyword, env); + let match = Curry._1(Parse.identifier_or_reserved_keyword, env); token$4(env, /* T_COLON */77); - var key = union(env); + let key = union(env); token$4(env, /* T_RBRACKET */6); token$4(env, /* T_COLON */77); - var value = union(env); + let value = union(env); return [ btwn(start_loc, value[0]), { @@ -7498,7 +7498,7 @@ function indexer_property(env, start_loc, $$static) { } function semicolon$1(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match >= 7) { if (match >= 9) { @@ -7518,14 +7518,14 @@ function semicolon$1(env) { function properties(allow_static, env, _param) { while(true) { - var param = _param; - var callProperties = param[2]; - var indexers = param[1]; - var acc = param[0]; - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var $$static = allow_static && maybe(env, /* T_STATIC */40); - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let param = _param; + let callProperties = param[2]; + let indexers = param[1]; + let acc = param[0]; + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let $$static = allow_static && maybe(env, /* T_STATIC */40); + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof match === "number") { if (match !== 89) { if (match !== 105) { @@ -7545,7 +7545,7 @@ function properties(allow_static, env, _param) { exit = 1; break; case /* T_LBRACKET */5 : - var indexer = indexer_property(env, start_loc, $$static); + let indexer = indexer_property(env, start_loc, $$static); semicolon$1(env); _param = [ acc, @@ -7570,15 +7570,15 @@ function properties(allow_static, env, _param) { } switch (exit) { case 1 : - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$2; - var exit$1 = 0; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$2; + let exit$1 = 0; if ($$static && match$1 === 77) { strict_error_at(env, [ start_loc, /* StrictReservedWord */39 ]); - var static_key_1 = { + let static_key_1 = { TAG: /* Identifier */1, _0: [ start_loc, @@ -7589,7 +7589,7 @@ function properties(allow_static, env, _param) { } ] }; - var static_key = [ + let static_key = [ start_loc, static_key_1 ]; @@ -7602,17 +7602,17 @@ function properties(allow_static, env, _param) { } if (exit$1 === 4) { push_lex_mode(env, /* NORMAL */0); - var key = Curry._1(Parse.object_key, env); + let key = Curry._1(Parse.object_key, env); pop_lex_mode(env); match$2 = [ $$static, key ]; } - var key$1 = match$2[1][1]; - var $$static$1 = match$2[0]; - var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); - var property$1 = typeof match$3 === "number" && !(match$3 !== 3 && match$3 !== 89) ? method_property(env, start_loc, $$static$1, key$1) : property(env, start_loc, $$static$1, key$1); + let key$1 = match$2[1][1]; + let $$static$1 = match$2[0]; + let match$3 = Curry._2(Parser_env_Peek.token, undefined, env); + let property$1 = typeof match$3 === "number" && !(match$3 !== 3 && match$3 !== 89) ? method_property(env, start_loc, $$static$1, key$1) : property(env, start_loc, $$static$1, key$1); semicolon$1(env); _param = [ { @@ -7630,7 +7630,7 @@ function properties(allow_static, env, _param) { Stdlib__List.rev(callProperties) ]; case 3 : - var call_prop = call_property(env, start_loc, $$static); + let call_prop = call_property(env, start_loc, $$static); semicolon$1(env); _param = [ acc, @@ -7647,15 +7647,15 @@ function properties(allow_static, env, _param) { } function _object(allow_staticOpt, env) { - var allow_static = allow_staticOpt !== undefined ? allow_staticOpt : false; - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let allow_static = allow_staticOpt !== undefined ? allow_staticOpt : false; + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var match = properties(allow_static, env, [ + let match = properties(allow_static, env, [ /* [] */0, /* [] */0, /* [] */0 ]); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc, end_loc), @@ -7669,19 +7669,19 @@ function _object(allow_staticOpt, env) { function params(env, allow_default, _require_default, _acc) { while(true) { - var acc = _acc; - var require_default = _require_default; - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var variance = typeof match === "number" ? ( + let acc = _acc; + let require_default = _require_default; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let variance = typeof match === "number" ? ( match !== 94 ? ( match !== 95 ? undefined : (token$3(env), /* Minus */1) ) : (token$3(env), /* Plus */0) ) : undefined; - var match$1 = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); - var id = match$1[1]; - var loc = match$1[0]; - var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$3 = allow_default ? ( + let match$1 = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); + let id = match$1[1]; + let loc = match$1[0]; + let match$2 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$3 = allow_default ? ( match$2 === 75 ? (token$3(env), [ union(env), true @@ -7696,21 +7696,21 @@ function params(env, allow_default, _require_default, _acc) { undefined, false ]; - var param_1 = { + let param_1 = { name: id.name, bound: id.typeAnnotation, variance: variance, default: match$3[0] }; - var param = [ + let param = [ loc, param_1 ]; - var acc$1 = { + let acc$1 = { hd: param, tl: acc }; - var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$4 = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match$4 === "number") { if (match$4 === 90) { return Stdlib__List.rev(acc$1); @@ -7731,7 +7731,7 @@ function params(env, allow_default, _require_default, _acc) { } function type_parameter_declaration(allow_default, env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LESS_THAN */89)) { return ; } @@ -7739,8 +7739,8 @@ function type_parameter_declaration(allow_default, env) { error$1(env, /* UnexpectedTypeAnnotation */6); } token$4(env, /* T_LESS_THAN */89); - var params$1 = params(env, allow_default, false, /* [] */0); - var loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); + let params$1 = params(env, allow_default, false, /* [] */0); + let loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); token$4(env, /* T_GREATER_THAN */90); return [ loc, @@ -7752,13 +7752,13 @@ function type_parameter_declaration(allow_default, env) { function union_with(env, left) { if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_BIT_OR */80)) { - var _acc = { + let _acc = { hd: left, tl: /* [] */0 }; while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 80) { token$4(env, /* T_BIT_OR */80); _acc = { @@ -7767,7 +7767,7 @@ function union_with(env, left) { }; continue ; } - var match$1 = rev_nonempty_acc(acc); + let match$1 = rev_nonempty_acc(acc); return [ match$1[0], { @@ -7783,13 +7783,13 @@ function union_with(env, left) { function intersection_with(env, left) { if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_BIT_AND */82)) { - var _acc = { + let _acc = { hd: left, tl: /* [] */0 }; while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 82) { token$4(env, /* T_BIT_AND */82); _acc = { @@ -7798,7 +7798,7 @@ function intersection_with(env, left) { }; continue ; } - var match$1 = rev_nonempty_acc(acc); + let match$1 = rev_nonempty_acc(acc); return [ match$1[0], { @@ -7814,9 +7814,9 @@ function intersection_with(env, left) { function identifier(env, _param) { while(true) { - var param = _param; - var qualification = param[1]; - var q_loc = param[0]; + let param = _param; + let qualification = param[1]; + let q_loc = param[0]; if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_PERIOD */9)) { return [ q_loc, @@ -7824,9 +7824,9 @@ function identifier(env, _param) { ]; } token$4(env, /* T_PERIOD */9); - var id = Curry._2(Parse.identifier, undefined, env); - var loc = btwn(q_loc, id[0]); - var qualification$1 = { + let id = Curry._2(Parse.identifier, undefined, env); + let loc = btwn(q_loc, id[0]); + let qualification$1 = { TAG: /* Qualified */1, _0: [ loc, @@ -7845,19 +7845,19 @@ function identifier(env, _param) { } function raw_generic_with_identifier(env, id) { - var id_0 = id[0]; - var id_1 = { + let id_0 = id[0]; + let id_1 = { TAG: /* Unqualified */0, _0: id }; - var id$1 = [ + let id$1 = [ id_0, id_1 ]; - var match = identifier(env, id$1); - var id_loc = match[0]; - var typeParameters = Curry._1(type_parameter_instantiation, env); - var loc = typeParameters !== undefined ? btwn(id_loc, typeParameters[0]) : id_loc; + let match = identifier(env, id$1); + let id_loc = match[0]; + let typeParameters = Curry._1(type_parameter_instantiation, env); + let loc = typeParameters !== undefined ? btwn(id_loc, typeParameters[0]) : id_loc; return [ loc, { @@ -7869,8 +7869,8 @@ function raw_generic_with_identifier(env, id) { function params$1(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 90) { return Stdlib__List.rev(acc); @@ -7880,8 +7880,8 @@ function params$1(env, _acc) { } } - var acc_0 = union(env); - var acc$1 = { + let acc_0 = union(env); + let acc$1 = { hd: acc_0, tl: acc }; @@ -7894,13 +7894,13 @@ function params$1(env, _acc) { } function type_parameter_instantiation(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LESS_THAN */89)) { return ; } token$4(env, /* T_LESS_THAN */89); - var params$2 = params$1(env, /* [] */0); - var loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); + let params$2 = params$1(env, /* [] */0); + let loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); token$4(env, /* T_GREATER_THAN */90); return [ loc, @@ -7910,17 +7910,17 @@ function type_parameter_instantiation(env) { ]; } -var _type = union; +let _type = union; function annotation(env) { if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAnnotation */6); } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_COLON */77); - var typeAnnotation = union(env); - var loc = env.last_loc.contents; - var end_loc; + let typeAnnotation = union(env); + let loc = env.last_loc.contents; + let end_loc; if (loc !== undefined) { end_loc = loc; } else { @@ -7940,7 +7940,7 @@ function annotation(env) { } function annotation_opt(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 77) { return annotation(env); } @@ -7948,56 +7948,56 @@ function annotation_opt(env) { } function wrap(f, env) { - var env$1 = with_strict(true, env); + let env$1 = with_strict(true, env); push_lex_mode(env$1, /* TYPE */1); - var ret = Curry._1(f, env$1); + let ret = Curry._1(f, env$1); pop_lex_mode(env$1); return ret; } -var partial_arg = Curry._1(type_parameter_declaration, true); +let partial_arg = Curry._1(type_parameter_declaration, true); function type_parameter_declaration_with_defaults(param) { return wrap(partial_arg, param); } -var partial_arg$1 = Curry._1(type_parameter_declaration, false); +let partial_arg$1 = Curry._1(type_parameter_declaration, false); function type_parameter_declaration$1(param) { return wrap(partial_arg$1, param); } function _object$1(allow_staticOpt, env) { - var allow_static = allow_staticOpt !== undefined ? allow_staticOpt : false; + let allow_static = allow_staticOpt !== undefined ? allow_staticOpt : false; return wrap(Curry._1(_object, allow_static), env); } function pattern(check_env, _param) { while(true) { - var param = _param; - var p = param[1]; + let param = _param; + let p = param[1]; switch (p.TAG | 0) { case /* Object */0 : - var o = p._0; + let o = p._0; return Stdlib__List.fold_left(object_property, check_env, o.properties); case /* Array */1 : - var arr = p._0; + let arr = p._0; return Stdlib__List.fold_left(array_element, check_env, arr.elements); case /* Assignment */2 : _param = p._0.left; continue ; case /* Identifier */3 : - var id = p._0; - var name = id[1].name; - var param_names = check_env[1]; - var env = check_env[0]; + let id = p._0; + let name = id[1].name; + let param_names = check_env[1]; + let env = check_env[0]; if (Curry._2(mem$1, name, param_names)) { error_at(env, [ id[0], /* StrictParamDupe */29 ]); } - var match = identifier_no_dupe_check([ + let match = identifier_no_dupe_check([ env, param_names ], id); @@ -8021,9 +8021,9 @@ function object_property(check_env) { if (param.TAG !== /* Property */0) { return pattern(check_env, param._0[1].argument); } - var property = param._0[1]; - var id = property.key; - var check_env$1; + let property = param._0[1]; + let id = property.key; + let check_env$1; switch (id.TAG | 0) { case /* Identifier */1 : check_env$1 = identifier_no_dupe_check(check_env, id._0); @@ -8053,9 +8053,9 @@ function array_element(check_env) { } function identifier_no_dupe_check(param, param$1) { - var name = param$1[1].name; - var loc = param$1[0]; - var env = param[0]; + let name = param$1[1].name; + let loc = param$1[0]; + let env = param[0]; if (is_restricted(name)) { strict_error_at(env, [ loc, @@ -8078,10 +8078,10 @@ function strict_post_check(env, strict, simple, id, params) { if (!(strict || !simple)) { return ; } - var env$1 = strict ? with_strict(!env.in_strict_mode, env) : env; + let env$1 = strict ? with_strict(!env.in_strict_mode, env) : env; if (id !== undefined) { - var name = id[1].name; - var loc = id[0]; + let name = id[1].name; + let loc = id[0]; if (is_restricted(name)) { strict_error_at(env$1, [ loc, @@ -8103,7 +8103,7 @@ function strict_post_check(env, strict, simple, id, params) { } function param$1(env) { - var id = Curry._2(Parse.pattern, env, /* StrictParamName */28); + let id = Curry._2(Parse.pattern, env, /* StrictParamName */28); if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ASSIGN */75)) { return [ id, @@ -8111,7 +8111,7 @@ function param$1(env) { ]; } token$4(env, /* T_ASSIGN */75); - var $$default = Curry._1(Parse.assignment, env); + let $$default = Curry._1(Parse.assignment, env); return [ id, $$default @@ -8120,12 +8120,12 @@ function param$1(env) { function param_list(env, _param) { while(true) { - var param$2 = _param; - var has_default = param$2[2]; - var defaults = param$2[1]; - var params = param$2[0]; - var t = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let param$2 = _param; + let has_default = param$2[2]; + let defaults = param$2[1]; + let params = param$2[0]; + let t = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; exit = typeof t === "number" ? ( t > 11 || t < 4 ? ( t !== 105 ? 1 : 2 @@ -8135,9 +8135,9 @@ function param_list(env, _param) { ) : 1; switch (exit) { case 1 : - var match = param$1(env); - var $$default = match[1]; - var has_default$1 = has_default || $$default !== undefined; + let match = param$1(env); + let $$default = match[1]; + let has_default$1 = has_default || $$default !== undefined; if (Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RPAREN */4)) { token$4(env, /* T_COMMA */8); } @@ -8154,7 +8154,7 @@ function param_list(env, _param) { ]; continue ; case 2 : - var rest = Caml_obj.caml_equal(t, /* T_ELLIPSIS */11) ? (token$4(env, /* T_ELLIPSIS */11), Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28)) : undefined; + let rest = Caml_obj.caml_equal(t, /* T_ELLIPSIS */11) ? (token$4(env, /* T_ELLIPSIS */11), Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28)) : undefined; if (Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RPAREN */4)) { error$1(env, /* ParameterAfterRestParameter */47); } @@ -8170,7 +8170,7 @@ function param_list(env, _param) { function function_params(env) { token$4(env, /* T_LPAREN */3); - var match = param_list(env, [ + let match = param_list(env, [ /* [] */0, /* [] */0, false @@ -8184,9 +8184,9 @@ function function_params(env) { } function function_body(env, async, generator) { - var env$1 = enter_function(env, async, generator); - var match = Curry._1(Parse.function_block_body, env$1); - var loc = match[0]; + let env$1 = enter_function(env, async, generator); + let match = Curry._1(Parse.function_block_body, env$1); + let loc = match[0]; return [ loc, { @@ -8201,7 +8201,7 @@ function function_body(env, async, generator) { } function generator(env, is_async) { - var match = maybe(env, /* T_MULT */97); + let match = maybe(env, /* T_MULT */97); if (is_async && match) { error$1(env, /* AsyncGenerator */48); return true; @@ -8227,21 +8227,21 @@ function is_simple_function_params(params, defaults, rest) { } function _function(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var async = maybe(env, /* T_ASYNC */61); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let async = maybe(env, /* T_ASYNC */61); token$4(env, /* T_FUNCTION */13); - var generator$1 = generator(env, async); - var match = env.in_export; - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$2; - var exit = 0; + let generator$1 = generator(env, async); + let match = env.in_export; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$2; + let exit = 0; if (match && typeof match$1 === "number") { if (match$1 !== 3) { if (match$1 !== 89) { exit = 1; } else { - var typeParams = Curry._1(type_parameter_declaration$1, env); - var id = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LPAREN */3) ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + let typeParams = Curry._1(type_parameter_declaration$1, env); + let id = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LPAREN */3) ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); match$2 = [ typeParams, id @@ -8257,24 +8257,24 @@ function _function(env) { exit = 1; } if (exit === 1) { - var id$1 = Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + let id$1 = Curry._2(Parse.identifier, /* StrictFunctionName */30, env); match$2 = [ Curry._1(type_parameter_declaration$1, env), id$1 ]; } - var id$2 = match$2[1]; - var match$3 = function_params(env); - var rest = match$3[2]; - var defaults = match$3[1]; - var params = match$3[0]; - var returnType = wrap(annotation_opt, env); - var predicate = Curry._1(Parse.predicate, env); - var match$4 = function_body(env, async, generator$1); - var body = match$4[1]; - var simple = is_simple_function_params(params, defaults, rest); + let id$2 = match$2[1]; + let match$3 = function_params(env); + let rest = match$3[2]; + let defaults = match$3[1]; + let params = match$3[0]; + let returnType = wrap(annotation_opt, env); + let predicate = Curry._1(Parse.predicate, env); + let match$4 = function_body(env, async, generator$1); + let body = match$4[1]; + let simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$4[2], simple, id$2, params); - var match$5; + let match$5; match$5 = body.TAG === /* BodyBlock */0 ? [ body._0[0], false @@ -8304,8 +8304,8 @@ function _function(env) { } function variable_declaration(env) { - var id = Curry._2(Parse.pattern, env, /* StrictVarName */27); - var match; + let id = Curry._2(Parse.pattern, env, /* StrictVarName */27); + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ASSIGN */75)) { token$4(env, /* T_ASSIGN */75); match = [ @@ -8327,8 +8327,8 @@ function variable_declaration(env) { } ]; } - var init = match[0]; - var end_loc = init !== undefined ? init[0] : id[0]; + let init = match[0]; + let end_loc = init !== undefined ? init[0] : id[0]; return [ [ btwn(id[0], end_loc), @@ -8343,24 +8343,24 @@ function variable_declaration(env) { function helper(env, _decls, _errs) { while(true) { - var errs = _errs; - var decls = _decls; - var match = variable_declaration(env); - var decl = match[0]; - var decls$1 = { + let errs = _errs; + let decls = _decls; + let match = variable_declaration(env); + let decl = match[0]; + let decls$1 = { hd: decl, tl: decls }; - var errs$1 = Stdlib.$at(match[1], errs); + let errs$1 = Stdlib.$at(match[1], errs); if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COMMA */8)) { token$4(env, /* T_COMMA */8); _errs = errs$1; _decls = decls$1; continue ; } - var end_loc = decl[0]; - var declarations = Stdlib__List.rev(decls$1); - var start_loc = decl[0]; + let end_loc = decl[0]; + let declarations = Stdlib__List.rev(decls$1); + let start_loc = decl[0]; return [ btwn(start_loc, end_loc), declarations, @@ -8370,9 +8370,9 @@ function helper(env, _decls, _errs) { } function declarations(token$5, kind, env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, token$5); - var match = helper(env, /* [] */0, /* [] */0); + let match = helper(env, /* [] */0, /* [] */0); return [ [ btwn(start_loc, match[0]), @@ -8386,11 +8386,11 @@ function declarations(token$5, kind, env) { } function $$const(env) { - var env$1 = with_no_let(true, env); - var match = declarations(/* T_CONST */25, /* Const */2, env$1); - var match$1 = match[0]; - var variable = match$1[1]; - var errs = Stdlib__List.fold_left((function (errs, decl) { + let env$1 = with_no_let(true, env); + let match = declarations(/* T_CONST */25, /* Const */2, env$1); + let match$1 = match[0]; + let variable = match$1[1]; + let errs = Stdlib__List.fold_left((function (errs, decl) { if (decl[1].init !== undefined) { return errs; } else { @@ -8413,14 +8413,14 @@ function $$const(env) { } function _let(env) { - var env$1 = with_no_let(true, env); + let env$1 = with_no_let(true, env); return declarations(/* T_LET */26, /* Let */1, env$1); } function variable(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var match$1; + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let match$1; if (typeof match === "number") { switch (match) { case /* T_VAR */22 : @@ -8445,7 +8445,7 @@ function variable(env) { error_unexpected(env); match$1 = declarations(/* T_VAR */22, /* Var */0, env); } - var match$2 = match$1[0]; + let match$2 = match$1[0]; return [ [ btwn(start_loc, match$2[0]), @@ -8459,13 +8459,13 @@ function variable(env) { } function is_tighter(a, b) { - var a_prec; + let a_prec; a_prec = a.TAG === /* Left_assoc */0 ? a._0 : a._0 - 1 | 0; return a_prec >= b._0; } function is_lhs(param) { - var tmp = param[1]; + let tmp = param[1]; if (typeof tmp === "number") { return false; } @@ -8479,7 +8479,7 @@ function is_lhs(param) { } function is_assignable_lhs(param) { - var tmp = param[1]; + let tmp = param[1]; if (typeof tmp === "number") { return false; } @@ -8495,8 +8495,8 @@ function is_assignable_lhs(param) { } function assignment_op(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var op; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let op; if (typeof match === "number") { switch (match) { case /* T_RSHIFT3_ASSIGN */63 : @@ -8551,17 +8551,17 @@ function assignment_op(env) { } function conditional(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var expr = Curry._1(logical, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let expr = Curry._1(logical, env); if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_PLING */76)) { return expr; } token$4(env, /* T_PLING */76); - var env$p = with_no_in(false, env); - var consequent = Curry._1(assignment, env$p); + let env$p = with_no_in(false, env); + let consequent = Curry._1(assignment, env$p); token$4(env, /* T_COLON */77); - var match = with_loc(assignment, env); - var loc = btwn(start_loc, match[0]); + let match = with_loc(assignment, env); + let loc = btwn(start_loc, match[0]); return [ loc, { @@ -8576,7 +8576,7 @@ function conditional(env) { } function peek_unary_op(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number") { return ; } @@ -8624,14 +8624,14 @@ function peek_unary_op(env) { } function unary(env) { - var begin_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var op = peek_unary_op(env); + let begin_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let op = peek_unary_op(env); if (op !== undefined) { token$3(env); - var argument = unary(env); - var loc = btwn(begin_loc, argument[0]); + let argument = unary(env); + let loc = btwn(begin_loc, argument[0]); if (op === 6) { - var tmp = argument[1]; + let tmp = argument[1]; if (typeof tmp !== "number" && tmp.TAG === /* Identifier */18) { strict_error_at(env, [ loc, @@ -8652,19 +8652,19 @@ function unary(env) { } ]; } - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var op$1 = typeof match === "number" ? ( + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let op$1 = typeof match === "number" ? ( match !== 102 ? ( match !== 103 ? undefined : /* Decrement */1 ) : /* Increment */0 ) : undefined; if (op$1 === undefined) { - var argument$1 = left_hand_side(env); + let argument$1 = left_hand_side(env); if (Curry._1(Parser_env_Peek.is_line_terminator, env)) { return argument$1; } - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var op$2 = typeof match$1 === "number" ? ( + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let op$2 = typeof match$1 === "number" ? ( match$1 !== 102 ? ( match$1 !== 103 ? undefined : /* Decrement */1 ) : /* Increment */0 @@ -8678,14 +8678,14 @@ function unary(env) { /* InvalidLHSInAssignment */14 ]); } - var match$2 = argument$1[1]; + let match$2 = argument$1[1]; if (typeof match$2 !== "number" && match$2.TAG === /* Identifier */18) { if (is_restricted(match$2._0[1].name)) { strict_error(env, /* StrictLHSPostfix */37); } } - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$3(env); return [ btwn(argument$1[0], end_loc), @@ -8700,14 +8700,14 @@ function unary(env) { ]; } token$3(env); - var argument$2 = unary(env); + let argument$2 = unary(env); if (!is_lhs(argument$2)) { error_at(env, [ argument$2[0], /* InvalidLHSInAssignment */14 ]); } - var match$3 = argument$2[1]; + let match$3 = argument$2[1]; if (typeof match$3 !== "number" && match$3.TAG === /* Identifier */18) { if (is_restricted(match$3._0[1].name)) { strict_error(env, /* StrictLHSPrefix */38); @@ -8728,14 +8728,14 @@ function unary(env) { } function left_hand_side(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var expr = match === 42 ? _new(env, (function (new_expr, _args) { + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let expr = match === 42 ? _new(env, (function (new_expr, _args) { return new_expr; })) : ( Curry._2(Parser_env_Peek.is_function, undefined, env) ? _function$1(env) : primary$1(env) ); - var expr$1 = member(env, expr); - var part = Curry._2(Parser_env_Peek.token, undefined, env); + let expr$1 = member(env, expr); + let part = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof part === "number") { if (part === /* T_LPAREN */3) { return call(env, expr$1); @@ -8751,8 +8751,8 @@ function left_hand_side(env) { function call(env, _left) { while(true) { - var left = _left; - var part = Curry._2(Parser_env_Peek.token, undefined, env); + let left = _left; + let part = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof part !== "number") { if (part.TAG === /* T_TEMPLATE_PART */2) { return tagged_template(env, left, part._0); @@ -8765,7 +8765,7 @@ function call(env, _left) { if (env.no_call) { return left; } - var match = Curry._1($$arguments, env); + let match = Curry._1($$arguments, env); _left = [ btwn(left[0], match[0]), { @@ -8779,9 +8779,9 @@ function call(env, _left) { continue ; case /* T_LBRACKET */5 : token$4(env, /* T_LBRACKET */5); - var expr = Curry._1(Parse.expression, env); - var last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var loc = btwn(left[0], last_loc); + let expr = Curry._1(Parse.expression, env); + let last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let loc = btwn(left[0], last_loc); token$4(env, /* T_RBRACKET */6); _left = [ loc, @@ -8800,8 +8800,8 @@ function call(env, _left) { continue ; case /* T_PERIOD */9 : token$4(env, /* T_PERIOD */9); - var match$1 = identifier_or_reserved_keyword(env); - var id = match$1[0]; + let match$1 = identifier_or_reserved_keyword(env); + let id = match$1[0]; _left = [ btwn(left[0], id[0]), { @@ -8825,29 +8825,29 @@ function call(env, _left) { function _new(env, _finish_fn) { while(true) { - var finish_fn = _finish_fn; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let finish_fn = _finish_fn; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 42) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_NEW */42); - var finish_fn$p = (function(finish_fn,start_loc){ + let finish_fn$p = (function(finish_fn,start_loc){ return function finish_fn$p(callee, args) { - var match = args !== undefined ? [ + let match = args !== undefined ? [ args[0], args[1] ] : [ callee[0], /* [] */0 ]; - var callee$p_0 = btwn(start_loc, match[0]); - var callee$p_1 = { + let callee$p_0 = btwn(start_loc, match[0]); + let callee$p_1 = { TAG: /* New */11, _0: { callee: callee, arguments: match[1] } }; - var callee$p = [ + let callee$p = [ callee$p_0, callee$p_1 ]; @@ -8858,19 +8858,19 @@ function _new(env, _finish_fn) { continue ; } Curry._2(Parser_env_Peek.token, undefined, env); - var expr = Curry._2(Parser_env_Peek.is_function, undefined, env) ? _function$1(env) : primary$1(env); - var callee = member(with_no_call(true, env), expr); - var part = Curry._2(Parser_env_Peek.token, undefined, env); - var callee$1; + let expr = Curry._2(Parser_env_Peek.is_function, undefined, env) ? _function$1(env) : primary$1(env); + let callee = member(with_no_call(true, env), expr); + let part = Curry._2(Parser_env_Peek.token, undefined, env); + let callee$1; callee$1 = typeof part === "number" || part.TAG !== /* T_TEMPLATE_PART */2 ? callee : tagged_template(env, callee, part._0); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var args = match$1 === 3 ? Curry._1($$arguments, env) : undefined; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let args = match$1 === 3 ? Curry._1($$arguments, env) : undefined; return Curry._2(finish_fn, callee$1, args); }; } function member(env, left) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number") { return left; } @@ -8879,8 +8879,8 @@ function member(env, left) { return left; } token$4(env, /* T_PERIOD */9); - var match$1 = identifier_or_reserved_keyword(env); - var id = match$1[0]; + let match$1 = identifier_or_reserved_keyword(env); + let id = match$1[0]; return call(env, [ btwn(left[0], id[0]), { @@ -8897,8 +8897,8 @@ function member(env, left) { ]); } token$4(env, /* T_LBRACKET */5); - var expr = Curry._1(Parse.expression, with_no_call(false, env)); - var last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let expr = Curry._1(Parse.expression, with_no_call(false, env)); + let last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); return call(env, [ btwn(left[0], last_loc), @@ -8917,36 +8917,36 @@ function member(env, left) { } function _function$1(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var async = maybe(env, /* T_ASYNC */61); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let async = maybe(env, /* T_ASYNC */61); token$4(env, /* T_FUNCTION */13); - var generator$1 = generator(env, async); - var match; + let generator$1 = generator(env, async); + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LPAREN */3)) { match = [ undefined, undefined ]; } else { - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var id = match$1 === 89 ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let id = match$1 === 89 ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); match = [ id, Curry._1(type_parameter_declaration$1, env) ]; } - var id$1 = match[0]; - var match$2 = function_params(env); - var rest = match$2[2]; - var defaults = match$2[1]; - var params = match$2[0]; - var returnType = wrap(annotation_opt, env); - var predicate = Curry._1(Parse.predicate, env); - var match$3 = function_body(env, async, generator$1); - var body = match$3[1]; - var simple = is_simple_function_params(params, defaults, rest); + let id$1 = match[0]; + let match$2 = function_params(env); + let rest = match$2[2]; + let defaults = match$2[1]; + let params = match$2[0]; + let returnType = wrap(annotation_opt, env); + let predicate = Curry._1(Parse.predicate, env); + let match$3 = function_body(env, async, generator$1); + let body = match$3[1]; + let simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$3[2], simple, id$1, params); - var expression; + let expression; expression = body.TAG === /* BodyBlock */0 ? false : true; return [ btwn(start_loc, match$3[0]), @@ -8970,8 +8970,8 @@ function _function$1(env) { } function number(env, number_type) { - var value = Curry._2(Parser_env_Peek.value, undefined, env); - var value$1; + let value = Curry._2(Parser_env_Peek.value, undefined, env); + let value$1; if (number_type) { switch (number_type) { case /* LEGACY_OCTAL */1 : @@ -9007,13 +9007,13 @@ function number(env, number_type) { } function primary$1(env) { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var number_type = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let number_type = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof number_type === "number") { switch (number_type) { case /* T_LCURLY */1 : - var match = Curry._1(Parse.object_initializer, env); + let match = Curry._1(Parse.object_initializer, env); return [ match[0], { @@ -9023,15 +9023,15 @@ function primary$1(env) { ]; case /* T_LPAREN */3 : token$4(env, /* T_LPAREN */3); - var expression = Curry._1(assignment, env); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var ret; + let expression = Curry._1(assignment, env); + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let ret; if (typeof match$1 === "number") { if (match$1 !== 8) { if (match$1 !== 77) { ret = expression; } else { - var typeAnnotation = wrap(annotation, env); + let typeAnnotation = wrap(annotation, env); ret = [ btwn(expression[0], typeAnnotation[0]), { @@ -9055,7 +9055,7 @@ function primary$1(env) { token$4(env, /* T_RPAREN */4); return ret; case /* T_LBRACKET */5 : - var match$2 = Curry._1(array_initializer, env); + let match$2 = Curry._1(array_initializer, env); return [ match$2[0], { @@ -9070,7 +9070,7 @@ function primary$1(env) { /* This */0 ]; case /* T_NULL */27 : - var raw = Curry._2(Parser_env_Peek.value, undefined, env); + let raw = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, /* T_NULL */27); return [ loc, @@ -9089,14 +9089,14 @@ function primary$1(env) { case /* T_CLASS */38 : return Curry._1(Parse.class_expression, env); case /* T_SUPER */49 : - var loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); + let loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_SUPER */49); - var id_1 = { + let id_1 = { name: "super", typeAnnotation: undefined, optional: false }; - var id = [ + let id = [ loc$1, id_1 ]; @@ -9108,7 +9108,7 @@ function primary$1(env) { } ]; case /* T_LESS_THAN */89 : - var match$3 = Curry._1(Parse.jsx_element, env); + let match$3 = Curry._1(Parse.jsx_element, env); return [ match$3[0], { @@ -9119,9 +9119,9 @@ function primary$1(env) { case /* T_DIV_ASSIGN */70 : case /* T_DIV */96 : push_lex_mode(env, /* REGEXP */5); - var loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); - var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$5; + let loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); + let match$4 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$5; if (typeof match$4 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -9133,8 +9133,8 @@ function primary$1(env) { }); } if (match$4.TAG === /* T_REGEXP */3) { - var match$6 = match$4._0; - var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); + let match$6 = match$4._0; + let raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); token$3(env); match$5 = [ raw$1, @@ -9151,9 +9151,9 @@ function primary$1(env) { ] }); } - var raw_flags = match$5[2]; + let raw_flags = match$5[2]; pop_lex_mode(env); - var filtered_flags = Stdlib__Buffer.create(raw_flags.length); + let filtered_flags = Stdlib__Buffer.create(raw_flags.length); Stdlib__String.iter((function (c) { if (c >= 110) { if (c !== 121) { @@ -9178,14 +9178,14 @@ function primary$1(env) { } }), raw_flags); - var flags = Stdlib__Buffer.contents(filtered_flags); + let flags = Stdlib__Buffer.contents(filtered_flags); if (flags !== raw_flags) { error$1(env, { TAG: /* InvalidRegExpFlags */3, _0: raw_flags }); } - var value = { + let value = { TAG: /* RegExp */3, _0: { pattern: match$5[1], @@ -9208,8 +9208,8 @@ function primary$1(env) { } else { switch (number_type.TAG | 0) { case /* T_NUMBER */0 : - var raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); - var value$1 = { + let raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); + let value$1 = { TAG: /* Number */2, _0: number(env, number_type._0) }; @@ -9224,11 +9224,11 @@ function primary$1(env) { } ]; case /* T_STRING */1 : - var match$7 = number_type._0; - var octal = match$7[3]; - var raw$3 = match$7[2]; - var value$2 = match$7[1]; - var loc$3 = match$7[0]; + let match$7 = number_type._0; + let octal = match$7[3]; + let raw$3 = match$7[2]; + let value$2 = match$7[1]; + let loc$3 = match$7[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -9241,7 +9241,7 @@ function primary$1(env) { octal ] }); - var value$3 = { + let value$3 = { TAG: /* String */0, _0: value$2 }; @@ -9256,7 +9256,7 @@ function primary$1(env) { } ]; case /* T_TEMPLATE_PART */2 : - var match$8 = Curry._2(template_literal, env, number_type._0); + let match$8 = Curry._2(template_literal, env, number_type._0); return [ match$8[0], { @@ -9271,7 +9271,7 @@ function primary$1(env) { switch (exit) { case 1 : if (Curry._2(Parser_env_Peek.is_identifier, undefined, env)) { - var id$1 = Curry._2(Parse.identifier, undefined, env); + let id$1 = Curry._2(Parse.identifier, undefined, env); return [ id$1[0], { @@ -9295,9 +9295,9 @@ function primary$1(env) { } ]; case 2 : - var raw$4 = Curry._2(Parser_env_Peek.value, undefined, env); + let raw$4 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, number_type); - var value$4 = { + let value$4 = { TAG: /* Boolean */1, _0: Caml_obj.caml_equal(number_type, /* T_TRUE */29) }; @@ -9316,7 +9316,7 @@ function primary$1(env) { } function tagged_template(env, tag, part) { - var quasi = Curry._2(template_literal, env, part); + let quasi = Curry._2(template_literal, env, part); return [ btwn(tag[0], quasi[0]), { @@ -9331,20 +9331,20 @@ function tagged_template(env, tag, part) { function sequence(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 8) { token$4(env, /* T_COMMA */8); - var expr = Curry._1(assignment, env); + let expr = Curry._1(assignment, env); _acc = { hd: expr, tl: acc }; continue ; } - var last_loc = acc ? acc.hd[0] : none; - var expressions = Stdlib__List.rev(acc); - var first_loc = expressions ? expressions.hd[0] : none; + let last_loc = acc ? acc.hd[0] : none; + let expressions = Stdlib__List.rev(acc); + let first_loc = expressions ? expressions.hd[0] : none; return [ btwn(first_loc, last_loc), { @@ -9358,10 +9358,10 @@ function sequence(env, _acc) { } function identifier_or_reserved_keyword(env) { - var lex_token = Curry._2(Parser_env_Peek.token, undefined, env); - var lex_value = Curry._2(Parser_env_Peek.value, undefined, env); - var lex_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var exit = 0; + let lex_token = Curry._2(Parser_env_Peek.token, undefined, env); + let lex_value = Curry._2(Parser_env_Peek.value, undefined, env); + let lex_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let exit = 0; if (typeof lex_token === "number") { if (lex_token >= 58) { if (lex_token < 62) { @@ -9384,8 +9384,8 @@ function identifier_or_reserved_keyword(env) { exit = 1; } if (exit === 1) { - var err; - var exit$1 = 0; + let err; + let exit$1 = 0; if (typeof lex_token === "number") { if (lex_token > 106 || lex_token < 58) { if (lex_token >= 13) { @@ -9430,8 +9430,8 @@ function identifier_or_reserved_keyword(env) { } function assignment_but_not_arrow_function(env) { - var expr = conditional(env); - var operator = assignment_op(env); + let expr = conditional(env); + let operator = assignment_op(env); if (operator === undefined) { return expr; } @@ -9441,7 +9441,7 @@ function assignment_but_not_arrow_function(env) { /* InvalidLHSInAssignment */14 ]); } - var match = expr[1]; + let match = expr[1]; if (typeof match !== "number" && match.TAG === /* Identifier */18) { if (is_restricted(match._0[1].name)) { strict_error_at(env, [ @@ -9451,9 +9451,9 @@ function assignment_but_not_arrow_function(env) { } } - var left = Curry._2(Parse.pattern_from_expr, env, expr); - var right = Curry._1(assignment, env); - var loc = btwn(left[0], right[0]); + let left = Curry._2(Parse.pattern_from_expr, env, expr); + let right = Curry._1(assignment, env); + let loc = btwn(left[0], right[0]); return [ loc, { @@ -9474,9 +9474,9 @@ function error_callback(param, param$1) { } function try_assignment_but_not_arrow_function(env) { - var env$1 = with_error_callback(error_callback, env); - var ret = assignment_but_not_arrow_function(env$1); - var match = Curry._2(Parser_env_Peek.token, undefined, env$1); + let env$1 = with_error_callback(error_callback, env); + let ret = assignment_but_not_arrow_function(env$1); + let match = Curry._2(Parser_env_Peek.token, undefined, env$1); if (typeof match === "number") { if (match !== 10) { if (match === 77) { @@ -9499,7 +9499,7 @@ function try_assignment_but_not_arrow_function(env) { MEL_EXN_ID: Parser_env_Try.Rollback }); } - var match$1 = ret[1]; + let match$1 = ret[1]; if (typeof match$1 === "number") { return ret; } @@ -9518,9 +9518,9 @@ function try_assignment_but_not_arrow_function(env) { } function assignment(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, env); - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, env); + let exit = 0; if (typeof match === "number") { if (match > 88 || match < 4) { if (match > 89 || match < 3) { @@ -9531,20 +9531,20 @@ function assignment(env) { exit = 2; } else { if (env.allow_yield) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_YIELD */56); if (!env.allow_yield) { error$1(env, /* IllegalYield */24); } - var delegate = maybe(env, /* T_MULT */97); - var has_argument = !(Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)); - var argument = delegate || has_argument ? Curry._1(assignment, env) : undefined; - var end_loc; + let delegate = maybe(env, /* T_MULT */97); + let has_argument = !(Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)); + let argument = delegate || has_argument ? Curry._1(assignment, env) : undefined; + let end_loc; if (argument !== undefined) { end_loc = argument[0]; } else { - var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$1 = loc !== undefined ? loc : start_loc; + let loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$1 = loc !== undefined ? loc : start_loc; semicolon(env); end_loc = end_loc$1; } @@ -9567,11 +9567,11 @@ function assignment(env) { if (exit === 2 && !match$1) { return assignment_but_not_arrow_function(env); } - var expr = Curry._2(Parser_env_Try.to_parse, env, try_assignment_but_not_arrow_function); + let expr = Curry._2(Parser_env_Try.to_parse, env, try_assignment_but_not_arrow_function); if (expr) { return expr._0; } - var expr$1 = Curry._2(Parser_env_Try.to_parse, env, try_arrow_function); + let expr$1 = Curry._2(Parser_env_Try.to_parse, env, try_arrow_function); if (expr$1) { return expr$1._0; } else { @@ -9595,9 +9595,9 @@ function make_logical(left, right, operator, loc) { function logical_and(env, _left, _lloc) { while(true) { - var lloc = _lloc; - var left = _left; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let lloc = _lloc; + let left = _left; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 79) { return [ lloc, @@ -9605,8 +9605,8 @@ function logical_and(env, _left, _lloc) { ]; } token$4(env, /* T_AND */79); - var match$1 = with_loc(binary, env); - var loc = btwn(lloc, match$1[0]); + let match$1 = with_loc(binary, env); + let loc = btwn(lloc, match$1[0]); _lloc = loc; _left = make_logical(left, match$1[1], /* And */1, loc); continue ; @@ -9615,9 +9615,9 @@ function logical_and(env, _left, _lloc) { function logical_or(env, _left, _lloc) { while(true) { - var lloc = _lloc; - var left = _left; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let lloc = _lloc; + let left = _left; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 78) { return [ lloc, @@ -9625,9 +9625,9 @@ function logical_or(env, _left, _lloc) { ]; } token$4(env, /* T_OR */78); - var match$1 = with_loc(binary, env); - var match$2 = logical_and(env, match$1[1], match$1[0]); - var loc = btwn(lloc, match$2[0]); + let match$1 = with_loc(binary, env); + let match$2 = logical_and(env, match$1[1], match$1[0]); + let loc = btwn(lloc, match$2[0]); _lloc = loc; _left = make_logical(left, match$2[1], /* Or */0, loc); continue ; @@ -9635,14 +9635,14 @@ function logical_or(env, _left, _lloc) { } function logical(env) { - var match = with_loc(binary, env); - var match$1 = logical_and(env, match[1], match[0]); + let match = with_loc(binary, env); + let match$1 = logical_and(env, match[1], match[0]); return logical_or(env, match$1[1], match$1[0])[1]; } function binary_op(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var ret; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let ret; if (typeof match === "number") { if (match === 16 || match === 15) { ret = match >= 16 ? [ @@ -9886,18 +9886,18 @@ function make_binary(left, right, operator, loc) { function add_to_stack(_right, _param, _rloc, _stack) { while(true) { - var param = _param; - var stack = _stack; - var rloc = _rloc; - var right = _right; - var rpri = param[1]; - var rop = param[0]; + let param = _param; + let stack = _stack; + let rloc = _rloc; + let right = _right; + let rpri = param[1]; + let rop = param[0]; if (stack) { - var match = stack.hd; - var match$1 = match[1]; + let match = stack.hd; + let match$1 = match[1]; if (is_tighter(match$1[1], rpri)) { - var loc = btwn(match[2], rloc); - var right$1 = make_binary(match[0], right, match$1[0], loc); + let loc = btwn(match[2], rloc); + let right$1 = make_binary(match[0], right, match$1[0], loc); _stack = stack.tl; _rloc = loc; _param = [ @@ -9924,43 +9924,43 @@ function add_to_stack(_right, _param, _rloc, _stack) { } function binary(env) { - var _stack = /* [] */0; + let _stack = /* [] */0; while(true) { - var stack = _stack; - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var is_unary = peek_unary_op(env) !== undefined; - var right = unary(with_no_in(false, env)); - var loc = env.last_loc.contents; - var end_loc = loc !== undefined ? loc : right[0]; - var right_loc = btwn(start_loc, end_loc); + let stack = _stack; + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let is_unary = peek_unary_op(env) !== undefined; + let right = unary(with_no_in(false, env)); + let loc = env.last_loc.contents; + let end_loc = loc !== undefined ? loc : right[0]; + let right_loc = btwn(start_loc, end_loc); if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LESS_THAN */89)) { - var tmp = right[1]; + let tmp = right[1]; if (typeof tmp !== "number" && tmp.TAG === /* JSXElement */22) { error$1(env, /* AdjacentJSXElements */46); } } - var match = binary_op(env); + let match = binary_op(env); if (match === undefined) { - var _right = right; - var _rloc = right_loc; - var _param = stack; + let _right = right; + let _rloc = right_loc; + let _param = stack; while(true) { - var param = _param; - var rloc = _rloc; - var right$1 = _right; + let param = _param; + let rloc = _rloc; + let right$1 = _right; if (!param) { return right$1; } - var match$1 = param.hd; - var loc$1 = btwn(match$1[2], rloc); + let match$1 = param.hd; + let loc$1 = btwn(match$1[2], rloc); _param = param.tl; _rloc = loc$1; _right = make_binary(match$1[0], right$1, match$1[1][0], loc$1); continue ; }; } - var rop = match[0]; + let rop = match[0]; if (is_unary && rop === /* Exp */14) { error_at(env, [ right_loc, @@ -9976,17 +9976,17 @@ function binary(env) { } function argument(env) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 11) { return { TAG: /* Expression */0, _0: Curry._1(assignment, env) }; } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_ELLIPSIS */11); - var argument$1 = Curry._1(assignment, env); - var loc = btwn(start_loc, argument$1[0]); + let argument$1 = Curry._1(assignment, env); + let loc = btwn(start_loc, argument$1[0]); return { TAG: /* Spread */1, _0: [ @@ -10000,8 +10000,8 @@ function argument(env) { function arguments$p(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 4) { return Stdlib__List.rev(acc); @@ -10011,8 +10011,8 @@ function arguments$p(env, _acc) { } } - var acc_0 = argument(env); - var acc$1 = { + let acc_0 = argument(env); + let acc$1 = { hd: acc_0, tl: acc }; @@ -10025,10 +10025,10 @@ function arguments$p(env, _acc) { } function $$arguments(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LPAREN */3); - var args = arguments$p(env, /* [] */0); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let args = arguments$p(env, /* [] */0); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RPAREN */4); return [ btwn(start_loc, end_loc), @@ -10038,18 +10038,18 @@ function $$arguments(env) { function template_parts(env, _quasis, _expressions) { while(true) { - var expressions = _expressions; - var quasis = _quasis; - var expr = Curry._1(Parse.expression, env); - var expressions$1 = { + let expressions = _expressions; + let quasis = _quasis; + let expr = Curry._1(Parse.expression, env); + let expressions$1 = { hd: expr, tl: expressions }; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 2) { push_lex_mode(env, /* TEMPLATE */4); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$2; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$2; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -10061,9 +10061,9 @@ function template_parts(env, _quasis, _expressions) { }); } if (match$1.TAG === /* T_TEMPLATE_PART */2) { - var match$3 = match$1._0; - var tail = match$3[2]; - var match$4 = match$3[1]; + let match$3 = match$1._0; + let tail = match$3[2]; + let match$4 = match$3[1]; token$3(env); match$2 = [ match$3[0], @@ -10086,13 +10086,13 @@ function template_parts(env, _quasis, _expressions) { ] }); } - var loc = match$2[0]; + let loc = match$2[0]; pop_lex_mode(env); - var quasis_0 = [ + let quasis_0 = [ loc, match$2[1] ]; - var quasis$1 = { + let quasis$1 = { hd: quasis_0, tl: quasis }; @@ -10108,15 +10108,15 @@ function template_parts(env, _quasis, _expressions) { continue ; } error_unexpected(env); - var imaginary_quasi_0 = expr[0]; - var imaginary_quasi_1 = { + let imaginary_quasi_0 = expr[0]; + let imaginary_quasi_1 = { value: { raw: "", cooked: "" }, tail: true }; - var imaginary_quasi = [ + let imaginary_quasi = [ imaginary_quasi_0, imaginary_quasi_1 ]; @@ -10132,25 +10132,25 @@ function template_parts(env, _quasis, _expressions) { } function template_literal(env, part) { - var is_tail = part[2]; - var match = part[1]; - var start_loc = part[0]; + let is_tail = part[2]; + let match = part[1]; + let start_loc = part[0]; token$4(env, { TAG: /* T_TEMPLATE_PART */2, _0: part }); - var head_1 = { + let head_1 = { value: { raw: match.raw, cooked: match.cooked }, tail: is_tail }; - var head = [ + let head = [ start_loc, head_1 ]; - var match$1 = is_tail ? [ + let match$1 = is_tail ? [ start_loc, { hd: head, @@ -10161,7 +10161,7 @@ function template_literal(env, part) { hd: head, tl: /* [] */0 }, /* [] */0); - var loc = btwn(start_loc, match$1[0]); + let loc = btwn(start_loc, match$1[0]); return [ loc, { @@ -10173,8 +10173,8 @@ function template_literal(env, part) { function elements(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 105) { return Stdlib__List.rev(acc); @@ -10201,11 +10201,11 @@ function elements(env, _acc) { case /* T_ARROW */10 : break; case /* T_ELLIPSIS */11 : - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_ELLIPSIS */11); - var argument = Curry._1(assignment, env); - var loc = btwn(start_loc, argument[0]); - var elem = { + let argument = Curry._1(assignment, env); + let loc = btwn(start_loc, argument[0]); + let elem = { TAG: /* Spread */1, _0: [ loc, @@ -10224,7 +10224,7 @@ function elements(env, _acc) { } } - var elem$1 = { + let elem$1 = { TAG: /* Expression */0, _0: Curry._1(assignment, env) }; @@ -10240,10 +10240,10 @@ function elements(env, _acc) { } function array_initializer(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LBRACKET */5); - var elements$1 = elements(env, /* [] */0); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let elements$1 = elements(env, /* [] */0); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); return [ btwn(start_loc, end_loc), @@ -10278,19 +10278,19 @@ function error_callback$1(param) { } function try_arrow_function(env) { - var env$1 = with_error_callback(error_callback$1, env); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); - var async = Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env$1), /* T_ARROW */10) && maybe(env$1, /* T_ASYNC */61); - var typeParameters = Curry._1(type_parameter_declaration$1, env$1); - var match; + let env$1 = with_error_callback(error_callback$1, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let async = Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env$1), /* T_ARROW */10) && maybe(env$1, /* T_ASYNC */61); + let typeParameters = Curry._1(type_parameter_declaration$1, env$1); + let match; if (Curry._2(Parser_env_Peek.is_identifier, undefined, env$1) && typeParameters === undefined) { - var id = Curry._2(Parse.identifier, /* StrictParamName */28, env$1); - var param_0 = id[0]; - var param_1 = { + let id = Curry._2(Parse.identifier, /* StrictParamName */28, env$1); + let param_0 = id[0]; + let param_1 = { TAG: /* Identifier */3, _0: id }; - var param = [ + let param = [ param_0, param_1 ]; @@ -10304,7 +10304,7 @@ function try_arrow_function(env) { undefined ]; } else { - var match$1 = function_params(env$1); + let match$1 = function_params(env$1); match = [ match$1[0], match$1[1], @@ -10312,29 +10312,29 @@ function try_arrow_function(env) { wrap(annotation_opt, env$1) ]; } - var rest = match[2]; - var defaults = match[1]; - var params = match[0]; - var predicate = Curry._1(Parse.predicate, env$1); - var env$2 = Caml_obj.caml_equal(params, /* [] */0) || rest !== undefined ? without_error_callback(env$1) : env$1; + let rest = match[2]; + let defaults = match[1]; + let params = match[0]; + let predicate = Curry._1(Parse.predicate, env$1); + let env$2 = Caml_obj.caml_equal(params, /* [] */0) || rest !== undefined ? without_error_callback(env$1) : env$1; if (Curry._1(Parser_env_Peek.is_line_terminator, env$2) && Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env$2), /* T_ARROW */10)) { error$1(env$2, /* NewlineBeforeArrow */44); } token$4(env$2, /* T_ARROW */10); - var env$3 = without_error_callback(env$2); - var match$2 = with_loc((function (param) { - var generator = false; - var env = with_in_function(true, param); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let env$3 = without_error_callback(env$2); + let match$2 = with_loc((function (param) { + let generator = false; + let env = with_in_function(true, param); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 1) { - var match$1 = function_body(env, async, generator); + let match$1 = function_body(env, async, generator); return [ match$1[1], match$1[2] ]; } - var env$1 = enter_function(env, async, generator); - var expr = Curry._1(Parse.assignment, env$1); + let env$1 = enter_function(env, async, generator); + let expr = Curry._1(Parse.assignment, env$1); return [ { TAG: /* BodyExpression */1, @@ -10343,13 +10343,13 @@ function try_arrow_function(env) { env$1.in_strict_mode ]; }), env$3); - var match$3 = match$2[1]; - var body = match$3[0]; - var simple = is_simple_function_params(params, defaults, rest); + let match$3 = match$2[1]; + let body = match$3[0]; + let simple = is_simple_function_params(params, defaults, rest); strict_post_check(env$3, match$3[1], simple, undefined, params); - var expression; + let expression; expression = body.TAG === /* BodyBlock */0 ? false : true; - var loc = btwn(start_loc, match$2[0]); + let loc = btwn(start_loc, match$2[0]); return [ loc, { @@ -10373,8 +10373,8 @@ function try_arrow_function(env) { function decorator_list_helper(env, _decorators) { while(true) { - var decorators = _decorators; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let decorators = _decorators; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 12) { return decorators; } @@ -10396,13 +10396,13 @@ function decorator_list(env) { } function key(env) { - var number_type = Curry._2(Parser_env_Peek.token, undefined, env); + let number_type = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof number_type === "number") { if (number_type === /* T_LBRACKET */5) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LBRACKET */5); - var expr = Curry._1(Parse.assignment, with_no_in(false, env)); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let expr = Curry._1(Parse.assignment, with_no_in(false, env)); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); return [ btwn(start_loc, end_loc), @@ -10416,10 +10416,10 @@ function key(env) { } else { switch (number_type.TAG | 0) { case /* T_NUMBER */0 : - var raw = Curry._2(Parser_env_Peek.value, undefined, env); - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var value = number(env, number_type._0); - var value$1 = { + let raw = Curry._2(Parser_env_Peek.value, undefined, env); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let value = number(env, number_type._0); + let value$1 = { TAG: /* Number */2, _0: value }; @@ -10437,11 +10437,11 @@ function key(env) { } ]; case /* T_STRING */1 : - var match = number_type._0; - var octal = match[3]; - var raw$1 = match[2]; - var value$2 = match[1]; - var loc$1 = match[0]; + let match = number_type._0; + let octal = match[3]; + let raw$1 = match[2]; + let value$2 = match[1]; + let loc$1 = match[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -10454,7 +10454,7 @@ function key(env) { octal ] }); - var value$3 = { + let value$3 = { TAG: /* String */0, _0: value$2 }; @@ -10475,8 +10475,8 @@ function key(env) { } } - var match$1 = identifier_or_reserved_keyword(env); - var id = match$1[0]; + let match$1 = identifier_or_reserved_keyword(env); + let id = match$1[0]; return [ id[0], { @@ -10487,11 +10487,11 @@ function key(env) { } function _method(env, kind) { - var generator$1 = generator(env, false); - var match = key(env); - var typeParameters = kind ? undefined : Curry._1(type_parameter_declaration$1, env); + let generator$1 = generator(env, false); + let match = key(env); + let typeParameters = kind ? undefined : Curry._1(type_parameter_declaration$1, env); token$4(env, /* T_LPAREN */3); - var params; + let params; switch (kind) { case /* Init */0 : throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -10506,7 +10506,7 @@ function _method(env, kind) { params = /* [] */0; break; case /* Set */2 : - var param = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); + let param = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); params = { hd: [ param[0], @@ -10521,12 +10521,12 @@ function _method(env, kind) { } token$4(env, /* T_RPAREN */4); - var returnType = wrap(annotation_opt, env); - var match$1 = function_body(env, false, generator$1); - var body = match$1[1]; - var simple = is_simple_function_params(params, /* [] */0, undefined); + let returnType = wrap(annotation_opt, env); + let match$1 = function_body(env, false, generator$1); + let body = match$1[1]; + let simple = is_simple_function_params(params, /* [] */0, undefined); strict_post_check(env, match$1[2], simple, undefined, params); - var match$2; + let match$2; match$2 = body.TAG === /* BodyBlock */0 ? [ body._0[0], false @@ -10534,8 +10534,8 @@ function _method(env, kind) { body._0[0], true ]; - var value_0 = match$2[0]; - var value_1 = { + let value_0 = match$2[0]; + let value_1 = { id: undefined, params: params, defaults: /* [] */0, @@ -10548,7 +10548,7 @@ function _method(env, kind) { returnType: returnType, typeParameters: typeParameters }; - var value = [ + let value = [ value_0, value_1 ]; @@ -10559,10 +10559,10 @@ function _method(env, kind) { } function property$1(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ELLIPSIS */11)) { token$4(env, /* T_ELLIPSIS */11); - var argument = Curry._1(Parse.assignment, env); + let argument = Curry._1(Parse.assignment, env); return { TAG: /* SpreadProperty */1, _0: [ @@ -10573,20 +10573,20 @@ function property$1(env) { ] }; } - var async = Curry._2(Parser_env_Peek.is_identifier, 1, env) && maybe(env, /* T_ASYNC */61); - var match = generator(env, async); - var match$1 = key(env); - var tmp; - var exit = 0; + let async = Curry._2(Parser_env_Peek.is_identifier, 1, env) && maybe(env, /* T_ASYNC */61); + let match = generator(env, async); + let match$1 = key(env); + let tmp; + let exit = 0; if (async || match) { exit = 1; } else { - var key$1 = match$1[1]; + let key$1 = match$1[1]; switch (key$1.TAG | 0) { case /* Identifier */1 : switch (key$1._0[1].name) { case "get" : - var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$2 = Curry._2(Parser_env_Peek.token, undefined, env); tmp = typeof match$2 === "number" ? ( match$2 > 77 || match$2 < 3 ? ( match$2 !== 89 ? get(env, start_loc) : init(env, start_loc, key$1, false, false) @@ -10596,7 +10596,7 @@ function property$1(env) { ) : get(env, start_loc); break; case "set" : - var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$3 = Curry._2(Parser_env_Peek.token, undefined, env); tmp = typeof match$3 === "number" ? ( match$3 > 77 || match$3 < 3 ? ( match$3 !== 89 ? set(env, start_loc) : init(env, start_loc, key$1, false, false) @@ -10626,14 +10626,14 @@ function property$1(env) { } function get(env, start_loc) { - var match = _method(env, /* Get */1); - var match$1 = match[1]; - var end_loc = match$1[0]; - var value_1 = { + let match = _method(env, /* Get */1); + let match$1 = match[1]; + let end_loc = match$1[0]; + let value_1 = { TAG: /* Function */2, _0: match$1[1] }; - var value = [ + let value = [ end_loc, value_1 ]; @@ -10650,14 +10650,14 @@ function get(env, start_loc) { } function set(env, start_loc) { - var match = _method(env, /* Set */2); - var match$1 = match[1]; - var end_loc = match$1[0]; - var value_1 = { + let match = _method(env, /* Set */2); + let match$1 = match[1]; + let end_loc = match$1[0]; + let value_1 = { TAG: /* Function */2, _0: match$1[1] }; - var value = [ + let value = [ end_loc, value_1 ]; @@ -10674,9 +10674,9 @@ function set(env, start_loc) { } function init(env, start_loc, key, async, generator) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var match$1; - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let match$1; + let exit = 0; if (typeof match === "number") { if (match !== 89) { if (match >= 9) { @@ -10717,10 +10717,10 @@ function init(env, start_loc, key, async, generator) { ]; break; case 2 : - var tmp; + let tmp; switch (key.TAG | 0) { case /* Literal */0 : - var lit = key._0; + let lit = key._0; tmp = [ lit[0], { @@ -10730,7 +10730,7 @@ function init(env, start_loc, key, async, generator) { ]; break; case /* Identifier */1 : - var id = key._0; + let id = key._0; tmp = [ id[0], { @@ -10751,17 +10751,17 @@ function init(env, start_loc, key, async, generator) { ]; break; case 3 : - var typeParameters = Curry._1(type_parameter_declaration$1, env); - var match$2 = function_params(env); - var rest = match$2[2]; - var defaults = match$2[1]; - var params = match$2[0]; - var returnType = wrap(annotation_opt, env); - var match$3 = function_body(env, async, generator); - var body = match$3[1]; - var simple = is_simple_function_params(params, defaults, rest); + let typeParameters = Curry._1(type_parameter_declaration$1, env); + let match$2 = function_params(env); + let rest = match$2[2]; + let defaults = match$2[1]; + let params = match$2[0]; + let returnType = wrap(annotation_opt, env); + let match$3 = function_body(env, async, generator); + let body = match$3[1]; + let simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$3[2], simple, undefined, params); - var match$4; + let match$4; match$4 = body.TAG === /* BodyBlock */0 ? [ body._0[0], false @@ -10769,8 +10769,8 @@ function init(env, start_loc, key, async, generator) { body._0[0], true ]; - var value_0 = match$4[0]; - var value_1 = { + let value_0 = match$4[0]; + let value_1 = { TAG: /* Function */2, _0: { id: undefined, @@ -10786,7 +10786,7 @@ function init(env, start_loc, key, async, generator) { typeParameters: typeParameters } }; - var value = [ + let value = [ value_0, value_1 ]; @@ -10798,7 +10798,7 @@ function init(env, start_loc, key, async, generator) { break; } - var value$1 = match$1[0]; + let value$1 = match$1[0]; return [ btwn(start_loc, value$1[0]), { @@ -10815,10 +10815,10 @@ function check_property(env, prop_map, prop) { if (prop.TAG !== /* Property */0) { return prop_map; } - var match = prop._0; - var prop$1 = match[1]; - var prop_loc = match[0]; - var exit = 0; + let match = prop._0; + let prop$1 = match[1]; + let prop_loc = match[0]; + let exit = 0; switch (prop$1.key.TAG | 0) { case /* Literal */0 : case /* Identifier */1 : @@ -10829,11 +10829,11 @@ function check_property(env, prop_map, prop) { } if (exit === 1) { - var match$1 = prop$1.key; - var key; + let match$1 = prop$1.key; + let key; switch (match$1.TAG | 0) { case /* Literal */0 : - var s = match$1._0[1].value; + let s = match$1._0[1].value; if (typeof s === "number") { key = "null"; } else { @@ -10842,7 +10842,7 @@ function check_property(env, prop_map, prop) { key = s._0; break; case /* Boolean */1 : - var b = s._0; + let b = s._0; key = b ? "true" : "false"; break; case /* Number */2 : @@ -10871,20 +10871,20 @@ function check_property(env, prop_map, prop) { }); } - var prev_kinds; + let prev_kinds; try { prev_kinds = Curry._2(find, key, prop_map); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { prev_kinds = /* Empty */0; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var match$2 = prop$1.kind; - var kind_string; + let match$2 = prop$1.kind; + let kind_string; switch (match$2) { case /* Init */0 : kind_string = "Init"; @@ -10897,7 +10897,7 @@ function check_property(env, prop_map, prop) { break; } - var exit$1 = 0; + let exit$1 = 0; switch (kind_string) { case "Init" : if (Curry._2(mem$1, "Init", prev_kinds)) { @@ -10933,7 +10933,7 @@ function check_property(env, prop_map, prop) { } } - var kinds = Curry._2(add$1, kind_string, prev_kinds); + let kinds = Curry._2(add$1, kind_string, prev_kinds); return Curry._3(add$2, key, kinds, prop_map); } @@ -10941,9 +10941,9 @@ function check_property(env, prop_map, prop) { function properties$1(env, _param) { while(true) { - var param = _param; - var acc = param[1]; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let param = _param; + let acc = param[1]; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return Stdlib__List.rev(acc); @@ -10953,8 +10953,8 @@ function properties$1(env, _param) { } } - var prop = property$1(env); - var prop_map = check_property(env, param[0], prop); + let prop = property$1(env); + let prop_map = check_property(env, param[0], prop); if (Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RCURLY */2)) { token$4(env, /* T_COMMA */8); } @@ -10970,13 +10970,13 @@ function properties$1(env, _param) { } function _initializer(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var props = properties$1(env, [ + let props = properties$1(env, [ /* Empty */0, /* [] */0 ]); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc, end_loc), @@ -10988,23 +10988,23 @@ function _initializer(env) { function class_implements(env, _acc) { while(true) { - var acc = _acc; - var id = Curry._2(Parse.identifier, undefined, env); - var typeParameters = wrap(type_parameter_instantiation, env); - var loc = typeParameters !== undefined ? btwn(id[0], typeParameters[0]) : id[0]; - var implement_1 = { + let acc = _acc; + let id = Curry._2(Parse.identifier, undefined, env); + let typeParameters = wrap(type_parameter_instantiation, env); + let loc = typeParameters !== undefined ? btwn(id[0], typeParameters[0]) : id[0]; + let implement_1 = { id: id, typeParameters: typeParameters }; - var implement = [ + let implement = [ loc, implement_1 ]; - var acc$1 = { + let acc$1 = { hd: implement, tl: acc }; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 8) { return Stdlib__List.rev(acc$1); } @@ -11015,8 +11015,8 @@ function class_implements(env, _acc) { } function init$1(env, start_loc, decorators, key, async, generator, $$static) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof match === "number") { if (match > 77 || match < 75) { if (match === 7) { @@ -11029,16 +11029,16 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { } if (exit === 2 && !async && !generator) { - var typeAnnotation = wrap(annotation_opt, env); - var options = env.parse_options; - var value = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ASSIGN */75) && ($$static && options.esproposal_class_static_fields || !$$static && options.esproposal_class_instance_fields) ? (token$4(env, /* T_ASSIGN */75), Curry._1(Parse.expression, env)) : undefined; - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let typeAnnotation = wrap(annotation_opt, env); + let options = env.parse_options; + let value = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ASSIGN */75) && ($$static && options.esproposal_class_static_fields || !$$static && options.esproposal_class_instance_fields) ? (token$4(env, /* T_ASSIGN */75), Curry._1(Parse.expression, env)) : undefined; + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (maybe(env, /* T_SEMICOLON */7) || !(Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LBRACKET */5 || Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LPAREN */3)) { } else { error_unexpected(env); } - var loc = btwn(start_loc, end_loc); + let loc = btwn(start_loc, end_loc); return { TAG: /* Property */1, _0: [ @@ -11052,17 +11052,17 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { ] }; } - var typeParameters = Curry._1(type_parameter_declaration$1, env); - var match$1 = function_params(env); - var rest = match$1[2]; - var defaults = match$1[1]; - var params = match$1[0]; - var returnType = wrap(annotation_opt, env); - var match$2 = function_body(env, async, generator); - var body = match$2[1]; - var simple = is_simple_function_params(params, defaults, rest); + let typeParameters = Curry._1(type_parameter_declaration$1, env); + let match$1 = function_params(env); + let rest = match$1[2]; + let defaults = match$1[1]; + let params = match$1[0]; + let returnType = wrap(annotation_opt, env); + let match$2 = function_body(env, async, generator); + let body = match$2[1]; + let simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$2[2], simple, undefined, params); - var match$3; + let match$3; match$3 = body.TAG === /* BodyBlock */0 ? [ body._0[0], false @@ -11070,8 +11070,8 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { body._0[0], true ]; - var end_loc$1 = match$3[0]; - var value_1 = { + let end_loc$1 = match$3[0]; + let value_1 = { id: undefined, params: params, defaults: defaults, @@ -11084,14 +11084,14 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { returnType: returnType, typeParameters: typeParameters }; - var value$1 = [ + let value$1 = [ end_loc$1, value_1 ]; - var kind; + let kind; switch (key.TAG | 0) { case /* Literal */0 : - var match$4 = key._0[1].value; + let match$4 = key._0[1].value; kind = typeof match$4 === "number" || !(match$4.TAG === /* String */0 && match$4._0 === "constructor") ? /* Method */1 : /* Constructor */0; break; case /* Identifier */1 : @@ -11118,20 +11118,20 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { } function class_element(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var decorators = decorator_list(env); - var $$static = maybe(env, /* T_STATIC */40); - var async = Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env), /* T_LPAREN */3) && Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env), /* T_COLON */77) && maybe(env, /* T_ASYNC */61); - var generator$1 = generator(env, async); - var match = key(env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let decorators = decorator_list(env); + let $$static = maybe(env, /* T_STATIC */40); + let async = Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env), /* T_LPAREN */3) && Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, 1, env), /* T_COLON */77) && maybe(env, /* T_ASYNC */61); + let generator$1 = generator(env, async); + let match = key(env); if (!async && !generator$1) { - var key$1 = match[1]; + let key$1 = match[1]; switch (key$1.TAG | 0) { case /* Identifier */1 : switch (key$1._0[1].name) { case "get" : - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; exit = typeof match$1 === "number" ? ( match$1 >= 75 ? ( match$1 >= 78 ? ( @@ -11145,8 +11145,8 @@ function class_element(env) { ) : 2; switch (exit) { case 2 : - var match$2 = _method(env, /* Get */1); - var value = match$2[1]; + let match$2 = _method(env, /* Get */1); + let value = match$2[1]; return { TAG: /* Method */0, _0: [ @@ -11166,8 +11166,8 @@ function class_element(env) { } break; case "set" : - var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); - var exit$1 = 0; + let match$3 = Curry._2(Parser_env_Peek.token, undefined, env); + let exit$1 = 0; exit$1 = typeof match$3 === "number" ? ( match$3 >= 75 ? ( match$3 >= 78 ? ( @@ -11181,8 +11181,8 @@ function class_element(env) { ) : 2; switch (exit$1) { case 2 : - var match$4 = _method(env, /* Set */2); - var value$1 = match$4[1]; + let match$4 = _method(env, /* Set */2); + let value$1 = match$4[1]; return { TAG: /* Method */0, _0: [ @@ -11216,8 +11216,8 @@ function class_element(env) { function elements$1(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match > 104 || match < 3) { if (!(match > 105 || match < 2)) { @@ -11239,10 +11239,10 @@ function elements$1(env, _acc) { } function class_body(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var body = elements$1(env, /* [] */0); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let body = elements$1(env, /* [] */0); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc, end_loc), @@ -11253,11 +11253,11 @@ function class_body(env) { } function _class(env) { - var match; + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_EXTENDS */39)) { token$4(env, /* T_EXTENDS */39); - var superClass = left_hand_side(with_allow_yield(false, env)); - var superTypeParameters = wrap(type_parameter_instantiation, env); + let superClass = left_hand_side(with_allow_yield(false, env)); + let superTypeParameters = wrap(type_parameter_instantiation, env); match = [ superClass, superTypeParameters @@ -11268,8 +11268,8 @@ function _class(env) { undefined ]; } - var $$implements = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_IMPLEMENTS */50) ? (!env.parse_options.types ? error$1(env, /* UnexpectedTypeInterface */10) : undefined, token$4(env, /* T_IMPLEMENTS */50), class_implements(env, /* [] */0)) : /* [] */0; - var body = Curry._1(class_body, env); + let $$implements = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_IMPLEMENTS */50) ? (!env.parse_options.types ? error$1(env, /* UnexpectedTypeInterface */10) : undefined, token$4(env, /* T_IMPLEMENTS */50), class_implements(env, /* [] */0)) : /* [] */0; + let body = Curry._1(class_body, env); return [ body, match[0], @@ -11279,18 +11279,18 @@ function _class(env) { } function class_declaration(env, decorators) { - var env$1 = with_strict(true, env); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); - var decorators$1 = Stdlib.$at(decorators, decorator_list(env$1)); + let env$1 = with_strict(true, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let decorators$1 = Stdlib.$at(decorators, decorator_list(env$1)); token$4(env$1, /* T_CLASS */38); - var tmp_env = with_no_let(true, env$1); - var match = env$1.in_export; - var match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, tmp_env); - var id = match && !match$1 ? undefined : Curry._2(Parse.identifier, undefined, tmp_env); - var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env$1); - var match$2 = _class(env$1); - var body = match$2[0]; - var loc = btwn(start_loc, body[0]); + let tmp_env = with_no_let(true, env$1); + let match = env$1.in_export; + let match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, tmp_env); + let id = match && !match$1 ? undefined : Curry._2(Parse.identifier, undefined, tmp_env); + let typeParameters = Curry._1(type_parameter_declaration_with_defaults, env$1); + let match$2 = _class(env$1); + let body = match$2[0]; + let loc = btwn(start_loc, body[0]); return [ loc, { @@ -11309,12 +11309,12 @@ function class_declaration(env, decorators) { } function class_expression(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var decorators = decorator_list(env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let decorators = decorator_list(env); token$4(env, /* T_CLASS */38); - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var match$1; - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let match$1; + let exit = 0; if (typeof match === "number") { if (match > 39 || match < 1) { if (match !== 89) { @@ -11337,16 +11337,16 @@ function class_expression(env) { exit = 1; } if (exit === 1) { - var id = Curry._2(Parse.identifier, undefined, env); - var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); + let id = Curry._2(Parse.identifier, undefined, env); + let typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); match$1 = [ id, typeParameters ]; } - var match$2 = _class(env); - var body = match$2[0]; - var loc = btwn(start_loc, body[0]); + let match$2 = _class(env); + let body = match$2[0]; + let loc = btwn(start_loc, body[0]); return [ loc, { @@ -11366,15 +11366,15 @@ function class_expression(env) { function declare_function(env, start_loc) { token$4(env, /* T_FUNCTION */13); - var id = Curry._2(Parse.identifier, undefined, env); - var start_sig_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var typeParameters = Curry._1(type_parameter_declaration$1, env); - var match = wrap(function_param_list, env); + let id = Curry._2(Parse.identifier, undefined, env); + let start_sig_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let typeParameters = Curry._1(type_parameter_declaration$1, env); + let match = wrap(function_param_list, env); token$4(env, /* T_COLON */77); - var returnType = wrap(_type, env); - var end_loc = returnType[0]; - var loc = btwn(start_sig_loc, end_loc); - var value_1 = { + let returnType = wrap(_type, env); + let end_loc = returnType[0]; + let loc = btwn(start_sig_loc, end_loc); + let value_1 = { TAG: /* Function */1, _0: { params: match[1], @@ -11383,30 +11383,30 @@ function declare_function(env, start_loc) { typeParameters: typeParameters } }; - var value = [ + let value = [ loc, value_1 ]; - var typeAnnotation = [ + let typeAnnotation = [ loc, value ]; - var init = id[1]; - var id_0 = btwn(id[0], end_loc); - var id_1 = { + let init = id[1]; + let id_0 = btwn(id[0], end_loc); + let id_1 = { name: init.name, typeAnnotation: typeAnnotation, optional: init.optional }; - var id$1 = [ + let id$1 = [ id_0, id_1 ]; - var end_loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$2 = end_loc$1 !== undefined ? end_loc$1 : end_loc; - var predicate = Curry._1(Parse.predicate, env); + let end_loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$2 = end_loc$1 !== undefined ? end_loc$1 : end_loc; + let predicate = Curry._1(Parse.predicate, env); semicolon(env); - var loc$1 = btwn(start_loc, end_loc$2); + let loc$1 = btwn(start_loc, end_loc$2); return [ loc$1, { @@ -11420,7 +11420,7 @@ function type_alias(env) { if (!Curry._2(Parser_env_Peek.is_identifier, 1, env)) { return Curry._1(Parse.statement, env); } - var match = type_alias_helper(env); + let match = type_alias_helper(env); return [ match[0], { @@ -11434,7 +11434,7 @@ function $$interface(env) { if (!Curry._2(Parser_env_Peek.is_identifier, 1, env)) { return expression(env); } - var match = Curry._1(interface_helper, env); + let match = Curry._1(interface_helper, env); return [ match[0], { @@ -11445,7 +11445,7 @@ function $$interface(env) { } function declare_function_statement(env, start_loc) { - var match = declare_function(env, start_loc); + let match = declare_function(env, start_loc); return [ match[0], { @@ -11456,35 +11456,35 @@ function declare_function_statement(env, start_loc) { } function declare_export_declaration(allow_export_typeOpt, env) { - var allow_export_type = allow_export_typeOpt !== undefined ? allow_export_typeOpt : false; + let allow_export_type = allow_export_typeOpt !== undefined ? allow_export_typeOpt : false; if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeDeclaration */7); } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_DECLARE */58); - var env$1 = with_in_export(true, with_strict(true, env)); + let env$1 = with_in_export(true, with_strict(true, env)); token$4(env$1, /* T_EXPORT */47); - var match = Curry._2(Parser_env_Peek.token, undefined, env$1); - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env$1); + let exit = 0; if (typeof match === "number") { if (match >= 52) { if (match !== 59) { if (match !== 97) { exit = 1; } else { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_MULT */97); - var parse_export_star_as = env$1.parse_options.esproposal_export_star_as; - var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error$1(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; - var specifiers = { + let parse_export_star_as = env$1.parse_options.esproposal_export_star_as; + let local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error$1(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; + let specifiers = { TAG: /* ExportBatchSpecifier */1, _0: loc, _1: local_name }; - var source = export_source(env$1); - var loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc = loc$1 !== undefined ? loc$1 : source[0]; - var source$1 = source; + let source = export_source(env$1); + let loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc = loc$1 !== undefined ? loc$1 : source[0]; + let source$1 = source; semicolon(env$1); return [ btwn(start_loc, end_loc), @@ -11501,9 +11501,9 @@ function declare_export_declaration(allow_export_typeOpt, env) { } } else { if (allow_export_type) { - var match$1 = type_alias_helper(env$1); - var alias_loc = match$1[0]; - var loc$2 = btwn(start_loc, alias_loc); + let match$1 = type_alias_helper(env$1); + let alias_loc = match$1[0]; + let loc$2 = btwn(start_loc, alias_loc); return [ loc$2, { @@ -11528,9 +11528,9 @@ function declare_export_declaration(allow_export_typeOpt, env) { } else if (match >= 39) { if (match >= 51) { if (allow_export_type) { - var match$2 = Curry._1(interface_helper, env$1); - var iface_loc = match$2[0]; - var loc$3 = btwn(start_loc, iface_loc); + let match$2 = Curry._1(interface_helper, env$1); + let iface_loc = match$2[0]; + let loc$3 = btwn(start_loc, iface_loc); return [ loc$3, { @@ -11558,15 +11558,15 @@ function declare_export_declaration(allow_export_typeOpt, env) { switch (match) { case /* T_DEFAULT */34 : token$4(env$1, /* T_DEFAULT */34); - var match$3 = Curry._2(Parser_env_Peek.token, undefined, env$1); - var match$4; - var exit$1 = 0; + let match$3 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let match$4; + let exit$1 = 0; if (typeof match$3 === "number") { if (match$3 !== 13) { if (match$3 !== 38) { exit$1 = 3; } else { - var _class = Curry._2(declare_class, env$1, start_loc); + let _class = Curry._2(declare_class, env$1, start_loc); match$4 = [ _class[0], { @@ -11576,7 +11576,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { ]; } } else { - var fn = declare_function(env$1, start_loc); + let fn = declare_function(env$1, start_loc); match$4 = [ fn[0], { @@ -11589,9 +11589,9 @@ function declare_export_declaration(allow_export_typeOpt, env) { exit$1 = 3; } if (exit$1 === 3) { - var _type$1 = wrap(_type, env$1); - var loc$4 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc$1 = loc$4 !== undefined ? loc$4 : _type$1[0]; + let _type$1 = wrap(_type, env$1); + let loc$4 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc$1 = loc$4 !== undefined ? loc$4 : _type$1[0]; semicolon(env$1); match$4 = [ end_loc$1, @@ -11652,7 +11652,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { } switch (exit) { case 1 : - var match$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let match$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); if (typeof match$5 === "number") { if (match$5 !== 51) { if (match$5 !== 59) { @@ -11665,18 +11665,18 @@ function declare_export_declaration(allow_export_typeOpt, env) { } } token$4(env$1, /* T_LCURLY */1); - var match$6 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); - var specifiers$1 = { + let match$6 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); + let specifiers$1 = { TAG: /* ExportSpecifiers */0, _0: match$6[0] }; - var end_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let end_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_RCURLY */2); - var source$2 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (Stdlib__List.iter((function (param) { + let source$2 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (Stdlib__List.iter((function (param) { return error_at(env$1, param); }), match$6[1]), undefined); - var loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc$3 = loc$5 !== undefined ? loc$5 : ( + let loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc$3 = loc$5 !== undefined ? loc$5 : ( source$2 !== undefined ? source$2[0] : end_loc$2 ); semicolon(env$1); @@ -11693,16 +11693,16 @@ function declare_export_declaration(allow_export_typeOpt, env) { } ]; case 2 : - var token$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); - var match$7; - var exit$2 = 0; + let token$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let match$7; + let exit$2 = 0; if (typeof token$5 === "number") { if (token$5 >= 23) { if (token$5 >= 27) { if (token$5 !== 38) { exit$2 = 3; } else { - var _class$1 = Curry._2(declare_class, env$1, start_loc); + let _class$1 = Curry._2(declare_class, env$1, start_loc); match$7 = [ _class$1[0], { @@ -11717,7 +11717,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { } else if (token$5 !== 13) { exit$2 = token$5 >= 22 ? 4 : 3; } else { - var fn$1 = declare_function(env$1, start_loc); + let fn$1 = declare_function(env$1, start_loc); match$7 = [ fn$1[0], { @@ -11751,7 +11751,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { error$1(env$1, /* DeclareExportConst */51); } } - var $$var = declare_var(env$1, start_loc); + let $$var = declare_var(env$1, start_loc); match$7 = [ $$var[0], { @@ -11779,7 +11779,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { } function declare_var_statement(env, start_loc) { - var match = declare_var(env, start_loc); + let match = declare_var(env, start_loc); return [ match[0], { @@ -11791,10 +11791,10 @@ function declare_var_statement(env, start_loc) { function declare_var(env, start_loc) { token$4(env, /* T_VAR */22); - var id = Curry._2(Parse.identifier_with_type, env, /* StrictVarName */27); - var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc = loc !== undefined ? loc : id[0]; - var loc$1 = btwn(start_loc, end_loc); + let id = Curry._2(Parse.identifier_with_type, env, /* StrictVarName */27); + let loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc = loc !== undefined ? loc : id[0]; + let loc$1 = btwn(start_loc, end_loc); semicolon(env); return [ loc$1, @@ -11805,18 +11805,18 @@ function declare_var(env, start_loc) { } function type_alias_helper(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAlias */5); } token$4(env, /* T_TYPE */59); push_lex_mode(env, /* TYPE */1); - var id = Curry._2(Parse.identifier, undefined, env); - var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); + let id = Curry._2(Parse.identifier, undefined, env); + let typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); token$4(env, /* T_ASSIGN */75); - var right = wrap(_type, env); - var end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$1 = end_loc !== undefined ? end_loc : right[0]; + let right = wrap(_type, env); + let end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$1 = end_loc !== undefined ? end_loc : right[0]; semicolon(env); pop_lex_mode(env); return [ @@ -11835,9 +11835,9 @@ function extract_ident_name(param) { function export_specifiers_and_errs(env, _specifiers, _errs) { while(true) { - var errs = _errs; - var specifiers = _specifiers; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let errs = _errs; + let specifiers = _specifiers; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return [ @@ -11853,13 +11853,13 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { } } - var match$1 = Curry._1(Parse.identifier_or_reserved_keyword, env); - var id = match$1[0]; - var match$2; + let match$1 = Curry._1(Parse.identifier_or_reserved_keyword, env); + let id = match$1[0]; + let match$2; if (Curry._2(Parser_env_Peek.value, undefined, env) === "as") { contextual(env, "as"); - var match$3 = Curry._1(Parse.identifier_or_reserved_keyword, env); - var name = match$3[0]; + let match$3 = Curry._1(Parse.identifier_or_reserved_keyword, env); + let name = match$3[0]; record_export(env, [ name[0], extract_ident_name(name) @@ -11870,7 +11870,7 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { name[0] ]; } else { - var loc = id[0]; + let loc = id[0]; record_export(env, [ loc, extract_ident_name(id) @@ -11881,20 +11881,20 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { loc ]; } - var err = match$2[1]; - var loc$1 = btwn(id[0], match$2[2]); - var specifier_1 = { + let err = match$2[1]; + let loc$1 = btwn(id[0], match$2[2]); + let specifier_1 = { id: id, name: match$2[0] }; - var specifier = [ + let specifier = [ loc$1, specifier_1 ]; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COMMA */8)) { token$4(env, /* T_COMMA */8); } - var errs$1 = err !== undefined ? ({ + let errs$1 = err !== undefined ? ({ hd: err, tl: errs }) : errs; @@ -11909,13 +11909,13 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { function export_source(env) { contextual(env, "from"); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number" && match.TAG === /* T_STRING */1) { - var match$1 = match._0; - var octal = match$1[3]; - var raw = match$1[2]; - var value = match$1[1]; - var loc = match$1[0]; + let match$1 = match._0; + let octal = match$1[3]; + let raw = match$1[2]; + let value = match$1[1]; + let loc = match$1[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -11928,7 +11928,7 @@ function export_source(env) { octal ] }); - var value$1 = { + let value$1 = { TAG: /* String */0, _0: value }; @@ -11940,17 +11940,17 @@ function export_source(env) { } ]; } - var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); - var value$2 = { + let raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); + let value$2 = { TAG: /* String */0, _0: raw$1 }; - var ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); - var ret_1 = { + let ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); + let ret_1 = { value: value$2, raw: raw$1 }; - var ret = [ + let ret = [ ret_0, ret_1 ]; @@ -11959,12 +11959,12 @@ function export_source(env) { } function declare(in_moduleOpt, env) { - var in_module = in_moduleOpt !== undefined ? in_moduleOpt : false; + let in_module = in_moduleOpt !== undefined ? in_moduleOpt : false; if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeDeclaration */7); } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var match = Curry._2(Parser_env_Peek.token, 1, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let match = Curry._2(Parser_env_Peek.token, 1, env); if (typeof match === "number") { if (match >= 22) { if (match >= 38) { @@ -11972,7 +11972,7 @@ function declare(in_moduleOpt, env) { switch (match) { case /* T_CLASS */38 : token$4(env, /* T_DECLARE */58); - var match$1 = Curry._2(declare_class, env, start_loc); + let match$1 = Curry._2(declare_class, env, start_loc); return [ match$1[0], { @@ -12032,11 +12032,11 @@ function declare(in_moduleOpt, env) { if (in_module || Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_PERIOD */9)) { token$4(env, /* T_PERIOD */9); contextual(env, "exports"); - var type_annot = wrap(annotation, env); - var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc = loc !== undefined ? loc : type_annot[0]; + let type_annot = wrap(annotation, env); + let loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc = loc !== undefined ? loc : type_annot[0]; semicolon(env); - var loc$1 = btwn(start_loc, end_loc); + let loc$1 = btwn(start_loc, end_loc); return [ loc$1, { @@ -12045,19 +12045,19 @@ function declare(in_moduleOpt, env) { } ]; } else { - var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); - var id; + let match$2 = Curry._2(Parser_env_Peek.token, undefined, env); + let id; if (typeof match$2 === "number" || match$2.TAG !== /* T_STRING */1) { id = { TAG: /* Identifier */0, _0: Curry._2(Parse.identifier, undefined, env) }; } else { - var match$3 = match$2._0; - var octal = match$3[3]; - var raw = match$3[2]; - var value = match$3[1]; - var loc$2 = match$3[0]; + let match$3 = match$2._0; + let octal = match$3[3]; + let raw = match$3[2]; + let value = match$3[1]; + let loc$2 = match$3[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -12070,7 +12070,7 @@ function declare(in_moduleOpt, env) { octal ] }); - var value$1 = { + let value$1 = { TAG: /* String */0, _0: value }; @@ -12085,22 +12085,22 @@ function declare(in_moduleOpt, env) { ] }; } - var body_start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let body_start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var match$4 = module_items(env, undefined, /* [] */0); - var module_kind = match$4[0]; + let match$4 = module_items(env, undefined, /* [] */0); + let module_kind = match$4[0]; token$4(env, /* T_RCURLY */2); - var body_end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var body_loc = btwn(body_start_loc, body_end_loc); - var body_1 = { + let body_end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let body_loc = btwn(body_start_loc, body_end_loc); + let body_1 = { body: match$4[1] }; - var body = [ + let body = [ body_loc, body_1 ]; - var loc$3 = btwn(start_loc, body_loc); - var kind = module_kind !== undefined ? module_kind : ({ + let loc$3 = btwn(start_loc, body_loc); + let kind = module_kind !== undefined ? module_kind : ({ TAG: /* CommonJS */0, _0: loc$3 }); @@ -12132,9 +12132,9 @@ function declare(in_moduleOpt, env) { } function expression(env) { - var expression$1 = Curry._1(Parse.expression, env); - var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc = loc !== undefined ? loc : expression$1[0]; + let expression$1 = Curry._1(Parse.expression, env); + let loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc = loc !== undefined ? loc : expression$1[0]; semicolon(env); return [ btwn(expression$1[0], end_loc), @@ -12149,9 +12149,9 @@ function expression(env) { function module_items(env, _module_kind, _acc) { while(true) { - var acc = _acc; - var module_kind = _module_kind; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let module_kind = _module_kind; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return [ @@ -12167,10 +12167,10 @@ function module_items(env, _module_kind, _acc) { } } - var stmt = declare(true, env); - var stmt$1 = stmt[1]; - var loc = stmt[0]; - var module_kind$1; + let stmt = declare(true, env); + let stmt$1 = stmt[1]; + let loc = stmt[0]; + let module_kind$1; if (module_kind !== undefined) { if (module_kind.TAG === /* CommonJS */0) { if (typeof stmt$1 === "number") { @@ -12182,7 +12182,7 @@ function module_items(env, _module_kind, _acc) { module_kind$1 = module_kind; break; case /* DeclareExportDeclaration */27 : - var declaration = stmt$1._0.declaration; + let declaration = stmt$1._0.declaration; if (declaration !== undefined) { switch (declaration.TAG | 0) { case /* NamedType */4 : @@ -12217,7 +12217,7 @@ function module_items(env, _module_kind, _acc) { }; break; case /* DeclareExportDeclaration */27 : - var declaration$1 = stmt$1._0.declaration; + let declaration$1 = stmt$1._0.declaration; if (declaration$1 !== undefined) { switch (declaration$1.TAG | 0) { case /* NamedType */4 : @@ -12252,13 +12252,13 @@ function module_items(env, _module_kind, _acc) { function supers(env, _acc) { while(true) { - var acc = _acc; - var $$super = wrap(generic, env); - var acc$1 = { + let acc = _acc; + let $$super = wrap(generic, env); + let acc$1 = { hd: $$super, tl: acc }; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 8) { return Stdlib__List.rev(acc$1); } @@ -12269,14 +12269,14 @@ function supers(env, _acc) { } function declare_class(env, start_loc) { - var env$1 = with_strict(true, env); + let env$1 = with_strict(true, env); token$4(env$1, /* T_CLASS */38); - var id = Curry._2(Parse.identifier, undefined, env$1); - var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env$1); - var $$extends = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env$1), /* T_EXTENDS */39) ? (token$4(env$1, /* T_EXTENDS */39), supers(env$1, /* [] */0)) : /* [] */0; - var mixins = Curry._2(Parser_env_Peek.value, undefined, env$1) === "mixins" ? (contextual(env$1, "mixins"), supers(env$1, /* [] */0)) : /* [] */0; - var body = _object$1(true, env$1); - var loc = btwn(start_loc, body[0]); + let id = Curry._2(Parse.identifier, undefined, env$1); + let typeParameters = Curry._1(type_parameter_declaration_with_defaults, env$1); + let $$extends = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env$1), /* T_EXTENDS */39) ? (token$4(env$1, /* T_EXTENDS */39), supers(env$1, /* [] */0)) : /* [] */0; + let mixins = Curry._2(Parser_env_Peek.value, undefined, env$1) === "mixins" ? (contextual(env$1, "mixins"), supers(env$1, /* [] */0)) : /* [] */0; + let body = _object$1(true, env$1); + let loc = btwn(start_loc, body[0]); return [ loc, { @@ -12291,13 +12291,13 @@ function declare_class(env, start_loc) { function supers$1(env, _acc) { while(true) { - var acc = _acc; - var $$super = wrap(generic, env); - var acc$1 = { + let acc = _acc; + let $$super = wrap(generic, env); + let acc$1 = { hd: $$super, tl: acc }; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 8) { return Stdlib__List.rev(acc$1); } @@ -12308,16 +12308,16 @@ function supers$1(env, _acc) { } function interface_helper(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeInterface */10); } token$4(env, /* T_INTERFACE */51); - var id = Curry._2(Parse.identifier, undefined, env); - var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); - var $$extends = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_EXTENDS */39) ? (token$4(env, /* T_EXTENDS */39), supers$1(env, /* [] */0)) : /* [] */0; - var body = _object$1(true, env); - var loc = btwn(start_loc, body[0]); + let id = Curry._2(Parse.identifier, undefined, env); + let typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); + let $$extends = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_EXTENDS */39) ? (token$4(env, /* T_EXTENDS */39), supers$1(env, /* [] */0)) : /* [] */0; + let body = _object$1(true, env); + let loc = btwn(start_loc, body[0]); return [ loc, { @@ -12332,7 +12332,7 @@ function interface_helper(env) { function fold(acc) { return function (param) { - var match = param[1]; + let match = param[1]; switch (match.TAG | 0) { case /* Object */0 : return Stdlib__List.fold_left((function (acc, prop) { @@ -12357,7 +12357,7 @@ function fold(acc) { case /* Assignment */2 : return fold(acc)(match._0.left); case /* Identifier */3 : - var match$1 = match._0; + let match$1 = match._0; return { hd: [ match$1[0], @@ -12381,8 +12381,8 @@ function assert_can_be_forin_or_forof(env, err) { return error$1(env, err); } if (param.TAG === /* InitDeclaration */0) { - var match = param._0; - var declarations = match[1].declarations; + let match = param._0; + let declarations = match[1].declarations; if (declarations && declarations.hd[1].init === undefined && !declarations.tl) { return ; } @@ -12391,8 +12391,8 @@ function assert_can_be_forin_or_forof(env, err) { err ]); } - var match$1 = param._0; - var loc = match$1[0]; + let match$1 = param._0; + let loc = match$1[0]; if (!Curry._1(Parse.is_assignable_lhs, [ loc, match$1[1] @@ -12407,15 +12407,15 @@ function assert_can_be_forin_or_forof(env, err) { } function _if(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_IF */14); token$4(env, /* T_LPAREN */3); - var test = Curry._1(Parse.expression, env); + let test = Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); Curry._2(Parser_env_Peek.token, undefined, env); - var consequent = Curry._2(Parser_env_Peek.is_function, undefined, env) ? (strict_error(env, /* StrictFunctionStatement */45), _function(env)) : Curry._1(Parse.statement, env); - var alternate = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ELSE */41) ? (token$4(env, /* T_ELSE */41), Curry._1(Parse.statement, env)) : undefined; - var end_loc = alternate !== undefined ? alternate[0] : consequent[0]; + let consequent = Curry._2(Parser_env_Peek.is_function, undefined, env) ? (strict_error(env, /* StrictFunctionStatement */45), _function(env)) : Curry._1(Parse.statement, env); + let alternate = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ELSE */41) ? (token$4(env, /* T_ELSE */41), Curry._1(Parse.statement, env)) : undefined; + let end_loc = alternate !== undefined ? alternate[0] : consequent[0]; return [ btwn(start_loc, end_loc), { @@ -12431,10 +12431,10 @@ function _if(env) { function case_list(env, _param) { while(true) { - var param = _param; - var acc = param[1]; - var seen_default = param[0]; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let param = _param; + let acc = param[1]; + let seen_default = param[0]; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return Stdlib__List.rev(acc); @@ -12444,13 +12444,13 @@ function case_list(env, _param) { } } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var test = match$1 === 34 ? (seen_default ? error$1(env, /* MultipleDefaultsInSwitch */19) : undefined, token$4(env, /* T_DEFAULT */34), undefined) : (token$4(env, /* T_CASE */31), Curry._1(Parse.expression, env)); - var seen_default$1 = seen_default || test === undefined; - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let test = match$1 === 34 ? (seen_default ? error$1(env, /* MultipleDefaultsInSwitch */19) : undefined, token$4(env, /* T_DEFAULT */34), undefined) : (token$4(env, /* T_CASE */31), Curry._1(Parse.expression, env)); + let seen_default$1 = seen_default || test === undefined; + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_COLON */77); - var term_fn = function (param) { + let term_fn = function (param) { if (typeof param === "number") { if (param > 31 || param < 2) { return param === 34; @@ -12461,17 +12461,17 @@ function case_list(env, _param) { return false; } }; - var consequent = Curry._2(Parse.statement_list, term_fn, with_in_switch(true, env)); - var match$2 = Stdlib__List.rev(consequent); - var end_loc$1 = match$2 ? match$2.hd[0] : end_loc; - var acc_0 = [ + let consequent = Curry._2(Parse.statement_list, term_fn, with_in_switch(true, env)); + let match$2 = Stdlib__List.rev(consequent); + let end_loc$1 = match$2 ? match$2.hd[0] : end_loc; + let acc_0 = [ btwn(start_loc, end_loc$1), { test: test, consequent: consequent } ]; - var acc$1 = { + let acc$1 = { hd: acc_0, tl: acc }; @@ -12484,11 +12484,11 @@ function case_list(env, _param) { } function var_or_const(env) { - var match = variable(env); - var match$1 = match[0]; - var start_loc = match$1[0]; - var end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$1 = end_loc !== undefined ? end_loc : start_loc; + let match = variable(env); + let match$1 = match[0]; + let start_loc = match$1[0]; + let end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$1 = end_loc !== undefined ? end_loc : start_loc; semicolon(env); Stdlib__List.iter((function (param) { return error_at(env, param); @@ -12501,13 +12501,13 @@ function var_or_const(env) { function source(env) { contextual(env, "from"); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number" && match.TAG === /* T_STRING */1) { - var match$1 = match._0; - var octal = match$1[3]; - var raw = match$1[2]; - var value = match$1[1]; - var loc = match$1[0]; + let match$1 = match._0; + let octal = match$1[3]; + let raw = match$1[2]; + let value = match$1[1]; + let loc = match$1[0]; if (octal) { strict_error(env, /* StrictOctalLiteral */31); } @@ -12520,7 +12520,7 @@ function source(env) { octal ] }); - var value$1 = { + let value$1 = { TAG: /* String */0, _0: value }; @@ -12532,17 +12532,17 @@ function source(env) { } ]; } - var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); - var value$2 = { + let raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); + let value$2 = { TAG: /* String */0, _0: raw$1 }; - var ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); - var ret_1 = { + let ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); + let ret_1 = { value: value$2, raw: raw$1 }; - var ret = [ + let ret = [ ret_0, ret_1 ]; @@ -12552,8 +12552,8 @@ function source(env) { function specifier_list(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return Stdlib__List.rev(acc); @@ -12563,13 +12563,13 @@ function specifier_list(env, _acc) { } } - var match$1 = Curry._1(Parse.identifier_or_reserved_keyword, env); - var err = match$1[1]; - var remote = match$1[0]; - var specifier; + let match$1 = Curry._1(Parse.identifier_or_reserved_keyword, env); + let err = match$1[1]; + let remote = match$1[0]; + let specifier; if (Curry._2(Parser_env_Peek.value, undefined, env) === "as") { contextual(env, "as"); - var local = Curry._2(Parse.identifier, undefined, env); + let local = Curry._2(Parse.identifier, undefined, env); specifier = { TAG: /* ImportNamedSpecifier */0, _0: { @@ -12601,12 +12601,12 @@ function specifier_list(env, _acc) { } function named_or_namespace_specifier(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 97) { token$4(env, /* T_MULT */97); contextual(env, "as"); - var id = Curry._2(Parse.identifier, undefined, env); + let id = Curry._2(Parse.identifier, undefined, env); return { hd: { TAG: /* ImportNamespaceSpecifier */2, @@ -12619,7 +12619,7 @@ function named_or_namespace_specifier(env) { }; } token$4(env, /* T_LCURLY */1); - var specifiers = specifier_list(env, /* [] */0); + let specifiers = specifier_list(env, /* [] */0); token$4(env, /* T_RCURLY */2); return specifiers; } @@ -12630,7 +12630,7 @@ function element(env) { return ; } if (param.TAG === /* Expression */0) { - var match = param._0; + let match = param._0; return { TAG: /* Element */0, _0: Curry._2(Parse.pattern_from_expr, env, [ @@ -12639,8 +12639,8 @@ function element(env) { ]) }; } - var match$1 = param._0; - var argument = Curry._2(Parse.pattern_from_expr, env, match$1[1].argument); + let match$1 = param._0; + let argument = Curry._2(Parse.pattern_from_expr, env, match$1[1].argument); return { TAG: /* Spread */1, _0: [ @@ -12654,16 +12654,16 @@ function element(env) { } function from_expr(env, param) { - var expr = param[1]; - var loc = param[0]; + let expr = param[1]; + let loc = param[0]; if (typeof expr !== "number") { switch (expr.TAG | 0) { case /* Array */0 : - var param$1 = [ + let param$1 = [ loc, expr._0 ]; - var elements = Stdlib__List.map(element(env), param$1[1].elements); + let elements = Stdlib__List.map(element(env), param$1[1].elements); return [ param$1[0], { @@ -12675,16 +12675,16 @@ function from_expr(env, param) { } ]; case /* Object */1 : - var param$2 = [ + let param$2 = [ loc, expr._0 ]; - var properties = Stdlib__List.map((function (param) { + let properties = Stdlib__List.map((function (param) { if (param.TAG === /* Property */0) { - var match = param._0; - var match$1 = match[1]; - var key = match$1.key; - var key$1; + let match = param._0; + let match$1 = match[1]; + let key = match$1.key; + let key$1; switch (key.TAG | 0) { case /* Literal */0 : key$1 = { @@ -12706,7 +12706,7 @@ function from_expr(env, param) { break; } - var pattern = Curry._2(Parse.pattern_from_expr, env, match$1.value); + let pattern = Curry._2(Parse.pattern_from_expr, env, match$1.value); return { TAG: /* Property */0, _0: [ @@ -12719,8 +12719,8 @@ function from_expr(env, param) { ] }; } - var match$2 = param._0; - var argument = Curry._2(Parse.pattern_from_expr, env, match$2[1].argument); + let match$2 = param._0; + let argument = Curry._2(Parse.pattern_from_expr, env, match$2[1].argument); return { TAG: /* SpreadProperty */1, _0: [ @@ -12742,7 +12742,7 @@ function from_expr(env, param) { } ]; case /* Assignment */7 : - var match = expr._0; + let match = expr._0; if (!match.operator) { return [ loc, @@ -12781,11 +12781,11 @@ function from_expr(env, param) { } function _object$2(restricted_error) { - var property = function (env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let property = function (env) { + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (maybe(env, /* T_ELLIPSIS */11)) { - var argument = pattern$1(env, restricted_error); - var loc = btwn(start_loc, argument[0]); + let argument = pattern$1(env, restricted_error); + let loc = btwn(start_loc, argument[0]); return { TAG: /* SpreadProperty */1, _0: [ @@ -12796,9 +12796,9 @@ function _object$2(restricted_error) { ] }; } - var match = Curry._1(Parse.object_key, env); - var lit = match[1]; - var key; + let match = Curry._1(Parse.object_key, env); + let lit = match[1]; + let key; switch (lit.TAG | 0) { case /* Literal */0 : key = { @@ -12820,8 +12820,8 @@ function _object$2(restricted_error) { break; } - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var prop; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let prop; if (match$1 === 77) { token$4(env, /* T_COLON */77); prop = [ @@ -12831,13 +12831,13 @@ function _object$2(restricted_error) { } else { switch (key.TAG | 0) { case /* Identifier */1 : - var id = key._0; - var pattern_0 = id[0]; - var pattern_1 = { + let id = key._0; + let pattern_0 = id[0]; + let pattern_1 = { TAG: /* Identifier */3, _0: id }; - var pattern$2 = [ + let pattern$2 = [ pattern_0, pattern_1 ]; @@ -12857,13 +12857,13 @@ function _object$2(restricted_error) { if (prop === undefined) { return ; } - var pattern$3 = prop[0]; - var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); - var pattern$4; + let pattern$3 = prop[0]; + let match$2 = Curry._2(Parser_env_Peek.token, undefined, env); + let pattern$4; if (match$2 === 75) { token$4(env, /* T_ASSIGN */75); - var $$default = Curry._1(Parse.assignment, env); - var loc$1 = btwn(pattern$3[0], $$default[0]); + let $$default = Curry._1(Parse.assignment, env); + let loc$1 = btwn(pattern$3[0], $$default[0]); pattern$4 = [ loc$1, { @@ -12877,7 +12877,7 @@ function _object$2(restricted_error) { } else { pattern$4 = pattern$3; } - var loc$2 = btwn(start_loc, pattern$4[0]); + let loc$2 = btwn(start_loc, pattern$4[0]); return { TAG: /* Property */0, _0: [ @@ -12890,10 +12890,10 @@ function _object$2(restricted_error) { ] }; }; - var properties = function (env, _acc) { + let properties = function (env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 2) { return Stdlib__List.rev(acc); @@ -12903,7 +12903,7 @@ function _object$2(restricted_error) { } } - var prop = property(env); + let prop = property(env); if (prop !== undefined) { if (Caml_obj.caml_notequal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RCURLY */2)) { token$4(env, /* T_COMMA */8); @@ -12918,14 +12918,14 @@ function _object$2(restricted_error) { }; }; return function (env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var properties$1 = properties(env, /* [] */0); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let properties$1 = properties(env, /* [] */0); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); - var match; + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COLON */77)) { - var typeAnnotation = wrap(annotation, env); + let typeAnnotation = wrap(annotation, env); match = [ typeAnnotation[0], typeAnnotation @@ -12950,10 +12950,10 @@ function _object$2(restricted_error) { } function _array(restricted_error) { - var elements = function (env, _acc) { + let elements = function (env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 105) { return Stdlib__List.rev(acc); @@ -12980,11 +12980,11 @@ function _array(restricted_error) { case /* T_ARROW */10 : break; case /* T_ELLIPSIS */11 : - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_ELLIPSIS */11); - var argument = pattern$1(env, restricted_error); - var loc = btwn(start_loc, argument[0]); - var element = { + let argument = pattern$1(env, restricted_error); + let loc = btwn(start_loc, argument[0]); + let element = { TAG: /* Spread */1, _0: [ loc, @@ -13003,13 +13003,13 @@ function _array(restricted_error) { } } - var pattern$2 = pattern$1(env, restricted_error); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); - var pattern$3; + let pattern$2 = pattern$1(env, restricted_error); + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env); + let pattern$3; if (match$1 === 75) { token$4(env, /* T_ASSIGN */75); - var $$default = Curry._1(Parse.expression, env); - var loc$1 = btwn(pattern$2[0], $$default[0]); + let $$default = Curry._1(Parse.expression, env); + let loc$1 = btwn(pattern$2[0], $$default[0]); pattern$3 = [ loc$1, { @@ -13023,7 +13023,7 @@ function _array(restricted_error) { } else { pattern$3 = pattern$2; } - var element$1 = { + let element$1 = { TAG: /* Element */0, _0: pattern$3 }; @@ -13038,14 +13038,14 @@ function _array(restricted_error) { }; }; return function (env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LBRACKET */5); - var elements$1 = elements(env, /* [] */0); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let elements$1 = elements(env, /* [] */0); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RBRACKET */6); - var match; + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COLON */77)) { - var typeAnnotation = wrap(annotation, env); + let typeAnnotation = wrap(annotation, env); match = [ typeAnnotation[0], typeAnnotation @@ -13070,7 +13070,7 @@ function _array(restricted_error) { } function pattern$1(env, restricted_error) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 1) { return _object$2(restricted_error)(env); @@ -13080,7 +13080,7 @@ function pattern$1(env, restricted_error) { } } - var id = Curry._2(Parse.identifier_with_type, env, restricted_error); + let id = Curry._2(Parse.identifier_with_type, env, restricted_error); return [ id[0], { @@ -13092,11 +13092,11 @@ function pattern$1(env, restricted_error) { function spread_attribute(env) { push_lex_mode(env, /* NORMAL */0); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); token$4(env, /* T_ELLIPSIS */11); - var argument = Curry._1(assignment, env); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let argument = Curry._1(assignment, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); pop_lex_mode(env); return [ @@ -13109,11 +13109,11 @@ function spread_attribute(env) { function expression_container(env) { push_lex_mode(env, /* NORMAL */0); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var expression; + let expression; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_RCURLY */2)) { - var empty_loc = btwn_exclusive(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); + let empty_loc = btwn_exclusive(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); expression = { TAG: /* EmptyExpression */1, _0: empty_loc @@ -13124,7 +13124,7 @@ function expression_container(env) { _0: Curry._1(Parse.expression, env) }; } - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); pop_lex_mode(env); return [ @@ -13136,8 +13136,8 @@ function expression_container(env) { } function identifier$1(env) { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var name = Curry._2(Parser_env_Peek.value, undefined, env); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let name = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, /* T_JSX_IDENTIFIER */106); return [ loc, @@ -13149,23 +13149,23 @@ function identifier$1(env) { function member_expression(env, _member) { while(true) { - var member = _member; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let member = _member; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match !== 9) { return member; } - var _object = { + let _object = { TAG: /* MemberExpression */1, _0: member }; token$4(env, /* T_PERIOD */9); - var property = identifier$1(env); - var loc = btwn(member[0], property[0]); - var member_1 = { + let property = identifier$1(env); + let loc = btwn(member[0], property[0]); + let member_1 = { _object: _object, property: property }; - var member$1 = [ + let member$1 = [ loc, member_1 ]; @@ -13175,8 +13175,8 @@ function member_expression(env, _member) { } function name(env) { - var name$1 = identifier$1(env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let name$1 = identifier$1(env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number") { return { TAG: /* Identifier */0, @@ -13191,8 +13191,8 @@ function name(env) { }; } token$4(env, /* T_COLON */77); - var name$2 = identifier$1(env); - var loc = btwn(name$1[0], name$2[0]); + let name$2 = identifier$1(env); + let loc = btwn(name$1[0], name$2[0]); return { TAG: /* NamespacedName */1, _0: [ @@ -13204,18 +13204,18 @@ function name(env) { ] }; } - var _object = { + let _object = { TAG: /* Identifier */0, _0: name$1 }; token$4(env, /* T_PERIOD */9); - var property = identifier$1(env); - var loc$1 = btwn(name$1[0], property[0]); - var member_1 = { + let property = identifier$1(env); + let loc$1 = btwn(name$1[0], property[0]); + let member_1 = { _object: _object, property: property }; - var member = [ + let member = [ loc$1, member_1 ]; @@ -13226,13 +13226,13 @@ function name(env) { } function attribute(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var name = identifier$1(env); - var match; + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let name = identifier$1(env); + let match; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COLON */77)) { token$4(env, /* T_COLON */77); - var name$1 = identifier$1(env); - var loc = btwn(name[0], name$1[0]); + let name$1 = identifier$1(env); + let loc = btwn(name[0], name$1[0]); match = [ loc, { @@ -13255,17 +13255,17 @@ function attribute(env) { } ]; } - var match$1; + let match$1; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_ASSIGN */75)) { token$4(env, /* T_ASSIGN */75); - var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let token$5 = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof token$5 === "number") { if (token$5 === /* T_LCURLY */1) { - var match$2 = expression_container(env); - var expression_container$1 = match$2[1]; - var loc$1 = match$2[0]; - var match$3 = expression_container$1.expression; + let match$2 = expression_container(env); + let expression_container$1 = match$2[1]; + let loc$1 = match$2[0]; + let match$3 = expression_container$1.expression; if (match$3.TAG !== /* Expression */0) { error$1(env, /* JSXAttributeValueEmptyExpression */40); } @@ -13281,10 +13281,10 @@ function attribute(env) { exit = 1; } } else if (token$5.TAG === /* T_JSX_TEXT */4) { - var match$4 = token$5._0; - var loc$2 = match$4[0]; + let match$4 = token$5._0; + let loc$2 = match$4[0]; token$4(env, token$5); - var value = { + let value = { TAG: /* String */0, _0: match$4[1] }; @@ -13304,7 +13304,7 @@ function attribute(env) { } if (exit === 1) { error$1(env, /* InvalidJSXAttributeValue */41); - var loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); + let loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); match$1 = [ loc$3, { @@ -13338,8 +13338,8 @@ function attribute(env) { function attributes(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match >= 91) { if (match === 96) { @@ -13355,7 +13355,7 @@ function attributes(env, _acc) { } } else { - var attribute$1 = { + let attribute$1 = { TAG: /* SpreadAttribute */1, _0: spread_attribute(env) }; @@ -13366,7 +13366,7 @@ function attributes(env, _acc) { continue ; } } - var attribute$2 = { + let attribute$2 = { TAG: /* Attribute */0, _0: attribute(env) }; @@ -13379,13 +13379,13 @@ function attributes(env, _acc) { } function opening_element_without_lt(env, start_loc) { - var name$1 = name(env); - var attributes$1 = attributes(env, /* [] */0); - var selfClosing = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_DIV */96); + let name$1 = name(env); + let attributes$1 = attributes(env, /* [] */0); + let selfClosing = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_DIV */96); if (selfClosing) { token$4(env, /* T_DIV */96); } - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_GREATER_THAN */90); pop_lex_mode(env); return [ @@ -13400,8 +13400,8 @@ function opening_element_without_lt(env, start_loc) { function closing_element_without_lt(env, start_loc) { token$4(env, /* T_DIV */96); - var name$1 = name(env); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let name$1 = name(env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_GREATER_THAN */90); double_pop_lex_mode(env); return [ @@ -13413,10 +13413,10 @@ function closing_element_without_lt(env, start_loc) { } function child(env) { - var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); + let token$5 = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof token$5 === "number") { if (token$5 === /* T_LCURLY */1) { - var expression_container$1 = expression_container(env); + let expression_container$1 = expression_container(env); return [ expression_container$1[0], { @@ -13427,7 +13427,7 @@ function child(env) { } } else if (token$5.TAG === /* T_JSX_TEXT */4) { - var match = token$5._0; + let match = token$5._0; token$4(env, token$5); return [ match[0], @@ -13440,7 +13440,7 @@ function child(env) { } ]; } - var element$2 = element$1(env); + let element$2 = element$1(env); return [ element$2[0], { @@ -13451,7 +13451,7 @@ function child(env) { } function element$1(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); push_lex_mode(env, /* JSX_TAG */2); token$4(env, /* T_LESS_THAN */89); return Curry._2(element_without_lt, env, start_loc); @@ -13459,9 +13459,9 @@ function element$1(env) { function element_or_closing(env) { push_lex_mode(env, /* JSX_TAG */2); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LESS_THAN */89); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number" && !(match !== 96 && match !== 105)) { return { TAG: /* Closing */0, @@ -13477,8 +13477,8 @@ function element_or_closing(env) { function children_and_closing(env, _acc) { while(true) { - var acc = _acc; - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match !== 89) { if (match !== 105) { @@ -13494,20 +13494,20 @@ function children_and_closing(env, _acc) { undefined ]; } - var closingElement = element_or_closing(env); + let closingElement = element_or_closing(env); if (closingElement.TAG === /* Closing */0) { return [ Stdlib__List.rev(acc), closingElement._0 ]; } - var element = closingElement._0; - var element_0 = element[0]; - var element_1 = { + let element = closingElement._0; + let element_0 = element[0]; + let element_1 = { TAG: /* Element */0, _0: element[1] }; - var element$1 = [ + let element$1 = [ element_0, element_1 ]; @@ -13530,12 +13530,12 @@ function normalize(name) { case /* Identifier */0 : return name._0[1].name; case /* NamespacedName */1 : - var match = name._0[1]; + let match = name._0[1]; return match.namespace[1].name + (":" + match.name[1].name); case /* MemberExpression */2 : - var match$1 = name._0[1]; - var _object = match$1._object; - var _object$1; + let match$1 = name._0[1]; + let _object = match$1._object; + let _object$1; _object$1 = _object.TAG === /* Identifier */0 ? _object._0[1].name : normalize({ TAG: /* MemberExpression */2, _0: _object._0 @@ -13546,15 +13546,15 @@ function normalize(name) { } function element_without_lt(env, start_loc) { - var openingElement = opening_element_without_lt(env, start_loc); - var match = openingElement[1].selfClosing ? [ + let openingElement = opening_element_without_lt(env, start_loc); + let match = openingElement[1].selfClosing ? [ /* [] */0, undefined ] : (push_lex_mode(env, /* JSX_CHILD */3), children_and_closing(env, /* [] */0)); - var closingElement = match[1]; - var end_loc; + let closingElement = match[1]; + let end_loc; if (closingElement !== undefined) { - var opening_name = normalize(openingElement[1].name); + let opening_name = normalize(openingElement[1].name); if (normalize(closingElement[1].name) !== opening_name) { error$1(env, { TAG: /* ExpectedJSXClosingTag */6, @@ -13577,8 +13577,8 @@ function element_without_lt(env, start_loc) { function statement(env) { while(true) { - var match = Curry._2(Parser_env_Peek.token, undefined, env); - var exit = 0; + let match = Curry._2(Parser_env_Peek.token, undefined, env); + let exit = 0; if (typeof match === "number") { if (match !== 105) { if (match >= 58) { @@ -13586,7 +13586,7 @@ function statement(env) { } else { switch (match) { case /* T_LCURLY */1 : - var match$1 = Curry._1(Parse.block_body, env); + let match$1 = Curry._1(Parse.block_body, env); return [ match$1[0], { @@ -13595,7 +13595,7 @@ function statement(env) { } ]; case /* T_SEMICOLON */7 : - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_SEMICOLON */7); return [ loc, @@ -13607,11 +13607,11 @@ function statement(env) { if (!env.in_function) { error$1(env, /* IllegalReturn */23); } - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RETURN */17); - var argument = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env) ? undefined : Curry._1(Parse.expression, env); - var loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc = loc$1 !== undefined ? loc$1 : ( + let argument = Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env) ? undefined : Curry._1(Parse.expression, env); + let loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc = loc$1 !== undefined ? loc$1 : ( argument !== undefined ? argument[0] : start_loc ); semicolon(env); @@ -13625,17 +13625,17 @@ function statement(env) { } ]; case /* T_SWITCH */18 : - var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_SWITCH */18); token$4(env, /* T_LPAREN */3); - var discriminant = Curry._1(Parse.expression, env); + let discriminant = Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); token$4(env, /* T_LCURLY */1); - var cases = case_list(env, [ + let cases = case_list(env, [ false, /* [] */0 ]); - var end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc$1, end_loc$1), @@ -13649,7 +13649,7 @@ function statement(env) { } ]; case /* T_THROW */20 : - var start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_THROW */20); if (Curry._1(Parser_env_Peek.is_line_terminator, env)) { error_at(env, [ @@ -13657,9 +13657,9 @@ function statement(env) { /* NewlineAfterThrow */11 ]); } - var argument$1 = Curry._1(Parse.expression, env); - var loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$2 = loc$2 !== undefined ? loc$2 : argument$1[0]; + let argument$1 = Curry._1(Parse.expression, env); + let loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$2 = loc$2 !== undefined ? loc$2 : argument$1[0]; semicolon(env); return [ btwn(start_loc$2, end_loc$2), @@ -13671,28 +13671,28 @@ function statement(env) { } ]; case /* T_TRY */21 : - var start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_TRY */21); - var block = Curry._1(Parse.block_body, env); - var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); - var handler; + let block = Curry._1(Parse.block_body, env); + let match$2 = Curry._2(Parser_env_Peek.token, undefined, env); + let handler; if (match$2 === 32) { - var start_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_CATCH */32); token$4(env, /* T_LPAREN */3); - var id = Curry._2(Parse.identifier, /* StrictCatchVariable */26, env); - var param_0 = id[0]; - var param_1 = { + let id = Curry._2(Parse.identifier, /* StrictCatchVariable */26, env); + let param_0 = id[0]; + let param_1 = { TAG: /* Identifier */3, _0: id }; - var param = [ + let param = [ param_0, param_1 ]; token$4(env, /* T_RPAREN */4); - var body = Curry._1(Parse.block_body, env); - var loc$3 = btwn(start_loc$4, body[0]); + let body = Curry._1(Parse.block_body, env); + let loc$3 = btwn(start_loc$4, body[0]); handler = [ loc$3, { @@ -13704,9 +13704,9 @@ function statement(env) { } else { handler = undefined; } - var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); - var finalizer = match$3 === 36 ? (token$4(env, /* T_FINALLY */36), Curry._1(Parse.block_body, env)) : undefined; - var end_loc$3 = finalizer !== undefined ? finalizer[0] : ( + let match$3 = Curry._2(Parser_env_Peek.token, undefined, env); + let finalizer = match$3 === 36 ? (token$4(env, /* T_FINALLY */36), Curry._1(Parse.block_body, env)) : undefined; + let end_loc$3 = finalizer !== undefined ? finalizer[0] : ( handler !== undefined ? handler[0] : (error_at(env, [ block[0], /* NoCatchOrFinally */20 @@ -13727,12 +13727,12 @@ function statement(env) { case /* T_VAR */22 : return var_or_const(env); case /* T_WHILE */23 : - var start_loc$5 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$5 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_WHILE */23); token$4(env, /* T_LPAREN */3); - var test = Curry._1(Parse.expression, env); + let test = Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); - var body$1 = Curry._1(Parse.statement, with_in_loop(true, env)); + let body$1 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$5, body$1[0]), { @@ -13744,13 +13744,13 @@ function statement(env) { } ]; case /* T_WITH */24 : - var start_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_WITH */24); token$4(env, /* T_LPAREN */3); - var _object = Curry._1(Parse.expression, env); + let _object = Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); - var body$2 = Curry._1(Parse.statement, env); - var loc$4 = btwn(start_loc$6, body$2[0]); + let body$2 = Curry._1(Parse.statement, env); + let loc$4 = btwn(start_loc$6, body$2[0]); strict_error_at(env, [ loc$4, /* StrictModeWith */25 @@ -13766,14 +13766,14 @@ function statement(env) { } ]; case /* T_BREAK */30 : - var start_loc$7 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$7 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_BREAK */30); - var label; + let label; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { label = undefined; } else { - var label$1 = Curry._2(Parse.identifier, undefined, env); - var name = label$1[1].name; + let label$1 = Curry._2(Parse.identifier, undefined, env); + let name = label$1[1].name; if (!Curry._2(mem$1, name, env.labels)) { error$1(env, { TAG: /* UnknownLabel */4, @@ -13782,11 +13782,11 @@ function statement(env) { } label = label$1; } - var loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$4 = loc$5 !== undefined ? loc$5 : ( + let loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$4 = loc$5 !== undefined ? loc$5 : ( label !== undefined ? label[0] : start_loc$7 ); - var loc$6 = btwn(start_loc$7, end_loc$4); + let loc$6 = btwn(start_loc$7, end_loc$4); if (label === undefined && !(env.in_loop || env.in_switch)) { error_at(env, [ loc$6, @@ -13804,14 +13804,14 @@ function statement(env) { } ]; case /* T_CONTINUE */33 : - var start_loc$8 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$8 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_CONTINUE */33); - var label$2; + let label$2; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7) || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { label$2 = undefined; } else { - var label$3 = Curry._2(Parse.identifier, undefined, env); - var name$1 = label$3[1].name; + let label$3 = Curry._2(Parse.identifier, undefined, env); + let name$1 = label$3[1].name; if (!Curry._2(mem$1, name$1, env.labels)) { error$1(env, { TAG: /* UnknownLabel */4, @@ -13820,11 +13820,11 @@ function statement(env) { } label$2 = label$3; } - var loc$7 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$5 = loc$7 !== undefined ? loc$7 : ( + let loc$7 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$5 = loc$7 !== undefined ? loc$7 : ( label$2 !== undefined ? label$2[0] : start_loc$8 ); - var loc$8 = btwn(start_loc$8, end_loc$5); + let loc$8 = btwn(start_loc$8, end_loc$5); if (!env.in_loop) { error_at(env, [ loc$8, @@ -13842,16 +13842,16 @@ function statement(env) { } ]; case /* T_DO */35 : - var start_loc$9 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$9 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_DO */35); - var body$3 = Curry._1(Parse.statement, with_in_loop(true, env)); + let body$3 = Curry._1(Parse.statement, with_in_loop(true, env)); token$4(env, /* T_WHILE */23); token$4(env, /* T_LPAREN */3); - var test$1 = Curry._1(Parse.expression, env); - var end_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); + let test$1 = Curry._1(Parse.expression, env); + let end_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RPAREN */4); - var loc$9 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$7 = loc$9 !== undefined ? loc$9 : end_loc$6; + let loc$9 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$7 = loc$9 !== undefined ? loc$9 : end_loc$6; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_SEMICOLON */7)) { semicolon(env); } @@ -13866,12 +13866,12 @@ function statement(env) { } ]; case /* T_FOR */37 : - var start_loc$10 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$10 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_FOR */37); token$4(env, /* T_LPAREN */3); - var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); - var match$5; - var exit$1 = 0; + let match$4 = Curry._2(Parser_env_Peek.token, undefined, env); + let match$5; + let exit$1 = 0; if (typeof match$4 === "number") { if (match$4 >= 22) { if (match$4 >= 27) { @@ -13879,7 +13879,7 @@ function statement(env) { } else { switch (match$4) { case /* T_VAR */22 : - var match$6 = declarations(/* T_VAR */22, /* Var */0, with_no_in(true, env)); + let match$6 = declarations(/* T_VAR */22, /* Var */0, with_no_in(true, env)); match$5 = [ { TAG: /* InitDeclaration */0, @@ -13893,7 +13893,7 @@ function statement(env) { exit$1 = 1; break; case /* T_CONST */25 : - var match$7 = $$const(with_no_in(true, env)); + let match$7 = $$const(with_no_in(true, env)); match$5 = [ { TAG: /* InitDeclaration */0, @@ -13903,7 +13903,7 @@ function statement(env) { ]; break; case /* T_LET */26 : - var match$8 = _let(with_no_in(true, env)); + let match$8 = _let(with_no_in(true, env)); match$5 = [ { TAG: /* InitDeclaration */0, @@ -13927,7 +13927,7 @@ function statement(env) { exit$1 = 1; } if (exit$1 === 1) { - var expr = Curry._1(Parse.expression, with_no_let(true, with_no_in(true, env))); + let expr = Curry._1(Parse.expression, with_no_let(true, with_no_in(true, env))); match$5 = [ { TAG: /* InitExpression */1, @@ -13936,13 +13936,13 @@ function statement(env) { /* [] */0 ]; } - var init = match$5[0]; - var match$9 = Curry._2(Parser_env_Peek.token, undefined, env); + let init = match$5[0]; + let match$9 = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match$9 === "number") { if (match$9 !== 15) { if (match$9 === 60) { assert_can_be_forin_or_forof(env, /* InvalidLHSInForOf */17)(init); - var left; + let left; if (init !== undefined) { left = init.TAG === /* InitDeclaration */0 ? ({ TAG: /* LeftDeclaration */0, @@ -13962,9 +13962,9 @@ function statement(env) { }); } token$4(env, /* T_OF */60); - var right = Curry._1(Parse.assignment, env); + let right = Curry._1(Parse.assignment, env); token$4(env, /* T_RPAREN */4); - var body$4 = Curry._1(Parse.statement, with_in_loop(true, env)); + let body$4 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$4[0]), { @@ -13980,7 +13980,7 @@ function statement(env) { } else { assert_can_be_forin_or_forof(env, /* InvalidLHSInForIn */16)(init); - var left$1; + let left$1; if (init !== undefined) { left$1 = init.TAG === /* InitDeclaration */0 ? ({ TAG: /* LeftDeclaration */0, @@ -14000,9 +14000,9 @@ function statement(env) { }); } token$4(env, /* T_IN */15); - var right$1 = Curry._1(Parse.expression, env); + let right$1 = Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); - var body$5 = Curry._1(Parse.statement, with_in_loop(true, env)); + let body$5 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$5[0]), { @@ -14021,13 +14021,13 @@ function statement(env) { return error_at(env, param); }), match$5[1]); token$4(env, /* T_SEMICOLON */7); - var match$10 = Curry._2(Parser_env_Peek.token, undefined, env); - var test$2 = match$10 === 7 ? undefined : Curry._1(Parse.expression, env); + let match$10 = Curry._2(Parser_env_Peek.token, undefined, env); + let test$2 = match$10 === 7 ? undefined : Curry._1(Parse.expression, env); token$4(env, /* T_SEMICOLON */7); - var match$11 = Curry._2(Parser_env_Peek.token, undefined, env); - var update = match$11 === 4 ? undefined : Curry._1(Parse.expression, env); + let match$11 = Curry._2(Parser_env_Peek.token, undefined, env); + let update = match$11 === 4 ? undefined : Curry._1(Parse.expression, env); token$4(env, /* T_RPAREN */4); - var body$6 = Curry._1(Parse.statement, with_in_loop(true, env)); + let body$6 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$6[0]), { @@ -14086,10 +14086,10 @@ function statement(env) { exit = 2; break; case /* T_DEBUGGER */57 : - var start_loc$11 = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc$11 = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_DEBUGGER */57); - var loc$10 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$8 = loc$10 !== undefined ? loc$10 : start_loc$11; + let loc$10 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$8 = loc$10 !== undefined ? loc$10 : start_loc$11; semicolon(env); return [ btwn(start_loc$11, end_loc$8), @@ -14110,14 +14110,14 @@ function statement(env) { } if (exit === 2) { if (Curry._2(Parser_env_Peek.is_identifier, undefined, env)) { - var expr$1 = Curry._1(Parse.expression, env); - var match$12 = Curry._2(Parser_env_Peek.token, undefined, env); - var label$4 = expr$1[1]; + let expr$1 = Curry._1(Parse.expression, env); + let match$12 = Curry._2(Parser_env_Peek.token, undefined, env); + let label$4 = expr$1[1]; if (typeof label$4 !== "number" && label$4.TAG === /* Identifier */18 && match$12 === 77) { - var label$5 = label$4._0; - var loc$11 = expr$1[0]; - var match$13 = label$5[1]; - var name$2 = match$13.name; + let label$5 = label$4._0; + let loc$11 = expr$1[0]; + let match$13 = label$5[1]; + let name$2 = match$13.name; token$4(env, /* T_COLON */77); if (Curry._2(mem$1, name$2, env.labels)) { error_at(env, [ @@ -14129,8 +14129,8 @@ function statement(env) { } ]); } - var env$1 = add_label(env, name$2); - var labeled_stmt = Curry._1(Parse.statement, env$1); + let env$1 = add_label(env, name$2); + let labeled_stmt = Curry._1(Parse.statement, env$1); return [ btwn(loc$11, labeled_stmt[0]), { @@ -14142,8 +14142,8 @@ function statement(env) { } ]; } - var loc$12 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$9 = loc$12 !== undefined ? loc$12 : expr$1[0]; + let loc$12 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$9 = loc$12 !== undefined ? loc$12 : expr$1[0]; semicolon(env); return [ btwn(expr$1[0], end_loc$9), @@ -14227,18 +14227,18 @@ function statement(env) { } function module_item(env) { - var decorators = decorator_list(env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let decorators = decorator_list(env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match !== "number") { return statement_list_item(decorators, env); } switch (match) { case /* T_EXPORT */47 : - var env$1 = with_in_export(true, with_strict(true, env)); - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let env$1 = with_in_export(true, with_strict(true, env)); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_EXPORT */47); - var match$1 = Curry._2(Parser_env_Peek.token, undefined, env$1); - var exit = 0; + let match$1 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let exit = 0; if (typeof match$1 === "number") { if (match$1 >= 51) { if (match$1 !== 97) { @@ -14250,8 +14250,8 @@ function module_item(env) { if (!env$1.parse_options.types) { error$1(env$1, /* UnexpectedTypeExport */9); } - var $$interface$1 = $$interface(env$1); - var match$2 = $$interface$1[1]; + let $$interface$1 = $$interface(env$1); + let match$2 = $$interface$1[1]; if (typeof match$2 === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -14269,7 +14269,7 @@ function module_item(env) { _1: "Internal Flow Error! Parsed `export interface` into something other than an interface declaration!" }); } - var end_loc = $$interface$1[0]; + let end_loc = $$interface$1[0]; return [ btwn(start_loc, end_loc), { @@ -14291,8 +14291,8 @@ function module_item(env) { if (!env$1.parse_options.types) { error$1(env$1, /* UnexpectedTypeExport */9); } - var type_alias$1 = type_alias(env$1); - var match$3 = type_alias$1[1]; + let type_alias$1 = type_alias(env$1); + let match$3 = type_alias$1[1]; if (typeof match$3 === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -14310,7 +14310,7 @@ function module_item(env) { _1: "Internal Flow Error! Parsed `export type` into something other than a type alias!" }); } - var end_loc$1 = type_alias$1[0]; + let end_loc$1 = type_alias$1[0]; return [ btwn(start_loc, end_loc$1), { @@ -14347,19 +14347,19 @@ function module_item(env) { } } } else { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_MULT */97); - var parse_export_star_as = env$1.parse_options.esproposal_export_star_as; - var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error$1(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; - var specifiers = { + let parse_export_star_as = env$1.parse_options.esproposal_export_star_as; + let local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error$1(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; + let specifiers = { TAG: /* ExportBatchSpecifier */1, _0: loc, _1: local_name }; - var source$1 = export_source(env$1); - var loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc$2 = loc$1 !== undefined ? loc$1 : source$1[0]; - var source$2 = source$1; + let source$1 = export_source(env$1); + let loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc$2 = loc$1 !== undefined ? loc$1 : source$1[0]; + let source$2 = source$1; semicolon(env$1); return [ btwn(start_loc, end_loc$2), @@ -14383,10 +14383,10 @@ function module_item(env) { btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env$1)), "default" ]); - var match$4 = Curry._2(Parser_env_Peek.token, undefined, env$1); - var match$5; + let match$4 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let match$5; if (match$4 === 13) { - var fn = _function(env$1); + let fn = _function(env$1); match$5 = [ fn[0], { @@ -14395,7 +14395,7 @@ function module_item(env) { } ]; } else if (Curry._2(Parser_env_Peek.is_class, undefined, env$1)) { - var _class = class_declaration(env$1, decorators); + let _class = class_declaration(env$1, decorators); match$5 = [ _class[0], { @@ -14404,9 +14404,9 @@ function module_item(env) { } ]; } else { - var expr = Curry._1(Parse.assignment, env$1); - var loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc$3 = loc$2 !== undefined ? loc$2 : expr[0]; + let expr = Curry._1(Parse.assignment, env$1); + let loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc$3 = loc$2 !== undefined ? loc$2 : expr[0]; semicolon(env$1); match$5 = [ end_loc$3, @@ -14468,21 +14468,21 @@ function module_item(env) { } switch (exit) { case 1 : - var match$6 = Curry._2(Parser_env_Peek.token, undefined, env$1); - var exportKind = match$6 === 59 ? (token$3(env$1), /* ExportType */0) : /* ExportValue */1; + let match$6 = Curry._2(Parser_env_Peek.token, undefined, env$1); + let exportKind = match$6 === 59 ? (token$3(env$1), /* ExportType */0) : /* ExportValue */1; token$4(env$1, /* T_LCURLY */1); - var match$7 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); - var specifiers$1 = { + let match$7 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); + let specifiers$1 = { TAG: /* ExportSpecifiers */0, _0: match$7[0] }; - var end_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env$1); + let end_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_RCURLY */2); - var source$3 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (Stdlib__List.iter((function (param) { + let source$3 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (Stdlib__List.iter((function (param) { return error_at(env$1, param); }), match$7[1]), undefined); - var loc$3 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); - var end_loc$5 = loc$3 !== undefined ? loc$3 : ( + let loc$3 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); + let end_loc$5 = loc$3 !== undefined ? loc$3 : ( source$3 !== undefined ? source$3[0] : end_loc$4 ); semicolon(env$1); @@ -14500,10 +14500,10 @@ function module_item(env) { } ]; case 2 : - var stmt = Curry._2(Parse.statement_list_item, decorators, env$1); - var match$8 = stmt[1]; - var loc$4 = stmt[0]; - var names; + let stmt = Curry._2(Parse.statement_list_item, decorators, env$1); + let match$8 = stmt[1]; + let loc$4 = stmt[0]; + let names; if (typeof match$8 === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -14512,7 +14512,7 @@ function module_item(env) { } switch (match$8.TAG | 0) { case /* FunctionDeclaration */18 : - var id = match$8._0.id; + let id = match$8._0.id; if (id !== undefined) { names = { hd: [ @@ -14531,8 +14531,8 @@ function module_item(env) { break; case /* VariableDeclaration */19 : names = Stdlib__List.fold_left((function (names, param) { - var id = param[1].id; - var param$1 = { + let id = param[1].id; + let param$1 = { hd: id, tl: /* [] */0 }; @@ -14540,7 +14540,7 @@ function module_item(env) { }), /* [] */0, match$8._0.declarations); break; case /* ClassDeclaration */20 : - var id$1 = match$8._0.id; + let id$1 = match$8._0.id; if (id$1 !== undefined) { names = { hd: [ @@ -14566,7 +14566,7 @@ function module_item(env) { Stdlib__List.iter((function (param) { return record_export(env$1, param); }), names); - var declaration = { + let declaration = { TAG: /* Declaration */0, _0: stmt }; @@ -14587,11 +14587,11 @@ function module_item(env) { } case /* T_IMPORT */48 : error_on_decorators(env)(decorators); - var env$2 = with_strict(true, env); - var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env$2); + let env$2 = with_strict(true, env); + let start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env$2); token$4(env$2, /* T_IMPORT */48); - var match$9 = Curry._2(Parser_env_Peek.token, undefined, env$2); - var match$10 = typeof match$9 === "number" ? ( + let match$9 = Curry._2(Parser_env_Peek.token, undefined, env$2); + let match$10 = typeof match$9 === "number" ? ( match$9 !== 44 ? ( match$9 !== 59 ? [ /* ImportValue */2, @@ -14608,12 +14608,12 @@ function module_item(env) { /* ImportValue */2, undefined ]; - var type_ident = match$10[1]; - var importKind = match$10[0]; - var match$11 = Curry._2(Parser_env_Peek.token, undefined, env$2); - var match$12 = Curry._2(Parser_env_Peek.is_identifier, undefined, env$2); - var exit$1 = 0; - var exit$2 = 0; + let type_ident = match$10[1]; + let importKind = match$10[0]; + let match$11 = Curry._2(Parser_env_Peek.token, undefined, env$2); + let match$12 = Curry._2(Parser_env_Peek.is_identifier, undefined, env$2); + let exit$1 = 0; + let exit$2 = 0; if (typeof match$11 === "number") { if (match$11 === /* T_COMMA */8) { exit$1 = 1; @@ -14622,11 +14622,11 @@ function module_item(env) { } } else if (match$11.TAG === /* T_STRING */1) { if (importKind === /* ImportValue */2) { - var match$13 = match$11._0; - var octal = match$13[3]; - var raw = match$13[2]; - var value = match$13[1]; - var str_loc = match$13[0]; + let match$13 = match$11._0; + let octal = match$13[3]; + let raw = match$13[2]; + let value = match$13[1]; + let str_loc = match$13[0]; if (octal) { strict_error(env$2, /* StrictOctalLiteral */31); } @@ -14639,20 +14639,20 @@ function module_item(env) { octal ] }); - var value$1 = { + let value$1 = { TAG: /* String */0, _0: value }; - var source_1 = { + let source_1 = { value: value$1, raw: raw }; - var source$4 = [ + let source$4 = [ str_loc, source_1 ]; - var loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); - var end_loc$6 = loc$5 !== undefined ? loc$5 : str_loc; + let loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); + let end_loc$6 = loc$5 !== undefined ? loc$5 : str_loc; semicolon(env$2); return [ btwn(start_loc$1, end_loc$6), @@ -14674,10 +14674,10 @@ function module_item(env) { if (match$12) { exit$1 = 1; } else { - var specifiers$2 = named_or_namespace_specifier(env$2); - var source$5 = source(env$2); - var loc$6 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); - var end_loc$7 = loc$6 !== undefined ? loc$6 : source$5[0]; + let specifiers$2 = named_or_namespace_specifier(env$2); + let source$5 = source(env$2); + let loc$6 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); + let end_loc$7 = loc$6 !== undefined ? loc$6 : source$5[0]; semicolon(env$2); return [ btwn(start_loc$1, end_loc$7), @@ -14693,10 +14693,10 @@ function module_item(env) { } } if (exit$1 === 1) { - var match$14 = Curry._2(Parser_env_Peek.token, undefined, env$2); - var match$15 = Curry._2(Parser_env_Peek.value, undefined, env$2); - var match$16; - var exit$3 = 0; + let match$14 = Curry._2(Parser_env_Peek.token, undefined, env$2); + let match$15 = Curry._2(Parser_env_Peek.value, undefined, env$2); + let match$16; + let exit$3 = 0; if (type_ident !== undefined && typeof match$14 === "number" && !(match$14 !== 8 && (match$14 || match$15 !== "from"))) { match$16 = [ /* ImportValue */2, @@ -14717,11 +14717,11 @@ function module_item(env) { } ]; } - var match$17 = Curry._2(Parser_env_Peek.token, undefined, env$2); - var additional_specifiers = match$17 === 8 ? (token$4(env$2, /* T_COMMA */8), named_or_namespace_specifier(env$2)) : /* [] */0; - var source$6 = source(env$2); - var loc$7 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); - var end_loc$8 = loc$7 !== undefined ? loc$7 : source$6[0]; + let match$17 = Curry._2(Parser_env_Peek.token, undefined, env$2); + let additional_specifiers = match$17 === 8 ? (token$4(env$2, /* T_COMMA */8), named_or_namespace_specifier(env$2)) : /* [] */0; + let source$6 = source(env$2); + let loc$7 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$2); + let end_loc$8 = loc$7 !== undefined ? loc$7 : source$6[0]; semicolon(env$2); return [ btwn(start_loc$1, end_loc$8), @@ -14761,32 +14761,32 @@ function module_item(env) { } function statement_list_item(decoratorsOpt, env) { - var decorators = decoratorsOpt !== undefined ? decoratorsOpt : /* [] */0; + let decorators = decoratorsOpt !== undefined ? decoratorsOpt : /* [] */0; if (!Curry._2(Parser_env_Peek.is_class, undefined, env)) { error_on_decorators(env)(decorators); } - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (typeof match === "number") { if (match === 25) { return var_or_const(env); } if (match === 26) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LET */26); if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_LPAREN */3)) { token$4(env, /* T_LPAREN */3); - var match$1 = helper(with_no_let(true, env), /* [] */0, /* [] */0); - var head = Stdlib__List.map((function (param) { - var match = param[1]; + let match$1 = helper(with_no_let(true, env), /* [] */0, /* [] */0); + let head = Stdlib__List.map((function (param) { + let match = param[1]; return { id: match.id, init: match.init }; }), match$1[1]); token$4(env, /* T_RPAREN */4); - var body = Curry._1(Parse.statement, env); - var end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$1 = end_loc !== undefined ? end_loc : match$1[0]; + let body = Curry._1(Parse.statement, env); + let end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$1 = end_loc !== undefined ? end_loc : match$1[0]; semicolon(env); Stdlib__List.iter((function (param) { return error_at(env, param); @@ -14802,16 +14802,16 @@ function statement_list_item(decoratorsOpt, env) { } ]; } - var match$2 = helper(with_no_let(true, env), /* [] */0, /* [] */0); - var declaration = { + let match$2 = helper(with_no_let(true, env), /* [] */0, /* [] */0); + let declaration = { TAG: /* VariableDeclaration */19, _0: { declarations: match$2[1], kind: /* Let */1 } }; - var end_loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); - var end_loc$3 = end_loc$2 !== undefined ? end_loc$2 : match$2[0]; + let end_loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); + let end_loc$3 = end_loc$2 !== undefined ? end_loc$2 : match$2[0]; semicolon(env); Stdlib__List.iter((function (param) { return error_at(env, param); @@ -14851,13 +14851,13 @@ function statement_list_item(decoratorsOpt, env) { } } -var class_declaration$1 = class_declaration; +let class_declaration$1 = class_declaration; function module_body(term_fn, env) { - var _acc = /* [] */0; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var t = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let t = Curry._2(Parser_env_Peek.token, undefined, env); if (t === 105) { return Stdlib__List.rev(acc); } @@ -14874,11 +14874,11 @@ function module_body(term_fn, env) { function statement_list(_env, term_fn, item_fn, _param) { while(true) { - var param = _param; - var env = _env; - var stmts = param[1]; - var string_tokens = param[0]; - var t = Curry._2(Parser_env_Peek.token, undefined, env); + let param = _param; + let env = _env; + let stmts = param[1]; + let string_tokens = param[0]; + let t = Curry._2(Parser_env_Peek.token, undefined, env); if (t === 105) { return [ env, @@ -14893,18 +14893,18 @@ function statement_list(_env, term_fn, item_fn, _param) { stmts ]; } - var string_token_0 = Curry._2(Parser_env_Peek.loc, undefined, env); - var string_token_1 = Curry._2(Parser_env_Peek.token, undefined, env); - var string_token = [ + let string_token_0 = Curry._2(Parser_env_Peek.loc, undefined, env); + let string_token_1 = Curry._2(Parser_env_Peek.token, undefined, env); + let string_token = [ string_token_0, string_token_1 ]; - var possible_directive = Curry._1(item_fn, env); - var stmts$1 = { + let possible_directive = Curry._1(item_fn, env); + let stmts$1 = { hd: possible_directive, tl: stmts }; - var match = possible_directive[1]; + let match = possible_directive[1]; if (typeof match === "number") { return [ env, @@ -14919,8 +14919,8 @@ function statement_list(_env, term_fn, item_fn, _param) { stmts$1 ]; } - var match$1 = match._0.expression; - var match$2 = match$1[1]; + let match$1 = match._0.expression; + let match$2 = match$1[1]; if (typeof match$2 === "number") { return [ env, @@ -14935,7 +14935,7 @@ function statement_list(_env, term_fn, item_fn, _param) { stmts$1 ]; } - var str = match$2._0.value; + let str = match$2._0.value; if (typeof str === "number") { return [ env, @@ -14950,10 +14950,10 @@ function statement_list(_env, term_fn, item_fn, _param) { stmts$1 ]; } - var loc = match$1[0]; - var len = loc._end.column - loc.start.column | 0; - var strict = env.in_strict_mode || str._0 === "use strict" && len === 12; - var string_tokens$1 = { + let loc = match$1[0]; + let len = loc._end.column - loc.start.column | 0; + let strict = env.in_strict_mode || str._0 === "use strict" && len === 12; + let string_tokens$1 = { hd: string_token, tl: string_tokens }; @@ -14967,13 +14967,13 @@ function statement_list(_env, term_fn, item_fn, _param) { } function directives(env, term_fn, item_fn) { - var match = statement_list(env, term_fn, item_fn, [ + let match = statement_list(env, term_fn, item_fn, [ /* [] */0, /* [] */0 ]); - var env$1 = match[0]; + let env$1 = match[0]; Stdlib__List.iter((function (param) { - var token = param[1]; + let token = param[1]; if (typeof token !== "number" && token.TAG === /* T_STRING */1) { if (token._0[3]) { return strict_error_at(env$1, [ @@ -14984,7 +14984,7 @@ function directives(env, term_fn, item_fn) { return ; } } - var s = "Nooo: " + (token_to_string(token) + "\n"); + let s = "Nooo: " + (token_to_string(token) + "\n"); throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: s @@ -14997,10 +14997,10 @@ function directives(env, term_fn, item_fn) { } function statement_list$1(term_fn, env) { - var _acc = /* [] */0; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var t = Curry._2(Parser_env_Peek.token, undefined, env); + let acc = _acc; + let t = Curry._2(Parser_env_Peek.token, undefined, env); if (t === 105) { return Stdlib__List.rev(acc); } @@ -15016,12 +15016,12 @@ function statement_list$1(term_fn, env) { } function statement_list_with_directives(term_fn, env) { - var match = Curry._3(directives, env, term_fn, (function (eta) { + let match = Curry._3(directives, env, term_fn, (function (eta) { return statement_list_item(undefined, eta); })); - var env$1 = match[0]; - var stmts = Curry._2(statement_list$1, term_fn, env$1); - var stmts$1 = Stdlib__List.fold_left((function (acc, stmt) { + let env$1 = match[0]; + let stmts = Curry._2(statement_list$1, term_fn, env$1); + let stmts$1 = Stdlib__List.fold_left((function (acc, stmt) { return { hd: stmt, tl: acc @@ -15034,8 +15034,8 @@ function statement_list_with_directives(term_fn, env) { } function module_body_with_directives(env, term_fn) { - var match = Curry._3(directives, env, term_fn, module_item); - var stmts = Curry._2(module_body, term_fn, match[0]); + let match = Curry._3(directives, env, term_fn, module_item); + let stmts = Curry._2(module_body, term_fn, match[0]); return Stdlib__List.fold_left((function (acc, stmt) { return { hd: stmt, @@ -15045,9 +15045,9 @@ function module_body_with_directives(env, term_fn) { } function identifier$2(restricted_error, env) { - var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var name = Curry._2(Parser_env_Peek.value, undefined, env); - var t = Curry._2(Parser_env_Peek.token, undefined, env); + let loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let name = Curry._2(Parser_env_Peek.value, undefined, env); + let t = Curry._2(Parser_env_Peek.token, undefined, env); if (t === 26) { if (env.in_strict_mode) { strict_error(env, /* StrictReservedWord */39); @@ -15083,13 +15083,13 @@ function identifier$2(restricted_error, env) { } function program(env) { - var stmts = module_body_with_directives(env, (function (param) { + let stmts = module_body_with_directives(env, (function (param) { return false; })); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_EOF */105); - var loc = stmts ? btwn(Stdlib__List.hd(stmts)[0], Stdlib__List.hd(Stdlib__List.rev(stmts))[0]) : end_loc; - var comments = Stdlib__List.rev(env.comments.contents); + let loc = stmts ? btwn(Stdlib__List.hd(stmts)[0], Stdlib__List.hd(Stdlib__List.rev(stmts))[0]) : end_loc; + let comments = Stdlib__List.rev(env.comments.contents); return [ loc, stmts, @@ -15098,8 +15098,8 @@ function program(env) { } function expression$1(env) { - var expr = Curry._1(assignment, env); - var match = Curry._2(Parser_env_Peek.token, undefined, env); + let expr = Curry._1(assignment, env); + let match = Curry._2(Parser_env_Peek.token, undefined, env); if (match === 8) { return sequence(env, { hd: expr, @@ -15111,15 +15111,15 @@ function expression$1(env) { } function identifier_with_type(env, restricted_error) { - var match = identifier$2(restricted_error, env); - var id = match[1]; - var loc = match[0]; - var match$1; + let match = identifier$2(restricted_error, env); + let id = match[1]; + let loc = match[0]; + let match$1; if (Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_PLING */76)) { if (!env.parse_options.types) { error$1(env, /* UnexpectedTypeAnnotation */6); } - var loc$1 = btwn(loc, Curry._2(Parser_env_Peek.loc, undefined, env)); + let loc$1 = btwn(loc, Curry._2(Parser_env_Peek.loc, undefined, env)); token$4(env, /* T_PLING */76); match$1 = [ loc$1, @@ -15135,17 +15135,17 @@ function identifier_with_type(env, restricted_error) { id ]; } - var id$1 = match$1[1]; - var loc$2 = match$1[0]; + let id$1 = match$1[1]; + let loc$2 = match$1[0]; if (!Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_COLON */77)) { return [ loc$2, id$1 ]; } - var typeAnnotation = wrap(annotation, env); - var loc$3 = btwn(loc$2, typeAnnotation[0]); - var typeAnnotation$1 = typeAnnotation; + let typeAnnotation = wrap(annotation, env); + let loc$3 = btwn(loc$2, typeAnnotation[0]); + let typeAnnotation$1 = typeAnnotation; return [ loc$3, { @@ -15157,13 +15157,13 @@ function identifier_with_type(env, restricted_error) { } function block_body(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var term_fn = function (t) { + let term_fn = function (t) { return Caml_obj.caml_equal(t, /* T_RCURLY */2); }; - var body = Curry._2(statement_list$1, term_fn, env); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let body = Curry._2(statement_list$1, term_fn, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc, end_loc), @@ -15174,13 +15174,13 @@ function block_body(env) { } function function_block_body(env) { - var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_LCURLY */1); - var term_fn = function (t) { + let term_fn = function (t) { return Caml_obj.caml_equal(t, /* T_RCURLY */2); }; - var match = statement_list_with_directives(term_fn, env); - var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let match = statement_list_with_directives(term_fn, env); + let end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RCURLY */2); return [ btwn(start_loc, end_loc), @@ -15192,7 +15192,7 @@ function function_block_body(env) { } function predicate(env) { - var checks_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let checks_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!(Caml_obj.caml_equal(Curry._2(Parser_env_Peek.token, undefined, env), /* T_IDENTIFIER */0) && Curry._2(Parser_env_Peek.value, undefined, env) === "checks")) { return ; } @@ -15203,10 +15203,10 @@ function predicate(env) { /* Inferred */0 ]; } - var exp = Curry._1(Parse.expression, env); - var rparen_loc = Curry._2(Parser_env_Peek.loc, undefined, env); + let exp = Curry._1(Parse.expression, env); + let rparen_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_RPAREN */4); - var loc = btwn(checks_loc, rparen_loc); + let loc = btwn(checks_loc, rparen_loc); return [ loc, /* Declared */{ @@ -15338,18 +15338,18 @@ Caml_module.update_mod({ }); function program$1(failOpt, token_sinkOpt, parse_optionsOpt, content) { - var fail = failOpt !== undefined ? failOpt : true; - var token_sink = token_sinkOpt !== undefined ? Caml_option.valFromOption(token_sinkOpt) : undefined; - var parse_options = parse_optionsOpt !== undefined ? Caml_option.valFromOption(parse_optionsOpt) : undefined; - var token_sinkOpt$1 = Caml_option.some(token_sink); - var parse_optionsOpt$1 = Caml_option.some(parse_options); - var filename; - var token_sink$1 = token_sinkOpt$1 !== undefined ? Caml_option.valFromOption(token_sinkOpt$1) : undefined; - var parse_options$1 = parse_optionsOpt$1 !== undefined ? Caml_option.valFromOption(parse_optionsOpt$1) : undefined; - var env = init_env(Caml_option.some(token_sink$1), Caml_option.some(parse_options$1), filename, content); - var parser = Parse.program; - var ast = Curry._1(parser, env); - var error_list = filter_duplicate_errors(env.errors.contents); + let fail = failOpt !== undefined ? failOpt : true; + let token_sink = token_sinkOpt !== undefined ? Caml_option.valFromOption(token_sinkOpt) : undefined; + let parse_options = parse_optionsOpt !== undefined ? Caml_option.valFromOption(parse_optionsOpt) : undefined; + let token_sinkOpt$1 = Caml_option.some(token_sink); + let parse_optionsOpt$1 = Caml_option.some(parse_options); + let filename; + let token_sink$1 = token_sinkOpt$1 !== undefined ? Caml_option.valFromOption(token_sinkOpt$1) : undefined; + let parse_options$1 = parse_optionsOpt$1 !== undefined ? Caml_option.valFromOption(parse_optionsOpt$1) : undefined; + let env = init_env(Caml_option.some(token_sink$1), Caml_option.some(parse_options$1), filename, content); + let parser = Parse.program; + let ast = Curry._1(parser, env); + let error_list = filter_duplicate_errors(env.errors.contents); if (fail && Caml_obj.caml_notequal(error_list, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error, { MEL_EXN_ID: $$Error, @@ -15362,26 +15362,26 @@ function program$1(failOpt, token_sinkOpt, parse_optionsOpt, content) { ]; } -var translation_errors = { +let translation_errors = { contents: /* [] */0 }; -var string = (function (x) {return x;} +let string = (function (x) {return x;} ); -var bool = (function (x) {x ? 1 : 0;} +let bool = (function (x) {x ? 1 : 0;} ); -var obj = (function(arr) {var ret = {}; arr.forEach(function(a) {ret[a[0]]=a[1];}); return ret} +let obj = (function(arr) {var ret = {}; arr.forEach(function(a) {ret[a[0]]=a[1];}); return ret} ); -var array = (function (x) {return x;} +let array = (function (x) {return x;} ); -var number$1 = (function (x) {return x;} +let number$1 = (function (x) {return x;} ); -var $$null = null; +let $$null = null; function regexp$1(loc, pattern, flags) { try { @@ -15401,19 +15401,19 @@ function regexp$1(loc, pattern, flags) { function parse(content, options) { try { - var match = program$1(false, undefined, Caml_option.some(undefined), content); + let match = program$1(false, undefined, Caml_option.some(undefined), content); translation_errors.contents = /* [] */0; - var array_of_list = function (fn, list) { + let array_of_list = function (fn, list) { return array(Stdlib__Array.of_list(Stdlib__List.map(fn, list))); }; - var option = function (f, param) { + let option = function (f, param) { if (param !== undefined) { return Curry._1(f, Caml_option.valFromOption(param)); } else { return $$null; } }; - var position = function (p) { + let position = function (p) { return obj([ [ "line", @@ -15425,9 +15425,9 @@ function parse(content, options) { ] ]); }; - var loc = function ($$location) { - var match = $$location.source; - var source = match !== undefined ? ( + let loc = function ($$location) { + let match = $$location.source; + let source = match !== undefined ? ( typeof match === "number" ? string("(global)") : string(match._0) ) : $$null; return obj([ @@ -15445,13 +15445,13 @@ function parse(content, options) { ] ]); }; - var range = function ($$location) { + let range = function ($$location) { return array([ number$1($$location.start.offset), number$1($$location._end.offset) ]); }; - var node = function (_type, $$location, props) { + let node = function (_type, $$location, props) { return obj(Stdlib__Array.append([ [ "type", @@ -15467,8 +15467,8 @@ function parse(content, options) { ] ], props)); }; - var errors = function (l) { - var error$2 = function (param) { + let errors = function (l) { + let error$2 = function (param) { return obj([ [ "loc", @@ -15482,8 +15482,8 @@ function parse(content, options) { }; return array_of_list(error$2, l); }; - var identifier = function (param) { - var id = param[1]; + let identifier = function (param) { + let id = param[1]; return node("Identifier", param[0], [ [ "name", @@ -15499,12 +15499,12 @@ function parse(content, options) { ] ]); }; - var class_element = function (param) { + let class_element = function (param) { if (param.TAG === /* Method */0) { - var param$1 = param._0; - var method_ = param$1[1]; - var key = method_.key; - var match; + let param$1 = param._0; + let method_ = param$1[1]; + let key = method_.key; + let match; switch (key.TAG | 0) { case /* Literal */0 : match = [ @@ -15526,7 +15526,7 @@ function parse(content, options) { break; } - var kind; + let kind; switch (method_.kind) { case /* Constructor */0 : kind = "constructor"; @@ -15569,10 +15569,10 @@ function parse(content, options) { ] ]); } else { - var param$2 = param._0; - var prop = param$2[1]; - var lit = prop.key; - var match$1; + let param$2 = param._0; + let prop = param$2[1]; + let lit = prop.key; + let match$1; switch (lit.TAG | 0) { case /* Literal */0 : match$1 = [ @@ -15618,9 +15618,9 @@ function parse(content, options) { ]); } }; - var expression = function (param) { - var arr = param[1]; - var loc = param[0]; + let expression = function (param) { + let arr = param[1]; + let loc = param[0]; if (typeof arr === "number") { return node("ThisExpression", loc, []); } @@ -15643,9 +15643,9 @@ function parse(content, options) { arr._0 ]); case /* ArrowFunction */3 : - var arrow = arr._0; - var b = arrow.body; - var body; + let arrow = arr._0; + let b = arrow.body; + let body; body = b.TAG === /* BodyBlock */0 ? block(b._0) : expression(b._0); return node("ArrowFunctionExpression", loc, [ [ @@ -15697,16 +15697,16 @@ function parse(content, options) { array_of_list(expression, arr._0.expressions) ]]); case /* Unary */5 : - var unary = arr._0; - var match = unary.operator; + let unary = arr._0; + let match = unary.operator; if (match >= 7) { return node("AwaitExpression", loc, [[ "argument", expression(unary.argument) ]]); } - var match$1 = unary.operator; - var operator; + let match$1 = unary.operator; + let operator; switch (match$1) { case /* Minus */0 : operator = "-"; @@ -15751,9 +15751,9 @@ function parse(content, options) { ] ]); case /* Binary */6 : - var binary = arr._0; - var match$2 = binary.operator; - var operator$1; + let binary = arr._0; + let match$2 = binary.operator; + let operator$1; switch (match$2) { case /* Equal */0 : operator$1 = "=="; @@ -15838,9 +15838,9 @@ function parse(content, options) { ] ]); case /* Assignment */7 : - var assignment = arr._0; - var match$3 = assignment.operator; - var operator$2; + let assignment = arr._0; + let match$3 = assignment.operator; + let operator$2; switch (match$3) { case /* Assign */0 : operator$2 = "="; @@ -15898,9 +15898,9 @@ function parse(content, options) { ] ]); case /* Update */8 : - var update = arr._0; - var match$4 = update.operator; - var operator$3 = match$4 ? "--" : "++"; + let update = arr._0; + let match$4 = update.operator; + let operator$3 = match$4 ? "--" : "++"; return node("UpdateExpression", loc, [ [ "operator", @@ -15916,9 +15916,9 @@ function parse(content, options) { ] ]); case /* Logical */9 : - var logical = arr._0; - var match$5 = logical.operator; - var operator$4 = match$5 ? "&&" : "||"; + let logical = arr._0; + let match$5 = logical.operator; + let operator$4 = match$5 ? "&&" : "||"; return node("LogicalExpression", loc, [ [ "operator", @@ -15934,7 +15934,7 @@ function parse(content, options) { ] ]); case /* Conditional */10 : - var conditional = arr._0; + let conditional = arr._0; return node("ConditionalExpression", loc, [ [ "test", @@ -15950,7 +15950,7 @@ function parse(content, options) { ] ]); case /* New */11 : - var _new = arr._0; + let _new = arr._0; return node("NewExpression", loc, [ [ "callee", @@ -15962,7 +15962,7 @@ function parse(content, options) { ] ]); case /* Call */12 : - var call = arr._0; + let call = arr._0; return node("CallExpression", loc, [ [ "callee", @@ -15974,9 +15974,9 @@ function parse(content, options) { ] ]); case /* Member */13 : - var member = arr._0; - var id = member.property; - var property; + let member = arr._0; + let id = member.property; + let property; property = id.TAG === /* PropertyIdentifier */0 ? identifier(id._0) : expression(id._0); return node("MemberExpression", loc, [ [ @@ -15993,7 +15993,7 @@ function parse(content, options) { ] ]); case /* Yield */14 : - var $$yield = arr._0; + let $$yield = arr._0; return node("YieldExpression", loc, [ [ "argument", @@ -16005,7 +16005,7 @@ function parse(content, options) { ] ]); case /* Comprehension */15 : - var comp = arr._0; + let comp = arr._0; return node("ComprehensionExpression", loc, [ [ "blocks", @@ -16017,7 +16017,7 @@ function parse(content, options) { ] ]); case /* Generator */16 : - var gen = arr._0; + let gen = arr._0; return node("GeneratorExpression", loc, [ [ "blocks", @@ -16029,7 +16029,7 @@ function parse(content, options) { ] ]); case /* Let */17 : - var _let = arr._0; + let _let = arr._0; return node("LetExpression", loc, [ [ "head", @@ -16053,11 +16053,11 @@ function parse(content, options) { arr._0 ]); case /* TaggedTemplate */21 : - var param$1 = [ + let param$1 = [ loc, arr._0 ]; - var tagged = param$1[1]; + let tagged = param$1[1]; return node("TaggedTemplateExpression", param$1[0], [ [ "tag", @@ -16074,11 +16074,11 @@ function parse(content, options) { arr._0 ]); case /* Class */23 : - var param$2 = [ + let param$2 = [ loc, arr._0 ]; - var c = param$2[1]; + let c = param$2[1]; return node("ClassExpression", param$2[0], [ [ "id", @@ -16110,7 +16110,7 @@ function parse(content, options) { ] ]); case /* TypeCast */24 : - var typecast = arr._0; + let typecast = arr._0; return node("TypeCastExpression", loc, [ [ "expression", @@ -16124,9 +16124,9 @@ function parse(content, options) { } }; - var template_element = function (param) { - var element = param[1]; - var value = obj([ + let template_element = function (param) { + let element = param[1]; + let value = obj([ [ "raw", string(element.value.raw) @@ -16147,9 +16147,9 @@ function parse(content, options) { ] ]); }; - var statement = function (param) { - var b = param[1]; - var loc = param[0]; + let statement = function (param) { + let b = param[1]; + let loc = param[0]; if (typeof b === "number") { if (b === /* Empty */0) { return node("EmptyStatement", loc, []); @@ -16169,7 +16169,7 @@ function parse(content, options) { expression(b._0.expression) ]]); case /* If */2 : - var _if = b._0; + let _if = b._0; return node("IfStatement", loc, [ [ "test", @@ -16185,7 +16185,7 @@ function parse(content, options) { ] ]); case /* Labeled */3 : - var labeled = b._0; + let labeled = b._0; return node("LabeledStatement", loc, [ [ "label", @@ -16207,7 +16207,7 @@ function parse(content, options) { option(identifier, b._0.label) ]]); case /* With */6 : - var _with = b._0; + let _with = b._0; return node("WithStatement", loc, [ [ "object", @@ -16224,7 +16224,7 @@ function parse(content, options) { b._0 ]); case /* Switch */8 : - var $$switch = b._0; + let $$switch = b._0; return node("SwitchStatement", loc, [ [ "discriminant", @@ -16250,7 +16250,7 @@ function parse(content, options) { expression(b._0.argument) ]]); case /* Try */11 : - var _try = b._0; + let _try = b._0; return node("TryStatement", loc, [ [ "block", @@ -16270,7 +16270,7 @@ function parse(content, options) { ] ]); case /* While */12 : - var _while = b._0; + let _while = b._0; return node("WhileStatement", loc, [ [ "test", @@ -16282,7 +16282,7 @@ function parse(content, options) { ] ]); case /* DoWhile */13 : - var dowhile = b._0; + let dowhile = b._0; return node("DoWhileStatement", loc, [ [ "body", @@ -16294,8 +16294,8 @@ function parse(content, options) { ] ]); case /* For */14 : - var _for = b._0; - var init = function (param) { + let _for = b._0; + let init = function (param) { if (param.TAG === /* InitDeclaration */0) { return variable_declaration(param._0); } else { @@ -16321,9 +16321,9 @@ function parse(content, options) { ] ]); case /* ForIn */15 : - var forin = b._0; - var left = forin.left; - var left$1; + let forin = b._0; + let left = forin.left; + let left$1; left$1 = left.TAG === /* LeftDeclaration */0 ? variable_declaration(left._0) : expression(left._0); return node("ForInStatement", loc, [ [ @@ -16344,9 +16344,9 @@ function parse(content, options) { ] ]); case /* ForOf */16 : - var forof = b._0; - var left$2 = forof.left; - var left$3; + let forof = b._0; + let left$2 = forof.left; + let left$3; left$3 = left$2.TAG === /* LeftDeclaration */0 ? variable_declaration(left$2._0) : expression(left$2._0); return node("ForOfStatement", loc, [ [ @@ -16363,7 +16363,7 @@ function parse(content, options) { ] ]); case /* Let */17 : - var _let = b._0; + let _let = b._0; return node("LetStatement", loc, [ [ "head", @@ -16375,17 +16375,17 @@ function parse(content, options) { ] ]); case /* FunctionDeclaration */18 : - var fn = b._0; - var id = fn.id; - var match = id !== undefined ? [ + let fn = b._0; + let id = fn.id; + let match = id !== undefined ? [ "FunctionDeclaration", identifier(id) ] : [ "FunctionExpression", $$null ]; - var b$1 = fn.body; - var body; + let b$1 = fn.body; + let body; body = b$1.TAG === /* BodyBlock */0 ? block(b$1._0) : expression(b$1._0); return node(match[0], loc, [ [ @@ -16437,13 +16437,13 @@ function parse(content, options) { b._0 ]); case /* ClassDeclaration */20 : - var param$1 = [ + let param$1 = [ loc, b._0 ]; - var c = param$1[1]; - var id$1 = c.id; - var match$1 = id$1 !== undefined ? [ + let c = param$1[1]; + let id$1 = c.id; + let match$1 = id$1 !== undefined ? [ "ClassDeclaration", identifier(id$1) ] : [ @@ -16501,12 +16501,12 @@ function parse(content, options) { b._0 ]); case /* DeclareModule */25 : - var m = b._0; - var lit = m.id; - var id$2; + let m = b._0; + let lit = m.id; + let id$2; id$2 = lit.TAG === /* Identifier */0 ? identifier(lit._0) : literal(lit._0); - var match$2 = m.kind; - var tmp; + let match$2 = m.kind; + let tmp; tmp = match$2.TAG === /* CommonJS */0 ? string("CommonJS") : string("ES"); return node("DeclareModule", loc, [ [ @@ -16528,9 +16528,9 @@ function parse(content, options) { type_annotation(b._0) ]]); case /* DeclareExportDeclaration */27 : - var $$export = b._0; - var match$3 = $$export.declaration; - var declaration; + let $$export = b._0; + let match$3 = $$export.declaration; + let declaration; if (match$3 !== undefined) { switch (match$3.TAG | 0) { case /* Variable */0 : @@ -16575,9 +16575,9 @@ function parse(content, options) { ] ]); case /* ExportDeclaration */28 : - var $$export$1 = b._0; - var match$4 = $$export$1.declaration; - var declaration$1 = match$4 !== undefined ? ( + let $$export$1 = b._0; + let match$4 = $$export$1.declaration; + let declaration$1 = match$4 !== undefined ? ( match$4.TAG === /* Declaration */0 ? statement(match$4._0) : expression(match$4._0) ) : $$null; return node("ExportDeclaration", loc, [ @@ -16603,14 +16603,14 @@ function parse(content, options) { ] ]); case /* ImportDeclaration */29 : - var $$import = b._0; - var specifiers = Stdlib__List.map((function (param) { + let $$import = b._0; + let specifiers = Stdlib__List.map((function (param) { switch (param.TAG | 0) { case /* ImportNamedSpecifier */0 : - var match = param._0; - var local_id = match.local; - var remote_id = match.remote; - var span_loc = local_id !== undefined ? btwn(remote_id[0], local_id[0]) : remote_id[0]; + let match = param._0; + let local_id = match.local; + let remote_id = match.remote; + let span_loc = local_id !== undefined ? btwn(remote_id[0], local_id[0]) : remote_id[0]; return node("ImportSpecifier", span_loc, [ [ "id", @@ -16622,13 +16622,13 @@ function parse(content, options) { ] ]); case /* ImportDefaultSpecifier */1 : - var id = param._0; + let id = param._0; return node("ImportDefaultSpecifier", id[0], [[ "id", identifier(id) ]]); case /* ImportNamespaceSpecifier */2 : - var param$1 = param._0; + let param$1 = param._0; return node("ImportNamespaceSpecifier", param$1[0], [[ "id", identifier(param$1[1]) @@ -16636,8 +16636,8 @@ function parse(content, options) { } }), $$import.specifiers); - var match$5 = $$import.importKind; - var import_kind; + let match$5 = $$import.importKind; + let import_kind; switch (match$5) { case /* ImportType */0 : import_kind = "type"; @@ -16667,8 +16667,8 @@ function parse(content, options) { } }; - var object_type = function (param) { - var o = param[1]; + let object_type = function (param) { + let o = param[1]; return node("ObjectTypeAnnotation", param[0], [ [ "properties", @@ -16684,10 +16684,10 @@ function parse(content, options) { ] ]); }; - var interface_extends = function (param) { - var g = param[1]; - var id = g.id; - var id$1; + let interface_extends = function (param) { + let g = param[1]; + let id = g.id; + let id$1; id$1 = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("InterfaceExtends", param[0], [ [ @@ -16700,15 +16700,15 @@ function parse(content, options) { ] ]); }; - var type_parameter_declaration = function (param) { + let type_parameter_declaration = function (param) { return node("TypeParameterDeclaration", param[0], [[ "params", array_of_list(type_param, param[1].params) ]]); }; - var _type = function (param) { - var t = param[1]; - var loc = param[0]; + let _type = function (param) { + let t = param[1]; + let loc = param[0]; if (typeof t === "number") { switch (t) { case /* Any */0 : @@ -16730,7 +16730,7 @@ function parse(content, options) { } else { switch (t.TAG | 0) { case /* Nullable */0 : - var t$1 = t._0; + let t$1 = t._0; return node("NullableTypeAnnotation", loc, [[ "typeAnnotation", _type(t$1) @@ -16746,19 +16746,19 @@ function parse(content, options) { t._0 ]); case /* Array */3 : - var t$2 = t._0; + let t$2 = t._0; return node("ArrayTypeAnnotation", loc, [[ "elementType", _type(t$2) ]]); case /* Generic */4 : - var param$1 = [ + let param$1 = [ loc, t._0 ]; - var g = param$1[1]; - var id = g.id; - var id$1; + let g = param$1[1]; + let id = g.id; + let id$1; id$1 = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("GenericTypeAnnotation", param$1[0], [ [ @@ -16771,7 +16771,7 @@ function parse(content, options) { ] ]); case /* Union */5 : - var param$2 = [ + let param$2 = [ loc, t._0 ]; @@ -16780,7 +16780,7 @@ function parse(content, options) { array_of_list(_type, param$2[1]) ]]); case /* Intersection */6 : - var param$3 = [ + let param$3 = [ loc, t._0 ]; @@ -16789,7 +16789,7 @@ function parse(content, options) { array_of_list(_type, param$3[1]) ]]); case /* Typeof */7 : - var param$4 = [ + let param$4 = [ loc, t._0 ]; @@ -16798,7 +16798,7 @@ function parse(content, options) { _type(param$4[1]) ]]); case /* Tuple */8 : - var param$5 = [ + let param$5 = [ loc, t._0 ]; @@ -16807,11 +16807,11 @@ function parse(content, options) { array_of_list(_type, param$5[1]) ]]); case /* StringLiteral */9 : - var param$6 = [ + let param$6 = [ loc, t._0 ]; - var s = param$6[1]; + let s = param$6[1]; return node("StringLiteralTypeAnnotation", param$6[0], [ [ "value", @@ -16823,11 +16823,11 @@ function parse(content, options) { ] ]); case /* NumberLiteral */10 : - var param$7 = [ + let param$7 = [ loc, t._0 ]; - var s$1 = param$7[1]; + let s$1 = param$7[1]; return node("NumberLiteralTypeAnnotation", param$7[0], [ [ "value", @@ -16839,11 +16839,11 @@ function parse(content, options) { ] ]); case /* BooleanLiteral */11 : - var param$8 = [ + let param$8 = [ loc, t._0 ]; - var s$2 = param$8[1]; + let s$2 = param$8[1]; return node("BooleanLiteralTypeAnnotation", param$8[0], [ [ "value", @@ -16858,12 +16858,12 @@ function parse(content, options) { } } }; - var pattern = function (param) { - var obj = param[1]; - var loc = param[0]; + let pattern = function (param) { + let obj = param[1]; + let loc = param[0]; switch (obj.TAG | 0) { case /* Object */0 : - var obj$1 = obj._0; + let obj$1 = obj._0; return node("ObjectPattern", loc, [ [ "properties", @@ -16875,7 +16875,7 @@ function parse(content, options) { ] ]); case /* Array */1 : - var arr = obj._0; + let arr = obj._0; return node("ArrayPattern", loc, [ [ "elements", @@ -16889,7 +16889,7 @@ function parse(content, options) { ] ]); case /* Assignment */2 : - var match = obj._0; + let match = obj._0; return node("AssignmentPattern", loc, [ [ "left", @@ -16907,10 +16907,10 @@ function parse(content, options) { } }; - var jsx_member_expression = function (param) { - var member_expression = param[1]; - var id = member_expression._object; - var _object; + let jsx_member_expression = function (param) { + let member_expression = param[1]; + let id = member_expression._object; + let _object; _object = id.TAG === /* Identifier */0 ? jsx_identifier(id._0) : jsx_member_expression(id._0); return node("JSXMemberExpression", param[0], [ [ @@ -16923,27 +16923,27 @@ function parse(content, options) { ] ]); }; - var jsx_identifier = function (param) { + let jsx_identifier = function (param) { return node("JSXIdentifier", param[0], [[ "name", string(param[1].name) ]]); }; - var jsx_expression_container = function (param) { - var expr = param[1].expression; - var expression$1; + let jsx_expression_container = function (param) { + let expr = param[1].expression; + let expression$1; expression$1 = expr.TAG === /* Expression */0 ? expression(expr._0) : node("JSXEmptyExpression", expr._0, []); return node("JSXExpressionContainer", param[0], [[ "expression", expression$1 ]]); }; - var literal = function (param) { - var lit = param[1]; - var raw = lit.raw; - var value = lit.value; - var loc = param[0]; - var value_; + let literal = function (param) { + let lit = param[1]; + let raw = lit.raw; + let value = lit.value; + let loc = param[0]; + let value_; if (typeof value === "number") { value_ = $$null; } else { @@ -16958,19 +16958,19 @@ function parse(content, options) { value_ = number$1(value._0); break; case /* RegExp */3 : - var match = value._0; + let match = value._0; value_ = regexp$1(loc, match.pattern, match.flags); break; } } - var props; - var exit = 0; + let props; + let exit = 0; if (typeof value === "number" || value.TAG !== /* RegExp */3) { exit = 1; } else { - var match$1 = value._0; - var regex = obj([ + let match$1 = value._0; + let regex = obj([ [ "pattern", string(match$1.pattern) @@ -17009,12 +17009,12 @@ function parse(content, options) { } return node("Literal", loc, props); }; - var jsx_opening_attribute = function (param) { + let jsx_opening_attribute = function (param) { if (param.TAG === /* Attribute */0) { - var param$1 = param._0; - var attribute = param$1[1]; - var id = attribute.name; - var name; + let param$1 = param._0; + let attribute = param$1[1]; + let id = attribute.name; + let name; name = id.TAG === /* Identifier */0 ? jsx_identifier(id._0) : jsx_namespaced_name(id._0); return node("JSXAttribute", param$1[0], [ [ @@ -17027,14 +17027,14 @@ function parse(content, options) { ] ]); } else { - var param$2 = param._0; + let param$2 = param._0; return node("JSXSpreadAttribute", param$2[0], [[ "argument", expression(param$2[1].argument) ]]); } }; - var jsx_name = function (param) { + let jsx_name = function (param) { switch (param.TAG | 0) { case /* Identifier */0 : return jsx_identifier(param._0); @@ -17045,7 +17045,7 @@ function parse(content, options) { } }; - var jsx_attribute_value = function (param) { + let jsx_attribute_value = function (param) { if (param.TAG === /* Literal */0) { return literal([ param._0, @@ -17058,8 +17058,8 @@ function parse(content, options) { ]); } }; - var jsx_namespaced_name = function (param) { - var namespaced_name = param[1]; + let jsx_namespaced_name = function (param) { + let namespaced_name = param[1]; return node("JSXNamespacedName", param[0], [ [ "namespace", @@ -17071,8 +17071,8 @@ function parse(content, options) { ] ]); }; - var export_specifier = function (param) { - var specifier = param[1]; + let export_specifier = function (param) { + let specifier = param[1]; return node("ExportSpecifier", param[0], [ [ "id", @@ -17084,20 +17084,20 @@ function parse(content, options) { ] ]); }; - var type_annotation = function (param) { + let type_annotation = function (param) { return node("TypeAnnotation", param[0], [[ "typeAnnotation", _type(param[1]) ]]); }; - var block = function (param) { + let block = function (param) { return node("BlockStatement", param[0], [[ "body", array_of_list(statement, param[1].body) ]]); }; - var template_literal = function (param) { - var value = param[1]; + let template_literal = function (param) { + let value = param[1]; return node("TemplateLiteral", param[0], [ [ "quasis", @@ -17109,7 +17109,7 @@ function parse(content, options) { ] ]); }; - var let_assignment = function (assignment) { + let let_assignment = function (assignment) { return obj([ [ "id", @@ -17121,10 +17121,10 @@ function parse(content, options) { ] ]); }; - var function_expression = function (param) { - var _function = param[1]; - var b = _function.body; - var body; + let function_expression = function (param) { + let _function = param[1]; + let b = _function.body; + let body; body = b.TAG === /* BodyBlock */0 ? block(b._0) : expression(b._0); return node("FunctionExpression", param[0], [ [ @@ -17171,12 +17171,12 @@ function parse(content, options) { ] ]); }; - var object_property = function (param) { + let object_property = function (param) { if (param.TAG === /* Property */0) { - var match = param._0; - var prop = match[1]; - var lit = prop.key; - var match$1; + let match = param._0; + let prop = match[1]; + let lit = prop.key; + let match$1; switch (lit.TAG | 0) { case /* Literal */0 : match$1 = [ @@ -17198,8 +17198,8 @@ function parse(content, options) { break; } - var match$2 = prop.kind; - var kind; + let match$2 = prop.kind; + let kind; switch (match$2) { case /* Init */0 : kind = "init"; @@ -17239,24 +17239,24 @@ function parse(content, options) { ] ]); } - var match$3 = param._0; + let match$3 = param._0; return node("SpreadProperty", match$3[0], [[ "argument", expression(match$3[1].argument) ]]); }; - var expression_or_spread = function (param) { + let expression_or_spread = function (param) { if (param.TAG === /* Expression */0) { return expression(param._0); } - var match = param._0; + let match = param._0; return node("SpreadElement", match[0], [[ "argument", expression(match[1].argument) ]]); }; - var jsx_element = function (param) { - var element = param[1]; + let jsx_element = function (param) { + let element = param[1]; return node("JSXElement", param[0], [ [ "openingElement", @@ -17272,8 +17272,8 @@ function parse(content, options) { ] ]); }; - var comprehension_block = function (param) { - var b = param[1]; + let comprehension_block = function (param) { + let b = param[1]; return node("ComprehensionBlock", param[0], [ [ "left", @@ -17289,8 +17289,8 @@ function parse(content, options) { ] ]); }; - var function_type = function (param) { - var fn = param[1]; + let function_type = function (param) { + let fn = param[1]; return node("FunctionTypeAnnotation", param[0], [ [ "params", @@ -17310,12 +17310,12 @@ function parse(content, options) { ] ]); }; - var object_pattern_property = function (param) { + let object_pattern_property = function (param) { if (param.TAG === /* Property */0) { - var match = param._0; - var prop = match[1]; - var lit = prop.key; - var match$1; + let match = param._0; + let prop = match[1]; + let lit = prop.key; + let match$1; switch (lit.TAG | 0) { case /* Literal */0 : match$1 = [ @@ -17356,30 +17356,30 @@ function parse(content, options) { ] ]); } - var match$2 = param._0; + let match$2 = param._0; return node("SpreadPropertyPattern", match$2[0], [[ "argument", pattern(match$2[1].argument) ]]); }; - var array_pattern_element = function (param) { + let array_pattern_element = function (param) { if (param.TAG === /* Element */0) { return pattern(param._0); } - var match = param._0; + let match = param._0; return node("SpreadElementPattern", match[0], [[ "argument", pattern(match[1].argument) ]]); }; - var declare_variable = function (param) { + let declare_variable = function (param) { return node("DeclareVariable", param[0], [[ "id", identifier(param[1].id) ]]); }; - var $$case = function (param) { - var c = param[1]; + let $$case = function (param) { + let c = param[1]; return node("SwitchCase", param[0], [ [ "test", @@ -17391,8 +17391,8 @@ function parse(content, options) { ] ]); }; - var type_alias = function (param) { - var alias = param[1]; + let type_alias = function (param) { + let alias = param[1]; return node("TypeAlias", param[0], [ [ "id", @@ -17408,7 +17408,7 @@ function parse(content, options) { ] ]); }; - var export_specifiers = function (param) { + let export_specifiers = function (param) { if (param !== undefined) { if (param.TAG === /* ExportSpecifiers */0) { return array_of_list(export_specifier, param._0); @@ -17422,8 +17422,8 @@ function parse(content, options) { return array([]); } }; - var interface_declaration = function (param) { - var i = param[1]; + let interface_declaration = function (param) { + let i = param[1]; return node("InterfaceDeclaration", param[0], [ [ "id", @@ -17443,14 +17443,14 @@ function parse(content, options) { ] ]); }; - var declare_function = function (param) { + let declare_function = function (param) { return node("DeclareFunction", param[0], [[ "id", identifier(param[1].id) ]]); }; - var $$catch = function (param) { - var c = param[1]; + let $$catch = function (param) { + let c = param[1]; return node("CatchClause", param[0], [ [ "param", @@ -17466,10 +17466,10 @@ function parse(content, options) { ] ]); }; - var variable_declaration = function (param) { - var $$var = param[1]; - var match = $$var.kind; - var kind; + let variable_declaration = function (param) { + let $$var = param[1]; + let match = $$var.kind; + let kind; switch (match) { case /* Var */0 : kind = "var"; @@ -17493,8 +17493,8 @@ function parse(content, options) { ] ]); }; - var declare_class = function (param) { - var d = param[1]; + let declare_class = function (param) { + let d = param[1]; return node("DeclareClass", param[0], [ [ "id", @@ -17514,8 +17514,8 @@ function parse(content, options) { ] ]); }; - var variable_declarator = function (param) { - var declarator = param[1]; + let variable_declarator = function (param) { + let declarator = param[1]; return node("VariableDeclarator", param[0], [ [ "id", @@ -17527,16 +17527,16 @@ function parse(content, options) { ] ]); }; - var type_parameter_instantiation = function (param) { + let type_parameter_instantiation = function (param) { return node("TypeParameterInstantiation", param[0], [[ "params", array_of_list(_type, param[1].params) ]]); }; - var generic_type_qualified_identifier = function (param) { - var q = param[1]; - var id = q.qualification; - var qualification; + let generic_type_qualified_identifier = function (param) { + let q = param[1]; + let id = q.qualification; + let qualification; qualification = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("QualifiedTypeIdentifier", param[0], [ [ @@ -17549,14 +17549,14 @@ function parse(content, options) { ] ]); }; - var class_body = function (param) { + let class_body = function (param) { return node("ClassBody", param[0], [[ "body", array_of_list(class_element, param[1].body) ]]); }; - var class_implements = function (param) { - var $$implements = param[1]; + let class_implements = function (param) { + let $$implements = param[1]; return node("ClassImplements", param[0], [ [ "id", @@ -17568,9 +17568,9 @@ function parse(content, options) { ] ]); }; - var comment = function (param) { - var c = param[1]; - var match; + let comment = function (param) { + let c = param[1]; + let match; match = c.TAG === /* Block */0 ? [ "Block", c._0 @@ -17583,9 +17583,9 @@ function parse(content, options) { string(match[1]) ]]); }; - var jsx_child = function (param) { - var element = param[1]; - var loc = param[0]; + let jsx_child = function (param) { + let element = param[1]; + let loc = param[0]; switch (element.TAG | 0) { case /* Element */0 : return jsx_element([ @@ -17598,11 +17598,11 @@ function parse(content, options) { element._0 ]); case /* Text */2 : - var param$1 = [ + let param$1 = [ loc, element._0 ]; - var text = param$1[1]; + let text = param$1[1]; return node("JSXText", param$1[0], [ [ "value", @@ -17616,14 +17616,14 @@ function parse(content, options) { } }; - var jsx_closing = function (param) { + let jsx_closing = function (param) { return node("JSXClosingElement", param[0], [[ "name", jsx_name(param[1].name) ]]); }; - var jsx_opening = function (param) { - var opening = param[1]; + let jsx_opening = function (param) { + let opening = param[1]; return node("JSXOpeningElement", param[0], [ [ "name", @@ -17639,8 +17639,8 @@ function parse(content, options) { ] ]); }; - var function_type_param = function (param) { - var param$1 = param[1]; + let function_type_param = function (param) { + let param$1 = param[1]; return node("FunctionTypeParam", param[0], [ [ "name", @@ -17656,9 +17656,9 @@ function parse(content, options) { ] ]); }; - var type_param = function (param) { - var tp = param[1]; - var variance = function (param) { + let type_param = function (param) { + let tp = param[1]; + let variance = function (param) { if (param) { return string("minus"); } else { @@ -17684,10 +17684,10 @@ function parse(content, options) { ] ]); }; - var object_type_property = function (param) { - var prop = param[1]; - var lit = prop.key; - var key; + let object_type_property = function (param) { + let prop = param[1]; + let lit = prop.key; + let key; switch (lit.TAG | 0) { case /* Literal */0 : key = literal(lit._0); @@ -17721,8 +17721,8 @@ function parse(content, options) { ] ]); }; - var object_type_indexer = function (param) { - var indexer = param[1]; + let object_type_indexer = function (param) { + let indexer = param[1]; return node("ObjectTypeIndexer", param[0], [ [ "id", @@ -17742,8 +17742,8 @@ function parse(content, options) { ] ]); }; - var object_type_call_property = function (param) { - var callProperty = param[1]; + let object_type_call_property = function (param) { + let callProperty = param[1]; return node("ObjectTypeCallProperty", param[0], [ [ "value", @@ -17755,7 +17755,7 @@ function parse(content, options) { ] ]); }; - var program$2 = function (param) { + let program$2 = function (param) { return node("Program", param[0], [ [ "body", @@ -17767,15 +17767,15 @@ function parse(content, options) { ] ]); }; - var ret = program$2(match[0]); - var translation_errors$1 = translation_errors.contents; + let ret = program$2(match[0]); + let translation_errors$1 = translation_errors.contents; ret["errors"] = errors(Stdlib.$at(match[1], translation_errors$1)); return ret; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error) { - var e = new Error(String(Stdlib__List.length(exn._1)) + " errors"); + let e = new Error(String(Stdlib__List.length(exn._1)) + " errors"); e["name"] = "Parse Error"; throw(e); return {}; @@ -17784,11 +17784,11 @@ function parse(content, options) { } } -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -17809,11 +17809,11 @@ function eq(loc, x, y) { }; } -var f = typeof __dirname === "undefined" ? undefined : __dirname; +let f = typeof __dirname === "undefined" ? undefined : __dirname; if (f !== undefined) { - var f$1 = Path.join(f, "flow_parser_sample.js"); - var v = parse(Fs.readFileSync(f$1, "utf8"), undefined); + let f$1 = Path.join(f, "flow_parser_sample.js"); + let v = parse(Fs.readFileSync(f$1, "utf8"), undefined); eq("File \"runParser.ml\", line 14, characters 7-14", [ 0, 2842 diff --git a/jscomp/test/dist/jscomp/test/for_loop_test.js b/jscomp/test/dist/jscomp/test/for_loop_test.js index 6c1905ec23..bcdb778e4a 100644 --- a/jscomp/test/dist/jscomp/test/for_loop_test.js +++ b/jscomp/test/dist/jscomp/test/for_loop_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); function for_3(x) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i < i_finish; ++i){ - var j = (i << 1); + for(let i = 0 ,i_finish = x.length; i < i_finish; ++i){ + let j = (i << 1); Caml_array.set(arr, i, (function(j){ return function (param) { v.contents = v.contents + j | 0; @@ -28,15 +28,15 @@ function for_3(x) { } function for_4(x) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i < i_finish; ++i){ - var j = (i << 1); - var k = (j << 1); + 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(k){ return function (param) { v.contents = v.contents + k | 0; @@ -50,14 +50,14 @@ function for_4(x) { } function for_5(x, u) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i < i_finish; ++i){ - var k = Math.imul((u << 1), u); + 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(k){ return function (param) { v.contents = v.contents + k | 0; @@ -71,29 +71,29 @@ function for_5(x, u) { } function for_6(x, u) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - var v4 = { + let v4 = { contents: 0 }; - var v5 = { + let v5 = { contents: 0 }; - var inspect_3 = -1; + let inspect_3 = -1; v4.contents = v4.contents + 1 | 0; - for(var _j = 0; _j <= 1; ++_j){ + for(let _j = 0; _j <= 1; ++_j){ v5.contents = v5.contents + 1 | 0; - var v2 = { + let v2 = { contents: 0 }; (function(v2){ - for(var i = 0 ,i_finish = x.length; i < i_finish; ++i){ - var k = Math.imul((u << 1), u); - var h = (v5.contents << 1); + 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; Caml_array.set(arr, i, (function(k,h){ return function (param) { @@ -116,15 +116,15 @@ function for_6(x, u) { } function for_7(param) { - var v = { + let v = { contents: 0 }; - var arr = Caml_array.make(21, (function (param) { + let arr = Caml_array.make(21, (function (param) { })); - for(var i = 0; i <= 6; ++i){ + for(let i = 0; i <= 6; ++i){ (function(i){ - for(var j = 0; j <= 2; ++j){ + for(let j = 0; j <= 2; ++j){ Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function(j){ return function (param) { v.contents = (v.contents + i | 0) + j | 0; @@ -140,17 +140,17 @@ function for_7(param) { } function for_8(param) { - var v = { + let v = { contents: 0 }; - var arr = Caml_array.make(21, (function (param) { + let arr = Caml_array.make(21, (function (param) { })); - for(var i = 0; i <= 6; ++i){ - var k = (i << 1); + for(let i = 0; i <= 6; ++i){ + let k = (i << 1); (function(i,k){ - for(var j = 0; j <= 2; ++j){ - var h = i + j | 0; + for(let j = 0; j <= 2; ++j){ + let h = i + j | 0; Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function(j,h){ return function (param) { v.contents = (((v.contents + i | 0) + j | 0) + h | 0) + k | 0; @@ -166,34 +166,34 @@ function for_8(param) { } function for_9(param) { - var v = { + let v = { contents: /* [] */0 }; - var collect = function (x) { + let collect = function (x) { v.contents = { hd: x, tl: v.contents }; }; - var vv = { + let vv = { contents: 0 }; - var vv2 = { + let vv2 = { contents: 0 }; - var arr = Caml_array.make(4, (function (param) { + let arr = Caml_array.make(4, (function (param) { })); - var arr2 = Caml_array.make(2, (function (param) { + let arr2 = Caml_array.make(2, (function (param) { })); - for(var i = 0; i <= 1; ++i){ - var v$1 = { + for(let i = 0; i <= 1; ++i){ + let v$1 = { contents: 0 }; v$1.contents = v$1.contents + i | 0; (function(v$1){ - for(var 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 (param) { @@ -220,7 +220,7 @@ function for_9(param) { ]]; } -var suites_0 = [ +let suites_0 = [ "for_loop_test_3", (function (param) { return { @@ -231,7 +231,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "for_loop_test_4", (function (param) { @@ -319,7 +319,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/for_side_effect_test.js b/jscomp/test/dist/jscomp/test/for_side_effect_test.js index 38575a0b99..d1b75fed83 100644 --- a/jscomp/test/dist/jscomp/test/for_side_effect_test.js +++ b/jscomp/test/dist/jscomp/test/for_side_effect_test.js @@ -1,25 +1,25 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); function tst(param) { - for(var _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){ } } function test2(param) { - var v = 0; + let v = 0; v = 3; v = 10; - for(var _i = 0; _i <= 1; ++_i){ + for(let _i = 0; _i <= 1; ++_i){ } return v; } -var suites_0 = [ +let suites_0 = [ "for_order", (function (param) { return { @@ -30,7 +30,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/format_regression.js b/jscomp/test/dist/jscomp/test/format_regression.js index 89e34db161..6a8c90b07c 100644 --- a/jscomp/test/dist/jscomp/test/format_regression.js +++ b/jscomp/test/dist/jscomp/test/format_regression.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); function peek_queue(param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -50,9 +50,9 @@ function format_pp_token(param, param$1) { function advance_loop(state) { while(true) { - var match = peek_queue(state.pp_queue); - var size = match.elem_size; - var size$1 = int_of_size(size); + let match = peek_queue(state.pp_queue); + let size = match.elem_size; + let size$1 = int_of_size(size); if (size$1 < 0 && (state.pp_right_total - state.pp_left_total | 0) < state.pp_space_left) { return ; } @@ -63,7 +63,7 @@ function advance_loop(state) { }; } -var pp_infinity = 1000000010; +let pp_infinity = 1000000010; exports.peek_queue = peek_queue; exports.int_of_size = int_of_size; diff --git a/jscomp/test/dist/jscomp/test/format_test.js b/jscomp/test/dist/jscomp/test/format_test.js index 6b8650bf0e..95ddfd9bd0 100644 --- a/jscomp/test/dist/jscomp/test/format_test.js +++ b/jscomp/test/dist/jscomp/test/format_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Scanf = require("melange/scanf.js"); - -var suites = { +let Caml_format = require("melange.js/caml_format.js"); +let CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Scanf = require("melange/scanf.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -71,7 +71,7 @@ function u(param) { }); } -var M = {}; +let M = {}; eq("File \"jscomp/test/format_test.ml\", line 31, characters 5-12", Curry._1(Stdlib__Format.asprintf(u(undefined)), "x"), "xx xyy"); @@ -181,12 +181,12 @@ function aux_list(loc, ls) { }), ls); } -var literals_0 = [ +let literals_0 = [ 7.875, "0x1.f8p+2" ]; -var literals_1 = { +let literals_1 = { hd: [ 0.3, "0x1.3333333333333p-2" @@ -236,7 +236,7 @@ var literals_1 = { } }; -var literals = { +let literals = { hd: literals_0, tl: literals_1 }; @@ -283,7 +283,7 @@ Stdlib__List.iter((function (param) { scan_float("File \"jscomp/test/format_test.ml\", line 123, characters 13-20", param[1], param[0]); }), literals); -var f1 = - -9.9; +let f1 = - -9.9; eq("File \"jscomp/test/format_test.ml\", line 129, characters 5-12", f1, 9.9); diff --git a/jscomp/test/dist/jscomp/test/fs_test.js b/jscomp/test/dist/jscomp/test/fs_test.js index 1f2846e1d2..ef693b390f 100644 --- a/jscomp/test/dist/jscomp/test/fs_test.js +++ b/jscomp/test/dist/jscomp/test/fs_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Fs = require("fs"); -var Path = require("path"); +let Mt = require("./mt.js"); +let Fs = require("fs"); +let Path = require("path"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -32,21 +32,21 @@ function eq(loc, param) { }; } -var x = typeof __filename === "undefined" ? undefined : __filename; +let x = typeof __filename === "undefined" ? undefined : __filename; -var current_file = x !== undefined ? x : ""; +let current_file = x !== undefined ? x : ""; -var x$1 = typeof __dirname === "undefined" ? undefined : __dirname; +let x$1 = typeof __dirname === "undefined" ? undefined : __dirname; -var current_dir_name = x$1 !== undefined ? x$1 : ""; +let current_dir_name = x$1 !== undefined ? x$1 : ""; Fs.readFileSync(current_file, "utf8"); Fs.readdirSync(current_dir_name); -var pathobj = Path.parse(current_dir_name); +let pathobj = Path.parse(current_dir_name); -var module_ = typeof module === "undefined" ? undefined : module; +let module_ = typeof module === "undefined" ? undefined : module; if (module_ !== undefined) { console.log([ diff --git a/jscomp/test/dist/jscomp/test/fun_pattern_match.js b/jscomp/test/dist/jscomp/test/fun_pattern_match.js index d0a6c86664..f095d35c85 100644 --- a/jscomp/test/dist/jscomp/test/fun_pattern_match.js +++ b/jscomp/test/dist/jscomp/test/fun_pattern_match.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); function f(param, v) { return ((((param.x0 + param.x1 | 0) + param.x2 | 0) + param.x3 | 0) + param.x4 | 0) + v | 0; @@ -14,9 +14,9 @@ function f2(param, param$1) { } function f3(param) { - var lhs = param.rank; + let lhs = param.rank; return function (param) { - var rhs = param.rank; + let rhs = param.rank; if (typeof lhs === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -42,9 +42,9 @@ function f3(param) { } function f4(param) { - var lhs = param.rank; + let lhs = param.rank; return function (param) { - var rhs = param.rank; + let rhs = param.rank; if (typeof lhs === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -69,7 +69,7 @@ function f4(param) { }; } -var x = { +let x = { NAME: "A", VAL: r }; @@ -78,9 +78,9 @@ function r(param) { return x; } -var match = r(undefined); +let match = r(undefined); -var v = Curry._1(match.VAL, undefined); +let v = Curry._1(match.VAL, undefined); console.log(v); diff --git a/jscomp/test/dist/jscomp/test/functor_app_test.js b/jscomp/test/dist/jscomp/test/functor_app_test.js index b0cc3aa2c0..32b57eefff 100644 --- a/jscomp/test/dist/jscomp/test/functor_app_test.js +++ b/jscomp/test/dist/jscomp/test/functor_app_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Functor_def = require("./functor_def.js"); -var Functor_inst = require("./functor_inst.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Functor_def = require("./functor_def.js"); +let Functor_inst = require("./functor_inst.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,15 +31,15 @@ function eq(loc, x, y) { }; } -var Y0 = Functor_def.Make(Functor_inst); +let Y0 = Functor_def.Make(Functor_inst); -var Y1 = Functor_def.Make(Functor_inst); +let Y1 = Functor_def.Make(Functor_inst); eq("File \"jscomp/test/functor_app_test.ml\", line 23, characters 6-13", Curry._2(Y0.h, 1, 2), 4); eq("File \"jscomp/test/functor_app_test.ml\", line 24, characters 6-13", Curry._2(Y1.h, 2, 3), 6); -var v = Functor_def.$$return(undefined); +let v = Functor_def.$$return(undefined); eq("File \"jscomp/test/functor_app_test.ml\", line 29, characters 6-13", v, 2); diff --git a/jscomp/test/dist/jscomp/test/functor_def.js b/jscomp/test/dist/jscomp/test/functor_def.js index 2efbe74b76..2a714971ca 100644 --- a/jscomp/test/dist/jscomp/test/functor_def.js +++ b/jscomp/test/dist/jscomp/test/functor_def.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); -var v = { +let v = { contents: 0 }; @@ -17,7 +17,7 @@ function $$return(param) { } function Make(U) { - var h = function (x, x$1) { + let h = function (x, x$1) { console.log(f(x$1, x$1)); return Curry._2(U.say, x$1, x$1); }; diff --git a/jscomp/test/dist/jscomp/test/functor_ffi.js b/jscomp/test/dist/jscomp/test/functor_ffi.js index a50c60dd5d..4dd236c556 100644 --- a/jscomp/test/dist/jscomp/test/functor_ffi.js +++ b/jscomp/test/dist/jscomp/test/functor_ffi.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); +let Caml_option = require("melange.js/caml_option.js"); function Make(S) { - var opt_get = function (f, i) { + let opt_get = function (f, i) { return Caml_option.undefined_to_opt(f[i]); }; return { @@ -16,7 +16,7 @@ function opt_get(f, i) { return Caml_option.undefined_to_opt(f[i]); } -var Int_arr = { +let Int_arr = { opt_get: opt_get }; diff --git a/jscomp/test/dist/jscomp/test/functors.js b/jscomp/test/dist/jscomp/test/functors.js index 34b80d5ee6..6b9acc3122 100644 --- a/jscomp/test/dist/jscomp/test/functors.js +++ b/jscomp/test/dist/jscomp/test/functors.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function O(X) { - var cow = function (x) { + let cow = function (x) { return Curry._1(X.foo, x); }; - var sheep = function (x) { + let sheep = function (x) { return 1 + Curry._1(X.foo, x) | 0; }; return { @@ -17,10 +17,10 @@ function O(X) { } function F(X, Y) { - var cow = function (x) { + let cow = function (x) { return Curry._1(Y.foo, Curry._1(X.foo, x)); }; - var sheep = function (x) { + let sheep = function (x) { return 1 + Curry._1(Y.foo, Curry._1(X.foo, x)) | 0; }; return { @@ -30,7 +30,7 @@ function F(X, Y) { } function F1(X, Y) { - var sheep = function (x) { + let sheep = function (x) { return 1 + Curry._1(Y.foo, Curry._1(X.foo, x)) | 0; }; return { @@ -39,7 +39,7 @@ function F1(X, Y) { } function F2(X, Y) { - var sheep = function (x) { + let sheep = function (x) { return 1 + Curry._1(Y.foo, Curry._1(X.foo, x)) | 0; }; return { @@ -47,9 +47,9 @@ function F2(X, Y) { }; } -var M = { +let M = { F: (function (funarg, funarg$1) { - var sheep = function (x) { + let sheep = function (x) { return 1 + Curry._1(funarg$1.foo, Curry._1(funarg.foo, x)) | 0; }; return { diff --git a/jscomp/test/dist/jscomp/test/gh_161_ml.js b/jscomp/test/dist/jscomp/test/gh_161_ml.js index 0b4a08b61d..d7d78fed84 100644 --- a/jscomp/test/dist/jscomp/test/gh_161_ml.js +++ b/jscomp/test/dist/jscomp/test/gh_161_ml.js @@ -2,9 +2,9 @@ 'use strict'; -var X = {}; +let X = {}; -var fails_in_melange = 0; +let fails_in_melange = 0; exports.X = X; exports.fails_in_melange = fails_in_melange; diff --git a/jscomp/test/dist/jscomp/test/glob/glob_test_u.js b/jscomp/test/dist/jscomp/test/glob/glob_test_u.js index 18a0ea15f9..bc743c6b30 100644 --- a/jscomp/test/dist/jscomp/test/glob/glob_test_u.js +++ b/jscomp/test/dist/jscomp/test/glob/glob_test_u.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Glob_u = require("./glob_u.js"); +let Glob_u = require("./glob_u.js"); -var v = Glob_u.v; +let v = Glob_u.v; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/glob/glob_u.js b/jscomp/test/dist/jscomp/test/glob/glob_u.js index a621ec9415..4e90465c67 100644 --- a/jscomp/test/dist/jscomp/test/glob/glob_u.js +++ b/jscomp/test/dist/jscomp/test/glob/glob_u.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 3; +let v = 3; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/glob/glob_x.js b/jscomp/test/dist/jscomp/test/glob/glob_x.js index 06a2942d82..ac7cff9477 100644 --- a/jscomp/test/dist/jscomp/test/glob/glob_x.js +++ b/jscomp/test/dist/jscomp/test/glob/glob_x.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 32; +let v = 32; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/glob/xlob_x.js b/jscomp/test/dist/jscomp/test/glob/xlob_x.js index a621ec9415..4e90465c67 100644 --- a/jscomp/test/dist/jscomp/test/glob/xlob_x.js +++ b/jscomp/test/dist/jscomp/test/glob/xlob_x.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 3; +let v = 3; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/global_exception_regression_test.js b/jscomp/test/dist/jscomp/test/global_exception_regression_test.js index eadc6092a5..768e2996a8 100644 --- a/jscomp/test/dist/jscomp/test/global_exception_regression_test.js +++ b/jscomp/test/dist/jscomp/test/global_exception_regression_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var v = { +let v = { MEL_EXN_ID: Stdlib.Not_found }; -var u = { +let u = { MEL_EXN_ID: Stdlib.Not_found }; -var s = { +let s = { MEL_EXN_ID: Stdlib.End_of_file }; -var suites_0 = [ +let suites_0 = [ "not_found_equal", (function (param) { return { @@ -27,7 +27,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "not_found_not_equal_end_of_file", (function (param) { @@ -41,7 +41,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/global_mangles.js b/jscomp/test/dist/jscomp/test/global_mangles.js index e3bb8d6c87..6dfc4fd0c8 100644 --- a/jscomp/test/dist/jscomp/test/global_mangles.js +++ b/jscomp/test/dist/jscomp/test/global_mangles.js @@ -2,33 +2,33 @@ 'use strict'; -var $$__dirname = 1; +let $$__dirname = 1; -var $$__filename = 2; +let $$__filename = 2; -var $$clearImmediate = 3; +let $$clearImmediate = 3; -var $$clearInterval = 4; +let $$clearInterval = 4; -var $$clearTimeout = 5; +let $$clearTimeout = 5; -var $$console = 6; +let $$console = 6; -var $$exports = 7; +let $$exports = 7; -var $$global = 8; +let $$global = 8; -var _module = 9; +let _module = 9; -var $$process = 10; +let $$process = 10; -var $$require = 11; +let $$require = 11; -var $$setImmediate = 12; +let $$setImmediate = 12; -var $$setInterval = 13; +let $$setInterval = 13; -var $$setTimeout = 14; +let $$setTimeout = 14; exports.$$__dirname = $$__dirname; exports.$$__filename = $$__filename; diff --git a/jscomp/test/dist/jscomp/test/global_module_alias_test.js b/jscomp/test/dist/jscomp/test/global_module_alias_test.js index eb243c4a20..b16ab838de 100644 --- a/jscomp/test/dist/jscomp/test/global_module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/global_module_alias_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,7 +30,7 @@ function eq(loc, x, y) { }; } -var v = { +let v = { contents: 0 }; @@ -83,7 +83,7 @@ v.contents = v.contents + 1 | 0; v.contents = v.contents + 1 | 0; -var H = Stdlib__List; +let H = Stdlib__List; eq("File \"jscomp/test/global_module_alias_test.ml\", line 57, characters 5-12", v.contents, 12); @@ -131,7 +131,7 @@ eq("File \"jscomp/test/global_module_alias_test.ml\", line 92, characters 5-12", eq("File \"jscomp/test/global_module_alias_test.ml\", line 93, characters 5-12", v.contents, 15); -var H$1 = f(undefined); +let H$1 = f(undefined); eq("File \"jscomp/test/global_module_alias_test.ml\", line 95, characters 5-12", Curry._1(H$1.length, { hd: 1, diff --git a/jscomp/test/dist/jscomp/test/google_closure_test.js b/jscomp/test/dist/jscomp/test/google_closure_test.js index 110aa8b574..d56fac3b51 100644 --- a/jscomp/test/dist/jscomp/test/google_closure_test.js +++ b/jscomp/test/dist/jscomp/test/google_closure_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Test_google_closure = require("./test_google_closure.js"); +let Mt = require("./mt.js"); +let Test_google_closure = require("./test_google_closure.js"); Mt.from_pair_suites("Closure", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/gpr496_test.js b/jscomp/test/dist/jscomp/test/gpr496_test.js index 86f6ebfff7..f79e3073dc 100644 --- a/jscomp/test/dist/jscomp/test/gpr496_test.js +++ b/jscomp/test/dist/jscomp/test/gpr496_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml = require("melange.js/caml.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,23 +30,23 @@ function eq(loc, x, y) { }; } -var expected_0 = true === false; +let expected_0 = true === false; -var expected_1 = false === true; +let expected_1 = false === true; -var expected_2 = false === false; +let expected_2 = false === false; -var expected_3 = true === true; +let expected_3 = true === true; -var expected_4 = Caml.caml_int_compare(false, true); +let expected_4 = Caml.caml_int_compare(false, true); -var expected_5 = Caml.caml_int_compare(true, false); +let expected_5 = Caml.caml_int_compare(true, false); -var expected_6 = Caml.caml_int_compare(false, false); +let expected_6 = Caml.caml_int_compare(false, false); -var expected_7 = Caml.caml_int_compare(true, true); +let expected_7 = Caml.caml_int_compare(true, true); -var expected = [ +let expected = [ expected_0, expected_1, expected_2, @@ -57,7 +57,7 @@ var expected = [ expected_7 ]; -var expected2 = [ +let expected2 = [ false, false, true, @@ -68,23 +68,23 @@ var expected2 = [ 0 ]; -var u_0 = true === false; +let u_0 = true === false; -var u_1 = false === true; +let u_1 = false === true; -var u_2 = false === false; +let u_2 = false === false; -var u_3 = true === true; +let u_3 = true === true; -var u_4 = Caml.caml_int_compare(false, true); +let u_4 = Caml.caml_int_compare(false, true); -var u_5 = Caml.caml_int_compare(true, false); +let u_5 = Caml.caml_int_compare(true, false); -var u_6 = Caml.caml_int_compare(false, false); +let u_6 = Caml.caml_int_compare(false, false); -var u_7 = Caml.caml_int_compare(true, true); +let u_7 = Caml.caml_int_compare(true, true); -var u = [ +let u = [ u_0, u_1, u_2, diff --git a/jscomp/test/dist/jscomp/test/gpr_1072.js b/jscomp/test/dist/jscomp/test/gpr_1072.js index a94973e414..24c8e00e4a 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1072.js +++ b/jscomp/test/dist/jscomp/test/gpr_1072.js @@ -2,16 +2,16 @@ 'use strict'; -var u = { +let u = { y: 3 }; -var v_ice_cream3_0 = { +let v_ice_cream3_0 = { flavor: "vanilla", num: 3 }; -var v_ice_cream3_1 = { +let v_ice_cream3_1 = { hd: { flavor: "x", num: 3 @@ -25,17 +25,17 @@ var v_ice_cream3_1 = { } }; -var v_ice_cream3 = { +let v_ice_cream3 = { hd: v_ice_cream3_0, tl: v_ice_cream3_1 }; -var v_ice_cream4_0 = { +let v_ice_cream4_0 = { flavor: "vanilla", num: 3 }; -var v_ice_cream4_1 = { +let v_ice_cream4_1 = { hd: { flavor: "x", num: 3 @@ -43,26 +43,26 @@ var v_ice_cream4_1 = { tl: /* [] */0 }; -var v_ice_cream4 = { +let v_ice_cream4 = { hd: v_ice_cream4_0, tl: v_ice_cream4_1 }; -var vv = { +let vv = { x: 3 }; -var int_expect = { +let int_expect = { x: 0 }; -var int_expect2 = { +let int_expect2 = { x: 0 }; -var int_expects_0 = {}; +let int_expects_0 = {}; -var int_expects_1 = { +let int_expects_1 = { hd: { x: 2 }, @@ -74,52 +74,52 @@ var int_expects_1 = { } }; -var int_expects = { +let int_expects = { hd: int_expects_0, tl: int_expects_1 }; -var mk_ice = { +let mk_ice = { flavour: "vanilla", num: 3 }; -var my_ice2 = { +let my_ice2 = { flavour: "vanilla", num: 1 }; -var my_ice3 = { +let my_ice3 = { num: 2 }; -var v_mk4 = { +let v_mk4 = { y: 3 }; -var v_mk5 = { +let v_mk5 = { x: undefined, y: 3 }; -var v_mk6 = { +let v_mk6 = { y: 3 }; -var v_mk6_1 = { +let v_mk6_1 = { x: undefined, y: 3 }; -var mk_u = { +let mk_u = { x: 0 }; -var v_mk7_0 = { +let v_mk7_0 = { y: 3 }; -var v_mk7_1 = { +let v_mk7_1 = { hd: { y: 2 }, @@ -131,7 +131,7 @@ var v_mk7_1 = { } }; -var v_mk7 = { +let v_mk7 = { hd: v_mk7_0, tl: v_mk7_1 }; @@ -150,7 +150,7 @@ again3(3); again3(2); -var side_effect = { +let side_effect = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1072_reg.js b/jscomp/test/dist/jscomp/test/gpr_1072_reg.js index 862153b944..f0ee79d416 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1072_reg.js +++ b/jscomp/test/dist/jscomp/test/gpr_1072_reg.js @@ -2,7 +2,7 @@ 'use strict'; -var v1 = { +let v1 = { localeMatcher: "best fit", formatMatcher: "basic", day: "2-digit", diff --git a/jscomp/test/dist/jscomp/test/gpr_1150.js b/jscomp/test/dist/jscomp/test/gpr_1150.js index 885c2197f6..ed7bf65fac 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1150.js +++ b/jscomp/test/dist/jscomp/test/gpr_1150.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(children) { if (!children) { return []; } - var children$1 = children.tl; - var a0 = children.hd; + let children$1 = children.tl; + let a0 = children.hd; if (!children$1) { return [a0]; } - var children$2 = children$1.tl; - var a1 = children$1.hd; + let children$2 = children$1.tl; + let a1 = children$1.hd; if (!children$2) { return [ a0, a1 ]; } - var children$3 = children$2.tl; - var a2 = children$2.hd; + let children$3 = children$2.tl; + let a2 = children$2.hd; if (!children$3) { return [ a0, @@ -29,8 +29,8 @@ function f(children) { a2 ]; } - var children$4 = children$3.tl; - var a3 = children$3.hd; + let children$4 = children$3.tl; + let a3 = children$3.hd; if (!children$4) { return [ a0, @@ -39,8 +39,8 @@ function f(children) { a3 ]; } - var children$5 = children$4.tl; - var a4 = children$4.hd; + let children$5 = children$4.tl; + let a4 = children$4.hd; if (!children$5) { return [ a0, @@ -50,8 +50,8 @@ function f(children) { a4 ]; } - var children$6 = children$5.tl; - var a5 = children$5.hd; + let children$6 = children$5.tl; + let a5 = children$5.hd; if (!children$6) { return [ a0, @@ -62,8 +62,8 @@ function f(children) { a5 ]; } - var children$7 = children$6.tl; - var a6 = children$6.hd; + let children$7 = children$6.tl; + let a6 = children$6.hd; if (!children$7) { return [ a0, @@ -75,8 +75,8 @@ function f(children) { a6 ]; } - var children$8 = children$7.tl; - var a7 = children$7.hd; + let children$8 = children$7.tl; + let a7 = children$7.hd; if (!children$8) { return [ a0, @@ -89,8 +89,8 @@ function f(children) { a7 ]; } - var children$9 = children$8.tl; - var a8 = children$8.hd; + let children$9 = children$8.tl; + let a8 = children$8.hd; if (!children$9) { return [ a0, @@ -104,8 +104,8 @@ function f(children) { a8 ]; } - var children$10 = children$9.tl; - var a9 = children$9.hd; + let children$10 = children$9.tl; + let a9 = children$9.hd; if (!children$10) { return [ a0, @@ -120,8 +120,8 @@ function f(children) { a9 ]; } - var children$11 = children$10.tl; - var a10 = children$10.hd; + let children$11 = children$10.tl; + let a10 = children$10.hd; if (!children$11) { return [ a0, @@ -137,8 +137,8 @@ function f(children) { a10 ]; } - var children$12 = children$11.tl; - var a11 = children$11.hd; + let children$12 = children$11.tl; + let a11 = children$11.hd; if (!children$12) { return [ a0, @@ -155,8 +155,8 @@ function f(children) { a11 ]; } - var children$13 = children$12.tl; - var a12 = children$12.hd; + let children$13 = children$12.tl; + let a12 = children$12.hd; if (!children$13) { return [ a0, @@ -174,8 +174,8 @@ function f(children) { a12 ]; } - var children$14 = children$13.tl; - var a13 = children$13.hd; + let children$14 = children$13.tl; + let a13 = children$13.hd; if (!children$14) { return [ a0, @@ -194,8 +194,8 @@ function f(children) { a13 ]; } - var children$15 = children$14.tl; - var a14 = children$14.hd; + let children$15 = children$14.tl; + let a14 = children$14.hd; if (!children$15) { return [ a0, diff --git a/jscomp/test/dist/jscomp/test/gpr_1154_test.js b/jscomp/test/dist/jscomp/test/gpr_1154_test.js index e9d2c0c7a8..e068d54440 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1154_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1154_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_int64 = require("melange.js/caml_int64.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Int64 = require("melange/int64.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -40,7 +40,7 @@ function g(x) { return Caml_int64.or_(x, (Stdlib.print_string("f"), x)); } -var v = { +let v = { contents: 0 }; @@ -53,7 +53,7 @@ function g2(x) { return Caml_int64.or_(x, (v.contents = v.contents + 1 | 0, x)); } -var a = Caml_int64.or_(Stdlib__Int64.one, (v.contents = v.contents + 1 | 0, Stdlib__Int64.one)); +let a = Caml_int64.or_(Stdlib__Int64.one, (v.contents = v.contents + 1 | 0, Stdlib__Int64.one)); eq("File \"jscomp/test/gpr_1154_test.ml\", line 27, characters 12-19", v.contents, 1); diff --git a/jscomp/test/dist/jscomp/test/gpr_1240_missing_unbox.js b/jscomp/test/dist/jscomp/test/gpr_1240_missing_unbox.js index 5664c5b207..6edcbae61a 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1240_missing_unbox.js +++ b/jscomp/test/dist/jscomp/test/gpr_1240_missing_unbox.js @@ -3,8 +3,8 @@ function f(x, y) { - var x$1 = x; - var y$1 = y; + let x$1 = x; + let y$1 = y; return [ x$1, y$1 diff --git a/jscomp/test/dist/jscomp/test/gpr_1245_test.js b/jscomp/test/dist/jscomp/test/gpr_1245_test.js index 23919e7fa1..813c4ee622 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1245_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1245_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); -var x = { +let x = { contents: 1 }; -var y = { +let y = { contents: 2 }; function f(param) { - var a = { + let a = { contents: param[0] }; - var b = { + let b = { contents: param[1] }; console.log(a, b); @@ -28,7 +28,7 @@ function g(param) { } function a0(f) { - var u = Curry._1(f, undefined); + let u = Curry._1(f, undefined); if (u !== null) { console.log(u); console.log(u); @@ -39,12 +39,12 @@ function a0(f) { } function a1(f) { - var E = /* @__PURE__ */Caml_exceptions.create("E"); + let E = /* @__PURE__ */Caml_exceptions.create("E"); try { return Curry._1(f, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === E) { return 1; } @@ -52,9 +52,9 @@ function a1(f) { } } -var a = 1; +let a = 1; -var b = 2; +let b = 2; exports.a = a; exports.b = b; diff --git a/jscomp/test/dist/jscomp/test/gpr_1268.js b/jscomp/test/dist/jscomp/test/gpr_1268.js index da881a622c..91ff90f2b6 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1268.js +++ b/jscomp/test/dist/jscomp/test/gpr_1268.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function f_add2(a, b, x, y) { return add(Curry._1(b, y), Curry._1(a, x)); diff --git a/jscomp/test/dist/jscomp/test/gpr_1285_test.js b/jscomp/test/dist/jscomp/test/gpr_1285_test.js index 2c3ee40cb5..8541c32360 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1285_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1285_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,13 +31,13 @@ function eq(loc, x, y) { }; } -var object_tables = /* Cons */{ +let object_tables = /* Cons */{ key: undefined, data: undefined, next: undefined }; -var object_tables$1 = /* Cons */{ +let object_tables$1 = /* Cons */{ key: undefined, data: undefined, next: undefined @@ -45,16 +45,16 @@ var object_tables$1 = /* Cons */{ function step1(param) { if (!object_tables.key) { - var $$class = CamlinternalOO.create_table(["step2"]); - var step2 = CamlinternalOO.get_method_label($$class, "step2"); + let $$class = CamlinternalOO.create_table(["step2"]); + let step2 = CamlinternalOO.get_method_label($$class, "step2"); CamlinternalOO.set_method($$class, step2, (function (self$1) { if (!object_tables$1.key) { - var $$class = CamlinternalOO.create_table(["step3"]); - var step3 = CamlinternalOO.get_method_label($$class, "step3"); + let $$class = CamlinternalOO.create_table(["step3"]); + let step3 = CamlinternalOO.get_method_label($$class, "step3"); CamlinternalOO.set_method($$class, step3, (function (self$2) { return 33; })); - var env_init = function (env) { + let env_init = function (env) { return CamlinternalOO.create_object_opt(undefined, $$class); }; CamlinternalOO.init_class($$class); @@ -62,7 +62,7 @@ function step1(param) { } return Curry._1(object_tables$1.key, undefined); })); - var env_init = function (env) { + let env_init = function (env) { return CamlinternalOO.create_object_opt(undefined, $$class); }; CamlinternalOO.init_class($$class); @@ -71,11 +71,11 @@ function step1(param) { return Curry._1(object_tables.key, undefined); } -var tmp = step1(undefined); +let tmp = step1(undefined); -var tmp$1 = Caml_oo_curry.js1(68057958, 1, tmp); +let tmp$1 = Caml_oo_curry.js1(68057958, 1, tmp); -var x = Caml_oo_curry.js1(68057959, 2, tmp$1); +let x = Caml_oo_curry.js1(68057959, 2, tmp$1); eq("File \"jscomp/test/gpr_1285_test.ml\", line 20, characters 5-12", x, 33); diff --git a/jscomp/test/dist/jscomp/test/gpr_1409_test.js b/jscomp/test/dist/jscomp/test/gpr_1409_test.js index bb2a6d61a3..3d7c617af2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1409_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1409_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var String_set = require("./string_set.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let String_set = require("./string_set.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -32,9 +32,9 @@ function eq(loc, x, y) { }; } -var a = {}; +let a = {}; -var b = { +let b = { foo: "42" }; @@ -46,11 +46,11 @@ function map(f, x) { } function make(foo) { - var partial_arg = map((function (prim) { + let partial_arg = map((function (prim) { return String(prim); }), foo); return function (param) { - var tmp = {}; + let tmp = {}; if (partial_arg !== undefined) { tmp.foo = Caml_option.valFromOption(partial_arg); } @@ -58,9 +58,9 @@ function make(foo) { }; } -var a_ = make(undefined)(undefined); +let a_ = make(undefined)(undefined); -var b_ = make(42)(undefined); +let b_ = make(42)(undefined); eq("File \"jscomp/test/gpr_1409_test.ml\", line 30, characters 6-13", b_.foo, "42"); @@ -70,12 +70,12 @@ console.log(a, b, a_, b_); eq("File \"jscomp/test/gpr_1409_test.ml\", line 36, characters 6-13", Object.keys(a_).length, 0); -var test2 = { +let test2 = { hi: 2 }; function test3(_open, xx__hi) { - var tmp = { + let tmp = { hi: 2 }; if (_open !== undefined) { @@ -89,7 +89,7 @@ function test3(_open, xx__hi) { function test4(_open, xx__hi) { console.log("no inlin"); - var tmp = { + let tmp = { open: _open, hi: 2 }; @@ -101,14 +101,14 @@ function test4(_open, xx__hi) { function test5(f, x) { console.log("no inline"); - var tmp = { + let tmp = { hi: 2 }; - var tmp$1 = Curry._1(f, x); + let tmp$1 = Curry._1(f, x); if (tmp$1 !== undefined) { tmp.open = Caml_option.valFromOption(tmp$1); } - var tmp$2 = Curry._1(f, x); + let tmp$2 = Curry._1(f, x); if (tmp$2 !== undefined) { tmp.xx = Caml_option.valFromOption(tmp$2); } @@ -117,17 +117,17 @@ function test5(f, x) { function test6(f, x) { console.log("no inline"); - var x$1 = { + let x$1 = { contents: 3 }; - var tmp = { + let tmp = { hi: 2 }; - var tmp$1 = (x$1.contents = x$1.contents + 1 | 0, x$1.contents); + let tmp$1 = (x$1.contents = x$1.contents + 1 | 0, x$1.contents); if (tmp$1 !== undefined) { tmp.open = Caml_option.valFromOption(tmp$1); } - var tmp$2 = f(x$1); + let tmp$2 = f(x$1); if (tmp$2 !== undefined) { tmp.xx = Caml_option.valFromOption(tmp$2); } diff --git a/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js b/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js index eeaea322d6..b76662f310 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Gpr_1423_nav = require("./gpr_1423_nav.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Gpr_1423_nav = require("./gpr_1423_nav.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1481.js b/jscomp/test/dist/jscomp/test/gpr_1481.js index ef24e9eebf..df0b88749d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1481.js +++ b/jscomp/test/dist/jscomp/test/gpr_1481.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Moduleid = require("#moduleid"); +let Moduleid = require("#moduleid"); function f(param) { return Moduleid.name; diff --git a/jscomp/test/dist/jscomp/test/gpr_1501_test.js b/jscomp/test/dist/jscomp/test/gpr_1501_test.js index a90e080ea7..d4a744eb47 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1501_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1501_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Printexc = require("melange/printexc.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Printexc = require("melange/printexc.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,9 +31,9 @@ function eq(loc, x, y) { }; } -var A = /* @__PURE__ */Caml_exceptions.create("Gpr_1501_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Gpr_1501_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Gpr_1501_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Gpr_1501_test.B"); eq("File \"jscomp/test/gpr_1501_test.ml\", line 14, characters 7-14", "Not_found", Stdlib__Printexc.to_string({ MEL_EXN_ID: Stdlib.Not_found diff --git a/jscomp/test/dist/jscomp/test/gpr_1503_test.js b/jscomp/test/dist/jscomp/test/gpr_1503_test.js index ef5076a434..6bc46ba060 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1503_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1503_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Mt = require("./mt.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Mt = require("./mt.js"); +let Stdlib__Int64 = require("melange/int64.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -34,14 +34,14 @@ function id(x) { return Caml_format.caml_int64_of_string(Caml_format.caml_int64_format("%d", x)); } -var i = [ +let i = [ 2074848171, 2880154539 ]; -var s = Caml_format.caml_int64_format("%d", i); +let s = Caml_format.caml_int64_format("%d", i); -var i$p = Caml_format.caml_int64_of_string(s); +let i$p = Caml_format.caml_int64_of_string(s); eq("File \"jscomp/test/gpr_1503_test.ml\", line 18, characters 5-12", i, i$p); diff --git a/jscomp/test/dist/jscomp/test/gpr_1539_test.js b/jscomp/test/dist/jscomp/test/gpr_1539_test.js index bc7da345e8..0373299168 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1539_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1539_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_module = require("melange.js/caml_module.js"); +let Caml_module = require("melange.js/caml_module.js"); -var Point = Caml_module.init_mod([ +let Point = Caml_module.init_mod([ "jscomp/test/gpr_1539_test.ml", 10, 6 @@ -27,9 +27,9 @@ Caml_module.update_mod({ }) }); -var CRS; +let CRS; -var Layer; +let Layer; exports.CRS = CRS; exports.Layer = Layer; diff --git a/jscomp/test/dist/jscomp/test/gpr_1600_test.js b/jscomp/test/dist/jscomp/test/gpr_1600_test.js index 35a631c570..4154b0dbd2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1600_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1600_test.js @@ -2,27 +2,27 @@ 'use strict'; -var obj = { +let obj = { hi: (function (x) { console.log(x); }) }; -var eventObj = { +let eventObj = { events: [], empty: (function () { }), push: (function (a) { - var self = this ; + let self = this ; self.events[0] = a; }), needRebuild: (function () { - var self = this ; + let self = this ; return self.events.length !== 0; }), currentEvents: (function () { - var self = this ; + let self = this ; return self.events; }) }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1658_test.js b/jscomp/test/dist/jscomp/test/gpr_1658_test.js index 0fa4eef81c..4da9196158 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1658_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1658_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Js__Js_types = require("melange.js/js_types.js"); -var Mt = require("./mt.js"); +let Js__Js_types = require("melange.js/js_types.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,7 +31,7 @@ function eq(loc, x, y) { eq("File \"jscomp/test/gpr_1658_test.ml\", line 11, characters 7-14", null, null); -var match = Js__Js_types.classify(null); +let match = Js__Js_types.classify(null); if (match === 2) { eq("File \"jscomp/test/gpr_1658_test.ml\", line 14, characters 11-18", true, true); diff --git a/jscomp/test/dist/jscomp/test/gpr_1667_test.js b/jscomp/test/dist/jscomp/test/gpr_1667_test.js index aab8c54f2b..3548889be1 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1667_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1667_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1698_test.js b/jscomp/test/dist/jscomp/test/gpr_1698_test.js index e8904b6741..77ecb141d5 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1698_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function is_number(_expr) { while(true) { - var expr = _expr; + let expr = _expr; switch (expr.TAG | 0) { case /* Val */0 : if (expr._0.TAG === /* Natural */0) { @@ -28,16 +28,16 @@ function is_number(_expr) { function compare(context, state, _a, _b) { while(true) { - var b = _b; - var a = _a; - var exit = 0; - var na; - var da; - var nb; - var db; - var exit$1 = 0; - var exit$2 = 0; - var exit$3 = 0; + let b = _b; + let a = _a; + let exit = 0; + let na; + let da; + let nb; + let db; + let exit$1 = 0; + let exit$2 = 0; + let exit$3 = 0; switch (a.TAG | 0) { case /* Val */0 : switch (b.TAG | 0) { @@ -173,7 +173,7 @@ function compare(context, state, _a, _b) { return -1; } case 2 : - var denom = compare(context, state, da, db); + let denom = compare(context, state, da, db); if (denom !== 0) { return denom; } @@ -185,7 +185,7 @@ function compare(context, state, _a, _b) { }; } -var a = { +let a = { TAG: /* Sum */2, _0: { hd: { @@ -208,7 +208,7 @@ var a = { } }; -var b = { +let b = { TAG: /* Val */0, _0: { TAG: /* Symbol */1, diff --git a/jscomp/test/dist/jscomp/test/gpr_1701_test.js b/jscomp/test/dist/jscomp/test/gpr_1701_test.js index 182db1f7df..a772974ed5 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1701_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1701_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var Foo = /* @__PURE__ */Caml_exceptions.create("Gpr_1701_test.Foo"); +let Foo = /* @__PURE__ */Caml_exceptions.create("Gpr_1701_test.Foo"); function test(n) { if (n === 0) { @@ -18,7 +18,7 @@ function test(n) { return test(n - 1 | 0); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Foo) { return ; } @@ -29,15 +29,15 @@ function test(n) { test(100); function read_lines(inc) { - var _acc = /* [] */0; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var l; + let acc = _acc; + let l; try { l = Stdlib.input_line(inc); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { l = undefined; } else { @@ -56,15 +56,15 @@ function read_lines(inc) { } function read_lines2(inc) { - var _acc = /* [] */0; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var l; + let acc = _acc; + let l; try { l = Stdlib.input_line(inc); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { return Stdlib__List.rev(acc); } @@ -79,16 +79,16 @@ function read_lines2(inc) { } function read_lines3(inc) { - var loop = function (acc) { + let loop = function (acc) { try { - var l = Stdlib.input_line(inc); + let l = Stdlib.input_line(inc); return loop({ hd: l, tl: acc }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { return Stdlib__List.rev(acc); } diff --git a/jscomp/test/dist/jscomp/test/gpr_1716_test.js b/jscomp/test/dist/jscomp/test/gpr_1716_test.js index 14d7394d08..98a19498d0 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1716_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1716_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -29,9 +29,9 @@ function eq(loc, x, y) { }; } -var a = {}; +let a = {}; -var b = {}; +let b = {}; Caml_obj.update_dummy(a, { b: b diff --git a/jscomp/test/dist/jscomp/test/gpr_1717_test.js b/jscomp/test/dist/jscomp/test/gpr_1717_test.js index 62791d54d0..5fc1efee0e 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1717_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1717_test.js @@ -2,11 +2,11 @@ 'use strict'; -var A = {}; +let A = {}; -var A0 = {}; +let A0 = {}; -var A1 = {}; +let A1 = {}; exports.A = A; exports.A0 = A0; diff --git a/jscomp/test/dist/jscomp/test/gpr_1728_test.js b/jscomp/test/dist/jscomp/test/gpr_1728_test.js index 77da3c30ed..4d9226383c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1728_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1728_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Mt = require("./mt.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -34,7 +34,7 @@ function foo(x) { } function badInlining(obj) { - var x = obj.field; + let x = obj.field; Caml_format.caml_int_of_string(x) !== 3; } diff --git a/jscomp/test/dist/jscomp/test/gpr_1749_test.js b/jscomp/test/dist/jscomp/test/gpr_1749_test.js index d76e91709d..46da2d41cb 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1749_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1749_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -32,7 +32,7 @@ eq("File \"jscomp/test/gpr_1749_test.ml\", line 18, characters 6-13", 0, 0); Mt.from_pair_suites("Gpr_1749_test", suites.contents); -var a = 0; +let a = 0; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_1760_test.js b/jscomp/test/dist/jscomp/test/gpr_1760_test.js index a9d4f424d0..665ad71fb7 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1760_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1760_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_int32 = require("melange.js/caml_int32.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Mt = require("./mt.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,7 +30,7 @@ function eq(loc, x, y) { }; } -var a0; +let a0; try { Caml_int32.div(0, 0); @@ -40,7 +40,7 @@ catch (exn){ a0 = 1; } -var a1; +let a1; try { Caml_int32.mod_(0, 0); @@ -50,7 +50,7 @@ catch (exn$1){ a1 = 1; } -var a4; +let a4; try { Caml_int32.div(0, 0); @@ -60,7 +60,7 @@ catch (exn$2){ a4 = 1; } -var a5; +let a5; try { Caml_int32.mod_(0, 0); @@ -70,7 +70,7 @@ catch (exn$3){ a5 = 1; } -var a6; +let a6; try { Caml_int64.div(Caml_int64.zero, Caml_int64.zero); @@ -80,7 +80,7 @@ catch (exn$4){ a6 = 1; } -var a7; +let a7; try { Caml_int64.mod_(Caml_int64.zero, Caml_int64.zero); diff --git a/jscomp/test/dist/jscomp/test/gpr_1762_test.js b/jscomp/test/dist/jscomp/test/gpr_1762_test.js index 6b02d97cf0..d3051173d3 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1762_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1762_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,7 +28,7 @@ function eq(loc, x, y) { }; } -var v = { +let v = { contents: 3 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1817_test.js b/jscomp/test/dist/jscomp/test/gpr_1817_test.js index b4be8afc82..2b3b7fb45f 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1817_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1817_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,8 +30,8 @@ function eq(loc, x, y) { } function f(param) { - var x = new Date(); - var y = new Date(); + let x = new Date(); + let y = new Date(); return [ Caml_obj.caml_greaterthan(y, x), Caml_obj.caml_lessthan(y, x), @@ -39,13 +39,13 @@ function f(param) { ]; } -var match = f(undefined); +let match = f(undefined); -var a2 = match[2]; +let a2 = match[2]; -var a1 = match[1]; +let a1 = match[1]; -var a0 = match[0]; +let a0 = match[0]; console.log(a0, a1); diff --git a/jscomp/test/dist/jscomp/test/gpr_1822_test.js b/jscomp/test/dist/jscomp/test/gpr_1822_test.js index 3f35066066..ea08203081 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1822_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1822_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,12 +28,12 @@ function eq(loc, x, y) { }; } -var myShape = { +let myShape = { TAG: /* Circle */0, _0: 10 }; -var area; +let area; area = myShape.TAG === /* Circle */0 ? 100 * 3.14 : Math.imul(10, myShape._1); diff --git a/jscomp/test/dist/jscomp/test/gpr_1891_test.js b/jscomp/test/dist/jscomp/test/gpr_1891_test.js index 8b4f25c044..179dd63b33 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1891_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1891_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function foo(x) { if (typeof x === "string" || !(x.NAME === "Foo" && x.VAL === 3)) { diff --git a/jscomp/test/dist/jscomp/test/gpr_1943_test.js b/jscomp/test/dist/jscomp/test/gpr_1943_test.js index 67c1cdadbd..c7a35cef0d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1943_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1943_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -40,7 +40,7 @@ function f(x) { ]; } -var v = f({ +let v = f({ "003": 0, "50": 1, "50x": 2, diff --git a/jscomp/test/dist/jscomp/test/gpr_1946_test.js b/jscomp/test/dist/jscomp/test/gpr_1946_test.js index 4bd2bae5c9..a558233d4b 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1946_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1946_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -15,16 +15,16 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var x = ({ +let x = ({ x: 3, y: 4 }).x; -var zz = ({ +let zz = ({ "5": 3 })[5]; -var h = { +let h = { "0123": 2, "123_456": 3 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_2250_test.js b/jscomp/test/dist/jscomp/test/gpr_2250_test.js index b573b591ef..659bbc2a94 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2250_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2250_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,7 +31,7 @@ function eq(loc, x, y) { }; } -var object_tables = /* Cons */{ +let object_tables = /* Cons */{ key: undefined, data: undefined, next: undefined @@ -39,17 +39,17 @@ var object_tables = /* Cons */{ function create(param) { if (!object_tables.key) { - var $$class = CamlinternalOO.create_table([ + let $$class = CamlinternalOO.create_table([ "add", "get" ]); - var ids = CamlinternalOO.new_methods_variables($$class, [ + let ids = CamlinternalOO.new_methods_variables($$class, [ "get", "add" ], ["data"]); - var get = ids[0]; - var add = ids[1]; - var data = ids[2]; + let get = ids[0]; + let add = ids[1]; + let data = ids[2]; CamlinternalOO.set_methods($$class, [ add, (function (self$1, param) { @@ -61,8 +61,8 @@ function create(param) { return self$1[data]; }) ]); - var env_init = function (env) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let env_init = function (env) { + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[data] = 0; return self; }; @@ -72,21 +72,21 @@ function create(param) { return Curry._1(object_tables.key, undefined); } -var cxt1 = create(undefined); +let cxt1 = create(undefined); -var tmp = Caml_oo_curry.js2(4846113, 1, cxt1, undefined); +let tmp = Caml_oo_curry.js2(4846113, 1, cxt1, undefined); -var result = Caml_oo_curry.js2(5144726, 2, tmp, undefined); +let result = Caml_oo_curry.js2(5144726, 2, tmp, undefined); eq("File \"jscomp/test/gpr_2250_test.ml\", line 26, characters 5-12", result, 1); -var cxt2 = create(undefined); +let cxt2 = create(undefined); -var tmp$1 = Caml_oo_curry.js2(4846113, 3, cxt2, undefined); +let tmp$1 = Caml_oo_curry.js2(4846113, 3, cxt2, undefined); -var tmp$2 = Caml_oo_curry.js2(4846113, 4, tmp$1, undefined); +let tmp$2 = Caml_oo_curry.js2(4846113, 4, tmp$1, undefined); -var result2 = Caml_oo_curry.js2(5144726, 5, tmp$2, undefined); +let result2 = Caml_oo_curry.js2(5144726, 5, tmp$2, undefined); eq("File \"jscomp/test/gpr_2250_test.ml\", line 37, characters 5-12", result2, 2); diff --git a/jscomp/test/dist/jscomp/test/gpr_2316_test.js b/jscomp/test/dist/jscomp/test/gpr_2316_test.js index f7dd8fdb7d..c87d9b1a8d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2316_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2316_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,7 +30,7 @@ function eq(loc, x, y) { }; } -var y; +let y; try { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -39,7 +39,7 @@ try { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Failure) { y = exn._1; } else { @@ -47,9 +47,9 @@ catch (raw_exn){ } } -var x; +let x; -var exit = 0; +let exit = 0; try { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -58,7 +58,7 @@ try { }); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Failure) { x = exn$1._1; } else { diff --git a/jscomp/test/dist/jscomp/test/gpr_2413_test.js b/jscomp/test/dist/jscomp/test/gpr_2413_test.js index 695f370bfa..a9bf4bfdd3 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2413_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2413_test.js @@ -5,25 +5,25 @@ function f(param) { switch (param.TAG | 0) { case /* A */0 : - var a = param._0; + let a = param._0; if (a.TAG === /* P */0) { - var a$1 = a._0; + let a$1 = a._0; return a$1 + a$1 | 0; } - var a$2 = a._0; + let a$2 = a._0; return a$2 - a$2 | 0; case /* B */1 : case /* C */2 : break; } - var a$3 = param._0._0; + let a$3 = param._0._0; return Math.imul(a$3, a$3); } function ff(c) { c.contents = c.contents + 1 | 0; - var match = (1 + c.contents | 0) + 1 | 0; + let match = (1 + c.contents | 0) + 1 | 0; if (match > 3 || match < 0) { return 0; } else { diff --git a/jscomp/test/dist/jscomp/test/gpr_2474.js b/jscomp/test/dist/jscomp/test/gpr_2474.js index 6be32ac99e..9f9bfdfdfd 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2474.js +++ b/jscomp/test/dist/jscomp/test/gpr_2474.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); throw new Caml_js_exceptions.MelangeError("Match_failure", { MEL_EXN_ID: "Match_failure", diff --git a/jscomp/test/dist/jscomp/test/gpr_2487.js b/jscomp/test/dist/jscomp/test/gpr_2487.js index 5f1fe34f6b..af32b892b6 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2487.js +++ b/jscomp/test/dist/jscomp/test/gpr_2487.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var b = Belt__Belt_Array.eq([ +let b = Belt__Belt_Array.eq([ 1, 2, 3 diff --git a/jscomp/test/dist/jscomp/test/gpr_2503_test.js b/jscomp/test/dist/jscomp/test/gpr_2503_test.js index feb01869c0..f4fbf59edc 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2503_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2503_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -21,7 +21,7 @@ function b(loc, b$1) { } function makeWrapper(foo, param) { - var tmp = {}; + let tmp = {}; if (foo !== undefined) { tmp.foo = Caml_option.valFromOption(foo); } @@ -38,7 +38,7 @@ makeWrapper2("a", undefined); function makeWrapper3(foo, param) { console.log(2); - var tmp = {}; + let tmp = {}; if (foo !== undefined) { tmp.foo = Caml_option.valFromOption(foo); } @@ -47,8 +47,8 @@ function makeWrapper3(foo, param) { function makeWrapper4(foo, param) { console.log(2); - var tmp = {}; - var tmp$1 = foo > 100 ? undefined : ( + let tmp = {}; + let tmp$1 = foo > 100 ? undefined : ( foo > 10 ? "b" : "a" ); if (tmp$1 !== undefined) { diff --git a/jscomp/test/dist/jscomp/test/gpr_2608_test.js b/jscomp/test/dist/jscomp/test/gpr_2608_test.js index 786ee9fcfa..2b8b2bf9b5 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2608_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2608_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,24 +16,24 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var oppHeroes = { +let oppHeroes = { hd: 0, tl: /* [] */0 }; -var huntGrootCondition = false; +let huntGrootCondition = false; if (Stdlib__List.length(/* [] */0) > 0) { - var x = Stdlib__List.filter((function (h) { + let x = Stdlib__List.filter((function (h) { return Stdlib__List.hd(/* [] */0) <= 1000; }), oppHeroes); huntGrootCondition = Stdlib__List.length(x) === 0; } -var huntGrootCondition2 = true; +let huntGrootCondition2 = true; if (Stdlib__List.length(/* [] */0) < 0) { - var x$1 = Stdlib__List.filter((function (h) { + let x$1 = Stdlib__List.filter((function (h) { return Stdlib__List.hd(/* [] */0) <= 1000; }), oppHeroes); huntGrootCondition2 = Stdlib__List.length(x$1) === 0; @@ -45,7 +45,7 @@ eq("File \"jscomp/test/gpr_2608_test.ml\", line 24, characters 5-12", huntGrootC Mt.from_pair_suites("Gpr_2608_test", suites.contents); -var nearestGroots = /* [] */0; +let nearestGroots = /* [] */0; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_2614_test.js b/jscomp/test/dist/jscomp/test/gpr_2614_test.js index 73c38896f0..989ad85110 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2614_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2614_test.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); +let Caml_option = require("melange.js/caml_option.js"); -var v = { +let v = { "Content-Type": 3, l: 2, open: 2 }; -var b = v.l; +let b = v.l; -var c = v.open; +let c = v.open; function ff(param) { v["Content-Type"] = 3; v.l = 2; } -var partial_arg = "x"; +let partial_arg = "x"; function h0(param) { - var tmp = { + let tmp = { hi: 2 }; if (partial_arg !== undefined) { @@ -30,12 +30,12 @@ function h0(param) { return tmp; } -var h1 = { +let h1 = { "lo-x": "x", hi: 2 }; -var h2 = { +let h2 = { hi: 2 }; @@ -45,7 +45,7 @@ function hh(x) { } function hh2(x) { - var match = x["lo-x"]; + let match = x["lo-x"]; if (match !== undefined) { return 1; } else { @@ -53,13 +53,13 @@ function hh2(x) { } } -var u = { +let u = { "xx-yy": 3 }; -var x = u["xx-yy"]; +let x = u["xx-yy"]; -var v$1 = x !== undefined ? x : 0; +let v$1 = x !== undefined ? x : 0; exports.b = b; exports.c = c; diff --git a/jscomp/test/dist/jscomp/test/gpr_2633_test.js b/jscomp/test/dist/jscomp/test/gpr_2633_test.js index 7dfa41d637..0e45ceaf95 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2633_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2633_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function on1(foo, $$event) { foo.on($$event.NAME, $$event.VAL); diff --git a/jscomp/test/dist/jscomp/test/gpr_2642_test.js b/jscomp/test/dist/jscomp/test/gpr_2642_test.js index 0f56473b55..f3fbf5e556 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2642_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2642_test.js @@ -4,7 +4,7 @@ function isfree(id, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return id === param._0; diff --git a/jscomp/test/dist/jscomp/test/gpr_2652_test.js b/jscomp/test/dist/jscomp/test/gpr_2652_test.js index 9547097408..40dafe1ac0 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2652_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2652_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Buffer = require("melange/buffer.js"); -var foo = Stdlib__Buffer.contents; +let foo = Stdlib__Buffer.contents; function bar(str) { return Buffer.from(undefined, str); diff --git a/jscomp/test/dist/jscomp/test/gpr_2682_test.js b/jscomp/test/dist/jscomp/test/gpr_2682_test.js index a7013d02ed..c3739c4fce 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2682_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2682_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var sum = ((a,b) => a + b +let sum = ((a,b) => a + b ); -var v = sum(1, 2); +let v = sum(1, 2); function f(a) { return a + 3 | 0; } -var b = f(1); +let b = f(1); -var c = f(2); +let c = f(2); -var forIn = ((o,foo)=> { +let forIn = ((o,foo)=> { for (var i in o){ foo(o) } @@ -27,7 +27,7 @@ function log(x) { console.log(x); } -var N = { +let N = { log2: log }; @@ -44,10 +44,10 @@ forIn({ console.log(x); })); -var f3 = (()=>true +let f3 = (()=>true ); -var bbbb = f3(); +let bbbb = f3(); if (!bbbb) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/gpr_2731_test.js b/jscomp/test/dist/jscomp/test/gpr_2731_test.js index cbd0246425..7033b13150 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2731_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2731_test.js @@ -6,17 +6,17 @@ function f(x) { return x + 1 | 0; } -var a = f(1); +let a = f(1); -var b = f(2); +let b = f(2); function g(param) { return 1; } -var c = g(undefined); +let c = g(undefined); -var d = g(undefined); +let d = g(undefined); exports.f = f; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/gpr_2789_test.js b/jscomp/test/dist/jscomp/test/gpr_2789_test.js index 5b3bae5359..61b3ae0bfa 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2789_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2789_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_2863_test.js b/jscomp/test/dist/jscomp/test/gpr_2863_test.js index 8b909f7a5f..4e43541cc8 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2863_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2863_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Belt__Belt_MutableSetInt = require("melange.belt/belt_MutableSetInt.js"); +let Belt__Belt_MutableSetInt = require("melange.belt/belt_MutableSetInt.js"); -var mySet = { +let mySet = { data: undefined }; @@ -13,7 +13,7 @@ Belt__Belt_MutableSetInt.add(mySet, 2); Belt__Belt_MutableSetInt.remove(mySet, 1); -var a = 3; +let a = 3; exports.mySet = mySet; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/gpr_2931_test.js b/jscomp/test/dist/jscomp/test/gpr_2931_test.js index faf098b036..66ed2e1fa2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2931_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2931_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_3142_test.js b/jscomp/test/dist/jscomp/test/gpr_3142_test.js index 74fc225035..2596652ed9 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3142_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3142_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -15,9 +15,9 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var _map = {"a":"x","u":"hi","b":"你","c":"我"}; +let _map = {"a":"x","u":"hi","b":"你","c":"我"}; -var _revMap = {"x":"a","hi":"u","你":"b","我":"c"}; +let _revMap = {"x":"a","hi":"u","你":"b","我":"c"}; function tToJs(param) { return _map[param]; @@ -47,9 +47,9 @@ eq("File \"jscomp/test/gpr_3142_test.ml\", line 26, characters 6-13", tFromJs("x Mt.from_pair_suites("Gpr_3142_test", suites.contents); -var v = tToJs; +let v = tToJs; -var u = tFromJs; +let u = tFromJs; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_3154_test.js b/jscomp/test/dist/jscomp/test/gpr_3154_test.js index f0798a02d5..efc96bb318 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3154_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3154_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_dict = require("melange.js/js_dict.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_dict = require("melange.js/js_dict.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -21,11 +21,11 @@ function b(loc, x) { Mt.bool_suites(test_id, suites, loc, x); } -var d = {}; +let d = {}; d["foo"] = undefined; -var match = Js__Js_dict.get(d, "foo"); +let match = Js__Js_dict.get(d, "foo"); if (match !== undefined && Caml_option.valFromOption(match) === undefined) { b("File \"jscomp/test/gpr_3154_test.ml\", line 12, characters 19-26", true); @@ -33,7 +33,7 @@ if (match !== undefined && Caml_option.valFromOption(match) === undefined) { b("File \"jscomp/test/gpr_3154_test.ml\", line 13, characters 11-18", false); } -var d0 = {}; +let d0 = {}; d0["foo"] = undefined; diff --git a/jscomp/test/dist/jscomp/test/gpr_3492_test.js b/jscomp/test/dist/jscomp/test/gpr_3492_test.js index e0e511aec1..12b57cee01 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3492_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3492_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_3502_test.js b/jscomp/test/dist/jscomp/test/gpr_3502_test.js index b9a1346854..b4a526e480 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3502_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3502_test.js @@ -10,16 +10,16 @@ function name(param) { return 2; } -var Language = { +let Language = { toString: toString, name: name }; -var language = "a"; +let language = "a"; -var shortName = "a"; +let shortName = "a"; -var name$1 = 2; +let name$1 = 2; exports.Language = Language; exports.language = language; diff --git a/jscomp/test/dist/jscomp/test/gpr_3519_jsx_test.js b/jscomp/test/dist/jscomp/test/gpr_3519_jsx_test.js index 0fbd8c7436..c7b0f0e9e7 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3519_jsx_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3519_jsx_test.js @@ -2,7 +2,7 @@ 'use strict'; -var React = { +let React = { $$null: undefined }; @@ -10,7 +10,7 @@ function Gpr_3519_jsx_test$Foo(Props) { } -var Foo = { +let Foo = { make: Gpr_3519_jsx_test$Foo }; diff --git a/jscomp/test/dist/jscomp/test/gpr_3519_test.js b/jscomp/test/dist/jscomp/test/gpr_3519_test.js index 1f9c7be41b..1ff4c07ac4 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3519_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3519_test.js @@ -2,7 +2,7 @@ 'use strict'; -var Foo = {}; +let Foo = {}; exports.Foo = Foo; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/gpr_3536_test.js b/jscomp/test/dist/jscomp/test/gpr_3536_test.js index 735a127ed9..28343a26c2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3536_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3536_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,7 +16,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var X = {}; +let X = {}; function xx(obj, a0, a1, a2, a3, a4, a5) { return (Curry._2(a4, Curry._2(a2, Curry._2(a0, obj, a1), a3), a5) - 1 | 0) - 3 | 0; @@ -34,9 +34,9 @@ eq("File \"jscomp/test/gpr_3536_test.ml\", line 32, characters 6-13", xx(3, (fun Mt.from_pair_suites("Gpr_3536_test", suites.contents); -var v = 5; +let v = 5; -var u = /* Some */{ +let u = /* Some */{ _0: 3 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_3546_test.js b/jscomp/test/dist/jscomp/test/gpr_3546_test.js index cf3748848b..f159a68d10 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3546_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3546_test.js @@ -8,9 +8,9 @@ function t_error3(param_0) { }; } -var t_error = /* T_error */0; +let t_error = /* T_error */0; -var t_error2 = /* T_error2 */0; +let t_error2 = /* T_error2 */0; exports.t_error = t_error; exports.t_error2 = t_error2; diff --git a/jscomp/test/dist/jscomp/test/gpr_3548_test.js b/jscomp/test/dist/jscomp/test/gpr_3548_test.js index fc100f4083..b35d66fc04 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3548_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3548_test.js @@ -2,9 +2,9 @@ 'use strict'; -var _map = {"Horizontal":"horizontal","Vertical":"vertical"}; +let _map = {"Horizontal":"horizontal","Vertical":"vertical"}; -var _revMap = {"horizontal":"Horizontal","vertical":"Vertical"}; +let _revMap = {"horizontal":"Horizontal","vertical":"Vertical"}; function orientationToJs(param) { return _map[param]; diff --git a/jscomp/test/dist/jscomp/test/gpr_3549_test.js b/jscomp/test/dist/jscomp/test/gpr_3549_test.js index 2ac2e8ad14..eae435ebe8 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3549_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3549_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -15,7 +15,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var others = [ +let others = [ 0, 0, 1, @@ -41,13 +41,13 @@ eq("File \"jscomp/test/gpr_3549_test.ml\", line 22, characters 5-12", others, [ Mt.from_pair_suites("Gpr_3549_test", suites.contents); -var u = 32; +let u = 32; -var x = 7.0; +let x = 7.0; -var y = 2e3; +let y = 2e3; -var z = 0.2; +let z = 0.2; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_3566_drive_test.js b/jscomp/test/dist/jscomp/test/gpr_3566_drive_test.js index d655b57e81..62c6215d08 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3566_drive_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3566_drive_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Gpr_3566_test = require("./gpr_3566_test.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Gpr_3566_test = require("./gpr_3566_test.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -17,11 +17,11 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var H = Gpr_3566_test.Test(undefined); +let H = Gpr_3566_test.Test(undefined); eq("File \"jscomp/test/gpr_3566_drive_test.ml\", line 8, characters 5-12", H.b, true); -var Caml_option$1 = {}; +let Caml_option$1 = {}; function f(x) { return Caml_option.some(x); diff --git a/jscomp/test/dist/jscomp/test/gpr_3566_test.js b/jscomp/test/dist/jscomp/test/gpr_3566_test.js index b6aabe510d..7453cd751f 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3566_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3566_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); function eq_A(x, y) { if (x.TAG === /* A */0 && y.TAG === /* A */0) { @@ -15,12 +15,12 @@ function eq_A(x, y) { function Test($star) { console.log("no inline"); - var u = { + let u = { TAG: /* A */0, _0: 3 }; - var Block = {}; - var b = eq_A({ + let Block = {}; + let b = eq_A({ TAG: /* A */0, _0: 3 }, u); @@ -34,8 +34,8 @@ function Test($star) { function Test2($star) { console.log("no inline"); - var Block = {}; - var b = eq_A({ + let Block = {}; + let b = eq_A({ TAG: /* A */0, _0: 3 }, { @@ -50,7 +50,7 @@ function Test2($star) { } function f(i, y) { - var x = { + let x = { TAG: /* A */0, _0: i }; @@ -58,8 +58,8 @@ function f(i, y) { } function Test3($star) { - var f = Caml_obj.caml_equal; - var Caml_obj$1 = {}; + let f = Caml_obj.caml_equal; + let Caml_obj$1 = {}; return { f: f, Caml_obj: Caml_obj$1 @@ -67,8 +67,8 @@ function Test3($star) { } function Test4($star) { - var Caml_obj$1 = {}; - var f = Caml_obj.caml_equal; + let Caml_obj$1 = {}; + let f = Caml_obj.caml_equal; return { Caml_obj: Caml_obj$1, f: f @@ -76,10 +76,10 @@ function Test4($star) { } function Test5($star) { - var f = function (x) { + let f = function (x) { return Caml_option.some(x); }; - var Caml_option$1 = {}; + let Caml_option$1 = {}; return { f: f, Caml_option: Caml_option$1 @@ -87,8 +87,8 @@ function Test5($star) { } function Test6($star) { - var Caml_option$1 = {}; - var f = function (x) { + let Caml_option$1 = {}; + let f = function (x) { return Caml_option.some(x); }; return { @@ -98,15 +98,15 @@ function Test6($star) { } function Test7($star) { - var Caml_option = {}; + let Caml_option = {}; return { Caml_option: Caml_option }; } function Test8($star) { - var Curry$1 = {}; - var f = function (x) { + let Curry$1 = {}; + let f = function (x) { return Curry._1(x, 1); }; return { @@ -116,10 +116,10 @@ function Test8($star) { } function Test9($star) { - var f = function (x) { + let f = function (x) { return Curry._1(x, 1); }; - var Curry$1 = {}; + let Curry$1 = {}; return { f: f, Curry: Curry$1 @@ -127,13 +127,13 @@ function Test9($star) { } function Test10($star) { - var Curry = {}; + let Curry = {}; return { Curry: Curry }; } -var x = 3; +let x = 3; exports.eq_A = eq_A; exports.Test = Test; diff --git a/jscomp/test/dist/jscomp/test/gpr_3595_test.js b/jscomp/test/dist/jscomp/test/gpr_3595_test.js index 5b04fb3b28..d5fc02b5c9 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3595_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3595_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,7 +16,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var match = [1]; +let match = [1]; if (match.length !== 1) { throw new Caml_js_exceptions.MelangeError("Match_failure", { @@ -29,9 +29,9 @@ if (match.length !== 1) { }); } -var a = match[0]; +let a = match[0]; -var x = 1; +let x = 1; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_3697_test.js b/jscomp/test/dist/jscomp/test/gpr_3697_test.js index 6b87cf502a..5afe29cc8c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3697_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3697_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var CamlinternalLazy = require("melange/camlinternalLazy.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); function fix(param) { return /* Fix */{ @@ -16,7 +16,7 @@ function fix(param) { function unfixLeak(_param) { while(true) { - var param = _param; + let param = _param; _param = CamlinternalLazy.force(param._0); continue ; }; @@ -24,7 +24,7 @@ function unfixLeak(_param) { function unfix(p) { while(true) { - var match = p.contents; + let match = p.contents; p.contents = CamlinternalLazy.force(match._0); }; } diff --git a/jscomp/test/dist/jscomp/test/gpr_373_test.js b/jscomp/test/dist/jscomp/test/gpr_373_test.js index 73a3a7d6fc..296c9539b8 100644 --- a/jscomp/test/dist/jscomp/test/gpr_373_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_373_test.js @@ -2,13 +2,13 @@ 'use strict'; -var overflow_dec_i32_number = 272872590; +let overflow_dec_i32_number = 272872590; -var overflow_dec_i32_number_2 = 0; +let overflow_dec_i32_number_2 = 0; -var not_overflow_dec_i32_number_3 = -1; +let not_overflow_dec_i32_number_3 = -1; -var overflow_hex_i32_number = -1; +let overflow_hex_i32_number = -1; exports.overflow_dec_i32_number = overflow_dec_i32_number; exports.overflow_dec_i32_number_2 = overflow_dec_i32_number_2; diff --git a/jscomp/test/dist/jscomp/test/gpr_3770_test.js b/jscomp/test/dist/jscomp/test/gpr_3770_test.js index 4aee1fd73c..0782872ff7 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3770_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3770_test.js @@ -3,7 +3,7 @@ function show(param) { - var a = param._0; + let a = param._0; if (a === 0 && param._1 === 0 && param._2 === 0) { return "zeroes"; } diff --git a/jscomp/test/dist/jscomp/test/gpr_3852_alias_reify.js b/jscomp/test/dist/jscomp/test/gpr_3852_alias_reify.js index ad27c7e756..6ff080507e 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3852_alias_reify.js +++ b/jscomp/test/dist/jscomp/test/gpr_3852_alias_reify.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Gpr_3852_effect = require("./gpr_3852_effect.js"); +let Gpr_3852_effect = require("./gpr_3852_effect.js"); -var A = Gpr_3852_effect; +let A = Gpr_3852_effect; exports.A = A; /* Gpr_3852_effect Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/gpr_3852_effect.js b/jscomp/test/dist/jscomp/test/gpr_3852_effect.js index ca9f6b33cd..d3a2c2a373 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3852_effect.js +++ b/jscomp/test/dist/jscomp/test/gpr_3852_effect.js @@ -4,7 +4,7 @@ console.log("hello"); -var v = 0; +let v = 0; exports.v = v; /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/gpr_3875_test.js b/jscomp/test/dist/jscomp/test/gpr_3875_test.js index 1684e81874..4a77dc084f 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3875_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3875_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var result = { +let result = { contents: "" }; @@ -12,12 +12,12 @@ function log(x) { result.contents = x; } -var Xx = { +let Xx = { log: log }; function compilerBug(a, b, c, f) { - var exit = 0; + let exit = 0; if (a !== "x") { exit = 2; } @@ -47,11 +47,11 @@ function compilerBug(a, b, c, f) { } } -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_3877_test.js b/jscomp/test/dist/jscomp/test/gpr_3877_test.js index a14b9b8797..03d001f31d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3877_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3877_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function test(code) { if (code > 599 || code < 500) { @@ -17,9 +17,9 @@ function test(code) { } } -var a = "good response"; +let a = "good response"; -var b = "bad response"; +let b = "bad response"; if (a !== "good response") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/gpr_3931_test.js b/jscomp/test/dist/jscomp/test/gpr_3931_test.js index 8c2fe85d86..686495b7b4 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3931_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3931_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_module = require("melange.js/caml_module.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_module = require("melange.js/caml_module.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); -var PA = Caml_module.init_mod([ +let PA = Caml_module.init_mod([ "jscomp/test/gpr_3931_test.ml", 3, 6 @@ -17,7 +17,7 @@ var PA = Caml_module.init_mod([ ]] }); -var P = Caml_module.init_mod([ +let P = Caml_module.init_mod([ "jscomp/test/gpr_3931_test.ml", 11, 6 diff --git a/jscomp/test/dist/jscomp/test/gpr_3980_test.js b/jscomp/test/dist/jscomp/test/gpr_3980_test.js index b17a41101d..8e63c896a7 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3980_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3980_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_math = require("melange.js/js_math.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_math = require("melange.js/js_math.js"); -var match = 1; +let match = 1; if (match !== undefined) { if (match !== 1) { @@ -17,7 +17,7 @@ if (match !== undefined) { ] }); } - var match$1 = 1; + let match$1 = 1; if (match$1 !== 1) { if (match$1 !== 2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/gpr_405_test.js b/jscomp/test/dist/jscomp/test/gpr_405_test.js index 0d301b4fd1..ebe49bb816 100644 --- a/jscomp/test/dist/jscomp/test/gpr_405_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_405_test.js @@ -1,42 +1,42 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); function Make(funarg) { - var $$let = funarg.V; - var H = Stdlib__Hashtbl.Make({ + let $$let = funarg.V; + let H = Stdlib__Hashtbl.Make({ equal: $$let.equal, hash: $$let.hash }); - var find_default = function (htbl, x) { + let find_default = function (htbl, x) { try { return Curry._2(H.find, htbl, x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var min_cutset = function (gr, first_node) { - var n_labels = Curry._1(H.create, 97); - var l_labels = Curry._1(H.create, 97); - var already_processed = Curry._1(H.create, 97); - var on_the_stack = Curry._1(H.create, 97); - var cut_set = { + let min_cutset = function (gr, first_node) { + let n_labels = Curry._1(H.create, 97); + let l_labels = Curry._1(H.create, 97); + let already_processed = Curry._1(H.create, 97); + let on_the_stack = Curry._1(H.create, 97); + let cut_set = { contents: /* [] */0 }; - var counter = { + let counter = { contents: 1 }; - var step2 = function (top, rest_of_stack) { + let step2 = function (top, rest_of_stack) { if (find_default(already_processed, top)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -62,15 +62,15 @@ function Make(funarg) { counter.contents = counter.contents + 1 | 0; Curry._3(H.add, l_labels, top, 0); Curry._3(H.add, already_processed, top, true); - var _successors = Curry._2(funarg.succ, gr, top); - var _top = top; - var _rest_of_stack = rest_of_stack; + let _successors = Curry._2(funarg.succ, gr, top); + let _top = top; + let _rest_of_stack = rest_of_stack; while(true) { - var rest_of_stack$1 = _rest_of_stack; - var top$1 = _top; - var successors = _successors; + let rest_of_stack$1 = _rest_of_stack; + let top$1 = _top; + let successors = _successors; if (successors) { - var successor = successors.hd; + let successor = successors.hd; if (!find_default(already_processed, successor)) { return step2(successor, { hd: [ @@ -80,7 +80,7 @@ function Make(funarg) { tl: rest_of_stack$1 }); } - var x = find_default(on_the_stack, successor) ? Curry._2(H.find, n_labels, successor) : Curry._2(H.find, l_labels, successor); + let x = find_default(on_the_stack, successor) ? Curry._2(H.find, n_labels, successor) : Curry._2(H.find, l_labels, successor); Curry._3(H.add, l_labels, top$1, Caml.caml_int_max(Curry._2(H.find, l_labels, top$1), x)); _successors = successors.tl; continue ; @@ -101,8 +101,8 @@ function Make(funarg) { if (!rest_of_stack$1) { return cut_set.contents; } - var match = rest_of_stack$1.hd; - var new_top = match[0]; + let match = rest_of_stack$1.hd; + let new_top = match[0]; Curry._3(H.add, on_the_stack, top$1, false); Curry._3(H.add, l_labels, new_top, Caml.caml_int_max(Curry._2(H.find, l_labels, top$1), Curry._2(H.find, l_labels, new_top))); _rest_of_stack = rest_of_stack$1.tl; diff --git a/jscomp/test/dist/jscomp/test/gpr_4069_test.js b/jscomp/test/dist/jscomp/test/gpr_4069_test.js index 32522957b0..f0c25c1c4d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4069_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4069_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function f(value) { if (value == null) { @@ -12,7 +12,7 @@ function f(value) { } function fxx(v) { - var match = Curry._1(v, undefined); + let match = Curry._1(v, undefined); switch (match) { case 1 : return /* 'a' */97; diff --git a/jscomp/test/dist/jscomp/test/gpr_4265_test.js b/jscomp/test/dist/jscomp/test/gpr_4265_test.js index a5f3fa60b0..936772f418 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4265_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4265_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Belt__Belt_MutableMapInt = require("melange.belt/belt_MutableMapInt.js"); -var Belt__Belt_internalMapInt = require("melange.belt/belt_internalMapInt.js"); -var Mt = require("./mt.js"); +let Belt__Belt_MutableMapInt = require("melange.belt/belt_MutableMapInt.js"); +let Belt__Belt_internalMapInt = require("melange.belt/belt_internalMapInt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -17,7 +17,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var mockMap = { +let mockMap = { data: undefined }; @@ -32,13 +32,13 @@ function remove(id) { add(1726); -var n = add(6667); +let n = add(6667); add(486); Belt__Belt_MutableMapInt.remove(mockMap, 1726); -var n1 = Belt__Belt_internalMapInt.getExn(mockMap.data, 6667); +let n1 = Belt__Belt_internalMapInt.getExn(mockMap.data, 6667); eq("File \"jscomp/test/gpr_4265_test.ml\", line 17, characters 6-13", n, n1); diff --git a/jscomp/test/dist/jscomp/test/gpr_4274_test.js b/jscomp/test/dist/jscomp/test/gpr_4274_test.js index 948834b0eb..b6df12a48c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4274_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4274_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); -var N = {}; +let N = {}; function f(X, xs) { X.forEach(xs, { @@ -23,9 +23,9 @@ Belt__Belt_List.forEachU({ console.log(x.x); })); -var Foo = {}; +let Foo = {}; -var bar = [{ +let bar = [{ foo: "bar" }]; diff --git a/jscomp/test/dist/jscomp/test/gpr_4280_test.js b/jscomp/test/dist/jscomp/test/gpr_4280_test.js index eea2ca1afc..d5b88171a9 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4280_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4280_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -15,28 +15,28 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var u = { +let u = { contents: 0 }; function div(children, param) { - for(var _i = 0; _i <= 1; ++_i){ + for(let _i = 0; _i <= 1; ++_i){ u.contents = 300; console.log("nonline"); } } function string(s) { - for(var _i = 0; _i <= 1; ++_i){ + for(let _i = 0; _i <= 1; ++_i){ u.contents = 200; console.log("no"); } } function fn(authState, route) { - var onboardingRoute; + let onboardingRoute; if (typeof authState === "string") { - var exit = 0; + let exit = 0; if (typeof route === "string") { if (route === "SignUp" || route === "SignIn" || route === "Invite" || route === "PasswordReset") { div({ @@ -60,7 +60,7 @@ function fn(authState, route) { } } else { - var exit$1 = 0; + let exit$1 = 0; if (typeof route === "string" || route.NAME !== "Onboarding") { exit$1 = 2; } else { diff --git a/jscomp/test/dist/jscomp/test/gpr_4407_test.js b/jscomp/test/dist/jscomp/test/gpr_4407_test.js index 01d9a2903c..84dfe6c817 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4407_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4407_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Debug_mode_value = require("./debug_mode_value.js"); -var Mt = require("./mt.js"); +let Debug_mode_value = require("./debug_mode_value.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,7 +16,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var non_debug_u = /* A */{ +let non_debug_u = /* A */{ _0: 1, _1: 2 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_4442_test.js b/jscomp/test/dist/jscomp/test/gpr_4442_test.js index 275b1dfd61..ef3691f72f 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4442_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4442_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -15,7 +15,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var u = (function fib(n){ +let u = (function fib(n){ if(n===0||n==1){ return 1 } diff --git a/jscomp/test/dist/jscomp/test/gpr_4519_test.js b/jscomp/test/dist/jscomp/test/gpr_4519_test.js index ab72f1f256..721dc100ef 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4519_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4519_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_459_test.js b/jscomp/test/dist/jscomp/test/gpr_459_test.js index 1bfe86d7fa..e6d3de3796 100644 --- a/jscomp/test/dist/jscomp/test/gpr_459_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_459_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,17 +28,17 @@ function eq(loc, x, y) { }; } -var uu = { +let uu = { "'x": 3 }; -var uu2 = { +let uu2 = { then: 1, catch: 2, "'x": 3 }; -var hh = uu["'x"]; +let hh = uu["'x"]; eq("File \"jscomp/test/gpr_459_test.ml\", line 25, characters 12-19", hh, 3); diff --git a/jscomp/test/dist/jscomp/test/gpr_4632.js b/jscomp/test/dist/jscomp/test/gpr_4632.js index d22f72bbca..ab89cc018c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4632.js +++ b/jscomp/test/dist/jscomp/test/gpr_4632.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var T0_myList = { +let T0_myList = { hd: 1, tl: { hd: 2, @@ -11,12 +11,12 @@ var T0_myList = { } }; -var T0_tail = { +let T0_tail = { hd: 2, tl: /* [] */0 }; -var T0 = { +let T0 = { myList: T0_myList, head: 1, tail: T0_tail diff --git a/jscomp/test/dist/jscomp/test/gpr_4900_test.js b/jscomp/test/dist/jscomp/test/gpr_4900_test.js index 132252e58d..dce34278a0 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4900_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4900_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var id = { +let id = { contents: 0 }; @@ -29,9 +29,9 @@ Mt.eq_suites(id, suites, "File \"jscomp/test/gpr_4900_test.ml\", line 15, charac Mt.from_pair_suites("File \"jscomp/test/gpr_4900_test.ml\", line 17, characters 20-27", suites.contents); -var from_pair_suites = Mt.from_pair_suites; +let from_pair_suites = Mt.from_pair_suites; -var eq_suites = Mt.eq_suites; +let eq_suites = Mt.eq_suites; exports.from_pair_suites = from_pair_suites; exports.eq_suites = eq_suites; diff --git a/jscomp/test/dist/jscomp/test/gpr_4924_test.js b/jscomp/test/dist/jscomp/test/gpr_4924_test.js index 3676cad185..814a10a602 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4924_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4924_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var id = { +let id = { contents: 0 }; @@ -77,9 +77,9 @@ function u6(b) { Mt.from_pair_suites("File \"jscomp/test/gpr_4924_test.ml\", line 49, characters 20-27", suites.contents); -var from_pair_suites = Mt.from_pair_suites; +let from_pair_suites = Mt.from_pair_suites; -var eq_suites = Mt.eq_suites; +let eq_suites = Mt.eq_suites; exports.from_pair_suites = from_pair_suites; exports.eq_suites = eq_suites; diff --git a/jscomp/test/dist/jscomp/test/gpr_5169_test.js b/jscomp/test/dist/jscomp/test/gpr_5169_test.js index e3c4098beb..b47c694a2b 100644 --- a/jscomp/test/dist/jscomp/test/gpr_5169_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_5169_test.js @@ -2,37 +2,37 @@ 'use strict'; -var NotOption = {}; +let NotOption = {}; -var TotallyNotOption = {}; +let TotallyNotOption = {}; -var NotOption2 = {}; +let NotOption2 = {}; -var a; +let a; -var b = 1; +let b = 1; -var c; +let c; -var d = 1; +let d = 1; -var e; +let e; -var f = 1; +let f = 1; -var g; +let g; -var h = 1; +let h = 1; -var i = /* None */0; +let i = /* None */0; -var j = /* Some */{ +let j = /* Some */{ _0: 1 }; -var k = /* None */0; +let k = /* None */0; -var l = /* Some */{ +let l = /* Some */{ _0: 1 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_5280_optimize_test.js b/jscomp/test/dist/jscomp/test/gpr_5280_optimize_test.js index 841e9fdbb4..c4aa7f577c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_5280_optimize_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_5280_optimize_test.js @@ -2,11 +2,11 @@ 'use strict'; -var a = /* Color */{ +let a = /* Color */{ _0: "#ffff" }; -var c = "white"; +let c = "white"; exports.a = a; exports.c = c; diff --git a/jscomp/test/dist/jscomp/test/gpr_627_test.js b/jscomp/test/dist/jscomp/test/gpr_627_test.js index 2d95daf335..79bccc54fc 100644 --- a/jscomp/test/dist/jscomp/test/gpr_627_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_627_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -30,22 +30,22 @@ function eq(loc, param) { }; } -var u = { +let u = { say: (function (x, y) { return x + y | 0; }) }; -var v = { +let v = { hi: (function (x, y) { - var self = this ; - var u = { + let self = this ; + let u = { x: x }; return self.say(u.x) + y + x; }), say: (function (x) { - var self = this ; + let self = this ; return x * self.x(); }), x: (function () { @@ -53,9 +53,9 @@ var v = { }) }; -var p_1 = u.say(1, 2); +let p_1 = u.say(1, 2); -var p = [ +let p = [ 3, p_1 ]; diff --git a/jscomp/test/dist/jscomp/test/gpr_858_test.js b/jscomp/test/dist/jscomp/test/gpr_858_test.js index 17bb5699cf..7f39fa1e3c 100644 --- a/jscomp/test/dist/jscomp/test/gpr_858_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_858_test.js @@ -2,11 +2,11 @@ 'use strict'; -var direct = { +let direct = { contents: /* [] */0 }; -var indirect = { +let indirect = { contents: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js b/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js index eaf2d4dcac..d4cf7972fb 100644 --- a/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); -var delayed = { +let delayed = { contents: (function (param) { }) }; -for(var i = 1; i <= 2; ++i){ - var f = (function(i){ +for(let i = 1; i <= 2; ++i){ + let f = (function(i){ return function f(n, j) { if (j !== 0) { - var prev = delayed.contents; + let prev = delayed.contents; delayed.contents = (function (param) { Curry._1(prev, undefined); f(((n + 1 | 0) + i | 0) - i | 0, j - 1 | 0); diff --git a/jscomp/test/dist/jscomp/test/gpr_904_test.js b/jscomp/test/dist/jscomp/test/gpr_904_test.js index a700c2734b..969bcaceeb 100644 --- a/jscomp/test/dist/jscomp/test/gpr_904_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_904_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/gpr_974_test.js b/jscomp/test/dist/jscomp/test/gpr_974_test.js index 9d7e869be7..ef30ba82dc 100644 --- a/jscomp/test/dist/jscomp/test/gpr_974_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_974_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); if (!Caml_obj.caml_equal(Caml_option.nullable_to_opt(""), "")) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/gpr_977_test.js b/jscomp/test/dist/jscomp/test/gpr_977_test.js index fcc5101fe1..805edc8e54 100644 --- a/jscomp/test/dist/jscomp/test/gpr_977_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_977_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib__Int32 = require("melange/int32.js"); +let Mt = require("./mt.js"); +let Stdlib__Int32 = require("melange/int32.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,20 +30,20 @@ function eq(loc, x, y) { } function f(x) { - for(var _i = 0; _i <= 100; ++_i){ + for(let _i = 0; _i <= 100; ++_i){ console.log("."); } return -x | 0; } function int32_f(x) { - for(var _i = 0; _i <= 100; ++_i){ + for(let _i = 0; _i <= 100; ++_i){ console.log("."); } return -x | 0; } -var u = f(-2147483648); +let u = f(-2147483648); eq("File \"jscomp/test/gpr_977_test.ml\", line 32, characters 5-12", -2147483648, u); @@ -51,7 +51,7 @@ eq("File \"jscomp/test/gpr_977_test.ml\", line 33, characters 5-12", Stdlib__Int Mt.from_pair_suites("Gpr_977_test", suites.contents); -var min_32_int = -2147483648; +let min_32_int = -2147483648; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/gpr_return_type_unused_attribute.js b/jscomp/test/dist/jscomp/test/gpr_return_type_unused_attribute.js index 795c3d4575..a3feceabcb 100644 --- a/jscomp/test/dist/jscomp/test/gpr_return_type_unused_attribute.js +++ b/jscomp/test/dist/jscomp/test/gpr_return_type_unused_attribute.js @@ -2,7 +2,7 @@ 'use strict'; -var v = mk(2); +let v = mk(2); exports.v = v; /* v Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/gray_code_test.js b/jscomp/test/dist/jscomp/test/gray_code_test.js index 7b843b1dc8..0e4d3c83b8 100644 --- a/jscomp/test/dist/jscomp/test/gray_code_test.js +++ b/jscomp/test/dist/jscomp/test/gray_code_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Stdlib__Bytes = require("melange/bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Stdlib__Bytes = require("melange/bytes.js"); function gray_encode(b) { return b ^ (b >>> 1); } function gray_decode(n) { - var _p = n; - var _n = (n >>> 1); + let _p = n; + let _n = (n >>> 1); while(true) { - var n$1 = _n; - var p = _p; + let n$1 = _n; + let p = _p; if (n$1 === 0) { return p; } @@ -24,12 +24,12 @@ function gray_decode(n) { } function bool_string(len, n) { - var s = Stdlib__Bytes.make(len, /* '0' */48); - var _i = len - 1 | 0; - var _n = n; + let s = Stdlib__Bytes.make(len, /* '0' */48); + let _i = len - 1 | 0; + let _n = n; while(true) { - var n$1 = _n; - var i = _i; + let n$1 = _n; + let i = _i; if ((n$1 & 1) === 1) { Caml_bytes.set(s, i, /* '1' */49); } @@ -43,12 +43,12 @@ function bool_string(len, n) { } function next_power(v) { - var v$1 = v - 1 | 0; - var v$2 = (v$1 >>> 1) | v$1; - var v$3 = (v$2 >>> 2) | v$2; - var v$4 = (v$3 >>> 4) | v$3; - var v$5 = (v$4 >>> 8) | v$4; - var v$6 = (v$5 >>> 16) | v$5; + let v$1 = v - 1 | 0; + let v$2 = (v$1 >>> 1) | v$1; + let v$3 = (v$2 >>> 2) | v$2; + let v$4 = (v$3 >>> 4) | v$3; + let v$5 = (v$4 >>> 8) | v$4; + let v$6 = (v$5 >>> 16) | v$5; return v$6 + 1 | 0; } diff --git a/jscomp/test/dist/jscomp/test/hamming_test.js b/jscomp/test/dist/jscomp/test/hamming_test.js index aca5b84c9e..aafcce2590 100644 --- a/jscomp/test/dist/jscomp/test/hamming_test.js +++ b/jscomp/test/dist/jscomp/test/hamming_test.js @@ -1,46 +1,46 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Printf = require("melange/printf.js"); -var n0 = Caml_int64.zero; +let n0 = Caml_int64.zero; -var n1 = Caml_int64.one; +let n1 = Caml_int64.one; -var n2 = [ +let n2 = [ 0, 2 ]; -var n3 = [ +let n3 = [ 0, 3 ]; -var n5 = [ +let n5 = [ 0, 5 ]; -var $percent = Caml_int64.mod_; +let $percent = Caml_int64.mod_; -var $star = Caml_int64.mul; +let $star = Caml_int64.mul; -var $slash = Caml_int64.div; +let $slash = Caml_int64.div; -var $plus = Caml_int64.add; +let $plus = Caml_int64.add; -var digit = Caml_format.caml_int64_of_string("1000000000000000000"); +let digit = Caml_format.caml_int64_of_string("1000000000000000000"); function mul(n, param) { - var pl = param[0]; + let pl = param[0]; return [ Caml_int64.mod_(Caml_int64.mul(n, pl), digit), Caml_int64.add(Caml_int64.mul(n, param[1]), Caml_int64.div(Caml_int64.mul(n, pl), digit)) @@ -48,16 +48,16 @@ function mul(n, param) { } function cmp(param, param$1) { - var ph = param$1[1]; - var nh = param[1]; + let ph = param$1[1]; + let nh = param[1]; if (Caml_obj.caml_lessthan(nh, ph)) { return -1; } if (Caml_obj.caml_greaterthan(nh, ph)) { return 1; } - var pl = param$1[0]; - var nl = param[0]; + let pl = param$1[0]; + let nl = param[0]; if (Caml_obj.caml_lessthan(nl, pl)) { return -1; } else if (Caml_obj.caml_greaterthan(nl, pl)) { @@ -79,16 +79,16 @@ function x5(p) { return mul(n5, p); } -var nn1 = [ +let nn1 = [ n1, n0 ]; -var buf = Stdlib__Buffer.create(5000); +let buf = Stdlib__Buffer.create(5000); function pr(param) { - var nh = param[1]; - var nl = param[0]; + let nh = param[1]; + let nl = param[0]; if (Caml_int64.compare(nh, n0) === 0) { return Curry._1(Stdlib__Printf.bprintf(buf, /* Format */{ _0: { @@ -136,7 +136,7 @@ function map(f, l) { return { LAZY_DONE: false, VAL: (function () { - var match = CamlinternalLazy.force(l); + let match = CamlinternalLazy.force(l); return /* Cons */{ _0: Curry._1(f, match._0), _1: map(f, match._1) @@ -149,13 +149,13 @@ function merge(cmp, l1, l2) { return { LAZY_DONE: false, VAL: (function () { - var match = CamlinternalLazy.force(l1); - var match$1 = CamlinternalLazy.force(l2); - var ll2 = match$1._1; - var x2 = match$1._0; - var ll1 = match._1; - var x1 = match._0; - var c = Curry._2(cmp, x1, x2); + let match = CamlinternalLazy.force(l1); + let match$1 = CamlinternalLazy.force(l2); + let ll2 = match$1._1; + let x2 = match$1._0; + let ll1 = match._1; + let x1 = match._0; + let c = Curry._2(cmp, x1, x2); if (c === 0) { return /* Cons */{ _0: x1, @@ -178,14 +178,14 @@ function merge(cmp, l1, l2) { function iter_interval(f, _l, _param) { while(true) { - var param = _param; - var l = _l; - var stop = param[1]; + let param = _param; + let l = _l; + let stop = param[1]; if (stop === 0) { return ; } - var start = param[0]; - var match = CamlinternalLazy.force(l); + let start = param[0]; + let match = CamlinternalLazy.force(l); if (start <= 0) { Curry._1(f, match._0); } @@ -198,7 +198,7 @@ function iter_interval(f, _l, _param) { }; } -var hamming = { +let hamming = { LAZY_DONE: false, VAL: (function () { return /* Cons */{ @@ -208,21 +208,21 @@ var hamming = { }) }; -var ham2 = { +let ham2 = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(map(x2, hamming)); }) }; -var ham3 = { +let ham3 = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(map(x3, hamming)); }) }; -var ham5 = { +let ham5 = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(map(x5, hamming)); diff --git a/jscomp/test/dist/jscomp/test/hash_collision_test.js b/jscomp/test/dist/jscomp/test/hash_collision_test.js index 5a5a1678de..f1e8b48757 100644 --- a/jscomp/test/dist/jscomp/test/hash_collision_test.js +++ b/jscomp/test/dist/jscomp/test/hash_collision_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -31,7 +31,7 @@ function f1(x) { } } -var hi = [ +let hi = [ "Eric_Cooper", "azdwbie" ]; diff --git a/jscomp/test/dist/jscomp/test/hash_sugar_desugar.js b/jscomp/test/dist/jscomp/test/hash_sugar_desugar.js index 513bf22ead..ba50c3daed 100644 --- a/jscomp/test/dist/jscomp/test/hash_sugar_desugar.js +++ b/jscomp/test/dist/jscomp/test/hash_sugar_desugar.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var Curry = require("melange.js/curry.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let Curry = require("melange.js/curry.js"); function h1(u) { return u.p; @@ -13,7 +13,7 @@ function h2(u) { } function h3(u) { - var f = u.hi; + let f = u.hi; return Curry._2(f, 1, 2); } @@ -34,13 +34,13 @@ function h7(u) { } function h8(u) { - var f = Caml_oo_curry.js1(23297, 3, u); + let f = Caml_oo_curry.js1(23297, 3, u); return Curry._2(f, 1, 2); } function chain_g(h) { - var tmp = Caml_oo_curry.js1(120, 4, h); - var tmp$1 = Caml_oo_curry.js1(121, 5, tmp); + let tmp = Caml_oo_curry.js1(120, 4, h); + let tmp$1 = Caml_oo_curry.js1(121, 5, tmp); return Caml_oo_curry.js1(122, 6, tmp$1); } diff --git a/jscomp/test/dist/jscomp/test/hash_test.js b/jscomp/test/dist/jscomp/test/hash_test.js index dbfce0bd6d..a2aeb5001c 100644 --- a/jscomp/test/dist/jscomp/test/hash_test.js +++ b/jscomp/test/dist/jscomp/test/hash_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -23,12 +23,12 @@ function eq(f) { }; } -var test_strings = Stdlib__Array.init(32, (function (i) { - var c = Stdlib__Char.chr(i); +let test_strings = Stdlib__Array.init(32, (function (i) { + let c = Stdlib__Char.chr(i); return Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, c)); })); -var test_strings_hash_results = [ +let test_strings_hash_results = [ 0, 904391063, 889600889, diff --git a/jscomp/test/dist/jscomp/test/hashtbl_test.js b/jscomp/test/dist/jscomp/test/hashtbl_test.js index 51dbc3e17a..fd2481f758 100644 --- a/jscomp/test/dist/jscomp/test/hashtbl_test.js +++ b/jscomp/test/dist/jscomp/test/hashtbl_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__MoreLabels = require("melange/moreLabels.js"); +let Caml = require("melange.js/caml.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__MoreLabels = require("melange/moreLabels.js"); function to_list(tbl) { return Stdlib__Hashtbl.fold((function (k, v, acc) { @@ -22,7 +22,7 @@ function to_list(tbl) { } function f(param) { - var tbl = Stdlib__Hashtbl.create(undefined, 17); + let tbl = Stdlib__Hashtbl.create(undefined, 17); Stdlib__Hashtbl.add(tbl, 1, /* '1' */49); Stdlib__Hashtbl.add(tbl, 2, /* '2' */50); return Stdlib__List.sort((function (param, param$1) { @@ -31,20 +31,20 @@ function f(param) { } function g(count) { - var tbl = Stdlib__Hashtbl.create(undefined, 17); - for(var i = 0; i <= count; ++i){ + let tbl = Stdlib__Hashtbl.create(undefined, 17); + for(let i = 0; i <= count; ++i){ Stdlib__Hashtbl.replace(tbl, (i << 1), String(i)); } - for(var i$1 = 0; i$1 <= count; ++i$1){ + for(let i$1 = 0; i$1 <= count; ++i$1){ Stdlib__Hashtbl.replace(tbl, (i$1 << 1), String(i$1)); } - var v = to_list(tbl); + let v = to_list(tbl); return Stdlib__Array.of_list(Stdlib__List.sort((function (param, param$1) { return Caml.caml_int_compare(param[0], param$1[0]); }), v)); } -var suites_0 = [ +let suites_0 = [ "simple", (function (param) { return { @@ -67,7 +67,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "more_iterations", (function (param) { @@ -87,7 +87,7 @@ var suites_1 = { hd: [ "More_labels_regressionfix_374", (function (param) { - var tbl = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); + let tbl = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); Stdlib__Hashtbl.add(tbl, 3, 3); return { TAG: /* Eq */0, @@ -100,7 +100,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/if_used_test.js b/jscomp/test/dist/jscomp/test/if_used_test.js index 48fcbbfbca..a020df95f8 100644 --- a/jscomp/test/dist/jscomp/test/if_used_test.js +++ b/jscomp/test/dist/jscomp/test/if_used_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); -var shared = [ +let shared = [ "move", "get_x" ]; function point_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared, ["x"]); - var move = ids[0]; - var get_x = ids[1]; - var x = ids[2]; + let ids = CamlinternalOO.new_methods_variables($$class, shared, ["x"]); + let move = ids[0]; + let get_x = ids[1]; + let x = ids[2]; CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { @@ -25,15 +25,15 @@ function point_init($$class) { }) ]); return function (env, self, x_init) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = x_init; return self$1; }; } -var point = CamlinternalOO.make_class(shared, point_init); +let point = CamlinternalOO.make_class(shared, point_init); -var p = Curry._2(point[0], undefined, 7); +let p = Curry._2(point[0], undefined, 7); exports.point = point; exports.p = p; diff --git a/jscomp/test/dist/jscomp/test/ignore_test.js b/jscomp/test/dist/jscomp/test/ignore_test.js index 4843e6ff58..8d180a1f47 100644 --- a/jscomp/test/dist/jscomp/test/ignore_test.js +++ b/jscomp/test/dist/jscomp/test/ignore_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/imm_map_bench.js b/jscomp/test/dist/jscomp/test/imm_map_bench.js index 256776a295..b51aa42fc3 100644 --- a/jscomp/test/dist/jscomp/test/imm_map_bench.js +++ b/jscomp/test/dist/jscomp/test/imm_map_bench.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Immutable = require("immutable"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_MapInt = require("melange.belt/belt_MapInt.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Immutable = require("immutable"); -var empty = new Immutable.OrderedMap(); +let empty = new Immutable.OrderedMap(); function fromArray(kvs) { - var v = empty; - for(var i = 0 ,i_finish = kvs.length; i < i_finish; ++i){ - var match = kvs[i]; + let v = empty; + for(let i = 0 ,i_finish = kvs.length; i < i_finish; ++i){ + let match = kvs[i]; v = v.set(match[0], match[1]); } return v; @@ -25,7 +25,7 @@ function should(b) { throw new Caml_js_exceptions.MelangeError(new Error("impossible").MEL_EXN_ID, new Error("impossible")); } -var shuffledDataAdd = Belt__Belt_Array.makeByAndShuffle(1000001, (function (i) { +let shuffledDataAdd = Belt__Belt_Array.makeByAndShuffle(1000001, (function (i) { return [ i, i @@ -33,15 +33,15 @@ var shuffledDataAdd = Belt__Belt_Array.makeByAndShuffle(1000001, (function (i) { })); function test(param) { - var v = fromArray(shuffledDataAdd); - for(var j = 0; j <= 1000000; ++j){ + let v = fromArray(shuffledDataAdd); + for(let j = 0; j <= 1000000; ++j){ should(v.has(j)); } } function test2(param) { - var v = Belt__Belt_MapInt.fromArray(shuffledDataAdd); - for(var j = 0; j <= 1000000; ++j){ + let v = Belt__Belt_MapInt.fromArray(shuffledDataAdd); + for(let j = 0; j <= 1000000; ++j){ should(Belt__Belt_MapInt.has(v, j)); } } @@ -58,7 +58,7 @@ test2(undefined); console.timeEnd("imm_map_bench.ml 45"); -var count = 1000000; +let count = 1000000; exports.empty = empty; exports.fromArray = fromArray; diff --git a/jscomp/test/dist/jscomp/test/include_side_effect.js b/jscomp/test/dist/jscomp/test/include_side_effect.js index 9f8e6abbc4..29fb73d1a5 100644 --- a/jscomp/test/dist/jscomp/test/include_side_effect.js +++ b/jscomp/test/dist/jscomp/test/include_side_effect.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Side_effect = require("./side_effect.js"); +let Side_effect = require("./side_effect.js"); /* Side_effect Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/incomplete_toplevel_test.js b/jscomp/test/dist/jscomp/test/incomplete_toplevel_test.js index 6a1471fc7b..fac69f0541 100644 --- a/jscomp/test/dist/jscomp/test/incomplete_toplevel_test.js +++ b/jscomp/test/dist/jscomp/test/incomplete_toplevel_test.js @@ -11,13 +11,13 @@ function f(param) { ]; } -var match = f(undefined); +let match = f(undefined); -var a = match[0]; +let a = match[0]; -var b = match[1]; +let b = match[1]; -var c = match[2]; +let c = match[2]; exports.f = f; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/infer_type_test.js b/jscomp/test/dist/jscomp/test/infer_type_test.js index a5ac7e3cd9..a7286b75ba 100644 --- a/jscomp/test/dist/jscomp/test/infer_type_test.js +++ b/jscomp/test/dist/jscomp/test/infer_type_test.js @@ -2,25 +2,25 @@ 'use strict'; -var hh = { +let hh = { hi: 30, lo: 20 }; -var v = { +let v = { hi: 32, lo: 3 }; -var vv = { +let vv = { hi: 3, lo: 3, width: 3 }; -var u = v.hi; +let u = v.hi; -var uu = v.width; +let uu = v.width; exports.hh = hh; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/inline_const.js b/jscomp/test/dist/jscomp/test/inline_const.js index db8c32422b..2b850b52fc 100644 --- a/jscomp/test/dist/jscomp/test/inline_const.js +++ b/jscomp/test/dist/jscomp/test/inline_const.js @@ -2,22 +2,22 @@ 'use strict'; -var N = {}; +let N = {}; console.log([ 3e-6, 3e-6 ]); -var x = true; +let x = true; function N1(funarg) { return {}; } -var h = "hello"; +let h = "hello"; -var hh = "hellohello"; +let hh = "hellohello"; exports.x = x; exports.N = N; diff --git a/jscomp/test/dist/jscomp/test/inline_const_test.js b/jscomp/test/dist/jscomp/test/inline_const_test.js index 550d2320b8..b5b809bb52 100644 --- a/jscomp/test/dist/jscomp/test/inline_const_test.js +++ b/jscomp/test/dist/jscomp/test/inline_const_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_int64 = require("melange.js/caml_int64.js"); -var Inline_const = require("./inline_const.js"); -var Mt = require("./mt.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Inline_const = require("./inline_const.js"); +let Mt = require("./mt.js"); +let Stdlib__Int64 = require("melange/int64.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,17 +18,17 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var H = {}; +let H = {}; -var f = "hello"; +let f = "hello"; -var f1 = "a"; +let f1 = "a"; -var f2 = "中文"; +let f2 = "中文"; -var f3 = "中文"; +let f3 = "中文"; -var f4 = "中文"; +let f4 = "中文"; eq("File \"jscomp/test/inline_const_test.ml\", line 29, characters 5-12", f, "hello"); @@ -46,18 +46,18 @@ eq("File \"jscomp/test/inline_const_test.ml\", line 35, characters 5-12", 1, 1); eq("File \"jscomp/test/inline_const_test.ml\", line 36, characters 5-12", 3e-6, 0.000003); -var h = Caml_int64.add(Caml_int64.add([ +let h = Caml_int64.add(Caml_int64.add([ 0, 100 ], Stdlib__Int64.one), Caml_int64.one); Mt.from_pair_suites("File \"jscomp/test/inline_const_test.ml\", line 43, characters 22-29", suites.contents); -var f5 = true; +let f5 = true; -var f6 = 1; +let f6 = 1; -var f7 = 3e-6; +let f7 = 3e-6; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/inline_edge_cases.js b/jscomp/test/dist/jscomp/test/inline_edge_cases.js index c7a5c8ac58..056ecaf2f2 100644 --- a/jscomp/test/dist/jscomp/test/inline_edge_cases.js +++ b/jscomp/test/dist/jscomp/test/inline_edge_cases.js @@ -4,7 +4,7 @@ function test3(_n) { while(true) { - var n = _n; + let n = _n; if (n === 0) { return (n + 5 | 0) + 4 | 0; } @@ -15,7 +15,7 @@ function test3(_n) { function test2(_n) { while(true) { - var n = _n; + let n = _n; if (n === 0) { return test3(n) + 3 | 0; } @@ -26,11 +26,11 @@ function test2(_n) { function test0(_n) { while(true) { - var n = _n; + let n = _n; if (n === 0) { - var _n$1 = n; + let _n$1 = n; while(true) { - var n$1 = _n$1; + let n$1 = _n$1; if (n$1 === 0) { return test2(n$1) + 2 | 0; } @@ -43,7 +43,7 @@ function test0(_n) { }; } -var v = test0(10); +let v = test0(10); test0(10) + 2 | 0; diff --git a/jscomp/test/dist/jscomp/test/inline_map2_test.js b/jscomp/test/dist/jscomp/test/inline_map2_test.js index 4a2cc679d4..db35a91051 100644 --- a/jscomp/test/dist/jscomp/test/inline_map2_test.js +++ b/jscomp/test/dist/jscomp/test/inline_map2_test.js @@ -1,25 +1,25 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); function Make(Ord) { - var height = function (param) { + let height = function (param) { if (param) { return param._4; } else { return 0; } }; - var create = function (l, x, d, r) { - var hl = height(l); - var hr = height(r); + let create = function (l, x, d, r) { + let hl = height(l); + let hr = height(r); return /* Node */{ _0: l, _1: x, @@ -28,7 +28,7 @@ function Make(Ord) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; }; - var singleton = function (x, d) { + let singleton = function (x, d) { return /* Node */{ _0: /* Empty */0, _1: x, @@ -37,15 +37,15 @@ function Make(Ord) { _4: 1 }; }; - var bal = function (l, x, d, r) { - var hl = l ? l._4 : 0; - var hr = r ? r._4 : 0; + let bal = function (l, x, d, r) { + let hl = l ? l._4 : 0; + let hr = r ? r._4 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -72,10 +72,10 @@ function Make(Ord) { }; } if (r) { - var rr = r._3; - var rd = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._3; + let rd = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -92,14 +92,14 @@ function Make(Ord) { _1: "Map.bal" }); }; - var is_empty = function (param) { + let is_empty = function (param) { if (param) { return false; } else { return true; } }; - var add = function (x, data, param) { + let add = function (x, data, param) { if (!param) { return /* Node */{ _0: /* Empty */0, @@ -109,11 +109,11 @@ function Make(Ord) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Curry._2(Ord.compare, x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return /* Node */{ _0: l, @@ -128,11 +128,11 @@ function Make(Ord) { return bal(l, v, d, add(x, data, r)); } }; - var find = function (x, _param) { + let find = function (x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(Ord.compare, x, param._1); + let c = Curry._2(Ord.compare, x, param._1); if (c === 0) { return param._2; } @@ -144,13 +144,13 @@ function Make(Ord) { }); }; }; - var mem = function (x, _param) { + let mem = function (x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(Ord.compare, x, param._1); + let c = Curry._2(Ord.compare, x, param._1); if (c === 0) { return true; } @@ -158,11 +158,11 @@ function Make(Ord) { continue ; }; }; - var min_binding = function (_param) { + let min_binding = function (_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param._0; + let l = param._0; if (!l) { return [ param._1, @@ -177,9 +177,9 @@ function Make(Ord) { }); }; }; - var max_binding = function (_param) { + let max_binding = function (_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param._3) { return [ @@ -195,9 +195,9 @@ function Make(Ord) { }); }; }; - var remove_min_binding = function (param) { + let remove_min_binding = function (param) { if (param) { - var l = param._0; + let l = param._0; if (l) { return bal(remove_min_binding(l), param._1, param._2, param._3); } else { @@ -209,15 +209,15 @@ function Make(Ord) { _1: "Map.remove_min_elt" }); }; - var remove = function (x, param) { + let remove = function (x, param) { if (!param) { return /* Empty */0; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Curry._2(Ord.compare, x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { if (!l) { return r; @@ -225,7 +225,7 @@ function Make(Ord) { if (!r) { return l; } - var match = min_binding(r); + let match = min_binding(r); return bal(l, match[0], match[1], remove_min_binding(r)); } else if (c < 0) { return bal(remove(x, l), v, d, r); @@ -233,9 +233,9 @@ function Make(Ord) { return bal(l, v, d, remove(x, r)); } }; - var iter = function (f, _param) { + let iter = function (f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -245,13 +245,13 @@ function Make(Ord) { continue ; }; }; - var map = function (f, param) { + let map = function (f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param._0); - var d$p = Curry._1(f, param._2); - var r$p = map(f, param._3); + let l$p = map(f, param._0); + let d$p = Curry._1(f, param._2); + let r$p = map(f, param._3); return /* Node */{ _0: l$p, _1: param._1, @@ -260,14 +260,14 @@ function Make(Ord) { _4: param._4 }; }; - var mapi = function (f, param) { + let mapi = function (f, param) { if (!param) { return /* Empty */0; } - var v = param._1; - var l$p = mapi(f, param._0); - var d$p = Curry._2(f, v, param._2); - var r$p = mapi(f, param._3); + let v = param._1; + let l$p = mapi(f, param._0); + let d$p = Curry._2(f, v, param._2); + let r$p = mapi(f, param._3); return /* Node */{ _0: l$p, _1: v, @@ -276,10 +276,10 @@ function Make(Ord) { _4: param._4 }; }; - var fold = function (f, _m, _accu) { + let fold = function (f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -288,9 +288,9 @@ function Make(Ord) { continue ; }; }; - var for_all = function (p, _param) { + let for_all = function (p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -304,9 +304,9 @@ function Make(Ord) { continue ; }; }; - var exists = function (p, _param) { + let exists = function (p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -320,29 +320,29 @@ function Make(Ord) { continue ; }; }; - var add_min_binding = function (k, v, param) { + let add_min_binding = function (k, v, param) { if (param) { return bal(add_min_binding(k, v, param._0), param._1, param._2, param._3); } else { return singleton(k, v); } }; - var add_max_binding = function (k, v, param) { + let add_max_binding = function (k, v, param) { if (param) { return bal(param._0, param._1, param._2, add_max_binding(k, v, param._3)); } else { return singleton(k, v); } }; - var join = function (l, v, d, r) { + let join = function (l, v, d, r) { if (!l) { return add_min_binding(v, d, r); } if (!r) { return add_max_binding(v, d, l); } - var rh = r._4; - var lh = l._4; + let rh = r._4; + let lh = l._4; if (lh > (rh + 2 | 0)) { return bal(l._0, l._1, l._2, join(l._3, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -351,24 +351,24 @@ function Make(Ord) { return create(l, v, d, r); } }; - var concat = function (t1, t2) { + let concat = function (t1, t2) { if (!t1) { return t2; } if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); }; - var concat_or_join = function (t1, v, d, t2) { + let concat_or_join = function (t1, v, d, t2) { if (d !== undefined) { return join(t1, v, Caml_option.valFromOption(d), t2); } else { return concat(t1, t2); } }; - var split = function (x, param) { + let split = function (x, param) { if (!param) { return [ /* Empty */0, @@ -376,11 +376,11 @@ function Make(Ord) { /* Empty */0 ]; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Curry._2(Ord.compare, x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return [ l, @@ -389,25 +389,25 @@ function Make(Ord) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], match$1[2] ]; }; - var merge = function (f, s1, s2) { + let merge = function (f, s1, s2) { if (s1) { - var v1 = s1._1; + let v1 = s1._1; if (s1._4 >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge(f, s1._0, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1._2), match[1]), merge(f, s1._3, match[2])); } @@ -415,8 +415,8 @@ function Make(Ord) { return /* Empty */0; } if (s2) { - var v2 = s2._1; - var match$1 = split(v2, s1); + let v2 = s2._1; + let match$1 = split(v2, s1); return concat_or_join(merge(f, match$1[0], s2._0), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2._2)), merge(f, match$1[2], s2._3)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -428,37 +428,37 @@ function Make(Ord) { ] }); }; - var filter = function (p, param) { + let filter = function (p, param) { if (!param) { return /* Empty */0; } - var d = param._2; - var v = param._1; - var l$p = filter(p, param._0); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, param._3); + let d = param._2; + let v = param._1; + let l$p = filter(p, param._0); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, param._3); if (pvd) { return join(l$p, v, d, r$p); } else { return concat(l$p, r$p); } }; - var partition = function (p, param) { + let partition = function (p, param) { if (!param) { return [ /* Empty */0, /* Empty */0 ]; } - var d = param._2; - var v = param._1; - var match = partition(p, param._0); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param._3); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param._2; + let v = param._1; + let match = partition(p, param._0); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param._3); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -471,10 +471,10 @@ function Make(Ord) { ]; } }; - var cons_enum = function (_m, _e) { + let cons_enum = function (_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -488,12 +488,12 @@ function Make(Ord) { continue ; }; }; - var compare = function (cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let compare = function (cmp, m1, m2) { + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -504,11 +504,11 @@ function Make(Ord) { if (!e2) { return 1; } - var c = Curry._2(Ord.compare, e1._0, e2._0); + let c = Curry._2(Ord.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -517,12 +517,12 @@ function Make(Ord) { continue ; }; }; - var equal = function (cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let equal = function (cmp, m1, m2) { + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -544,17 +544,17 @@ function Make(Ord) { continue ; }; }; - var cardinal = function (param) { + let cardinal = function (param) { if (param) { return (cardinal(param._0) + 1 | 0) + cardinal(param._3) | 0; } else { return 0; } }; - var bindings_aux = function (_accu, _param) { + let bindings_aux = function (_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -569,7 +569,7 @@ function Make(Ord) { continue ; }; }; - var bindings = function (s) { + let bindings = function (s) { return bindings_aux(/* [] */0, s); }; return { @@ -620,8 +620,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ _0: l, _1: x, @@ -642,14 +642,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l._4 : 0; - var hr = r ? r._4 : 0; + let hl = l ? l._4 : 0; + let hr = r ? r._4 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -676,10 +676,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r._3; - var rd = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._3; + let rd = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -715,11 +715,11 @@ function add(x, data, param) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_int_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_int_compare(x, v); if (c === 0) { return /* Node */{ _0: l, @@ -737,9 +737,9 @@ function add(x, data, param) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Caml.caml_int_compare(x, param._1); + let c = Caml.caml_int_compare(x, param._1); if (c === 0) { return param._2; } @@ -754,11 +754,11 @@ function find(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Caml.caml_int_compare(x, param._1); + let c = Caml.caml_int_compare(x, param._1); if (c === 0) { return true; } @@ -769,9 +769,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param._0; + let l = param._0; if (!l) { return [ param._1, @@ -789,7 +789,7 @@ function min_binding(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param._3) { return [ @@ -808,7 +808,7 @@ function max_binding(_param) { function remove_min_binding(param) { if (param) { - var l = param._0; + let l = param._0; if (l) { return bal(remove_min_binding(l), param._1, param._2, param._3); } else { @@ -825,11 +825,11 @@ function remove(x, param) { if (!param) { return /* Empty */0; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_int_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_int_compare(x, v); if (c === 0) { if (!l) { return r; @@ -837,7 +837,7 @@ function remove(x, param) { if (!r) { return l; } - var match = min_binding(r); + let match = min_binding(r); return bal(l, match[0], match[1], remove_min_binding(r)); } else if (c < 0) { return bal(remove(x, l), v, d, r); @@ -848,7 +848,7 @@ function remove(x, param) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -863,9 +863,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param._0); - var d$p = Curry._1(f, param._2); - var r$p = map(f, param._3); + let l$p = map(f, param._0); + let d$p = Curry._1(f, param._2); + let r$p = map(f, param._3); return /* Node */{ _0: l$p, _1: param._1, @@ -879,10 +879,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param._1; - var l$p = mapi(f, param._0); - var d$p = Curry._2(f, v, param._2); - var r$p = mapi(f, param._3); + let v = param._1; + let l$p = mapi(f, param._0); + let d$p = Curry._2(f, v, param._2); + let r$p = mapi(f, param._3); return /* Node */{ _0: l$p, _1: v, @@ -894,8 +894,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -907,7 +907,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -924,7 +924,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -962,8 +962,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r._4; - var lh = l._4; + let rh = r._4; + let lh = l._4; if (lh > (rh + 2 | 0)) { return bal(l._0, l._1, l._2, join(l._3, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -980,7 +980,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -1000,11 +1000,11 @@ function split(x, param) { /* Empty */0 ]; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_int_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_int_compare(x, v); if (c === 0) { return [ l, @@ -1013,14 +1013,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -1030,9 +1030,9 @@ function split(x, param) { function merge(f, s1, s2) { if (s1) { - var v1 = s1._1; + let v1 = s1._1; if (s1._4 >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge(f, s1._0, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1._2), match[1]), merge(f, s1._3, match[2])); } @@ -1040,8 +1040,8 @@ function merge(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2._1; - var match$1 = split(v2, s1); + let v2 = s2._1; + let match$1 = split(v2, s1); return concat_or_join(merge(f, match$1[0], s2._0), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2._2)), merge(f, match$1[2], s2._3)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -1058,11 +1058,11 @@ function filter(p, param) { if (!param) { return /* Empty */0; } - var d = param._2; - var v = param._1; - var l$p = filter(p, param._0); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, param._3); + let d = param._2; + let v = param._1; + let l$p = filter(p, param._0); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, param._3); if (pvd) { return join(l$p, v, d, r$p); } else { @@ -1077,15 +1077,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param._2; - var v = param._1; - var match = partition(p, param._0); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param._3); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param._2; + let v = param._1; + let match = partition(p, param._0); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param._3); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -1101,8 +1101,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -1118,11 +1118,11 @@ function cons_enum(_m, _e) { } function compare(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -1133,11 +1133,11 @@ function compare(cmp, m1, m2) { if (!e2) { return 1; } - var c = Caml.caml_int_compare(e1._0, e2._0); + let c = Caml.caml_int_compare(e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -1148,11 +1148,11 @@ function compare(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -1185,8 +1185,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -1206,7 +1206,7 @@ function bindings(s) { return bindings_aux(/* [] */0, s); } -var IntMap = { +let IntMap = { height: height, create: create, singleton: singleton, @@ -1244,7 +1244,7 @@ var IntMap = { choose: min_binding }; -var m = Stdlib__List.fold_left((function (acc, param) { +let m = Stdlib__List.fold_left((function (acc, param) { return add(param[0], param[1], acc); }), /* Empty */0, { hd: [ @@ -1281,8 +1281,8 @@ function height$1(param) { } function create$1(l, x, d, r) { - var hl = height$1(l); - var hr = height$1(r); + let hl = height$1(l); + let hr = height$1(r); return /* Node */{ _0: l, _1: x, @@ -1303,14 +1303,14 @@ function singleton$1(x, d) { } function bal$1(l, x, d, r) { - var hl = l ? l._4 : 0; - var hr = r ? r._4 : 0; + let hl = l ? l._4 : 0; + let hr = r ? r._4 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } @@ -1337,10 +1337,10 @@ function bal$1(l, x, d, r) { }; } if (r) { - var rr = r._3; - var rd = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._3; + let rd = r._2; + let rv = r._1; + let rl = r._0; if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } @@ -1376,11 +1376,11 @@ function add$1(x, data, param) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_string_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return /* Node */{ _0: l, @@ -1398,9 +1398,9 @@ function add$1(x, data, param) { function find$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Caml.caml_string_compare(x, param._1); + let c = Caml.caml_string_compare(x, param._1); if (c === 0) { return param._2; } @@ -1415,11 +1415,11 @@ function find$1(x, _param) { function mem$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Caml.caml_string_compare(x, param._1); + let c = Caml.caml_string_compare(x, param._1); if (c === 0) { return true; } @@ -1430,9 +1430,9 @@ function mem$1(x, _param) { function min_binding$1(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param._0; + let l = param._0; if (!l) { return [ param._1, @@ -1450,7 +1450,7 @@ function min_binding$1(_param) { function max_binding$1(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param._3) { return [ @@ -1469,7 +1469,7 @@ function max_binding$1(_param) { function remove_min_binding$1(param) { if (param) { - var l = param._0; + let l = param._0; if (l) { return bal$1(remove_min_binding$1(l), param._1, param._2, param._3); } else { @@ -1486,11 +1486,11 @@ function remove$1(x, param) { if (!param) { return /* Empty */0; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_string_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { if (!l) { return r; @@ -1498,7 +1498,7 @@ function remove$1(x, param) { if (!r) { return l; } - var match = min_binding$1(r); + let match = min_binding$1(r); return bal$1(l, match[0], match[1], remove_min_binding$1(r)); } else if (c < 0) { return bal$1(remove$1(x, l), v, d, r); @@ -1509,7 +1509,7 @@ function remove$1(x, param) { function iter$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -1524,9 +1524,9 @@ function map$1(f, param) { if (!param) { return /* Empty */0; } - var l$p = map$1(f, param._0); - var d$p = Curry._1(f, param._2); - var r$p = map$1(f, param._3); + let l$p = map$1(f, param._0); + let d$p = Curry._1(f, param._2); + let r$p = map$1(f, param._3); return /* Node */{ _0: l$p, _1: param._1, @@ -1540,10 +1540,10 @@ function mapi$1(f, param) { if (!param) { return /* Empty */0; } - var v = param._1; - var l$p = mapi$1(f, param._0); - var d$p = Curry._2(f, v, param._2); - var r$p = mapi$1(f, param._3); + let v = param._1; + let l$p = mapi$1(f, param._0); + let d$p = Curry._2(f, v, param._2); + let r$p = mapi$1(f, param._3); return /* Node */{ _0: l$p, _1: v, @@ -1555,8 +1555,8 @@ function mapi$1(f, param) { function fold$1(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -1568,7 +1568,7 @@ function fold$1(f, _m, _accu) { function for_all$1(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -1585,7 +1585,7 @@ function for_all$1(p, _param) { function exists$1(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -1623,8 +1623,8 @@ function join$1(l, v, d, r) { if (!r) { return add_max_binding$1(v, d, l); } - var rh = r._4; - var lh = l._4; + let rh = r._4; + let lh = l._4; if (lh > (rh + 2 | 0)) { return bal$1(l._0, l._1, l._2, join$1(l._3, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -1641,7 +1641,7 @@ function concat$1(t1, t2) { if (!t2) { return t1; } - var match = min_binding$1(t2); + let match = min_binding$1(t2); return join$1(t1, match[0], match[1], remove_min_binding$1(t2)); } @@ -1661,11 +1661,11 @@ function split$1(x, param) { /* Empty */0 ]; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_string_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return [ l, @@ -1674,14 +1674,14 @@ function split$1(x, param) { ]; } if (c < 0) { - var match = split$1(x, l); + let match = split$1(x, l); return [ match[0], match[1], join$1(match[2], v, d, r) ]; } - var match$1 = split$1(x, r); + let match$1 = split$1(x, r); return [ join$1(l, v, d, match$1[0]), match$1[1], @@ -1691,9 +1691,9 @@ function split$1(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1._1; + let v1 = s1._1; if (s1._4 >= height$1(s2)) { - var match = split$1(v1, s2); + let match = split$1(v1, s2); return concat_or_join$1(merge$1(f, s1._0, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1._2), match[1]), merge$1(f, s1._3, match[2])); } @@ -1701,8 +1701,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2._1; - var match$1 = split$1(v2, s1); + let v2 = s2._1; + let match$1 = split$1(v2, s1); return concat_or_join$1(merge$1(f, match$1[0], s2._0), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2._2)), merge$1(f, match$1[2], s2._3)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -1719,11 +1719,11 @@ function filter$1(p, param) { if (!param) { return /* Empty */0; } - var d = param._2; - var v = param._1; - var l$p = filter$1(p, param._0); - var pvd = Curry._2(p, v, d); - var r$p = filter$1(p, param._3); + let d = param._2; + let v = param._1; + let l$p = filter$1(p, param._0); + let pvd = Curry._2(p, v, d); + let r$p = filter$1(p, param._3); if (pvd) { return join$1(l$p, v, d, r$p); } else { @@ -1738,15 +1738,15 @@ function partition$1(p, param) { /* Empty */0 ]; } - var d = param._2; - var v = param._1; - var match = partition$1(p, param._0); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition$1(p, param._3); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param._2; + let v = param._1; + let match = partition$1(p, param._0); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition$1(p, param._3); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join$1(lt, v, d, rt), @@ -1762,8 +1762,8 @@ function partition$1(p, param) { function cons_enum$1(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -1779,11 +1779,11 @@ function cons_enum$1(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + let _e1 = cons_enum$1(m1, /* End */0); + let _e2 = cons_enum$1(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -1794,11 +1794,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Caml.caml_string_compare(e1._0, e2._0); + let c = Caml.caml_string_compare(e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -1809,11 +1809,11 @@ function compare$1(cmp, m1, m2) { } function equal$1(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + let _e1 = cons_enum$1(m1, /* End */0); + let _e2 = cons_enum$1(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -1846,8 +1846,8 @@ function cardinal$1(param) { function bindings_aux$1(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -1867,7 +1867,7 @@ function bindings$1(s) { return bindings_aux$1(/* [] */0, s); } -var SMap = { +let SMap = { height: height$1, create: create$1, singleton: singleton$1, @@ -1905,7 +1905,7 @@ var SMap = { choose: min_binding$1 }; -var s = Stdlib__List.fold_left((function (acc, param) { +let s = Stdlib__List.fold_left((function (acc, param) { return add$1(param[0], param[1], acc); }), /* Empty */0, { hd: [ @@ -1959,7 +1959,7 @@ Mt.from_pair_suites("Inline_map2_test", { } }); -var empty = /* Empty */0; +let empty = /* Empty */0; exports.Make = Make; exports.IntMap = IntMap; diff --git a/jscomp/test/dist/jscomp/test/inline_map_test.js b/jscomp/test/dist/jscomp/test/inline_map_test.js index 7401c9b233..e4a42ccac8 100644 --- a/jscomp/test/dist/jscomp/test/inline_map_test.js +++ b/jscomp/test/dist/jscomp/test/inline_map_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); function height(param) { if (param) { @@ -16,8 +16,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ _0: l, _1: x, @@ -28,14 +28,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l._4 : 0; - var hr = r ? r._4 : 0; + let hl = l ? l._4 : 0; + let hr = r ? r._4 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -62,10 +62,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r._3; - var rd = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._3; + let rd = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -93,11 +93,11 @@ function add(x, data, param) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml.caml_int_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml.caml_int_compare(x, v); if (c === 0) { return /* Node */{ _0: l, @@ -115,9 +115,9 @@ function add(x, data, param) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Caml.caml_int_compare(x, param._1); + let c = Caml.caml_int_compare(x, param._1); if (c === 0) { return param._2; } @@ -130,7 +130,7 @@ function find(x, _param) { }; } -var m = Stdlib__List.fold_left((function (acc, param) { +let m = Stdlib__List.fold_left((function (acc, param) { return add(param[0], param[1], acc); }), /* Empty */0, { hd: [ diff --git a/jscomp/test/dist/jscomp/test/inline_record_test.js b/jscomp/test/dist/jscomp/test/inline_record_test.js index 30257366e1..984f72b7e9 100644 --- a/jscomp/test/dist/jscomp/test/inline_record_test.js +++ b/jscomp/test/dist/jscomp/test/inline_record_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,13 +18,13 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var v = { +let v = { TAG: /* A0 */0, lbl: 3, more: /* [] */0 }; -var v1 = { +let v1 = { TAG: /* A1 */1, more: { hd: 1, @@ -55,15 +55,15 @@ console.log(f(v)); console.log(f(v1)); -var A0 = /* @__PURE__ */Caml_exceptions.create("Inline_record_test.A0"); +let A0 = /* @__PURE__ */Caml_exceptions.create("Inline_record_test.A0"); -var v3 = { +let v3 = { MEL_EXN_ID: A0, lbl: 3, more: /* [] */0 }; -var tmp; +let tmp; if (A0 === A0) { tmp = 3; @@ -88,24 +88,24 @@ function ff(x) { } } -var v4 = { +let v4 = { TAG: /* A0 */0, x: 0, y: 0, z: 0 }; -var v5 = { +let v5 = { TAG: /* A1 */1, z: 0 }; -for(var _i = 0; _i <= 10; ++_i){ +for(let _i = 0; _i <= 10; ++_i){ ff(v4); ff(v5); } -var tmp$1; +let tmp$1; if (v4.TAG === /* A0 */0) { tmp$1 = v4.x; @@ -122,7 +122,7 @@ if (v4.TAG === /* A0 */0) { eq("File \"jscomp/test/inline_record_test.ml\", line 64, characters 6-13", tmp$1, 11); -var tmp$2; +let tmp$2; if (v5.TAG === /* A0 */0) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -139,9 +139,9 @@ tmp$2 = v5.z; eq("File \"jscomp/test/inline_record_test.ml\", line 66, characters 6-13", tmp$2, 22); -var A4 = /* @__PURE__ */Caml_exceptions.create("Inline_record_test.A4"); +let A4 = /* @__PURE__ */Caml_exceptions.create("Inline_record_test.A4"); -var v6 = { +let v6 = { MEL_EXN_ID: A4, x: 0, y: 0, @@ -157,11 +157,11 @@ function ff0(x) { } -for(var _i$1 = 0; _i$1 <= 10; ++_i$1){ +for(let _i$1 = 0; _i$1 <= 10; ++_i$1){ ff0(v6); } -var tmp$3; +let tmp$3; if (v6.MEL_EXN_ID === A4) { tmp$3 = v6.x; @@ -191,12 +191,12 @@ function ff1(x) { Mt.from_pair_suites("Inline_record_test", suites.contents); -var v2 = /* A0 */{ +let v2 = /* A0 */{ lbl: 3, more: /* [] */0 }; -var vvv = /* A0 */{ +let vvv = /* A0 */{ lbl: 3, more: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/inline_regression_test.js b/jscomp/test/dist/jscomp/test/inline_regression_test.js index f48923afb7..4fa43132ff 100644 --- a/jscomp/test/dist/jscomp/test/inline_regression_test.js +++ b/jscomp/test/dist/jscomp/test/inline_regression_test.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__String = require("melange/string.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__String = require("melange/string.js"); function generic_basename(is_dir_sep, current_dir_name, name) { if (name === "") { return current_dir_name; } else { - var _n = name.length - 1 | 0; + let _n = name.length - 1 | 0; while(true) { - var n = _n; + let n = _n; if (n < 0) { return Stdlib__String.sub(name, 0, 1); } if (!Curry._2(is_dir_sep, name, n)) { - var _n$1 = n; - var p = n + 1 | 0; + let _n$1 = n; + let p = n + 1 | 0; while(true) { - var n$1 = _n$1; + let n$1 = _n$1; if (n$1 < 0) { return Stdlib__String.sub(name, 0, p); } @@ -44,7 +44,7 @@ function basename(param) { }), Stdlib__Filename.current_dir_name, param); } -var suites_0 = [ +let suites_0 = [ "basename", (function (param) { return { @@ -55,7 +55,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/inner_call.js b/jscomp/test/dist/jscomp/test/inner_call.js index a55da320bb..5962e45895 100644 --- a/jscomp/test/dist/jscomp/test/inner_call.js +++ b/jscomp/test/dist/jscomp/test/inner_call.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Inner_define = require("./inner_define.js"); +let Inner_define = require("./inner_define.js"); console.log(Inner_define.N.add(1, 2)); diff --git a/jscomp/test/dist/jscomp/test/inner_define.js b/jscomp/test/dist/jscomp/test/inner_define.js index 1064b11271..fc3eb66d90 100644 --- a/jscomp/test/dist/jscomp/test/inner_define.js +++ b/jscomp/test/dist/jscomp/test/inner_define.js @@ -6,7 +6,7 @@ function add(x, y) { return x + y | 0; } -var N = { +let N = { add: add }; @@ -22,7 +22,7 @@ function f3(param, param$1, param$2) { } -var N0 = { +let N0 = { f1: f1, f2: f2, f3: f3 @@ -36,7 +36,7 @@ function f3$1(param, param$1, param$2) { } -var N1 = { +let N1 = { f2: f2$1, f3: f3$1 }; diff --git a/jscomp/test/dist/jscomp/test/inner_unused.js b/jscomp/test/dist/jscomp/test/inner_unused.js index f39b8d77fc..ea164f2c2b 100644 --- a/jscomp/test/dist/jscomp/test/inner_unused.js +++ b/jscomp/test/dist/jscomp/test/inner_unused.js @@ -7,7 +7,7 @@ function f(x) { } function M(S) { - var f = function (x) { + let f = function (x) { return x; }; return { diff --git a/jscomp/test/dist/jscomp/test/installation_test.js b/jscomp/test/dist/jscomp/test/installation_test.js index 434de6e40a..b8d4a655df 100644 --- a/jscomp/test/dist/jscomp/test/installation_test.js +++ b/jscomp/test/dist/jscomp/test/installation_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/int32_test.js b/jscomp/test/dist/jscomp/test/int32_test.js index a22d290e75..3b28a3e807 100644 --- a/jscomp/test/dist/jscomp/test/int32_test.js +++ b/jscomp/test/dist/jscomp/test/int32_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_float = require("melange.js/caml_float.js"); -var Curry = require("melange.js/curry.js"); -var Ext_array_test = require("./ext_array_test.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Int32 = require("melange/int32.js"); +let Caml_float = require("melange.js/caml_float.js"); +let Curry = require("melange.js/curry.js"); +let Ext_array_test = require("./ext_array_test.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Int32 = require("melange/int32.js"); function f(x) { return [ @@ -18,11 +18,11 @@ function f(x) { ]; } -var shift_right_logical_tests_0 = Stdlib__Array.map((function (x) { +let shift_right_logical_tests_0 = Stdlib__Array.map((function (x) { return (-1 >>> x) | 0; }), Ext_array_test.range(0, 31)); -var shift_right_logical_tests_1 = [ +let shift_right_logical_tests_1 = [ -1, 2147483647, 1073741823, @@ -57,16 +57,16 @@ var shift_right_logical_tests_1 = [ 1 ]; -var shift_right_logical_tests = [ +let shift_right_logical_tests = [ shift_right_logical_tests_0, shift_right_logical_tests_1 ]; -var shift_right_tests_0 = Stdlib__Array.map((function (x) { +let shift_right_tests_0 = Stdlib__Array.map((function (x) { return (Stdlib__Int32.min_int >> x); }), Ext_array_test.range(0, 31)); -var shift_right_tests_1 = [ +let shift_right_tests_1 = [ -2147483648, -1073741824, -536870912, @@ -101,16 +101,16 @@ var shift_right_tests_1 = [ -1 ]; -var shift_right_tests = [ +let shift_right_tests = [ shift_right_tests_0, shift_right_tests_1 ]; -var shift_left_tests_0 = Stdlib__Array.map((function (x) { +let shift_left_tests_0 = Stdlib__Array.map((function (x) { return (1 << x); }), Ext_array_test.range(0, 31)); -var shift_left_tests_1 = [ +let shift_left_tests_1 = [ 1, 2, 4, @@ -145,7 +145,7 @@ var shift_left_tests_1 = [ -2147483648 ]; -var shift_left_tests = [ +let shift_left_tests = [ shift_left_tests_0, shift_left_tests_1 ]; @@ -154,7 +154,7 @@ function $star$tilde(prim0, prim1) { return Math.imul(prim0, prim1); } -var suites = { +let suites = { contents: Stdlib.$at({ hd: [ "File \"jscomp/test/int32_test.ml\", line 31, characters 2-9", @@ -254,7 +254,7 @@ var suites = { }), shift_left_tests_0, shift_left_tests_1))))) }; -var test_id = { +let test_id = { contents: 0 }; @@ -268,7 +268,7 @@ eq("File \"jscomp/test/int32_test.ml\", line 48, characters 5-12", Caml_float.ca Mt.from_pair_suites("Int32_test", suites.contents); -var test_div = 30; +let test_div = 30; exports.f = f; exports.shift_right_logical_tests = shift_right_logical_tests; diff --git a/jscomp/test/dist/jscomp/test/int64_mul_div_test.js b/jscomp/test/dist/jscomp/test/int64_mul_div_test.js index cddef3e6df..205620856f 100644 --- a/jscomp/test/dist/jscomp/test/int64_mul_div_test.js +++ b/jscomp/test/dist/jscomp/test/int64_mul_div_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Int64 = require("melange/int64.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Int64 = require("melange/int64.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); function commutative_mul(result, a, b) { return { @@ -25,7 +25,7 @@ function commutative_mul(result, a, b) { }; } -var pairs = [ +let pairs = [ [ [ -1482940033, @@ -310,9 +310,9 @@ var pairs = [ function from_pairs(prefix, pairs) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - var b = param[2]; - var a = param[1]; - var result = param[0]; + let b = param[2]; + let a = param[1]; + let result = param[0]; return [ Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -339,7 +339,7 @@ function from_pairs(prefix, pairs) { }), pairs)); } -var small_pairs = [ +let small_pairs = [ [ [ 0, @@ -426,7 +426,7 @@ var small_pairs = [ ] ]; -var to_floats = [ +let to_floats = [ [ Caml_int64.one, 1 @@ -871,7 +871,7 @@ var to_floats = [ ] ]; -var check_complete_compare = [ +let check_complete_compare = [ true, true, true, @@ -882,7 +882,7 @@ var check_complete_compare = [ true ]; -var of_float_pairs = [ +let of_float_pairs = [ [ 6853066956871844, [ @@ -1165,7 +1165,7 @@ var of_float_pairs = [ ] ]; -var simple_divs = [ +let simple_divs = [ [ [ 0, @@ -1530,10 +1530,10 @@ var simple_divs = [ function from(xs) { return Stdlib__List.mapi((function (i, param) { - var d = param[3]; - var c = param[2]; - var b = param[1]; - var a = param[0]; + let d = param[3]; + let c = param[2]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1564,12 +1564,12 @@ function from(xs) { }), Stdlib__Array.to_list(xs)); } -var to_string = [[ +let to_string = [[ Caml_int64.zero, "0" ]]; -var int64_compare_tests = [ +let int64_compare_tests = [ [ Caml_int64.one, [ @@ -1598,9 +1598,9 @@ var int64_compare_tests = [ function from_compare(xs) { return Stdlib__List.mapi((function (i, param) { - var c = param[2]; - var b = param[1]; - var a = param[0]; + let c = param[2]; + let b = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1627,8 +1627,8 @@ function from_compare(xs) { function from_to_string(xs) { return Stdlib__List.mapi((function (i, param) { - var str_a = param[1]; - var a = param[0]; + let str_a = param[1]; + let a = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1654,8 +1654,8 @@ function from_to_string(xs) { } Mt.from_pair_suites("Int64_mul_div_test", Stdlib.$at(from_pairs("random", pairs), Stdlib.$at(from_pairs("small", small_pairs), Stdlib.$at(Stdlib__List.mapi((function (i, param) { - var f = param[1]; - var i64 = param[0]; + let f = param[1]; + let i64 = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1680,8 +1680,8 @@ Mt.from_pair_suites("Int64_mul_div_test", Stdlib.$at(from_pairs("random", pairs) }) ]; }), Stdlib__Array.to_list(to_floats)), Stdlib.$at(Stdlib__List.mapi((function (i, param) { - var i64 = param[1]; - var f = param[0]; + let i64 = param[1]; + let f = param[0]; return [ Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { diff --git a/jscomp/test/dist/jscomp/test/int64_string_bench.js b/jscomp/test/dist/jscomp/test/int64_string_bench.js index 148e305de4..86ba206102 100644 --- a/jscomp/test/dist/jscomp/test/int64_string_bench.js +++ b/jscomp/test/dist/jscomp/test/int64_string_bench.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Stdlib__Int64 = require("melange/int64.js"); console.time("Int64.to_string"); -var u = Caml_int64.sub(Stdlib__Int64.max_int, [ +let u = Caml_int64.sub(Stdlib__Int64.max_int, [ 0, 200000 ]); -for(var _i = 0; _i <= 100000; ++_i){ +for(let _i = 0; _i <= 100000; ++_i){ Caml_format.caml_int64_format("%d", u); } @@ -22,12 +22,12 @@ console.log(Caml_format.caml_int64_format("%d", u)); console.time("Int64.to_string"); -var u$1 = [ +let u$1 = [ 0, 30000000 ]; -for(var _i$1 = 0; _i$1 <= 100000; ++_i$1){ +for(let _i$1 = 0; _i$1 <= 100000; ++_i$1){ Caml_format.caml_int64_format("%d", u$1); } @@ -37,12 +37,12 @@ console.log(Caml_format.caml_int64_format("%d", u$1)); console.time("Int64.to_string"); -var u$2 = Caml_int64.add(Stdlib__Int64.min_int, [ +let u$2 = Caml_int64.add(Stdlib__Int64.min_int, [ 0, 100 ]); -for(var _i$2 = 0; _i$2 <= 100000; ++_i$2){ +for(let _i$2 = 0; _i$2 <= 100000; ++_i$2){ Caml_format.caml_int64_format("%d", u$2); } diff --git a/jscomp/test/dist/jscomp/test/int64_string_test.js b/jscomp/test/dist/jscomp/test/int64_string_test.js index 37a81bbb03..777b2e6f23 100644 --- a/jscomp/test/dist/jscomp/test/int64_string_test.js +++ b/jscomp/test/dist/jscomp/test/int64_string_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Mt = require("./mt.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Mt = require("./mt.js"); +let Stdlib__Int64 = require("melange/int64.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -20,7 +20,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var v = Caml_format.caml_int64_format("%d", Stdlib__Int64.max_int); +let v = Caml_format.caml_int64_format("%d", Stdlib__Int64.max_int); eq("File \"jscomp/test/int64_string_test.ml\", line 9, characters 6-13", v, "9223372036854775807"); @@ -28,7 +28,7 @@ function f(a, b) { eq("File \"jscomp/test/int64_string_test.ml\", line 11, characters 5-12", Caml_format.caml_int64_format("%d", a), b); } -var hh = Caml_int64.add(Stdlib__Int64.min_int, [ +let hh = Caml_int64.add(Stdlib__Int64.min_int, [ 0, 100 ]); @@ -57,33 +57,33 @@ f([ 2764472320 ], "1000000000000000"); -for(var i = 0; i <= 8; ++i){ +for(let i = 0; i <= 8; ++i){ eq("File \"jscomp/test/int64_string_test.ml\", line 25, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.of_int32(i))), "-922337203685477580" + String(8 - i | 0)); } -for(var i$1 = 0; i$1 <= 8; ++i$1){ +for(let i$1 = 0; i$1 <= 8; ++i$1){ eq("File \"jscomp/test/int64_string_test.ml\", line 29, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.of_int32(100 + i$1 | 0))), "-922337203685477570" + String(8 - i$1 | 0)); } -for(var i$2 = 0; i$2 <= 8; ++i$2){ +for(let i$2 = 0; i$2 <= 8; ++i$2){ eq("File \"jscomp/test/int64_string_test.ml\", line 33, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.of_int32(1000000 + i$2 | 0))), "-922337203685377580" + String(8 - i$2 | 0)); } -var u = [ +let u = [ 2097151, 4294957295 ]; -for(var i$3 = 0; i$3 <= 6; ++i$3){ +for(let i$3 = 0; i$3 <= 6; ++i$3){ eq("File \"jscomp/test/int64_string_test.ml\", line 42, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(u, Caml_int64.of_int32(Math.imul(i$3, 10000)))), "90071992547" + (String(3 + i$3 | 0) + "0991")); } -var v$1 = [ +let v$1 = [ -2097153, 4294917297 ]; -for(var i$4 = 0; i$4 <= 9; ++i$4){ +for(let i$4 = 0; i$4 <= 9; ++i$4){ eq("File \"jscomp/test/int64_string_test.ml\", line 49, characters 5-12", Caml_format.caml_int64_format("%d", Caml_int64.add(v$1, Caml_int64.of_int32(Math.imul(i$4, 10000)))), "-90071992547" + (String(9 - i$4 | 0) + "0991")); } @@ -104,7 +104,7 @@ eq("File \"jscomp/test/int64_string_test.ml\", line 54, characters 6-13", Caml_f eq("File \"jscomp/test/int64_string_test.ml\", line 55, characters 6-13", Caml_format.caml_int64_format("%d", Caml_int64.max_int), "9223372036854775807"); -var random_data = { +let random_data = { hd: { hd: [ [ @@ -1318,7 +1318,7 @@ Belt__Belt_List.forEach(random_data, (function (u) { ] }); } - var match = u.hd; + let match = u.hd; return eq("File \"jscomp/test/int64_string_test.ml\", line 160, characters 21-28", Caml_format.caml_int64_format("%d", match[0]), match[1]); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/int64_test.js b/jscomp/test/dist/jscomp/test/int64_test.js index a43c4236cd..4bb9dce9e4 100644 --- a/jscomp/test/dist/jscomp/test/int64_test.js +++ b/jscomp/test/dist/jscomp/test/int64_test.js @@ -1,28 +1,28 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Ext_array_test = require("./ext_array_test.js"); -var Js__Caml_int64 = require("melange.js/caml_int64.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Int32 = require("melange/int32.js"); -var Stdlib__Int64 = require("melange/int64.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Ext_array_test = require("./ext_array_test.js"); +let Js__Caml_int64 = require("melange.js/caml_int64.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Int32 = require("melange/int32.js"); +let Stdlib__Int64 = require("melange/int64.js"); function f(u, v) { return u > v; } -var v = Caml_int64.add(Caml_int64.of_int32(Stdlib__Int32.max_int), Stdlib__Int64.one); +let v = Caml_int64.add(Caml_int64.of_int32(Stdlib__Int32.max_int), Stdlib__Int64.one); -var h = Caml_int64.neg(v); +let h = Caml_int64.neg(v); -var a = [ +let a = [ 0, 2147483647 ]; @@ -41,13 +41,13 @@ function commutative_add(result, a, b) { }; } -var generic_compare = Caml_obj.caml_compare; +let generic_compare = Caml_obj.caml_compare; -var shift_left_tests_0 = Stdlib__Array.map((function (i) { +let shift_left_tests_0 = Stdlib__Array.map((function (i) { return Caml_int64.lsl_(Caml_int64.one, i); }), Ext_array_test.range(0, 63)); -var shift_left_tests_1 = [ +let shift_left_tests_1 = [ Caml_int64.one, [ 0, @@ -300,16 +300,16 @@ var shift_left_tests_1 = [ Caml_int64.min_int ]; -var shift_left_tests = [ +let shift_left_tests = [ shift_left_tests_0, shift_left_tests_1 ]; -var shift_right_tests_0 = Stdlib__Array.map((function (i) { +let shift_right_tests_0 = Stdlib__Array.map((function (i) { return Caml_int64.asr_(Caml_int64.min_int, i); }), Ext_array_test.range(0, 63)); -var shift_right_tests_1 = [ +let shift_right_tests_1 = [ Caml_int64.min_int, [ -1073741824, @@ -562,16 +562,16 @@ var shift_right_tests_1 = [ Caml_int64.neg_one ]; -var shift_right_tests = [ +let shift_right_tests = [ shift_right_tests_0, shift_right_tests_1 ]; -var shift_right_logical_suites_0 = Stdlib__Array.map((function (i) { +let shift_right_logical_suites_0 = Stdlib__Array.map((function (i) { return Caml_int64.lsr_(Caml_int64.min_int, i); }), Ext_array_test.range(0, 63)); -var shift_right_logical_suites_1 = [ +let shift_right_logical_suites_1 = [ Caml_int64.min_int, [ 1073741824, @@ -824,16 +824,16 @@ var shift_right_logical_suites_1 = [ Caml_int64.one ]; -var shift_right_logical_suites = [ +let shift_right_logical_suites = [ shift_right_logical_suites_0, shift_right_logical_suites_1 ]; function fib(_n, _a, _b) { while(true) { - var b = _b; - var a = _a; - var n = _n; + let b = _b; + let a = _a; + let n = _n; if (n === 0) { return a; } @@ -846,8 +846,8 @@ function fib(_n, _a, _b) { function fac(_n, _acc) { while(true) { - var acc = _acc; - var n = _n; + let acc = _acc; + let n = _n; if (n === 0) { return acc; } @@ -857,7 +857,7 @@ function fac(_n, _acc) { }; } -var suites = Stdlib.$at({ +let suites = Stdlib.$at({ hd: [ "add_one", (function (param) { @@ -2180,11 +2180,11 @@ var suites = Stdlib.$at({ ]; }), shift_right_logical_suites_0, shift_right_logical_suites_1))))); -var suites$1 = { +let suites$1 = { contents: suites }; -var test_id = { +let test_id = { contents: 0 }; @@ -2193,8 +2193,8 @@ function eq(loc, x, y) { } function id(loc, x) { - var float_value = Caml_int64.float_of_bits(x); - var match = Stdlib.classify_float(float_value); + let float_value = Caml_int64.float_of_bits(x); + let match = Stdlib.classify_float(float_value); if (match >= 4) { return ; } else { diff --git a/jscomp/test/dist/jscomp/test/int_hashtbl_test.js b/jscomp/test/dist/jscomp/test/int_hashtbl_test.js index c2003d79b3..1a3ddb4c75 100644 --- a/jscomp/test/dist/jscomp/test/int_hashtbl_test.js +++ b/jscomp/test/dist/jscomp/test/int_hashtbl_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__List = require("melange/list.js"); function f(H) { - var tbl = Curry._1(H.create, 17); + let tbl = Curry._1(H.create, 17); Curry._3(H.add, tbl, 1, /* '1' */49); Curry._3(H.add, tbl, 2, /* '2' */50); return Stdlib__List.sort((function (param, param$1) { @@ -26,14 +26,14 @@ function f(H) { } function g(H, count) { - var tbl = Curry._1(H.create, 17); - for(var i = 0; i <= count; ++i){ + let tbl = Curry._1(H.create, 17); + for(let i = 0; i <= count; ++i){ Curry._3(H.replace, tbl, (i << 1), String(i)); } - for(var i$1 = 0; i$1 <= count; ++i$1){ + for(let i$1 = 0; i$1 <= count; ++i$1){ Curry._3(H.replace, tbl, (i$1 << 1), String(i$1)); } - var v = Curry._3(H.fold, (function (k, v, acc) { + let v = Curry._3(H.fold, (function (k, v, acc) { return { hd: [ k, @@ -47,18 +47,18 @@ function g(H, count) { }), v)); } -var hash = Stdlib__Hashtbl.hash; +let hash = Stdlib__Hashtbl.hash; function equal(x, y) { return x === y; } -var Int_hash = Stdlib__Hashtbl.Make({ +let Int_hash = Stdlib__Hashtbl.Make({ equal: equal, hash: hash }); -var suites_0 = [ +let suites_0 = [ "simple", (function (param) { return { @@ -81,7 +81,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "more_iterations", (function (param) { @@ -100,7 +100,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/int_map.js b/jscomp/test/dist/jscomp/test/int_map.js index a81095043c..dae86a2ba5 100644 --- a/jscomp/test/dist/jscomp/test/int_map.js +++ b/jscomp/test/dist/jscomp/test/int_map.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var funarg = { +let funarg = { compare: compare }; @@ -24,8 +24,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -46,14 +46,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -80,10 +80,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -119,11 +119,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -138,14 +138,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -155,9 +155,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -172,24 +172,24 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -211,26 +211,26 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -248,24 +248,24 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -287,26 +287,26 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -324,11 +324,11 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -339,11 +339,11 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -354,9 +354,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -374,11 +374,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -392,7 +392,7 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -411,7 +411,7 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -428,7 +428,7 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_binding(l), param.v, param.d, param.r); } else { @@ -448,7 +448,7 @@ function merge(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return bal(t1, match[0], match[1], remove_min_binding(t2)); } @@ -456,23 +456,23 @@ function remove(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return merge(l, r); } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return m; } else { @@ -482,17 +482,17 @@ function remove(x, m) { function update(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -506,21 +506,21 @@ function update(x, f, m) { } } if (c < 0) { - var ll = update(x, f, l); + let ll = update(x, f, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = update(x, f, r); + let rr = update(x, f, r); if (r === rr) { return m; } else { return bal(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -535,7 +535,7 @@ function update(x, f, m) { } function add_to_list(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -553,7 +553,7 @@ function add_to_list(x, data, m) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -568,9 +568,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map(f, param.r); + let l$p = map(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -584,10 +584,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi(f, param.r); + let v = param.v; + let l$p = mapi(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi(f, param.r); return /* Node */{ l: l$p, v: v, @@ -599,8 +599,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -612,7 +612,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -629,7 +629,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -667,8 +667,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, l.d, join(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -685,7 +685,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -705,11 +705,11 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -718,14 +718,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -735,9 +735,9 @@ function split(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge$1(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$1(f, s1.r, match[2])); } @@ -745,8 +745,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split(v2, s1); + let v2 = s2.v; + let match$1 = split(v2, s1); return concat_or_join(merge$1(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$1(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -766,25 +766,25 @@ function union(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split(v1, s2); - var d2$1 = match[1]; - var l = union(f, s1.l, match[0]); - var r = union(f, s1.r, match[2]); + let match = split(v1, s2); + let d2$1 = match[1]; + let l = union(f, s1.l, match[0]); + let r = union(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join(l, v1, d1, r); } } - var match$1 = split(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union(f, match$1[0], s2.l); - var r$1 = union(f, match$1[2], s2.r); + let match$1 = split(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union(f, match$1[0], s2.l); + let r$1 = union(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -796,13 +796,13 @@ function filter(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -818,10 +818,10 @@ function filter_map(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map(f, param.r); + let v = param.v; + let l$p = filter_map(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map(f, param.r); if (fvd !== undefined) { return join(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -836,15 +836,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -860,8 +860,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -877,11 +877,11 @@ function cons_enum(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -892,11 +892,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -907,11 +907,11 @@ function compare$1(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -944,8 +944,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -985,7 +985,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._2, c._3); + let partial_arg = cons_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -998,7 +998,7 @@ function seq_of_enum_(c, param) { } function to_seq(m) { - var partial_arg = cons_enum(m, /* End */0); + let partial_arg = cons_enum(m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1006,8 +1006,8 @@ function to_seq(m) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1026,7 +1026,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._2, c._3); + let partial_arg = snoc_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1039,24 +1039,24 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1079,97 +1079,97 @@ function to_seq_from(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var empty = /* Empty */0; +let empty = /* Empty */0; -var add$1 = add; +let add$1 = add; -var add_to_list$1 = add_to_list; +let add_to_list$1 = add_to_list; -var update$1 = update; +let update$1 = update; -var singleton$1 = singleton; +let singleton$1 = singleton; -var remove$1 = remove; +let remove$1 = remove; -var merge$2 = merge$1; +let merge$2 = merge$1; -var union$1 = union; +let union$1 = union; -var cardinal$1 = cardinal; +let cardinal$1 = cardinal; -var bindings$1 = bindings; +let bindings$1 = bindings; -var min_binding$1 = min_binding; +let min_binding$1 = min_binding; -var min_binding_opt$1 = min_binding_opt; +let min_binding_opt$1 = min_binding_opt; -var max_binding$1 = max_binding; +let max_binding$1 = max_binding; -var max_binding_opt$1 = max_binding_opt; +let max_binding_opt$1 = max_binding_opt; -var choose = min_binding; +let choose = min_binding; -var choose_opt = min_binding_opt; +let choose_opt = min_binding_opt; -var find$1 = find; +let find$1 = find; -var find_opt$1 = find_opt; +let find_opt$1 = find_opt; -var find_first$1 = find_first; +let find_first$1 = find_first; -var find_first_opt$1 = find_first_opt; +let find_first_opt$1 = find_first_opt; -var find_last$1 = find_last; +let find_last$1 = find_last; -var find_last_opt$1 = find_last_opt; +let find_last_opt$1 = find_last_opt; -var iter$1 = iter; +let iter$1 = iter; -var fold$1 = fold; +let fold$1 = fold; -var map$1 = map; +let map$1 = map; -var mapi$1 = mapi; +let mapi$1 = mapi; -var filter$1 = filter; +let filter$1 = filter; -var filter_map$1 = filter_map; +let filter_map$1 = filter_map; -var partition$1 = partition; +let partition$1 = partition; -var split$1 = split; +let split$1 = split; -var is_empty$1 = is_empty; +let is_empty$1 = is_empty; -var mem$1 = mem; +let mem$1 = mem; -var equal$1 = equal; +let equal$1 = equal; -var compare$2 = compare$1; +let compare$2 = compare$1; -var for_all$1 = for_all; +let for_all$1 = for_all; -var exists$1 = exists; +let exists$1 = exists; -var to_list = bindings; +let to_list = bindings; -var of_list$1 = of_list; +let of_list$1 = of_list; -var to_seq$1 = to_seq; +let to_seq$1 = to_seq; -var to_rev_seq$1 = to_rev_seq; +let to_rev_seq$1 = to_rev_seq; -var to_seq_from$1 = to_seq_from; +let to_seq_from$1 = to_seq_from; -var add_seq$1 = add_seq; +let add_seq$1 = add_seq; -var of_seq$1 = of_seq; +let of_seq$1 = of_seq; exports.empty = empty; exports.add = add$1; diff --git a/jscomp/test/dist/jscomp/test/int_overflow_test.js b/jscomp/test/dist/jscomp/test/int_overflow_test.js index 7441c872c5..0bf29a9048 100644 --- a/jscomp/test/dist/jscomp/test/int_overflow_test.js +++ b/jscomp/test/dist/jscomp/test/int_overflow_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_string = require("melange.js/caml_string.js"); -var Mt = require("./mt.js"); -var Stdlib__Int32 = require("melange/int32.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Mt = require("./mt.js"); +let Stdlib__Int32 = require("melange/int32.js"); function hash_variant(s) { - var accu = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let accu = 0; + 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) { @@ -18,8 +18,8 @@ function hash_variant(s) { } function hash_variant2(s) { - var accu = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let accu = 0; + 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/dist/jscomp/test/int_switch_test.js b/jscomp/test/dist/jscomp/test/int_switch_test.js index 29d03c4d15..619de06725 100644 --- a/jscomp/test/dist/jscomp/test/int_switch_test.js +++ b/jscomp/test/dist/jscomp/test/int_switch_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -21,7 +21,7 @@ function b(loc, x) { } function f(x) { - var match = Curry._1(x, undefined); + let match = Curry._1(x, undefined); switch (match) { case 1 : return /* 'a' */97; @@ -35,7 +35,7 @@ function f(x) { } function f22(x) { - var match = Curry._1(x, undefined); + let match = Curry._1(x, undefined); switch (match) { case 1 : return /* 'a' */97; @@ -49,7 +49,7 @@ function f22(x) { } function f33(x) { - var match = Curry._1(x, undefined); + let match = Curry._1(x, undefined); switch (match) { case /* A */0 : return /* 'a' */97; diff --git a/jscomp/test/dist/jscomp/test/internal_unused_test.js b/jscomp/test/dist/jscomp/test/internal_unused_test.js index 82a257f3ed..b223436ea8 100644 --- a/jscomp/test/dist/jscomp/test/internal_unused_test.js +++ b/jscomp/test/dist/jscomp/test/internal_unused_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); console.log(3); -var A = /* @__PURE__ */Caml_exceptions.create("Internal_unused_test.P1.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Internal_unused_test.P1.A"); function f(param) { throw new Caml_js_exceptions.MelangeError(A, { @@ -14,23 +14,23 @@ function f(param) { }); } -var c = 5; +let c = 5; function h(a, b) { return a + b | 0; } -var h1 = 2; +let h1 = 2; -var h2 = h1 + 1 | 0; +let h2 = h1 + 1 | 0; -var h4 = 2; +let h4 = 2; -var h5 = h4 + 1 | 0; +let h5 = h4 + 1 | 0; -var b = 5; +let b = 5; -var N = { +let N = { b: b }; diff --git a/jscomp/test/dist/jscomp/test/js_array_test.js b/jscomp/test/dist/jscomp/test/js_array_test.js index f49e6fa342..ad74598053 100644 --- a/jscomp/test/dist/jscomp/test/js_array_test.js +++ b/jscomp/test/dist/jscomp/test/js_array_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "isArray_array", (function (param) { return { @@ -15,7 +15,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "isArray_int", (function (param) { @@ -312,13 +312,13 @@ var suites_1 = { hd: [ "spliceInPlace", (function (param) { - var arr = [ + let arr = [ 1, 2, 3, 4 ]; - var removed = arr.splice(2, 0, 5); + let removed = arr.splice(2, 0, 5); return { TAG: /* Eq */0, _0: [ @@ -342,13 +342,13 @@ var suites_1 = { hd: [ "removeFromInPlace", (function (param) { - var arr = [ + let arr = [ 1, 2, 3, 4 ]; - var removed = arr.splice(2); + let removed = arr.splice(2); return { TAG: /* Eq */0, _0: [ @@ -372,13 +372,13 @@ var suites_1 = { hd: [ "removeCountInPlace", (function (param) { - var arr = [ + let arr = [ 1, 2, 3, 4 ]; - var removed = arr.splice(2, 1); + let removed = arr.splice(2, 1); return { TAG: /* Eq */0, _0: [ @@ -888,7 +888,7 @@ var suites_1 = { hd: [ "forEach", (function (param) { - var sum = { + let sum = { contents: 0 }; [ @@ -909,7 +909,7 @@ var suites_1 = { hd: [ "forEachi", (function (param) { - var sum = { + let sum = { contents: 0 }; [ @@ -1139,7 +1139,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_bool_test.js b/jscomp/test/dist/jscomp/test/js_bool_test.js index 06b7f8010b..15b884f7b2 100644 --- a/jscomp/test/dist/jscomp/test/js_bool_test.js +++ b/jscomp/test/dist/jscomp/test/js_bool_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); function f(x) { if (x) { @@ -27,11 +27,11 @@ function f4(x) { } } -var u = 1; +let u = 1; -var v = true; +let v = true; -var suites_0 = [ +let suites_0 = [ "caml_bool_eq_caml_bool", (function (param) { return { @@ -42,7 +42,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "js_bool_eq_js_bool", (function (param) { @@ -68,7 +68,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; @@ -114,7 +114,7 @@ function bb(x) { ]; } -var consts = [ +let consts = [ false, false, true, @@ -125,14 +125,14 @@ var consts = [ true ]; -var bool_array = [ +let bool_array = [ true, false ]; Mt.from_pair_suites("Js_bool_test", suites); -var f3 = true; +let f3 = true; exports.f = f; exports.f2 = f2; diff --git a/jscomp/test/dist/jscomp/test/js_date_test.js b/jscomp/test/dist/jscomp/test/js_date_test.js index 2d1bf45f3c..7e9be782ad 100644 --- a/jscomp/test/dist/jscomp/test/js_date_test.js +++ b/jscomp/test/dist/jscomp/test/js_date_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); -var Stdlib__Option = require("melange/option.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); +let Stdlib__Option = require("melange/option.js"); function date(param) { return new Date("1976-03-08T12:34:56.789+01:23"); } -var suites_0 = [ +let suites_0 = [ "valueOf", (function (param) { return { @@ -21,7 +21,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "make", (function (param) { @@ -88,7 +88,7 @@ var suites_1 = { hd: [ "makeWithYM", (function (param) { - var d = new Date(1984, 4); + let d = new Date(1984, 4); return { TAG: /* Eq */0, _0: [ @@ -106,7 +106,7 @@ var suites_1 = { hd: [ "makeWithYMD", (function (param) { - var d = new Date(1984, 4, 6); + let d = new Date(1984, 4, 6); return { TAG: /* Eq */0, _0: [ @@ -126,7 +126,7 @@ var suites_1 = { hd: [ "makeWithYMDH", (function (param) { - var d = new Date(1984, 4, 6, 3); + let d = new Date(1984, 4, 6, 3); return { TAG: /* Eq */0, _0: [ @@ -148,7 +148,7 @@ var suites_1 = { hd: [ "makeWithYMDHM", (function (param) { - var d = new Date(1984, 4, 6, 3, 59); + let d = new Date(1984, 4, 6, 3, 59); return { TAG: /* Eq */0, _0: [ @@ -172,7 +172,7 @@ var suites_1 = { hd: [ "makeWithYMDHMS", (function (param) { - var d = new Date(1984, 4, 6, 3, 59, 27); + let d = new Date(1984, 4, 6, 3, 59, 27); return { TAG: /* Eq */0, _0: [ @@ -198,8 +198,8 @@ var suites_1 = { hd: [ "utcWithYM", (function (param) { - var d = Date.UTC(1984, 4); - var d$1 = new Date(d); + let d = Date.UTC(1984, 4); + let d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ @@ -217,8 +217,8 @@ var suites_1 = { hd: [ "utcWithYMD", (function (param) { - var d = Date.UTC(1984, 4, 6); - var d$1 = new Date(d); + let d = Date.UTC(1984, 4, 6); + let d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ @@ -238,8 +238,8 @@ var suites_1 = { hd: [ "utcWithYMDH", (function (param) { - var d = Date.UTC(1984, 4, 6, 3); - var d$1 = new Date(d); + let d = Date.UTC(1984, 4, 6, 3); + let d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ @@ -261,8 +261,8 @@ var suites_1 = { hd: [ "utcWithYMDHM", (function (param) { - var d = Date.UTC(1984, 4, 6, 3, 59); - var d$1 = new Date(d); + let d = Date.UTC(1984, 4, 6, 3, 59); + let d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ @@ -286,8 +286,8 @@ var suites_1 = { hd: [ "utcWithYMDHMS", (function (param) { - var d = Date.UTC(1984, 4, 6, 3, 59, 27); - var d$1 = new Date(d); + let d = Date.UTC(1984, 4, 6, 3, 59, 27); + let d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ @@ -456,7 +456,7 @@ var suites_1 = { hd: [ "setDate", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setDate(12); return { TAG: /* Eq */0, @@ -469,7 +469,7 @@ var suites_1 = { hd: [ "setFullYear", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986); return { TAG: /* Eq */0, @@ -482,7 +482,7 @@ var suites_1 = { hd: [ "setFullYearM", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986, 7); return { TAG: /* Eq */0, @@ -501,7 +501,7 @@ var suites_1 = { hd: [ "setFullYearMD", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986, 7, 23); return { TAG: /* Eq */0, @@ -522,7 +522,7 @@ var suites_1 = { hd: [ "setHours", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22); return { TAG: /* Eq */0, @@ -535,7 +535,7 @@ var suites_1 = { hd: [ "setHoursM", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22, 48); return { TAG: /* Eq */0, @@ -554,7 +554,7 @@ var suites_1 = { hd: [ "setHoursMS", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22, 48, 54); return { TAG: /* Eq */0, @@ -575,7 +575,7 @@ var suites_1 = { hd: [ "setMilliseconds", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMilliseconds(543); return { TAG: /* Eq */0, @@ -588,7 +588,7 @@ var suites_1 = { hd: [ "setMinutes", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18); return { TAG: /* Eq */0, @@ -601,7 +601,7 @@ var suites_1 = { hd: [ "setMinutesS", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18, 42); return { TAG: /* Eq */0, @@ -620,7 +620,7 @@ var suites_1 = { hd: [ "setMinutesSMs", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18, 42, 311); return { TAG: /* Eq */0, @@ -641,7 +641,7 @@ var suites_1 = { hd: [ "setMonth", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMonth(10); return { TAG: /* Eq */0, @@ -654,7 +654,7 @@ var suites_1 = { hd: [ "setMonthD", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMonth(10, 14); return { TAG: /* Eq */0, @@ -673,7 +673,7 @@ var suites_1 = { hd: [ "setSeconds", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setSeconds(36); return { TAG: /* Eq */0, @@ -686,7 +686,7 @@ var suites_1 = { hd: [ "setSecondsMs", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setSeconds(36, 420); return { TAG: /* Eq */0, @@ -705,7 +705,7 @@ var suites_1 = { hd: [ "setUTCDate", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCDate(12); return { TAG: /* Eq */0, @@ -718,7 +718,7 @@ var suites_1 = { hd: [ "setUTCFullYear", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986); return { TAG: /* Eq */0, @@ -731,7 +731,7 @@ var suites_1 = { hd: [ "setUTCFullYearM", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986, 7); return { TAG: /* Eq */0, @@ -750,7 +750,7 @@ var suites_1 = { hd: [ "setUTCFullYearMD", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986, 7, 23); return { TAG: /* Eq */0, @@ -771,7 +771,7 @@ var suites_1 = { hd: [ "setUTCHours", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22); return { TAG: /* Eq */0, @@ -784,7 +784,7 @@ var suites_1 = { hd: [ "setUTCHoursM", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22, 48); return { TAG: /* Eq */0, @@ -803,7 +803,7 @@ var suites_1 = { hd: [ "setUTCHoursMS", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22, 48, 54); return { TAG: /* Eq */0, @@ -824,7 +824,7 @@ var suites_1 = { hd: [ "setUTCMilliseconds", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMilliseconds(543); return { TAG: /* Eq */0, @@ -837,7 +837,7 @@ var suites_1 = { hd: [ "setUTCMinutes", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18); return { TAG: /* Eq */0, @@ -850,7 +850,7 @@ var suites_1 = { hd: [ "setUTCMinutesS", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18, 42); return { TAG: /* Eq */0, @@ -869,7 +869,7 @@ var suites_1 = { hd: [ "setUTCMinutesSMs", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18, 42, 311); return { TAG: /* Eq */0, @@ -890,7 +890,7 @@ var suites_1 = { hd: [ "setUTCMonth", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMonth(10); return { TAG: /* Eq */0, @@ -903,7 +903,7 @@ var suites_1 = { hd: [ "setUTCMonthD", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMonth(10, 14); return { TAG: /* Eq */0, @@ -922,7 +922,7 @@ var suites_1 = { hd: [ "setUTCSeconds", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCSeconds(36); return { TAG: /* Eq */0, @@ -935,7 +935,7 @@ var suites_1 = { hd: [ "setUTCSecondsMs", (function (param) { - var d = new Date("1976-03-08T12:34:56.789+01:23"); + let d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCSeconds(36, 420); return { TAG: /* Eq */0, @@ -1020,9 +1020,9 @@ var suites_1 = { hd: [ "eq", (function (param) { - var a = new Date("2013-03-01T01:10:00"); - var b = new Date("2013-03-01T01:10:00"); - var c = new Date("2013-03-01T01:10:01"); + let a = new Date("2013-03-01T01:10:00"); + let b = new Date("2013-03-01T01:10:00"); + let c = new Date("2013-03-01T01:10:01"); return { TAG: /* Ok */4, _0: Caml_obj.caml_equal(a, b) && Caml_obj.caml_notequal(b, c) && Caml_obj.caml_greaterthan(c, b) @@ -1097,7 +1097,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_dict_test.js b/jscomp/test/dist/jscomp/test/js_dict_test.js index 7c5caf894a..e4e19b9f9b 100644 --- a/jscomp/test/dist/jscomp/test/js_dict_test.js +++ b/jscomp/test/dist/jscomp/test/js_dict_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Js__Js_dict = require("melange.js/js_dict.js"); -var Mt = require("./mt.js"); +let Js__Js_dict = require("melange.js/js_dict.js"); +let Mt = require("./mt.js"); function obj(param) { return { @@ -11,7 +11,7 @@ function obj(param) { }; } -var suites_0 = [ +let suites_0 = [ "empty", (function (param) { return { @@ -22,7 +22,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "get", (function (param) { @@ -68,7 +68,7 @@ var suites_1 = { hd: [ "set", (function (param) { - var o = { + let o = { foo: 43, bar: 86 }; @@ -253,7 +253,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_exception_catch_test.js b/jscomp/test/dist/jscomp/test/js_exception_catch_test.js index b21ce68bac..47558859f3 100644 --- a/jscomp/test/dist/jscomp/test/js_exception_catch_test.js +++ b/jscomp/test/dist/jscomp/test/js_exception_catch_test.js @@ -1,24 +1,24 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); - -var suites = { +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); + +let suites = { contents: /* [] */0 }; -var counter = { +let counter = { contents: 0 }; function add_test(loc, test) { counter.contents = counter.contents + 1 | 0; - var id = loc + (" id " + String(counter.contents)); + let id = loc + (" id " + String(counter.contents)); suites.contents = { hd: [ id, @@ -56,16 +56,16 @@ function true_(loc) { })); } -var exit = 0; +let exit = 0; -var e; +let e; try { e = JSON.parse(" {\"x\"}"); exit = 1; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Js__Js_exn.$$Error) { add_test("File \"jscomp/test/js_exception_catch_test.ml\", line 21, characters 10-17", (function (param) { return { @@ -87,11 +87,11 @@ if (exit === 1) { })); } -var A = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.B"); -var C = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.C"); +let C = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.C"); function test(f) { try { @@ -99,7 +99,7 @@ function test(f) { return "No_error"; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.MEL_EXN_ID === Stdlib.Not_found) { return "Not_found"; } else if (e.MEL_EXN_ID === Stdlib.Invalid_argument) { diff --git a/jscomp/test/dist/jscomp/test/js_float_test.js b/jscomp/test/dist/jscomp/test/js_float_test.js index b971f7a4f3..544b23df12 100644 --- a/jscomp/test/dist/jscomp/test/js_float_test.js +++ b/jscomp/test/dist/jscomp/test/js_float_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var suites_0 = [ +let suites_0 = [ "_NaN <> _NaN", (function (param) { return { @@ -15,7 +15,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "isNaN - _NaN", (function (param) { @@ -530,7 +530,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_global_test.js b/jscomp/test/dist/jscomp/test/js_global_test.js index 5336210c73..f2197f48f5 100644 --- a/jscomp/test/dist/jscomp/test/js_global_test.js +++ b/jscomp/test/dist/jscomp/test/js_global_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "setTimeout/clearTimeout sanity check", (function (param) { - var handle = setTimeout((function (param) { + let handle = setTimeout((function (param) { }), 0); clearTimeout(handle); @@ -17,11 +17,11 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "setInerval/clearInterval sanity check", (function (param) { - var handle = setInterval((function (param) { + let handle = setInterval((function (param) { }), 0); clearInterval(handle); @@ -82,7 +82,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_int_test.js b/jscomp/test/dist/jscomp/test/js_int_test.js index bbefcb2ac8..21e25ef348 100644 --- a/jscomp/test/dist/jscomp/test/js_int_test.js +++ b/jscomp/test/dist/jscomp/test/js_int_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "toExponential", (function (param) { return { @@ -14,7 +14,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "toExponentialWithPrecision - digits:2", (function (param) { @@ -239,7 +239,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_json_test.js b/jscomp/test/dist/jscomp/test/js_json_test.js index efb0e2d2cd..9e23444a80 100644 --- a/jscomp/test/dist/jscomp/test/js_json_test.js +++ b/jscomp/test/dist/jscomp/test/js_json_test.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_dict = require("melange.js/js_dict.js"); -var Js__Js_json = require("melange.js/js_json.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); - -var suites = { +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_dict = require("melange.js/js_dict.js"); +let Js__Js_json = require("melange.js/js_json.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); + +let suites = { contents: /* [] */0 }; -var counter = { +let counter = { contents: 0 }; function add_test(loc, test) { counter.contents = counter.contents + 1 | 0; - var id = loc + (" id " + String(counter.contents)); + let id = loc + (" id " + String(counter.contents)); suites.contents = { hd: [ id, @@ -59,10 +59,10 @@ function true_(loc) { })); } -var v = JSON.parse(" { \"x\" : [1, 2, 3 ] } "); +let v = JSON.parse(" { \"x\" : [1, 2, 3 ] } "); add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (function (param) { - var ty = Js__Js_json.classify(v); + let ty = Js__Js_json.classify(v); if (typeof ty === "number") { return { TAG: /* Ok */4, @@ -75,14 +75,14 @@ add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (fun _0: false }; } - var v$1 = Js__Js_dict.get(ty._0, "x"); + let v$1 = Js__Js_dict.get(ty._0, "x"); if (v$1 === undefined) { return { TAG: /* Ok */4, _0: false }; } - var ty2 = Js__Js_json.classify(Caml_option.valFromOption(v$1)); + let ty2 = Js__Js_json.classify(Caml_option.valFromOption(v$1)); if (typeof ty2 === "number") { return { TAG: /* Ok */4, @@ -96,7 +96,7 @@ add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (fun }; } ty2._0.forEach(function (x) { - var ty3 = Js__Js_json.classify(x); + let ty3 = Js__Js_json.classify(x); if (typeof ty3 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -127,9 +127,9 @@ add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (fun eq("File \"jscomp/test/js_json_test.ml\", line 49, characters 5-12", Js__Js_json.test(v, /* Object */2), true); -var json = JSON.parse(JSON.stringify(null)); +let json = JSON.parse(JSON.stringify(null)); -var ty = Js__Js_json.classify(json); +let ty = Js__Js_json.classify(json); if (typeof ty === "number") { if (ty >= 2) { @@ -158,9 +158,9 @@ if (typeof ty === "number") { })); } -var json$1 = JSON.parse(JSON.stringify("test string")); +let json$1 = JSON.parse(JSON.stringify("test string")); -var ty$1 = Js__Js_json.classify(json$1); +let ty$1 = Js__Js_json.classify(json$1); if (typeof ty$1 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 66, characters 16-23", (function (param) { @@ -180,11 +180,11 @@ if (typeof ty$1 === "number") { })); } -var json$2 = JSON.parse(JSON.stringify(1.23456789)); +let json$2 = JSON.parse(JSON.stringify(1.23456789)); -var ty$2 = Js__Js_json.classify(json$2); +let ty$2 = Js__Js_json.classify(json$2); -var exit = 0; +let exit = 0; if (typeof ty$2 === "number" || ty$2.TAG !== /* JSONNumber */1) { exit = 1; @@ -201,11 +201,11 @@ if (exit === 1) { })); } -var json$3 = JSON.parse(JSON.stringify(-1347440721)); +let json$3 = JSON.parse(JSON.stringify(-1347440721)); -var ty$3 = Js__Js_json.classify(json$3); +let ty$3 = Js__Js_json.classify(json$3); -var exit$1 = 0; +let exit$1 = 0; if (typeof ty$3 === "number" || ty$3.TAG !== /* JSONNumber */1) { exit$1 = 1; @@ -223,8 +223,8 @@ if (exit$1 === 1) { } function test(v) { - var json = JSON.parse(JSON.stringify(v)); - var ty = Js__Js_json.classify(json); + let json = JSON.parse(JSON.stringify(v)); + let ty = Js__Js_json.classify(json); if (typeof ty !== "number") { return add_test("File \"jscomp/test/js_json_test.ml\", line 97, characters 18-25", (function (param) { return { @@ -267,15 +267,15 @@ function option_get(param) { }); } -var dict = {}; +let dict = {}; dict["a"] = "test string"; dict["b"] = 123.0; -var json$4 = JSON.parse(JSON.stringify(dict)); +let json$4 = JSON.parse(JSON.stringify(dict)); -var ty$4 = Js__Js_json.classify(json$4); +let ty$4 = Js__Js_json.classify(json$4); if (typeof ty$4 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 135, characters 16-23", (function (param) { @@ -285,8 +285,8 @@ if (typeof ty$4 === "number") { }; })); } else if (ty$4.TAG === /* JSONObject */2) { - var x = ty$4._0; - var ta = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "a"))); + let x = ty$4._0; + let ta = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "a"))); if (typeof ta === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 133, characters 18-25", (function (param) { return { @@ -303,7 +303,7 @@ if (typeof ty$4 === "number") { }; })); } else { - var ty$5 = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "b"))); + let ty$5 = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "b"))); if (typeof ty$5 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 131, characters 22-29", (function (param) { return { @@ -312,7 +312,7 @@ if (typeof ty$4 === "number") { }; })); } else if (ty$5.TAG === /* JSONNumber */1) { - var b = ty$5._0; + let b = ty$5._0; add_test("File \"jscomp/test/js_json_test.ml\", line 130, characters 19-26", (function (param) { return { TAG: /* Approx */5, @@ -347,7 +347,7 @@ if (typeof ty$4 === "number") { } function eq_at_i(loc, json, i, kind, expected) { - var ty = Js__Js_json.classify(json); + let ty = Js__Js_json.classify(json); if (typeof ty === "number") { return add_test(loc, (function (param) { return { @@ -364,7 +364,7 @@ function eq_at_i(loc, json, i, kind, expected) { }; })); } - var ty$1 = Js__Js_json.classify(Caml_array.get(ty._0, i)); + let ty$1 = Js__Js_json.classify(Caml_array.get(ty._0, i)); switch (kind) { case /* String */0 : if (typeof ty$1 === "number") { @@ -490,7 +490,7 @@ function eq_at_i(loc, json, i, kind, expected) { } } -var json$5 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { +let json$5 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { return prim; }), [ "string 0", @@ -504,7 +504,7 @@ eq_at_i("File \"jscomp/test/js_json_test.ml\", line 195, characters 10-17", json eq_at_i("File \"jscomp/test/js_json_test.ml\", line 196, characters 10-17", json$5, 2, /* String */0, "string 2"); -var json$6 = JSON.parse(JSON.stringify([ +let json$6 = JSON.parse(JSON.stringify([ "string 0", "string 1", "string 2" @@ -516,13 +516,13 @@ eq_at_i("File \"jscomp/test/js_json_test.ml\", line 207, characters 10-17", json eq_at_i("File \"jscomp/test/js_json_test.ml\", line 208, characters 10-17", json$6, 2, /* String */0, "string 2"); -var a = [ +let a = [ 1.0000001, 10000000000.1, 123.0 ]; -var json$7 = JSON.parse(JSON.stringify(a)); +let json$7 = JSON.parse(JSON.stringify(a)); eq_at_i("File \"jscomp/test/js_json_test.ml\", line 220, characters 10-17", json$7, 0, /* Number */1, Caml_array.get(a, 0)); @@ -530,13 +530,13 @@ eq_at_i("File \"jscomp/test/js_json_test.ml\", line 221, characters 10-17", json eq_at_i("File \"jscomp/test/js_json_test.ml\", line 222, characters 10-17", json$7, 2, /* Number */1, Caml_array.get(a, 2)); -var a$1 = [ +let a$1 = [ 0, -1347440721, -268391749 ]; -var json$8 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { +let json$8 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { return prim; }), a$1))); @@ -546,13 +546,13 @@ eq_at_i("File \"jscomp/test/js_json_test.ml\", line 236, characters 10-17", json eq_at_i("File \"jscomp/test/js_json_test.ml\", line 237, characters 10-17", json$8, 2, /* Number */1, Caml_array.get(a$1, 2)); -var a$2 = [ +let a$2 = [ true, false, true ]; -var json$9 = JSON.parse(JSON.stringify(a$2)); +let json$9 = JSON.parse(JSON.stringify(a$2)); eq_at_i("File \"jscomp/test/js_json_test.ml\", line 249, characters 10-17", json$9, 0, /* Boolean */4, Caml_array.get(a$2, 0)); @@ -561,20 +561,20 @@ eq_at_i("File \"jscomp/test/js_json_test.ml\", line 250, characters 10-17", json eq_at_i("File \"jscomp/test/js_json_test.ml\", line 251, characters 10-17", json$9, 2, /* Boolean */4, Caml_array.get(a$2, 2)); function make_d(s, i) { - var d = {}; + let d = {}; d["a"] = s; d["b"] = i; return d; } -var a$3 = [ +let a$3 = [ make_d("aaa", 123), make_d("bbb", 456) ]; -var json$10 = JSON.parse(JSON.stringify(a$3)); +let json$10 = JSON.parse(JSON.stringify(a$3)); -var ty$6 = Js__Js_json.classify(json$10); +let ty$6 = Js__Js_json.classify(json$10); if (typeof ty$6 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 283, characters 16-23", (function (param) { @@ -584,7 +584,7 @@ if (typeof ty$6 === "number") { }; })); } else if (ty$6.TAG === /* JSONArray */3) { - var ty$7 = Js__Js_json.classify(Caml_array.get(ty$6._0, 1)); + let ty$7 = Js__Js_json.classify(Caml_array.get(ty$6._0, 1)); if (typeof ty$7 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 281, characters 18-25", (function (param) { return { @@ -593,7 +593,7 @@ if (typeof ty$6 === "number") { }; })); } else if (ty$7.TAG === /* JSONObject */2) { - var ty$8 = Js__Js_json.classify(option_get(Js__Js_dict.get(ty$7._0, "a"))); + let ty$8 = Js__Js_json.classify(option_get(Js__Js_dict.get(ty$7._0, "a"))); if (typeof ty$8 === "number") { add_test("File \"jscomp/test/js_json_test.ml\", line 279, characters 20-27", (function (param) { return { diff --git a/jscomp/test/dist/jscomp/test/js_math_test.js b/jscomp/test/dist/jscomp/test/js_math_test.js index 90d640acf8..f06239083a 100644 --- a/jscomp/test/dist/jscomp/test/js_math_test.js +++ b/jscomp/test/dist/jscomp/test/js_math_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Js__Js_math = require("melange.js/js_math.js"); -var Mt = require("./mt.js"); +let Js__Js_math = require("melange.js/js_math.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "_E", (function (param) { return { @@ -16,7 +16,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "_LN2", (function (param) { @@ -517,7 +517,7 @@ var suites_1 = { hd: [ "random", (function (param) { - var a = Math.random(); + let a = Math.random(); return { TAG: /* Ok */4, _0: a >= 0 && a < 1 @@ -528,7 +528,7 @@ var suites_1 = { hd: [ "random_int", (function (param) { - var a = Js__Js_math.random_int(1, 3); + let a = Js__Js_math.random_int(1, 3); return { TAG: /* Ok */4, _0: a >= 1 && a < 3 @@ -731,7 +731,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_null_test.js b/jscomp/test/dist/jscomp/test/js_null_test.js index ece8c96c4e..711db972fe 100644 --- a/jscomp/test/dist/jscomp/test/js_null_test.js +++ b/jscomp/test/dist/jscomp/test/js_null_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_null = require("melange.js/js_null.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_null = require("melange.js/js_null.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "toOption - empty", (function (param) { return { @@ -16,7 +16,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "toOption - 'a", (function (param) { @@ -90,7 +90,7 @@ var suites_1 = { hd: [ "iter - empty", (function (param) { - var hit = { + let hit = { contents: false }; Js__Js_null.iter((function (param) { @@ -107,7 +107,7 @@ var suites_1 = { hd: [ "iter - 'a", (function (param) { - var hit = { + let hit = { contents: 0 }; Js__Js_null.iter((function (v) { @@ -154,7 +154,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_null_undefined_test.js b/jscomp/test/dist/jscomp/test/js_null_undefined_test.js index abb3ff1eab..74320ba279 100644 --- a/jscomp/test/dist/jscomp/test/js_null_undefined_test.js +++ b/jscomp/test/dist/jscomp/test/js_null_undefined_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_nullable = require("melange.js/js_nullable.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_nullable = require("melange.js/js_nullable.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "toOption - null", (function (param) { return { @@ -16,7 +16,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "toOption - undefined", (function (param) { @@ -160,7 +160,7 @@ var suites_1 = { hd: [ "iter - null", (function (param) { - var hit = { + let hit = { contents: false }; Js__Js_nullable.iter((function (param) { @@ -177,7 +177,7 @@ var suites_1 = { hd: [ "iter - undefined", (function (param) { - var hit = { + let hit = { contents: false }; Js__Js_nullable.iter((function (param) { @@ -194,7 +194,7 @@ var suites_1 = { hd: [ "iter - empty", (function (param) { - var hit = { + let hit = { contents: false }; Js__Js_nullable.iter((function (param) { @@ -211,7 +211,7 @@ var suites_1 = { hd: [ "iter - 'a", (function (param) { - var hit = { + let hit = { contents: 0 }; Js__Js_nullable.iter((function (v) { @@ -310,7 +310,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_nullable_test.js b/jscomp/test/dist/jscomp/test/js_nullable_test.js index 8638768739..7ec6052f56 100644 --- a/jscomp/test/dist/jscomp/test/js_nullable_test.js +++ b/jscomp/test/dist/jscomp/test/js_nullable_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -29,7 +29,7 @@ function eq(loc, x, y) { } function test(dom) { - var elem = dom.getElementById("haha"); + let elem = dom.getElementById("haha"); if (elem == null) { return 1; } else { diff --git a/jscomp/test/dist/jscomp/test/js_obj_test.js b/jscomp/test/dist/jscomp/test/js_obj_test.js index 8c0c566e2a..8bb3e4aec8 100644 --- a/jscomp/test/dist/jscomp/test/js_obj_test.js +++ b/jscomp/test/dist/jscomp/test/js_obj_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); function f(u) { return Caml_oo_curry.js2(5740587, 1, u, 32); @@ -14,22 +14,22 @@ function f_js(u) { return u.say(32); } -var object_tables = /* Cons */{ +let object_tables = /* Cons */{ key: undefined, data: undefined, next: undefined }; -var suites_0 = [ +let suites_0 = [ "caml_obj", (function (param) { if (!object_tables.key) { - var $$class = CamlinternalOO.create_table(["say"]); - var say = CamlinternalOO.get_method_label($$class, "say"); + let $$class = CamlinternalOO.create_table(["say"]); + let say = CamlinternalOO.get_method_label($$class, "say"); CamlinternalOO.set_method($$class, say, (function (self$1, x) { return 1 + x | 0; })); - var env_init = function (env) { + let env_init = function (env) { return CamlinternalOO.create_object_opt(undefined, $$class); }; CamlinternalOO.init_class($$class); @@ -43,7 +43,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "js_obj", (function (param) { @@ -103,7 +103,7 @@ var suites_1 = { hd: [ "merge", (function (param) { - var original = { + let original = { a: 1 }; return { @@ -121,7 +121,7 @@ var suites_1 = { hd: [ "merge-preserves-original", (function (param) { - var original = { + let original = { a: 1 }; Object.assign({}, original, { @@ -144,7 +144,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_promise_basic_test.js b/jscomp/test/dist/jscomp/test/js_promise_basic_test.js index ac49861584..45d57c2f60 100644 --- a/jscomp/test/dist/jscomp/test/js_promise_basic_test.js +++ b/jscomp/test/dist/jscomp/test/js_promise_basic_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); - -var suites = { +let Caml_array = require("melange.js/caml_array.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -56,14 +56,14 @@ function fail(param) { } function thenTest(param) { - var p = Promise.resolve(4); + let p = Promise.resolve(4); return p.then(function (x) { return Promise.resolve(assert_bool(x === 4)); }); } function andThenTest(param) { - var p = Promise.resolve(6); + let p = Promise.resolve(6); return p.then(function (param) { return Promise.resolve(12); }).then(function (y) { @@ -71,10 +71,10 @@ function andThenTest(param) { }); } -var h = Promise.resolve(undefined); +let h = Promise.resolve(undefined); function assertIsNotFound(x) { - var match = Caml_exceptions.caml_is_extension(x) && x.MEL_EXN_ID === Stdlib.Not_found ? 0 : undefined; + let match = Caml_exceptions.caml_is_extension(x) && x.MEL_EXN_ID === Stdlib.Not_found ? 0 : undefined; if (match !== undefined) { return h; } @@ -89,14 +89,14 @@ function assertIsNotFound(x) { } function catchTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.then(fail).catch(assertIsNotFound); } function orResolvedTest(param) { - var p = Promise.resolve(42); + let p = Promise.resolve(42); return p.catch(function (param) { return Promise.resolve(22); }).then(function (value) { @@ -105,7 +105,7 @@ function orResolvedTest(param) { } function orRejectedTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.catch(function (param) { @@ -116,7 +116,7 @@ function orRejectedTest(param) { } function orElseResolvedTest(param) { - var p = Promise.resolve(42); + let p = Promise.resolve(42); return p.catch(function (param) { return Promise.resolve(22); }).then(function (value) { @@ -125,7 +125,7 @@ function orElseResolvedTest(param) { } function orElseRejectedResolveTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.catch(function (param) { @@ -136,7 +136,7 @@ function orElseRejectedResolveTest(param) { } function orElseRejectedRejectTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.catch(function (param) { @@ -144,7 +144,7 @@ function orElseRejectedRejectTest(param) { MEL_EXN_ID: Stdlib.Stack_overflow }); }).then(fail).catch(function (error) { - var match = Caml_exceptions.caml_is_extension(error) && error.MEL_EXN_ID === Stdlib.Stack_overflow ? 0 : undefined; + let match = Caml_exceptions.caml_is_extension(error) && error.MEL_EXN_ID === Stdlib.Stack_overflow ? 0 : undefined; if (match !== undefined) { return h; } @@ -160,38 +160,38 @@ function orElseRejectedRejectTest(param) { } function resolveTest(param) { - var p1 = Promise.resolve(10); + let p1 = Promise.resolve(10); return p1.then(function (x) { return Promise.resolve(assert_bool(x === 10)); }); } function rejectTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.catch(assertIsNotFound); } function thenCatchChainResolvedTest(param) { - var p = Promise.resolve(20); + let p = Promise.resolve(20); return p.then(function (value) { return Promise.resolve(assert_bool(value === 20)); }).catch(fail); } function thenCatchChainRejectedTest(param) { - var p = Promise.reject({ + let p = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); return p.then(fail).catch(assertIsNotFound); } function allResolvedTest(param) { - var p1 = Promise.resolve(1); - var p2 = Promise.resolve(2); - var p3 = Promise.resolve(3); - var promises = [ + let p1 = Promise.resolve(1); + let p2 = Promise.resolve(2); + let p3 = Promise.resolve(3); + let promises = [ p1, p2, p3 @@ -209,12 +209,12 @@ function is_not_found(error) { } function allRejectTest(param) { - var p1 = Promise.resolve(1); - var p2 = Promise.resolve(3); - var p3 = Promise.reject({ + let p1 = Promise.resolve(1); + let p2 = Promise.resolve(3); + let p3 = Promise.reject({ MEL_EXN_ID: Stdlib.Not_found }); - var promises = [ + let promises = [ p1, p2, p3 @@ -226,10 +226,10 @@ function allRejectTest(param) { } function raceTest(param) { - var p1 = Promise.resolve("first"); - var p2 = Promise.resolve("second"); - var p3 = Promise.resolve("third"); - var promises = [ + let p1 = Promise.resolve("first"); + let p2 = Promise.resolve("second"); + let p3 = Promise.resolve("third"); + let promises = [ p1, p2, p3 @@ -309,7 +309,7 @@ console.log("hey"); Mt.from_pair_suites("Js_promise_basic_test", suites.contents); -var twop = Promise.resolve(2); +let twop = Promise.resolve(2); function then_(prim0, prim1) { return prim1.then(Curry.__1(prim0)); diff --git a/jscomp/test/dist/jscomp/test/js_re_test.js b/jscomp/test/dist/jscomp/test/js_re_test.js index abb69ab457..4975a307d6 100644 --- a/jscomp/test/dist/jscomp/test/js_re_test.js +++ b/jscomp/test/dist/jscomp/test/js_re_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "captures", (function (param) { - var re = /(\d+)-(?:(\d+))?/g; - var result = re.exec("3-"); + let re = /(\d+)-(?:(\d+))?/g; + let result = re.exec("3-"); if (result === null) { return { TAG: /* Fail */8, _0: undefined }; } - var defined = Caml_array.get(result, 1); - var $$undefined = Caml_array.get(result, 2); + let defined = Caml_array.get(result, 1); + let $$undefined = Caml_array.get(result, 2); return { TAG: /* Eq */0, _0: [ @@ -32,12 +32,12 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "fromString", (function (param) { - var contentOf = function (tag, xmlString) { - var param = new RegExp("<" + (tag + (">(.*?)<\\/" + (tag + ">")))).exec(xmlString); + let contentOf = function (tag, xmlString) { + let param = new RegExp("<" + (tag + (">(.*?)<\\/" + (tag + ">")))).exec(xmlString); if (param !== null) { return Caml_option.nullable_to_opt(Caml_array.get(param, 1)); } @@ -54,7 +54,7 @@ var suites_1 = { hd: [ "exec_literal", (function (param) { - var res = /[^.]+/.exec("http://xxx.domain.com"); + let res = /[^.]+/.exec("http://xxx.domain.com"); if (res !== null) { return { TAG: /* Eq */0, @@ -73,7 +73,7 @@ var suites_1 = { hd: [ "exec_no_match", (function (param) { - var match = /https:\/\/(.*)/.exec("http://xxx.domain.com"); + let match = /https:\/\/(.*)/.exec("http://xxx.domain.com"); if (match !== null) { return { TAG: /* FailWith */9, @@ -91,7 +91,7 @@ var suites_1 = { hd: [ "test_str", (function (param) { - var res = new RegExp("foo").test("#foo#"); + let res = new RegExp("foo").test("#foo#"); return { TAG: /* Eq */0, _0: true, @@ -103,7 +103,7 @@ var suites_1 = { hd: [ "fromStringWithFlags", (function (param) { - var res = new RegExp("foo", "g"); + let res = new RegExp("foo", "g"); return { TAG: /* Eq */0, _0: true, @@ -115,7 +115,7 @@ var suites_1 = { hd: [ "result_index", (function (param) { - var res = new RegExp("zbar").exec("foobarbazbar"); + let res = new RegExp("zbar").exec("foobarbazbar"); if (res !== null) { return { TAG: /* Eq */0, @@ -134,8 +134,8 @@ var suites_1 = { hd: [ "result_input", (function (param) { - var input = "foobar"; - var res = /foo/g.exec(input); + let input = "foobar"; + let res = /foo/g.exec(input); if (res !== null) { return { TAG: /* Eq */0, @@ -187,7 +187,7 @@ var suites_1 = { hd: [ "t_lastIndex", (function (param) { - var re = /na/g; + let re = /na/g; re.exec("banana"); return { TAG: /* Eq */0, @@ -200,10 +200,10 @@ var suites_1 = { hd: [ "t_setLastIndex", (function (param) { - var re = /na/g; - var before = re.lastIndex; + let re = /na/g; + let before = re.lastIndex; re.lastIndex = 42; - var after = re.lastIndex; + let after = re.lastIndex; return { TAG: /* Eq */0, _0: [ @@ -279,7 +279,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_string_test.js b/jscomp/test/dist/jscomp/test/js_string_test.js index cf4c0af06a..214903eab6 100644 --- a/jscomp/test/dist/jscomp/test/js_string_test.js +++ b/jscomp/test/dist/jscomp/test/js_string_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Option = require("melange.belt/belt_Option.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Belt__Belt_Option = require("melange.belt/belt_Option.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "make", (function (param) { return { @@ -16,7 +16,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "fromCharCode", (function (param) { @@ -347,7 +347,7 @@ var suites_1 = { hd: [ "unsafeReplaceBy0", (function (param) { - var replace = function (whole, offset, s) { + let replace = function (whole, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -365,7 +365,7 @@ var suites_1 = { hd: [ "unsafeReplaceBy1", (function (param) { - var replace = function (whole, p1, offset, s) { + let replace = function (whole, p1, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -383,7 +383,7 @@ var suites_1 = { hd: [ "unsafeReplaceBy2", (function (param) { - var replace = function (whole, p1, p2, offset, s) { + let replace = function (whole, p1, p2, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -401,7 +401,7 @@ var suites_1 = { hd: [ "unsafeReplaceBy3", (function (param) { - var replace = function (whole, p1, p2, p3, offset, s) { + let replace = function (whole, p1, p2, p3, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -720,7 +720,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_typed_array_test.js b/jscomp/test/dist/jscomp/test/js_typed_array_test.js index f88fd7c379..85b3877268 100644 --- a/jscomp/test/dist/jscomp/test/js_typed_array_test.js +++ b/jscomp/test/dist/jscomp/test/js_typed_array_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); function mkI8(a) { return new Int8Array(a); @@ -19,13 +19,13 @@ function viaInt8(f, arr) { }; } -var x = new Int8Array([ +let x = new Int8Array([ 1, 2, 3 ]); -var suites_0 = [ +let suites_0 = [ "array_buffer - make", (function (param) { return { @@ -36,7 +36,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "array_buffer - byteLength", (function (param) { @@ -90,7 +90,7 @@ var suites_1 = { hd: [ "typed_array - unsafe_set", (function (param) { - var a = new Int8Array([ + let a = new Int8Array([ 1, 2, 3, @@ -164,7 +164,7 @@ var suites_1 = { hd: [ "typed_array - setArray", (function (param) { - var f = function (a) { + let f = function (a) { a.set([ 9, 8, @@ -195,7 +195,7 @@ var suites_1 = { hd: [ "typed_array - setArrayOffset", (function (param) { - var f = function (a) { + let f = function (a) { a.set([ 9, 8, @@ -818,7 +818,7 @@ var suites_1 = { hd: [ "typed_array - forEach", (function (param) { - var sum = { + let sum = { contents: 0 }; new Int8Array([ @@ -839,7 +839,7 @@ var suites_1 = { hd: [ "typed_array - forEachi", (function (param) { - var sum = { + let sum = { contents: 0 }; new Int8Array([ @@ -1051,7 +1051,7 @@ var suites_1 = { hd: [ "int8_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1063,7 +1063,7 @@ var suites_1 = { hd: [ "int8_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 2, @@ -1086,7 +1086,7 @@ var suites_1 = { hd: [ "int8_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Int8Array([ + let a = new Int8Array([ 1, 2, 3, @@ -1142,7 +1142,7 @@ var suites_1 = { hd: [ "uint8_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1154,7 +1154,7 @@ var suites_1 = { hd: [ "uint8_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 2, @@ -1177,7 +1177,7 @@ var suites_1 = { hd: [ "uint8_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Uint8Array([ + let a = new Uint8Array([ 1, 2, 3, @@ -1233,7 +1233,7 @@ var suites_1 = { hd: [ "uint8clamped_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1245,7 +1245,7 @@ var suites_1 = { hd: [ "uint8clamped_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 2, @@ -1268,7 +1268,7 @@ var suites_1 = { hd: [ "uint8clamped_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Uint8ClampedArray([ + let a = new Uint8ClampedArray([ 1, 2, 3, @@ -1324,7 +1324,7 @@ var suites_1 = { hd: [ "int16_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1336,7 +1336,7 @@ var suites_1 = { hd: [ "int16_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 4, @@ -1359,7 +1359,7 @@ var suites_1 = { hd: [ "int16_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Int16Array([ + let a = new Int16Array([ 1, 2, 3, @@ -1415,7 +1415,7 @@ var suites_1 = { hd: [ "uint16_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1427,7 +1427,7 @@ var suites_1 = { hd: [ "uint16_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 4, @@ -1450,7 +1450,7 @@ var suites_1 = { hd: [ "uint16_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Uint16Array([ + let a = new Uint16Array([ 1, 2, 3, @@ -1508,7 +1508,7 @@ var suites_1 = { hd: [ "int32_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1520,7 +1520,7 @@ var suites_1 = { hd: [ "int32_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 8, @@ -1543,7 +1543,7 @@ var suites_1 = { hd: [ "int32_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Int32Array(Stdlib__Array.map((function (prim) { + let a = new Int32Array(Stdlib__Array.map((function (prim) { return prim; }), [ 1, @@ -1601,7 +1601,7 @@ var suites_1 = { hd: [ "uint32_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1613,7 +1613,7 @@ var suites_1 = { hd: [ "uint32_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 8, @@ -1636,7 +1636,7 @@ var suites_1 = { hd: [ "uint32_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Uint32Array([ + let a = new Uint32Array([ 1, 2, 3, @@ -1692,7 +1692,7 @@ var suites_1 = { hd: [ "float32_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1704,7 +1704,7 @@ var suites_1 = { hd: [ "float32_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 8, @@ -1727,7 +1727,7 @@ var suites_1 = { hd: [ "float32_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Float32Array([ + let a = new Float32Array([ 1, 2, 3, @@ -1783,7 +1783,7 @@ var suites_1 = { hd: [ "float64_array - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1795,7 +1795,7 @@ var suites_1 = { hd: [ "float64_array - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 16, @@ -1818,7 +1818,7 @@ var suites_1 = { hd: [ "float64_array - unsafe_set - typed_array sanity check", (function (param) { - var a = new Float64Array([ + let a = new Float64Array([ 1, 2, 3, @@ -1859,7 +1859,7 @@ var suites_1 = { hd: [ "DataView - fromBufferOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 24, @@ -1871,7 +1871,7 @@ var suites_1 = { hd: [ "DataView - fromBufferRange", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 4, @@ -1883,7 +1883,7 @@ var suites_1 = { hd: [ "DataView - buffer", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: buffer, @@ -1895,7 +1895,7 @@ var suites_1 = { hd: [ "DataView - byteOffset", (function (param) { - var buffer = new ArrayBuffer(32); + let buffer = new ArrayBuffer(32); return { TAG: /* Eq */0, _0: 8, @@ -1907,8 +1907,8 @@ var suites_1 = { hd: [ "DataView - setInt8, getInt8", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt8(0, 1); return { TAG: /* Eq */0, @@ -1921,8 +1921,8 @@ var suites_1 = { hd: [ "DataView - setUint8, getUint8", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint8(0, 128); return { TAG: /* Eq */0, @@ -1935,8 +1935,8 @@ var suites_1 = { hd: [ "DataView - setInt16, getInt16", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt16(0, 257); return { TAG: /* Eq */0, @@ -1949,8 +1949,8 @@ var suites_1 = { hd: [ "DataView - getInt16LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt16(0, 25000, 1); return { TAG: /* Eq */0, @@ -1963,8 +1963,8 @@ var suites_1 = { hd: [ "DataView - setInt16LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt16(0, 25000, 1); return { TAG: /* Eq */0, @@ -1977,8 +1977,8 @@ var suites_1 = { hd: [ "DataView - setUint16, getUint16", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint16(0, 32768); return { TAG: /* Eq */0, @@ -1991,8 +1991,8 @@ var suites_1 = { hd: [ "DataView - getUint16LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint16(0, 32768, 1); return { TAG: /* Eq */0, @@ -2005,8 +2005,8 @@ var suites_1 = { hd: [ "DataView - setUint16LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint16(0, 32768, 1); return { TAG: /* Eq */0, @@ -2019,8 +2019,8 @@ var suites_1 = { hd: [ "DataView - setInt32, getInt32", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt32(0, 65537); return { TAG: /* Eq */0, @@ -2033,8 +2033,8 @@ var suites_1 = { hd: [ "DataView - getInt32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt32(0, 65537, 1); return { TAG: /* Eq */0, @@ -2047,8 +2047,8 @@ var suites_1 = { hd: [ "DataView - setInt32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setInt32(0, 65537, 1); return { TAG: /* Eq */0, @@ -2061,8 +2061,8 @@ var suites_1 = { hd: [ "DataView - setUint32, getUint32", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint32(0, 65537); return { TAG: /* Eq */0, @@ -2075,8 +2075,8 @@ var suites_1 = { hd: [ "DataView - getUint32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint32(0, 65537, 1); return { TAG: /* Eq */0, @@ -2089,8 +2089,8 @@ var suites_1 = { hd: [ "DataView - setUint32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setUint32(0, 65537, 1); return { TAG: /* Eq */0, @@ -2103,8 +2103,8 @@ var suites_1 = { hd: [ "DataView - setFloat32, getFloat32", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat32(0, 65537.0); return { TAG: /* Eq */0, @@ -2117,8 +2117,8 @@ var suites_1 = { hd: [ "DataView - getFloat32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat32(0, 65537.0, 1); return { TAG: /* Eq */0, @@ -2131,8 +2131,8 @@ var suites_1 = { hd: [ "DataView - setFloat32LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat32(0, 1.0, 1); return { TAG: /* Eq */0, @@ -2145,8 +2145,8 @@ var suites_1 = { hd: [ "DataView - setFloat64, getFloat64", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat64(0, 1e200); return { TAG: /* Eq */0, @@ -2159,8 +2159,8 @@ var suites_1 = { hd: [ "DataView - getFloat64LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat64(0, 1e200, 1); return { TAG: /* Eq */0, @@ -2173,8 +2173,8 @@ var suites_1 = { hd: [ "DataView - setFloat64LittleEndian", (function (param) { - var buffer = new ArrayBuffer(8); - var view = new DataView(buffer); + let buffer = new ArrayBuffer(8); + let view = new DataView(buffer); view.setFloat64(0, 1.0, 1); return { TAG: /* Eq */0, @@ -2326,7 +2326,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_undefined_test.js b/jscomp/test/dist/jscomp/test/js_undefined_test.js index af40b69710..fb7dcf32eb 100644 --- a/jscomp/test/dist/jscomp/test/js_undefined_test.js +++ b/jscomp/test/dist/jscomp/test/js_undefined_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Js__Js_undefined = require("melange.js/js_undefined.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Js__Js_undefined = require("melange.js/js_undefined.js"); +let Mt = require("./mt.js"); -var suites_0 = [ +let suites_0 = [ "toOption - empty", (function (param) { return { @@ -16,7 +16,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "File \"jscomp/test/js_undefined_test.ml\", line 5, characters 2-9", (function (param) { @@ -90,7 +90,7 @@ var suites_1 = { hd: [ "iter - empty", (function (param) { - var hit = { + let hit = { contents: false }; Js__Js_undefined.iter((function (param) { @@ -107,7 +107,7 @@ var suites_1 = { hd: [ "iter - 'a", (function (param) { - var hit = { + let hit = { contents: 0 }; Js__Js_undefined.iter((function (v) { @@ -154,7 +154,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/js_val.js b/jscomp/test/dist/jscomp/test/js_val.js index d8c22b9914..b65af8e471 100644 --- a/jscomp/test/dist/jscomp/test/js_val.js +++ b/jscomp/test/dist/jscomp/test/js_val.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var X = require("x"); +let X = require("x"); -var h = u; +let h = u; -var hh = X.vv; +let hh = X.vv; -var hhh = X.vv; +let hhh = X.vv; -var hhhh = X.vvvv; +let hhhh = X.vvvv; exports.h = h; exports.hh = hh; diff --git a/jscomp/test/dist/jscomp/test/jsoo_400_test.js b/jscomp/test/dist/jscomp/test/jsoo_400_test.js index 989bded1d1..d6e5232d54 100644 --- a/jscomp/test/dist/jscomp/test/jsoo_400_test.js +++ b/jscomp/test/dist/jscomp/test/jsoo_400_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_int32 = require("melange.js/caml_int32.js"); -var Mt = require("./mt.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Mt = require("./mt.js"); function u(param) { - var n; + let n; try { n = 3; } diff --git a/jscomp/test/dist/jscomp/test/key_word_property.js b/jscomp/test/dist/jscomp/test/key_word_property.js index 74a3afa092..7bf07a085b 100644 --- a/jscomp/test/dist/jscomp/test/key_word_property.js +++ b/jscomp/test/dist/jscomp/test/key_word_property.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var OmeEs6Module = require("./ome-es6-module").default; -var OmeEs6Module$1 = require("./ome-es6-module"); -var SomeEs6Module = require("some-es6-module"); -var SomeEs6Module$1 = require("some-es6-module").default; -var Vscode = require("vscode"); +let OmeEs6Module = require("./ome-es6-module").default; +let OmeEs6Module$1 = require("./ome-es6-module"); +let SomeEs6Module = require("some-es6-module"); +let SomeEs6Module$1 = require("some-es6-module").default; +let Vscode = require("vscode"); -var $$default = SomeEs6Module$1; +let $$default = SomeEs6Module$1; -var default2 = SomeEs6Module.default2; +let default2 = SomeEs6Module.default2; -var oefault = OmeEs6Module; +let oefault = OmeEs6Module; -var oefault2 = OmeEs6Module$1.default2; +let oefault2 = OmeEs6Module$1.default2; -var $$window = Vscode.window; +let $$window = Vscode.window; function mk($$window, $$default) { return { @@ -41,7 +41,7 @@ function des(v) { }; } -var test = { +let test = { case: 3, window: 3 }; @@ -50,7 +50,7 @@ function u(param) { return $$window.switch(); } -var $$case = 3; +let $$case = 3; exports.default = $$default; exports.__esModule = true; diff --git a/jscomp/test/dist/jscomp/test/key_word_property2.js b/jscomp/test/dist/jscomp/test/key_word_property2.js index 21e9283906..78dedf1cc9 100644 --- a/jscomp/test/dist/jscomp/test/key_word_property2.js +++ b/jscomp/test/dist/jscomp/test/key_word_property2.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Export_keyword = require("./export_keyword.js"); +let Export_keyword = require("./export_keyword.js"); function test2(v) { return { @@ -17,11 +17,11 @@ function test(p) { ]; } -var $$case = Export_keyword.$$case; +let $$case = Export_keyword.$$case; -var $$window = Export_keyword.$$window; +let $$window = Export_keyword.$$window; -var $$switch = Export_keyword.$$switch; +let $$switch = Export_keyword.$$switch; exports.test2 = test2; exports.test = test; diff --git a/jscomp/test/dist/jscomp/test/key_word_property_plus_test.js b/jscomp/test/dist/jscomp/test/key_word_property_plus_test.js index a65ecc13b9..b22e5c6856 100644 --- a/jscomp/test/dist/jscomp/test/key_word_property_plus_test.js +++ b/jscomp/test/dist/jscomp/test/key_word_property_plus_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Global_mangles = require("./global_mangles.js"); -var Mt = require("./mt.js"); +let Global_mangles = require("./global_mangles.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/label_uncurry.js b/jscomp/test/dist/jscomp/test/label_uncurry.js index 2ce61c6318..66854cb608 100644 --- a/jscomp/test/dist/jscomp/test/label_uncurry.js +++ b/jscomp/test/dist/jscomp/test/label_uncurry.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); +let Caml_format = require("melange.js/caml_format.js"); function f(x) { return x; @@ -20,7 +20,7 @@ function h(unit) { return 3; } -var a = u1(u); +let a = u1(u); exports.f = f; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/large_obj_test.js b/jscomp/test/dist/jscomp/test/large_obj_test.js index c13f7ae654..1efe719153 100644 --- a/jscomp/test/dist/jscomp/test/large_obj_test.js +++ b/jscomp/test/dist/jscomp/test/large_obj_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); -var shared = [ +let shared = [ "field0", "field1", "field2", @@ -109,7 +109,7 @@ var shared = [ "field99" ]; -var shared$1 = [ +let shared$1 = [ "get9", "get8", "get7", @@ -132,7 +132,7 @@ var shared$1 = [ "get0" ]; -var shared$2 = [ +let shared$2 = [ "get0", "get1", "get2", @@ -155,249 +155,249 @@ var shared$2 = [ "get19" ]; -var $$class = CamlinternalOO.create_table(shared$2); +let $$class = CamlinternalOO.create_table(shared$2); -var ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared); +let ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared); -var get9 = ids[0]; +let get9 = ids[0]; -var get8 = ids[1]; +let get8 = ids[1]; -var get7 = ids[2]; +let get7 = ids[2]; -var get6 = ids[3]; +let get6 = ids[3]; -var get5 = ids[4]; +let get5 = ids[4]; -var get4 = ids[5]; +let get4 = ids[5]; -var get3 = ids[6]; +let get3 = ids[6]; -var get2 = ids[7]; +let get2 = ids[7]; -var get19 = ids[8]; +let get19 = ids[8]; -var get18 = ids[9]; +let get18 = ids[9]; -var get17 = ids[10]; +let get17 = ids[10]; -var get16 = ids[11]; +let get16 = ids[11]; -var get15 = ids[12]; +let get15 = ids[12]; -var get14 = ids[13]; +let get14 = ids[13]; -var get13 = ids[14]; +let get13 = ids[14]; -var get12 = ids[15]; +let get12 = ids[15]; -var get11 = ids[16]; +let get11 = ids[16]; -var get10 = ids[17]; +let get10 = ids[17]; -var get1 = ids[18]; +let get1 = ids[18]; -var get0 = ids[19]; +let get0 = ids[19]; -var field0 = ids[20]; +let field0 = ids[20]; -var field1 = ids[21]; +let field1 = ids[21]; -var field2 = ids[22]; +let field2 = ids[22]; -var field3 = ids[23]; +let field3 = ids[23]; -var field4 = ids[24]; +let field4 = ids[24]; -var field5 = ids[25]; +let field5 = ids[25]; -var field6 = ids[26]; +let field6 = ids[26]; -var field7 = ids[27]; +let field7 = ids[27]; -var field8 = ids[28]; +let field8 = ids[28]; -var field9 = ids[29]; +let field9 = ids[29]; -var field10 = ids[30]; +let field10 = ids[30]; -var field11 = ids[31]; +let field11 = ids[31]; -var field12 = ids[32]; +let field12 = ids[32]; -var field13 = ids[33]; +let field13 = ids[33]; -var field14 = ids[34]; +let field14 = ids[34]; -var field15 = ids[35]; +let field15 = ids[35]; -var field16 = ids[36]; +let field16 = ids[36]; -var field17 = ids[37]; +let field17 = ids[37]; -var field18 = ids[38]; +let field18 = ids[38]; -var field19 = ids[39]; +let field19 = ids[39]; -var field20 = ids[40]; +let field20 = ids[40]; -var field21 = ids[41]; +let field21 = ids[41]; -var field22 = ids[42]; +let field22 = ids[42]; -var field23 = ids[43]; +let field23 = ids[43]; -var field24 = ids[44]; +let field24 = ids[44]; -var field25 = ids[45]; +let field25 = ids[45]; -var field26 = ids[46]; +let field26 = ids[46]; -var field27 = ids[47]; +let field27 = ids[47]; -var field28 = ids[48]; +let field28 = ids[48]; -var field29 = ids[49]; +let field29 = ids[49]; -var field30 = ids[50]; +let field30 = ids[50]; -var field31 = ids[51]; +let field31 = ids[51]; -var field32 = ids[52]; +let field32 = ids[52]; -var field33 = ids[53]; +let field33 = ids[53]; -var field34 = ids[54]; +let field34 = ids[54]; -var field35 = ids[55]; +let field35 = ids[55]; -var field36 = ids[56]; +let field36 = ids[56]; -var field37 = ids[57]; +let field37 = ids[57]; -var field38 = ids[58]; +let field38 = ids[58]; -var field39 = ids[59]; +let field39 = ids[59]; -var field40 = ids[60]; +let field40 = ids[60]; -var field41 = ids[61]; +let field41 = ids[61]; -var field42 = ids[62]; +let field42 = ids[62]; -var field43 = ids[63]; +let field43 = ids[63]; -var field44 = ids[64]; +let field44 = ids[64]; -var field45 = ids[65]; +let field45 = ids[65]; -var field46 = ids[66]; +let field46 = ids[66]; -var field47 = ids[67]; +let field47 = ids[67]; -var field48 = ids[68]; +let field48 = ids[68]; -var field49 = ids[69]; +let field49 = ids[69]; -var field50 = ids[70]; +let field50 = ids[70]; -var field51 = ids[71]; +let field51 = ids[71]; -var field52 = ids[72]; +let field52 = ids[72]; -var field53 = ids[73]; +let field53 = ids[73]; -var field54 = ids[74]; +let field54 = ids[74]; -var field55 = ids[75]; +let field55 = ids[75]; -var field56 = ids[76]; +let field56 = ids[76]; -var field57 = ids[77]; +let field57 = ids[77]; -var field58 = ids[78]; +let field58 = ids[78]; -var field59 = ids[79]; +let field59 = ids[79]; -var field60 = ids[80]; +let field60 = ids[80]; -var field61 = ids[81]; +let field61 = ids[81]; -var field62 = ids[82]; +let field62 = ids[82]; -var field63 = ids[83]; +let field63 = ids[83]; -var field64 = ids[84]; +let field64 = ids[84]; -var field65 = ids[85]; +let field65 = ids[85]; -var field66 = ids[86]; +let field66 = ids[86]; -var field67 = ids[87]; +let field67 = ids[87]; -var field68 = ids[88]; +let field68 = ids[88]; -var field69 = ids[89]; +let field69 = ids[89]; -var field70 = ids[90]; +let field70 = ids[90]; -var field71 = ids[91]; +let field71 = ids[91]; -var field72 = ids[92]; +let field72 = ids[92]; -var field73 = ids[93]; +let field73 = ids[93]; -var field74 = ids[94]; +let field74 = ids[94]; -var field75 = ids[95]; +let field75 = ids[95]; -var field76 = ids[96]; +let field76 = ids[96]; -var field77 = ids[97]; +let field77 = ids[97]; -var field78 = ids[98]; +let field78 = ids[98]; -var field79 = ids[99]; +let field79 = ids[99]; -var field80 = ids[100]; +let field80 = ids[100]; -var field81 = ids[101]; +let field81 = ids[101]; -var field82 = ids[102]; +let field82 = ids[102]; -var field83 = ids[103]; +let field83 = ids[103]; -var field84 = ids[104]; +let field84 = ids[104]; -var field85 = ids[105]; +let field85 = ids[105]; -var field86 = ids[106]; +let field86 = ids[106]; -var field87 = ids[107]; +let field87 = ids[107]; -var field88 = ids[108]; +let field88 = ids[108]; -var field89 = ids[109]; +let field89 = ids[109]; -var field90 = ids[110]; +let field90 = ids[110]; -var field91 = ids[111]; +let field91 = ids[111]; -var field92 = ids[112]; +let field92 = ids[112]; -var field93 = ids[113]; +let field93 = ids[113]; -var field94 = ids[114]; +let field94 = ids[114]; -var field95 = ids[115]; +let field95 = ids[115]; -var field96 = ids[116]; +let field96 = ids[116]; -var field97 = ids[117]; +let field97 = ids[117]; -var field98 = ids[118]; +let field98 = ids[118]; -var field99 = ids[119]; +let field99 = ids[119]; CamlinternalOO.set_methods($$class, [ get0, @@ -483,7 +483,7 @@ CamlinternalOO.set_methods($$class, [ ]); function obj_init(env) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[field0] = 0; self[field1] = 1; self[field2] = 2; @@ -589,7 +589,7 @@ function obj_init(env) { CamlinternalOO.init_class($$class); -var raw_object = obj_init(undefined); +let raw_object = obj_init(undefined); if (Caml_oo_curry.js1(291536124, 1, raw_object) !== 34) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -603,127 +603,127 @@ if (Caml_oo_curry.js1(291536124, 1, raw_object) !== 34) { } function raw_class_init($$class) { - var ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared); - var get9 = ids[0]; - var get8 = ids[1]; - var get7 = ids[2]; - var get6 = ids[3]; - var get5 = ids[4]; - var get4 = ids[5]; - var get3 = ids[6]; - var get2 = ids[7]; - var get19 = ids[8]; - var get18 = ids[9]; - var get17 = ids[10]; - var get16 = ids[11]; - var get15 = ids[12]; - var get14 = ids[13]; - var get13 = ids[14]; - var get12 = ids[15]; - var get11 = ids[16]; - var get10 = ids[17]; - var get1 = ids[18]; - var get0 = ids[19]; - var field0 = ids[20]; - var field1 = ids[21]; - var field2 = ids[22]; - var field3 = ids[23]; - var field4 = ids[24]; - var field5 = ids[25]; - var field6 = ids[26]; - var field7 = ids[27]; - var field8 = ids[28]; - var field9 = ids[29]; - var field10 = ids[30]; - var field11 = ids[31]; - var field12 = ids[32]; - var field13 = ids[33]; - var field14 = ids[34]; - var field15 = ids[35]; - var field16 = ids[36]; - var field17 = ids[37]; - var field18 = ids[38]; - var field19 = ids[39]; - var field20 = ids[40]; - var field21 = ids[41]; - var field22 = ids[42]; - var field23 = ids[43]; - var field24 = ids[44]; - var field25 = ids[45]; - var field26 = ids[46]; - var field27 = ids[47]; - var field28 = ids[48]; - var field29 = ids[49]; - var field30 = ids[50]; - var field31 = ids[51]; - var field32 = ids[52]; - var field33 = ids[53]; - var field34 = ids[54]; - var field35 = ids[55]; - var field36 = ids[56]; - var field37 = ids[57]; - var field38 = ids[58]; - var field39 = ids[59]; - var field40 = ids[60]; - var field41 = ids[61]; - var field42 = ids[62]; - var field43 = ids[63]; - var field44 = ids[64]; - var field45 = ids[65]; - var field46 = ids[66]; - var field47 = ids[67]; - var field48 = ids[68]; - var field49 = ids[69]; - var field50 = ids[70]; - var field51 = ids[71]; - var field52 = ids[72]; - var field53 = ids[73]; - var field54 = ids[74]; - var field55 = ids[75]; - var field56 = ids[76]; - var field57 = ids[77]; - var field58 = ids[78]; - var field59 = ids[79]; - var field60 = ids[80]; - var field61 = ids[81]; - var field62 = ids[82]; - var field63 = ids[83]; - var field64 = ids[84]; - var field65 = ids[85]; - var field66 = ids[86]; - var field67 = ids[87]; - var field68 = ids[88]; - var field69 = ids[89]; - var field70 = ids[90]; - var field71 = ids[91]; - var field72 = ids[92]; - var field73 = ids[93]; - var field74 = ids[94]; - var field75 = ids[95]; - var field76 = ids[96]; - var field77 = ids[97]; - var field78 = ids[98]; - var field79 = ids[99]; - var field80 = ids[100]; - var field81 = ids[101]; - var field82 = ids[102]; - var field83 = ids[103]; - var field84 = ids[104]; - var field85 = ids[105]; - var field86 = ids[106]; - var field87 = ids[107]; - var field88 = ids[108]; - var field89 = ids[109]; - var field90 = ids[110]; - var field91 = ids[111]; - var field92 = ids[112]; - var field93 = ids[113]; - var field94 = ids[114]; - var field95 = ids[115]; - var field96 = ids[116]; - var field97 = ids[117]; - var field98 = ids[118]; - var field99 = ids[119]; + let ids = CamlinternalOO.new_methods_variables($$class, shared$1, shared); + let get9 = ids[0]; + let get8 = ids[1]; + let get7 = ids[2]; + let get6 = ids[3]; + let get5 = ids[4]; + let get4 = ids[5]; + let get3 = ids[6]; + let get2 = ids[7]; + let get19 = ids[8]; + let get18 = ids[9]; + let get17 = ids[10]; + let get16 = ids[11]; + let get15 = ids[12]; + let get14 = ids[13]; + let get13 = ids[14]; + let get12 = ids[15]; + let get11 = ids[16]; + let get10 = ids[17]; + let get1 = ids[18]; + let get0 = ids[19]; + let field0 = ids[20]; + let field1 = ids[21]; + let field2 = ids[22]; + let field3 = ids[23]; + let field4 = ids[24]; + let field5 = ids[25]; + let field6 = ids[26]; + let field7 = ids[27]; + let field8 = ids[28]; + let field9 = ids[29]; + let field10 = ids[30]; + let field11 = ids[31]; + let field12 = ids[32]; + let field13 = ids[33]; + let field14 = ids[34]; + let field15 = ids[35]; + let field16 = ids[36]; + let field17 = ids[37]; + let field18 = ids[38]; + let field19 = ids[39]; + let field20 = ids[40]; + let field21 = ids[41]; + let field22 = ids[42]; + let field23 = ids[43]; + let field24 = ids[44]; + let field25 = ids[45]; + let field26 = ids[46]; + let field27 = ids[47]; + let field28 = ids[48]; + let field29 = ids[49]; + let field30 = ids[50]; + let field31 = ids[51]; + let field32 = ids[52]; + let field33 = ids[53]; + let field34 = ids[54]; + let field35 = ids[55]; + let field36 = ids[56]; + let field37 = ids[57]; + let field38 = ids[58]; + let field39 = ids[59]; + let field40 = ids[60]; + let field41 = ids[61]; + let field42 = ids[62]; + let field43 = ids[63]; + let field44 = ids[64]; + let field45 = ids[65]; + let field46 = ids[66]; + let field47 = ids[67]; + let field48 = ids[68]; + let field49 = ids[69]; + let field50 = ids[70]; + let field51 = ids[71]; + let field52 = ids[72]; + let field53 = ids[73]; + let field54 = ids[74]; + let field55 = ids[75]; + let field56 = ids[76]; + let field57 = ids[77]; + let field58 = ids[78]; + let field59 = ids[79]; + let field60 = ids[80]; + let field61 = ids[81]; + let field62 = ids[82]; + let field63 = ids[83]; + let field64 = ids[84]; + let field65 = ids[85]; + let field66 = ids[86]; + let field67 = ids[87]; + let field68 = ids[88]; + let field69 = ids[89]; + let field70 = ids[90]; + let field71 = ids[91]; + let field72 = ids[92]; + let field73 = ids[93]; + let field74 = ids[94]; + let field75 = ids[95]; + let field76 = ids[96]; + let field77 = ids[97]; + let field78 = ids[98]; + let field79 = ids[99]; + let field80 = ids[100]; + let field81 = ids[101]; + let field82 = ids[102]; + let field83 = ids[103]; + let field84 = ids[104]; + let field85 = ids[105]; + let field86 = ids[106]; + let field87 = ids[107]; + let field88 = ids[108]; + let field89 = ids[109]; + let field90 = ids[110]; + let field91 = ids[111]; + let field92 = ids[112]; + let field93 = ids[113]; + let field94 = ids[114]; + let field95 = ids[115]; + let field96 = ids[116]; + let field97 = ids[117]; + let field98 = ids[118]; + let field99 = ids[119]; CamlinternalOO.set_methods($$class, [ get0, (function (self$2) { @@ -807,7 +807,7 @@ function raw_class_init($$class) { }) ]); return function (env, self, value) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[field0] = 0; self$1[field1] = (value << 0); self$1[field2] = (value << 1); @@ -912,9 +912,9 @@ function raw_class_init($$class) { }; } -var raw_class = CamlinternalOO.make_class(shared$2, raw_class_init); +let raw_class = CamlinternalOO.make_class(shared$2, raw_class_init); -var v = Curry._2(raw_class[0], undefined, 3); +let v = Curry._2(raw_class[0], undefined, 3); if (Caml_oo_curry.js1(291536121, 2, v) !== 56) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/large_record_duplication_test.js b/jscomp/test/dist/jscomp/test/large_record_duplication_test.js index de41008f8f..afcb3560b8 100644 --- a/jscomp/test/dist/jscomp/test/large_record_duplication_test.js +++ b/jscomp/test/dist/jscomp/test/large_record_duplication_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -19,12 +19,12 @@ function eq(loc, x, y) { } function f0(x) { - var newrecord = Caml_obj.caml_obj_dup(x); + let newrecord = Caml_obj.caml_obj_dup(x); newrecord.x0 = 1; return newrecord; } -var Small = /* @__PURE__ */Caml_exceptions.create("Large_record_duplication_test.Small"); +let Small = /* @__PURE__ */Caml_exceptions.create("Large_record_duplication_test.Small"); function f_small(param) { if (param.MEL_EXN_ID === Small) { @@ -40,7 +40,7 @@ function f_small(param) { } } -var h = { +let h = { MEL_EXN_ID: Small, x: 1, y: "" @@ -58,7 +58,7 @@ eq("File \"jscomp/test/large_record_duplication_test.ml\", line 74, characters 6 y: "" }), false); -var v1 = /* A0 */{ +let v1 = /* A0 */{ x0: 9, x1: 9, x2: 9, @@ -95,14 +95,14 @@ function f1(x) { if (!x) { return /* A1 */0; } - var newrecord = Caml_obj.caml_obj_dup(x); + let newrecord = Caml_obj.caml_obj_dup(x); newrecord.x0 = 1; return newrecord; } eq("File \"jscomp/test/large_record_duplication_test.ml\", line 139, characters 6-13", get_x0(f1(v1)), 1); -var v2 = { +let v2 = { TAG: /* A0 */0, x0: 9, x1: 9, @@ -140,20 +140,20 @@ function f2(x) { if (x.TAG !== /* A0 */0) { return x; } - var newrecord = Caml_obj.caml_obj_dup(x); + let newrecord = Caml_obj.caml_obj_dup(x); newrecord.x0 = 1; return newrecord; } eq("File \"jscomp/test/large_record_duplication_test.ml\", line 204, characters 6-13", get_x0$1(f2(v2)), 1); -var A0 = /* @__PURE__ */Caml_exceptions.create("Large_record_duplication_test.A0"); +let A0 = /* @__PURE__ */Caml_exceptions.create("Large_record_duplication_test.A0"); function f3(x) { if (x.MEL_EXN_ID !== A0) { return x; } - var newrecord = Caml_obj.caml_obj_dup(x); + let newrecord = Caml_obj.caml_obj_dup(x); newrecord.x0 = 1; return newrecord; } @@ -165,7 +165,7 @@ function get_x0$2(x) { } -var v3 = { +let v3 = { MEL_EXN_ID: A0, x0: 9, x1: 9, @@ -202,7 +202,7 @@ eq("File \"jscomp/test/large_record_duplication_test.ml\", line 272, characters Mt.from_pair_suites("Large_record_duplication_test", suites.contents); -var v0 = { +let v0 = { x0: 9, x1: 9, x2: 9, diff --git a/jscomp/test/dist/jscomp/test/largest_int_flow.js b/jscomp/test/dist/jscomp/test/largest_int_flow.js index 17fb52bc80..49a770b3b2 100644 --- a/jscomp/test/dist/jscomp/test/largest_int_flow.js +++ b/jscomp/test/dist/jscomp/test/largest_int_flow.js @@ -2,7 +2,7 @@ 'use strict'; -var x = 272872590; +let x = 272872590; exports.x = x; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/lazy_test.js b/jscomp/test/dist/jscomp/test/lazy_test.js index 0d7704f4da..471e3addb1 100644 --- a/jscomp/test/dist/jscomp/test/lazy_test.js +++ b/jscomp/test/dist/jscomp/test/lazy_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Lazy = require("melange/lazy.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Lazy = require("melange/lazy.js"); -var u = { +let u = { contents: 3 }; -var v = { +let v = { LAZY_DONE: false, VAL: (function () { u.contents = 32; @@ -19,9 +19,9 @@ var v = { }; function lazy_test(param) { - var h = u.contents; + let h = u.contents; CamlinternalLazy.force(v); - var g = u.contents; + let g = u.contents; return [ h, g @@ -30,12 +30,12 @@ function lazy_test(param) { function f(param) { CamlinternalLazy.force(param[0]); - var match = param[2].contents; + let match = param[2].contents; if (match === undefined) { return 0; } CamlinternalLazy.force(param[1]); - var x = param[2].contents; + let x = param[2].contents; if (x !== undefined) { return 1; } @@ -49,25 +49,25 @@ function f(param) { }); } -var s = { +let s = { contents: undefined }; -var set_true = { +let set_true = { LAZY_DONE: false, VAL: (function () { s.contents = 1; }) }; -var set_false = { +let set_false = { LAZY_DONE: false, VAL: (function () { s.contents = undefined; }) }; -var h; +let h; try { h = f([ @@ -77,7 +77,7 @@ try { ]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Match_failure) { h = 2; } else { @@ -85,11 +85,11 @@ catch (raw_exn){ } } -var u_v = { +let u_v = { contents: 0 }; -var u$1 = { +let u$1 = { LAZY_DONE: false, VAL: (function () { u_v.contents = 2; @@ -98,30 +98,30 @@ var u$1 = { CamlinternalLazy.force(u$1); -var exotic = CamlinternalLazy.force; +let exotic = CamlinternalLazy.force; -var l_from_fun = { +let l_from_fun = { LAZY_DONE: false, VAL: (function () { return 3; }) }; -var forward_test = { +let forward_test = { LAZY_DONE: false, VAL: (function () { - var u = 3; + let u = 3; u = u + 1 | 0; return u; }) }; -var f005 = { +let f005 = { LAZY_DONE: true, VAL: 6 }; -var f006 = { +let f006 = { LAZY_DONE: false, VAL: (function () { return function (param) { @@ -130,7 +130,7 @@ var f006 = { }) }; -var f007 = { +let f007 = { LAZY_DONE: false, VAL: (function () { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -139,7 +139,7 @@ var f007 = { }) }; -var f008 = { +let f008 = { LAZY_DONE: false, VAL: (function () { console.log("hi"); @@ -156,29 +156,29 @@ function a2(x) { }; } -var a3 = { +let a3 = { LAZY_DONE: true, VAL: 3 }; -var a4 = { +let a4 = { LAZY_DONE: true, VAL: 3 }; -var a5 = { +let a5 = { LAZY_DONE: true, VAL: undefined }; -var a6 = { +let a6 = { LAZY_DONE: true, VAL: undefined }; -var a7 = CamlinternalLazy.force(a5); +let a7 = CamlinternalLazy.force(a5); -var a8 = CamlinternalLazy.force(a6); +let a8 = CamlinternalLazy.force(a6); Mt.from_pair_suites("Lazy_test", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/lexer_test.js b/jscomp/test/dist/jscomp/test/lexer_test.js index d5c010bc5d..80df018eec 100644 --- a/jscomp/test/dist/jscomp/test/lexer_test.js +++ b/jscomp/test/dist/jscomp/test/lexer_test.js @@ -1,24 +1,24 @@ // Generated by Melange 'use strict'; -var Arith_lexer = require("./arith_lexer.js"); -var Arith_parser = require("./arith_parser.js"); -var Arith_syntax = require("./arith_syntax.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Number_lexer = require("./number_lexer.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); +let Arith_lexer = require("./arith_lexer.js"); +let Arith_parser = require("./arith_parser.js"); +let Arith_syntax = require("./arith_syntax.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Number_lexer = require("./number_lexer.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); function get_tokens(lex, str) { - var buf = Stdlib__Lexing.from_string(undefined, str); - var _acc = /* [] */0; + let buf = Stdlib__Lexing.from_string(undefined, str); + let _acc = /* [] */0; while(true) { - var acc = _acc; - var v = Curry._1(lex, buf); + let acc = _acc; + let v = Curry._1(lex, buf); if (Caml_obj.caml_equal(v, /* EOF */7)) { return Stdlib__List.rev(acc); } @@ -35,11 +35,11 @@ function f(param) { } function from_tokens(lst) { - var l = { + let l = { contents: lst }; return function (param) { - var match = l.contents; + let match = l.contents; if (match) { l.contents = match.tl; return match.hd; @@ -50,7 +50,7 @@ function from_tokens(lst) { }; } -var lexer_suites_0 = [ +let lexer_suites_0 = [ "arith_token", (function (param) { return { @@ -94,7 +94,7 @@ var lexer_suites_0 = [ }) ]; -var lexer_suites_1 = { +let lexer_suites_1 = { hd: [ "simple token", (function (param) { @@ -112,10 +112,10 @@ var lexer_suites_1 = { hd: [ "number_lexer", (function (param) { - var v = { + let v = { contents: /* [] */0 }; - var add = function (t) { + let add = function (t) { v.contents = { hd: t, tl: v.contents @@ -208,7 +208,7 @@ var lexer_suites_1 = { } }; -var lexer_suites = { +let lexer_suites = { hd: lexer_suites_0, tl: lexer_suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/lib_js_test.js b/jscomp/test/dist/jscomp/test/lib_js_test.js index c7275d6cbd..34e407fa13 100644 --- a/jscomp/test/dist/jscomp/test/lib_js_test.js +++ b/jscomp/test/dist/jscomp/test/lib_js_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); console.log(JSON.stringify({ hd: 1, @@ -16,7 +16,7 @@ console.log(JSON.stringify({ console.log("hey"); -var suites_0 = [ +let suites_0 = [ "anything_to_string", (function (param) { return { @@ -27,7 +27,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/libarg_test.js b/jscomp/test/dist/jscomp/test/libarg_test.js index d01ec2ac89..4ecf10f8ab 100644 --- a/jscomp/test/dist/jscomp/test/libarg_test.js +++ b/jscomp/test/dist/jscomp/test/libarg_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Arg = require("melange/arg.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Arg = require("melange/arg.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); -var current = { +let current = { contents: 0 }; -var accum = { +let accum = { contents: /* [] */0 }; @@ -55,11 +55,11 @@ function f_bool(b) { }), b); } -var r_set = { +let r_set = { contents: false }; -var r_clear = { +let r_clear = { contents: true }; @@ -82,7 +82,7 @@ function f_string(s) { }), s); } -var r_string = { +let r_string = { contents: "" }; @@ -107,7 +107,7 @@ function f_int(i) { }), i); } -var r_int = { +let r_int = { contents: 0 }; @@ -135,7 +135,7 @@ function f_float(f) { }), f); } -var r_float = { +let r_float = { contents: 0.0 }; @@ -196,7 +196,7 @@ function f_anon(s) { }), s); } -var spec_0 = [ +let spec_0 = [ "-u", { TAG: /* Unit */0, @@ -205,7 +205,7 @@ var spec_0 = [ "Unit (0)" ]; -var spec_1 = { +let spec_1 = { hd: [ "-b", { @@ -355,12 +355,12 @@ var spec_1 = { } }; -var spec = { +let spec = { hd: spec_0, tl: spec_1 }; -var args1 = [ +let args1 = [ "prog", "anon1", "-u", @@ -394,7 +394,7 @@ var args1 = [ "r2" ]; -var args2 = [ +let args2 = [ "prog", "anon1", "-u", @@ -455,8 +455,8 @@ function test(argv) { r_float.contents = 0.0; accum.contents = /* [] */0; Stdlib__Arg.parse_argv(current, argv, spec, f_anon, "usage"); - var result = Stdlib__List.rev(accum.contents); - var reference = { + let result = Stdlib__List.rev(accum.contents); + let reference = { hd: "anon(anon1)", tl: { hd: "unit()", @@ -503,7 +503,7 @@ function test(argv) { } }; if (Caml_obj.caml_notequal(result, reference)) { - var f = function (x, y) { + let f = function (x, y) { Curry._3(Stdlib__Printf.printf(/* Format */{ _0: { TAG: /* String */2, @@ -558,7 +558,7 @@ test(args2); Mt.from_pair_suites("Libarg_test", /* [] */0); -var suites = /* [] */0; +let suites = /* [] */0; exports.current = current; exports.accum = accum; diff --git a/jscomp/test/dist/jscomp/test/libqueue_test.js b/jscomp/test/dist/jscomp/test/libqueue_test.js index 5c16ef1aac..e807622ccf 100644 --- a/jscomp/test/dist/jscomp/test/libqueue_test.js +++ b/jscomp/test/dist/jscomp/test/libqueue_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Queue = require("melange/queue.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Queue = require("melange/queue.js"); function to_list(q) { return Stdlib__List.rev(Stdlib__Queue.fold((function (l, x) { @@ -16,7 +16,7 @@ function to_list(q) { }), /* [] */0, q)); } -var Q = { +let Q = { Empty: Stdlib__Queue.Empty, create: Stdlib__Queue.create, add: Stdlib__Queue.add, @@ -46,7 +46,7 @@ function does_raise(f, q) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Queue.Empty) { return true; } @@ -54,7 +54,7 @@ function does_raise(f, q) { } } -var q = { +let q = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -270,7 +270,7 @@ if (!does_raise(Stdlib__Queue.take, q)) { }); } -var q$1 = { +let q$1 = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -335,7 +335,7 @@ if (q$1.length !== 0) { }); } -var q$2 = { +let q$2 = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -468,13 +468,13 @@ if (!does_raise(Stdlib__Queue.peek, q$2)) { }); } -var q$3 = { +let q$3 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i = 1; i <= 10; ++i){ +for(let i = 1; i <= 10; ++i){ Stdlib__Queue.add(i, q$3); } @@ -530,17 +530,17 @@ if (Stdlib__Queue.take(q$3) !== 42) { }); } -var q1 = { +let q1 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i$1 = 1; i$1 <= 10; ++i$1){ +for(let i$1 = 1; i$1 <= 10; ++i$1){ Stdlib__Queue.add(i$1, q1); } -var q2 = Stdlib__Queue.copy(q1); +let q2 = Stdlib__Queue.copy(q1); if (!Caml_obj.caml_equal(to_list(q1), { hd: 1, @@ -646,7 +646,7 @@ if (q2.length !== 10) { }); } -for(var i$2 = 1; i$2 <= 10; ++i$2){ +for(let i$2 = 1; i$2 <= 10; ++i$2){ if (Stdlib__Queue.take(q1) !== i$2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -660,7 +660,7 @@ for(var i$2 = 1; i$2 <= 10; ++i$2){ } -for(var i$3 = 1; i$3 <= 10; ++i$3){ +for(let i$3 = 1; i$3 <= 10; ++i$3){ if (Stdlib__Queue.take(q2) !== i$3) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -674,7 +674,7 @@ for(var i$3 = 1; i$3 <= 10; ++i$3){ } -var q$4 = { +let q$4 = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -691,7 +691,7 @@ if (q$4.length !== 0) { }); } -for(var i$4 = 1; i$4 <= 10; ++i$4){ +for(let i$4 = 1; i$4 <= 10; ++i$4){ Stdlib__Queue.add(i$4, q$4); if (q$4.length !== i$4) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -716,7 +716,7 @@ for(var i$4 = 1; i$4 <= 10; ++i$4){ } -for(var 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 Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -762,17 +762,17 @@ if (q$4.length !== 0) { }); } -var q$5 = { +let q$5 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i$6 = 1; i$6 <= 10; ++i$6){ +for(let i$6 = 1; i$6 <= 10; ++i$6){ Stdlib__Queue.add(i$6, q$5); } -var i$7 = { +let i$7 = { contents: 1 }; @@ -790,13 +790,13 @@ Stdlib__Queue.iter((function (j) { i$7.contents = i$7.contents + 1 | 0; }), q$5); -var q1$1 = { +let q1$1 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -var q2$1 = { +let q2$1 = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -892,19 +892,19 @@ if (!Caml_obj.caml_equal(to_list(q2$1), /* [] */0)) { }); } -var q1$2 = { +let q1$2 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -var q2$2 = { +let q2$2 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i$8 = 1; i$8 <= 4; ++i$8){ +for(let i$8 = 1; i$8 <= 4; ++i$8){ Stdlib__Queue.add(i$8, q1$2); } @@ -1022,19 +1022,19 @@ if (!Caml_obj.caml_equal(to_list(q2$2), { }); } -var q1$3 = { +let q1$3 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -var q2$3 = { +let q2$3 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i$9 = 5; i$9 <= 8; ++i$9){ +for(let i$9 = 5; i$9 <= 8; ++i$9){ Stdlib__Queue.add(i$9, q2$3); } @@ -1152,23 +1152,23 @@ if (!Caml_obj.caml_equal(to_list(q2$3), { }); } -var q1$4 = { +let q1$4 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -var q2$4 = { +let q2$4 = { length: 0, first: /* Nil */0, last: /* Nil */0 }; -for(var i$10 = 1; i$10 <= 4; ++i$10){ +for(let i$10 = 1; i$10 <= 4; ++i$10){ Stdlib__Queue.add(i$10, q1$4); } -for(var i$11 = 5; i$11 <= 8; ++i$11){ +for(let i$11 = 5; i$11 <= 8; ++i$11){ Stdlib__Queue.add(i$11, q2$4); } diff --git a/jscomp/test/dist/jscomp/test/limits_test.js b/jscomp/test/dist/jscomp/test/limits_test.js index a8751b87ba..a62551eb5b 100644 --- a/jscomp/test/dist/jscomp/test/limits_test.js +++ b/jscomp/test/dist/jscomp/test/limits_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Int32 = require("melange/int32.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Int32 = require("melange/int32.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/list_stack.js b/jscomp/test/dist/jscomp/test/list_stack.js index 681bfa96f1..e75df82fa3 100644 --- a/jscomp/test/dist/jscomp/test/list_stack.js +++ b/jscomp/test/dist/jscomp/test/list_stack.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Stdlib__List = require("melange/list.js"); +let Stdlib__List = require("melange/list.js"); Stdlib__List.find((function (x) { return x > 3; diff --git a/jscomp/test/dist/jscomp/test/list_test.js b/jscomp/test/dist/jscomp/test/list_test.js index b579f75eba..3fac3c1a1f 100644 --- a/jscomp/test/dist/jscomp/test/list_test.js +++ b/jscomp/test/dist/jscomp/test/list_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); -var list_suites_0 = [ +let list_suites_0 = [ "length", (function (param) { return { @@ -26,7 +26,7 @@ var list_suites_0 = [ }) ]; -var list_suites_1 = { +let list_suites_1 = { hd: [ "length2", (function (param) { @@ -105,7 +105,7 @@ var list_suites_1 = { } }; -var list_suites = { +let list_suites = { hd: list_suites_0, tl: list_suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/local_class_type.js b/jscomp/test/dist/jscomp/test/local_class_type.js index dcee843134..6c234fbb0a 100644 --- a/jscomp/test/dist/jscomp/test/local_class_type.js +++ b/jscomp/test/dist/jscomp/test/local_class_type.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); function f(x) { x.height = 3; diff --git a/jscomp/test/dist/jscomp/test/local_exception_test.js b/jscomp/test/dist/jscomp/test/local_exception_test.js index 51799c430d..64cd5b8da2 100644 --- a/jscomp/test/dist/jscomp/test/local_exception_test.js +++ b/jscomp/test/dist/jscomp/test/local_exception_test.js @@ -1,25 +1,25 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); -var A = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.A"); -var v = { +let v = { MEL_EXN_ID: A, _1: 3, _2: true }; -var B = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.B"); -var u = { +let u = { MEL_EXN_ID: B }; -var D = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.D"); +let D = /* @__PURE__ */Caml_exceptions.create("Local_exception_test.D"); -var d = { +let d = { MEL_EXN_ID: D, _1: 3 }; diff --git a/jscomp/test/dist/jscomp/test/loop_regression_test.js b/jscomp/test/dist/jscomp/test/loop_regression_test.js index 9aa6580286..070c9be557 100644 --- a/jscomp/test/dist/jscomp/test/loop_regression_test.js +++ b/jscomp/test/dist/jscomp/test/loop_regression_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); function f(param) { - var v = { + let v = { contents: 0 }; - var acc = { + let acc = { contents: 0 }; - var n = 10; + let n = 10; while(true) { if (v.contents > n) { return acc.contents; @@ -21,7 +21,7 @@ function f(param) { }; } -var suites_0 = [ +let suites_0 = [ "sum", (function (param) { return { @@ -32,7 +32,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/loop_suites_test.js b/jscomp/test/dist/jscomp/test/loop_suites_test.js index 2e5c4a8f57..0a983cbe75 100644 --- a/jscomp/test/dist/jscomp/test/loop_suites_test.js +++ b/jscomp/test/dist/jscomp/test/loop_suites_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var For_loop_test = require("./for_loop_test.js"); -var Mt = require("./mt.js"); +let For_loop_test = require("./for_loop_test.js"); +let Mt = require("./mt.js"); Mt.from_pair_suites("for_loop_test", For_loop_test.suites); diff --git a/jscomp/test/dist/jscomp/test/map_find_test.js b/jscomp/test/dist/jscomp/test/map_find_test.js index 07febb9dca..7fd224438b 100644 --- a/jscomp/test/dist/jscomp/test/map_find_test.js +++ b/jscomp/test/dist/jscomp/test/map_find_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var funarg = { +let funarg = { compare: compare }; @@ -23,8 +23,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -35,14 +35,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -69,10 +69,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -100,11 +100,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -119,14 +119,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -136,9 +136,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -151,7 +151,7 @@ function find(x, _param) { }; } -var m = Stdlib__List.fold_left((function (acc, param) { +let m = Stdlib__List.fold_left((function (acc, param) { return Curry._3(add, param[0], param[1], acc); }), /* Empty */0, { hd: [ @@ -179,9 +179,9 @@ var m = Stdlib__List.fold_left((function (acc, param) { } }); -var compare$1 = Caml.caml_string_compare; +let compare$1 = Caml.caml_string_compare; -var funarg$1 = { +let funarg$1 = { compare: compare$1 }; @@ -194,8 +194,8 @@ function height$1(param) { } function create$1(l, x, d, r) { - var hl = height$1(l); - var hr = height$1(r); + let hl = height$1(l); + let hr = height$1(r); return /* Node */{ l: l, v: x, @@ -206,14 +206,14 @@ function create$1(l, x, d, r) { } function bal$1(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } @@ -240,10 +240,10 @@ function bal$1(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } @@ -271,11 +271,11 @@ function add$1(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -290,14 +290,14 @@ function add$1(x, data, m) { } } if (c < 0) { - var ll = add$1(x, data, l); + let ll = add$1(x, data, l); if (l === ll) { return m; } else { return bal$1(ll, v, d, r); } } - var rr = add$1(x, data, r); + let rr = add$1(x, data, r); if (r === rr) { return m; } else { @@ -307,9 +307,9 @@ function add$1(x, data, m) { function find$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return param.d; } @@ -322,7 +322,7 @@ function find$1(x, _param) { }; } -var s = Stdlib__List.fold_left((function (acc, param) { +let s = Stdlib__List.fold_left((function (acc, param) { return Curry._3(add$1, param[0], param[1], acc); }), /* Empty */0, { hd: [ diff --git a/jscomp/test/dist/jscomp/test/map_test.js b/jscomp/test/dist/jscomp/test/map_test.js index 22451e4549..ca84bda97c 100644 --- a/jscomp/test/dist/jscomp/test/map_test.js +++ b/jscomp/test/dist/jscomp/test/map_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var Int = { +let Int = { compare: compare }; @@ -24,8 +24,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -36,14 +36,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -70,10 +70,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -101,11 +101,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(Int.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(Int.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -120,14 +120,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -137,8 +137,8 @@ function add(x, data, m) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -154,11 +154,11 @@ function cons_enum(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -169,11 +169,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(Int.compare, e1._0, e2._0); + let c = Curry._2(Int.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -184,11 +184,11 @@ function compare$1(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -225,7 +225,7 @@ function of_list(bs) { }), /* Empty */0, bs); } -var funarg = { +let funarg = { compare: Stdlib__String.compare }; @@ -238,8 +238,8 @@ function height$1(param) { } function create$1(l, x, d, r) { - var hl = height$1(l); - var hr = height$1(r); + let hl = height$1(l); + let hr = height$1(r); return /* Node */{ l: l, v: x, @@ -250,14 +250,14 @@ function create$1(l, x, d, r) { } function bal$1(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } @@ -284,10 +284,10 @@ function bal$1(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } @@ -315,11 +315,11 @@ function add$1(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -334,14 +334,14 @@ function add$1(x, data, m) { } } if (c < 0) { - var ll = add$1(x, data, l); + let ll = add$1(x, data, l); if (l === ll) { return m; } else { return bal$1(ll, v, d, r); } } - var rr = add$1(x, data, r); + let rr = add$1(x, data, r); if (r === rr) { return m; } else { @@ -351,9 +351,9 @@ function add$1(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -366,10 +366,10 @@ function find(x, _param) { }; } -var int_map_suites_0 = [ +let int_map_suites_0 = [ "add", (function (param) { - var v = Curry._1(of_list, { + let v = Curry._1(of_list, { hd: [ 1, /* '1' */49 @@ -396,11 +396,11 @@ var int_map_suites_0 = [ }) ]; -var int_map_suites_1 = { +let int_map_suites_1 = { hd: [ "equal", (function (param) { - var v = Curry._1(of_list, { + let v = Curry._1(of_list, { hd: [ 1, /* '1' */49 @@ -419,7 +419,7 @@ var int_map_suites_1 = { } } }); - var u = Curry._1(of_list, { + let u = Curry._1(of_list, { hd: [ 2, /* '3' */51 @@ -449,7 +449,7 @@ var int_map_suites_1 = { hd: [ "equal2", (function (param) { - var v = Curry._1(of_list, { + let v = Curry._1(of_list, { hd: [ 1, /* '1' */49 @@ -468,7 +468,7 @@ var int_map_suites_1 = { } } }); - var u = Curry._1(of_list, { + let u = Curry._1(of_list, { hd: [ 2, /* '3' */51 @@ -500,12 +500,12 @@ var int_map_suites_1 = { hd: [ "iteration", (function (param) { - var m = /* Empty */0; - for(var i = 0; i <= 10000; ++i){ + let m = /* Empty */0; + for(let i = 0; i <= 10000; ++i){ m = Curry._3(add$1, String(i), String(i), m); } - var v = -1; - for(var i$1 = 0; i$1 <= 10000; ++i$1){ + let v = -1; + for(let i$1 = 0; i$1 <= 10000; ++i$1){ if (Curry._2(find, String(i$1), m) !== String(i$1)) { v = i$1; } @@ -523,7 +523,7 @@ var int_map_suites_1 = { } }; -var int_map_suites = { +let int_map_suites = { hd: int_map_suites_0, tl: int_map_suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/mario_game.js b/jscomp/test/dist/jscomp/test/mario_game.js index b7369248df..a7c28c134b 100644 --- a/jscomp/test/dist/jscomp/test/mario_game.js +++ b/jscomp/test/dist/jscomp/test/mario_game.js @@ -1,36 +1,36 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_int32 = require("melange.js/caml_int32.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Random = require("melange/random.js"); +let Caml = require("melange.js/caml.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Random = require("melange/random.js"); -var Actors = {}; +let Actors = {}; -var Dom_html = {}; +let Dom_html = {}; function setup_sprite(loopOpt, bbox_offsetOpt, bbox_sizeOpt, img_src, max_frames, max_ticks, frame_size, src_offset) { - var loop = loopOpt !== undefined ? loopOpt : true; - var bbox_offset = bbox_offsetOpt !== undefined ? bbox_offsetOpt : [ + let loop = loopOpt !== undefined ? loopOpt : true; + let bbox_offset = bbox_offsetOpt !== undefined ? bbox_offsetOpt : [ 0, 0 ]; - var bbox_size = bbox_sizeOpt !== undefined ? bbox_sizeOpt : [ + let bbox_size = bbox_sizeOpt !== undefined ? bbox_sizeOpt : [ 0, 0 ]; - var bbox_size$1 = Caml_obj.caml_equal(bbox_size, [ + let bbox_size$1 = Caml_obj.caml_equal(bbox_size, [ 0, 0 ]) ? frame_size : bbox_size; - var img_src$1 = "./sprites/" + img_src; + let img_src$1 = "./sprites/" + img_src; return { max_frames: max_frames, max_ticks: max_ticks, @@ -44,7 +44,7 @@ function setup_sprite(loopOpt, bbox_offsetOpt, bbox_sizeOpt, img_src, max_frames } function make_enemy(param) { - var dir = param[1]; + let dir = param[1]; switch (param[0]) { case /* Goomba */0 : return setup_sprite(undefined, [ @@ -249,13 +249,13 @@ function make_particle(param) { function make_type(typ, dir) { switch (typ.TAG | 0) { case /* SPlayer */0 : - var pt = typ._0; - var spr_type = [ + let pt = typ._0; + let spr_type = [ typ._1, dir ]; if (pt) { - var typ$1 = spr_type[0]; + let typ$1 = spr_type[0]; if (spr_type[1]) { switch (typ$1) { case /* Standing */0 : @@ -378,7 +378,7 @@ function make_type(typ, dir) { } } } else { - var typ$2 = spr_type[0]; + let typ$2 = spr_type[0]; if (spr_type[1]) { switch (typ$2) { case /* Standing */0 : @@ -507,7 +507,7 @@ function make_type(typ, dir) { dir ]); case /* SItem */2 : - var param = typ._0; + let param = typ._0; switch (param) { case /* Mushroom */0 : return setup_sprite(undefined, [ @@ -556,7 +556,7 @@ function make_type(typ, dir) { } case /* SBlock */3 : - var param$1 = typ._0; + let param$1 = typ._0; if (typeof param$1 !== "number") { return setup_sprite(undefined, undefined, undefined, "blocks.png", 4, 15, [ 16, @@ -622,7 +622,7 @@ function make_type(typ, dir) { } function make_from_params(params, context) { - var img = document.createElement("img"); + let img = document.createElement("img"); img.src = params.img_src; return { params: params, @@ -638,12 +638,12 @@ function make_from_params(params, context) { } function make(spawn, dir, context) { - var params = make_type(spawn, dir); + let params = make_type(spawn, dir); return make_from_params(params, context); } function make_bgd(context) { - var params = setup_sprite(undefined, undefined, undefined, "bgd-1.png", 1, 0, [ + let params = setup_sprite(undefined, undefined, undefined, "bgd-1.png", 1, 0, [ 512, 256 ], [ @@ -654,23 +654,23 @@ function make_bgd(context) { } function make_particle$1(ptyp, context) { - var params = make_particle(ptyp); + let params = make_particle(ptyp); return make_from_params(params, context); } function transform_enemy(enemy_typ, spr, dir) { - var params = make_enemy([ + let params = make_enemy([ enemy_typ, dir ]); - var img = document.createElement("img"); + let img = document.createElement("img"); img.src = params.img_src; spr.params = params; spr.img = img; } function update_animation(spr) { - var curr_ticks = spr.ticks.contents; + let curr_ticks = spr.ticks.contents; if (curr_ticks >= spr.params.max_ticks) { spr.ticks.contents = 0; if (spr.params.loop) { @@ -685,7 +685,7 @@ function update_animation(spr) { } } -var Sprite = { +let Sprite = { setup_sprite: setup_sprite, make: make, make_bgd: make_bgd, @@ -718,18 +718,18 @@ function make_type$1(typ, ctx) { } function make$1(velOpt, accOpt, part_type, pos, ctx) { - var vel = velOpt !== undefined ? velOpt : [ + let vel = velOpt !== undefined ? velOpt : [ 0, 0 ]; - var acc = accOpt !== undefined ? accOpt : [ + let acc = accOpt !== undefined ? accOpt : [ 0, 0 ]; - var params = make_type$1(part_type, ctx); - var pos$1 = pair_to_xy(pos); - var vel$1 = pair_to_xy(vel); - var acc$1 = pair_to_xy(acc); + let params = make_type$1(part_type, ctx); + let pos$1 = pair_to_xy(pos); + let vel$1 = pair_to_xy(vel); + let acc$1 = pair_to_xy(acc); return { params: params, part_type: part_type, @@ -742,7 +742,7 @@ function make$1(velOpt, accOpt, part_type, pos, ctx) { } function make_score(score, pos, ctx) { - var t = score >= 801 ? ( + let t = score >= 801 ? ( score >= 2001 ? ( score !== 4000 ? ( score !== 8000 ? /* Score100 */3 : /* Score8000 */10 @@ -782,19 +782,19 @@ function $$process(part) { part.pos.y = part.vel.y + part.pos.y; } -var Particle = { +let Particle = { make: make$1, make_score: make_score, $$process: $$process }; -var id_counter = { +let id_counter = { contents: Stdlib.min_int }; function setup_obj(has_gravityOpt, speedOpt, param) { - var has_gravity = has_gravityOpt !== undefined ? has_gravityOpt : true; - var speed = speedOpt !== undefined ? speedOpt : 1; + let has_gravity = has_gravityOpt !== undefined ? has_gravityOpt : true; + let speed = speedOpt !== undefined ? speedOpt : 1; return { has_gravity: has_gravity, speed: speed @@ -802,8 +802,8 @@ function setup_obj(has_gravityOpt, speedOpt, param) { } function set_vel_to_speed(obj) { - var speed = obj.params.speed; - var match = obj.dir; + let speed = obj.params.speed; + let match = obj.dir; if (match) { obj.vel.x = speed; } else { @@ -816,14 +816,14 @@ function make_type$2(param) { case /* SPlayer */0 : return setup_obj(undefined, 2.8, undefined); case /* SEnemy */1 : - var param$1 = param._0; + let param$1 = param._0; if (param$1 >= 3) { return setup_obj(undefined, 3, undefined); } else { return setup_obj(undefined, undefined, undefined); } case /* SItem */2 : - var param$2 = param._0; + let param$2 = param._0; if (param$2 >= 3) { return setup_obj(false, undefined, undefined); } else { @@ -841,12 +841,12 @@ function new_id(param) { } function make$2($staropt$star, $staropt$star$1, spawnable, context, param) { - var id = $staropt$star !== undefined ? Caml_option.valFromOption($staropt$star) : undefined; - var dir = $staropt$star$1 !== undefined ? $staropt$star$1 : /* Left */0; - var spr = make(spawnable, dir, context); - var params = make_type$2(spawnable); - var id$1 = id !== undefined ? id : new_id(undefined); - var obj = { + let id = $staropt$star !== undefined ? Caml_option.valFromOption($staropt$star) : undefined; + let dir = $staropt$star$1 !== undefined ? $staropt$star$1 : /* Left */0; + let spr = make(spawnable, dir, context); + let params = make_type$2(spawnable); + let id$1 = id !== undefined ? id : new_id(undefined); + let obj = { params: params, pos: { x: param[0], @@ -873,12 +873,12 @@ function make$2($staropt$star, $staropt$star$1, spawnable, context, param) { } function spawn(spawnable, context, param) { - var match = make$2(undefined, undefined, spawnable, context, [ + let match = make$2(undefined, undefined, spawnable, context, [ param[0], param[1] ]); - var obj = match[1]; - var spr = match[0]; + let obj = match[1]; + let spr = match[0]; switch (spawnable.TAG | 0) { case /* SPlayer */0 : return { @@ -942,20 +942,20 @@ function equals(col1, col2) { } function normalize_pos(pos, p1, p2) { - var match = p1.bbox_offset; - var match$1 = p2.bbox_offset; - var match$2 = p1.bbox_size; - var match$3 = p2.bbox_size; + let match = p1.bbox_offset; + let match$1 = p2.bbox_offset; + let match$2 = p1.bbox_size; + let match$3 = p2.bbox_size; pos.x = pos.x - (match$3[0] + match$1[0]) + (match$2[0] + match[0]); pos.y = pos.y - (match$3[1] + match$1[1]) + (match$2[1] + match[1]); } function update_player(player, keys, context) { - var prev_jumping = player.jumping; - var prev_dir = player.dir; - var prev_vx = Math.abs(player.vel.x); + let prev_jumping = player.jumping; + let prev_dir = player.dir; + let prev_vx = Math.abs(player.vel.x); Stdlib__List.iter((function (param) { - var lr_acc = player.vel.x * 0.2; + let lr_acc = player.vel.x * 0.2; switch (param) { case /* CLeft */0 : if (!player.crouch) { @@ -996,10 +996,10 @@ function update_player(player, keys, context) { } }), keys); - var v = player.vel.x * 0.9; - var vel_damped = Math.abs(v) < 0.1 ? 0 : v; + let v = player.vel.x * 0.9; + let vel_damped = Math.abs(v) < 0.1 ? 0 : v; player.vel.x = vel_damped; - var pl_typ = player.health <= 1 ? /* SmallM */1 : /* BigM */0; + let pl_typ = player.health <= 1 ? /* SmallM */1 : /* BigM */0; if (!prev_jumping && player.jumping) { return [ pl_typ, @@ -1082,15 +1082,15 @@ function process_obj(obj, mapy) { } function normalize_origin(pos, spr) { - var p = spr.params; - var match = p.bbox_offset; - var match$1 = p.bbox_size; + let p = spr.params; + let match = p.bbox_offset; + let match$1 = p.bbox_size; pos.x = pos.x - match[0]; pos.y = pos.y - (match[1] + match$1[1]); } function collide_block(check_xOpt, dir, obj) { - var check_x = check_xOpt !== undefined ? check_xOpt : true; + let check_x = check_xOpt !== undefined ? check_xOpt : true; if (dir !== 1) { if (dir) { if (check_x) { @@ -1122,15 +1122,15 @@ function evolve_enemy(player_dir, typ, spr, obj, context) { obj.kill = true; return ; case /* GKoopa */1 : - var match = make$2(undefined, obj.dir, { + let match = make$2(undefined, obj.dir, { TAG: /* SEnemy */1, _0: /* GKoopaShell */3 }, context, [ obj.pos.x, obj.pos.y ]); - var new_obj = match[1]; - var new_spr = match[0]; + let new_obj = match[1]; + let new_spr = match[0]; normalize_pos(new_obj.pos, spr.params, new_spr.params); return { TAG: /* Enemy */1, @@ -1139,15 +1139,15 @@ function evolve_enemy(player_dir, typ, spr, obj, context) { _2: new_obj }; case /* RKoopa */2 : - var match$1 = make$2(undefined, obj.dir, { + let match$1 = make$2(undefined, obj.dir, { TAG: /* SEnemy */1, _0: /* RKoopaShell */4 }, context, [ obj.pos.x, obj.pos.y ]); - var new_obj$1 = match$1[1]; - var new_spr$1 = match$1[0]; + 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 */1, @@ -1170,13 +1170,13 @@ function evolve_enemy(player_dir, typ, spr, obj, context) { function rev_dir(o, t, s) { reverse_left_right(o); - var old_params = s.params; + let old_params = s.params; transform_enemy(t, s, o.dir); normalize_pos(o.pos, old_params, s.params); } function dec_health(obj) { - var health = obj.health - 1 | 0; + let health = obj.health - 1 | 0; if (health === 0) { obj.kill = true; return ; @@ -1190,7 +1190,7 @@ function dec_health(obj) { function evolve_block(obj, context) { dec_health(obj); - var match = make$2(undefined, undefined, { + let match = make$2(undefined, undefined, { TAG: /* SBlock */3, _0: /* QBlockUsed */0 }, context, [ @@ -1206,14 +1206,14 @@ function evolve_block(obj, context) { } function spawn_above(player_dir, obj, typ, context) { - var item = spawn({ + let item = spawn({ TAG: /* SItem */2, _0: typ }, context, [ obj.pos.x, obj.pos.y ]); - var item_obj = item._2; + let item_obj = item._2; item_obj.pos.y = item_obj.pos.y - item._1.params.frame_size[1]; item_obj.dir = player_dir ? /* Left */0 : /* Right */1; set_vel_to_speed(item_obj); @@ -1221,14 +1221,14 @@ function spawn_above(player_dir, obj, typ, context) { } function get_aabb(obj) { - var spr = obj._1.params; - var obj$1 = obj._2; - var match = spr.bbox_offset; - var box = obj$1.pos.x + match[0]; - var boy = obj$1.pos.y + match[1]; - var match$1 = spr.bbox_size; - var sy = match$1[1]; - var sx = match$1[0]; + let spr = obj._1.params; + let obj$1 = obj._2; + let match = spr.bbox_offset; + let box = obj$1.pos.x + match[0]; + let boy = obj$1.pos.y + match[1]; + let match$1 = spr.bbox_size; + let sy = match$1[1]; + let sx = match$1[0]; return { center: { x: box + sx / 2, @@ -1242,9 +1242,9 @@ function get_aabb(obj) { } function col_bypass(c1, c2) { - var o1 = c1._2; - var o2 = c2._2; - var ctypes; + let o1 = c1._2; + let o2 = c2._2; + let ctypes; switch (c1.TAG | 0) { case /* Player */0 : ctypes = c2.TAG === /* Enemy */1 ? c1._2.invuln > 0 : false; @@ -1278,21 +1278,21 @@ function col_bypass(c1, c2) { } function check_collision(c1, c2) { - var b1 = get_aabb(c1); - var b2 = get_aabb(c2); - var o1 = c1._2; + let b1 = get_aabb(c1); + let b2 = get_aabb(c2); + let o1 = c1._2; if (col_bypass(c1, c2)) { return ; } - var vx = b1.center.x - b2.center.x; - var vy = b1.center.y - b2.center.y; - var hwidths = b1.half.x + b2.half.x; - var hheights = b1.half.y + b2.half.y; + let vx = b1.center.x - b2.center.x; + let vy = b1.center.y - b2.center.y; + let hwidths = b1.half.x + b2.half.x; + let hheights = b1.half.y + b2.half.y; if (!(Math.abs(vx) < hwidths && Math.abs(vy) < hheights)) { return ; } - var ox = hwidths - Math.abs(vx); - var oy = hheights - Math.abs(vy); + let ox = hwidths - Math.abs(vx); + let oy = hheights - Math.abs(vy); if (ox >= oy) { if (vy > 0) { o1.pos.y = o1.pos.y + oy; @@ -1315,24 +1315,24 @@ function kill(collid, ctx) { case /* Player */0 : return /* [] */0; case /* Enemy */1 : - var o = collid._2; - var pos_0 = o.pos.x; - var pos_1 = o.pos.y; - var pos = [ + let o = collid._2; + let pos_0 = o.pos.x; + let pos_1 = o.pos.y; + let pos = [ pos_0, pos_1 ]; - var score = o.score > 0 ? ({ + let score = o.score > 0 ? ({ hd: make_score(o.score, pos, ctx), tl: /* [] */0 }) : /* [] */0; - var remains = collid._0 ? /* [] */0 : ({ + let remains = collid._0 ? /* [] */0 : ({ hd: make$1(undefined, undefined, /* GoombaSquish */0, pos, ctx), tl: /* [] */0 }); return Stdlib.$at(score, remains); case /* Item */2 : - var o$1 = collid._2; + let o$1 = collid._2; if (collid._0) { return /* [] */0; } else { @@ -1345,38 +1345,38 @@ function kill(collid, ctx) { }; } case /* Block */3 : - var o$2 = collid._2; + let o$2 = collid._2; if (collid._0 !== 1) { return /* [] */0; } - var pos_0$1 = o$2.pos.x; - var pos_1$1 = o$2.pos.y; - var pos$1 = [ + 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 ]; - var p1 = make$1([ + let p1 = make$1([ -5, -5 ], [ 0, 0.2 ], /* BrickChunkL */1, pos$1, ctx); - var p2 = make$1([ + let p2 = make$1([ -3, -4 ], [ 0, 0.2 ], /* BrickChunkL */1, pos$1, ctx); - var p3 = make$1([ + let p3 = make$1([ 3, -4 ], [ 0, 0.2 ], /* BrickChunkR */2, pos$1, ctx); - var p4 = make$1([ + let p4 = make$1([ 5, -5 ], [ @@ -1400,7 +1400,7 @@ function kill(collid, ctx) { } } -var $$Object = { +let $$Object = { invuln: 60, dampen_jump: 4, get_sprite: get_sprite, @@ -1425,20 +1425,20 @@ var $$Object = { }; function render_bbox(sprite, param) { - var context = sprite.context; - var match = sprite.params.bbox_offset; - var match$1 = sprite.params.bbox_size; + let context = sprite.context; + let match = sprite.params.bbox_offset; + let match$1 = sprite.params.bbox_size; context.strokeStyle = "#FF0000"; return context.strokeRect(param[0] + match[0], param[1] + match[1], match$1[0], match$1[1]); } function render(sprite, param) { - var context = sprite.context; - var match = sprite.params.src_offset; - var match$1 = sprite.params.frame_size; - var sw = match$1[0]; - var match$2 = sprite.params.frame_size; - var sx = match[0] + sprite.frame.contents * sw; + let context = sprite.context; + let match = sprite.params.src_offset; + let match$1 = sprite.params.frame_size; + let sw = match$1[0]; + let match$2 = sprite.params.frame_size; + let sx = match[0] + sprite.frame.contents * sw; return context.drawImage(sprite.img, sx, match[1], sw, match$1[1], param[0], param[1], match$2[0], match$2[1]); } @@ -1454,24 +1454,24 @@ function draw_bgd(bgd, off_x) { } function clear_canvas(canvas) { - var context = canvas.getContext("2d"); - var cwidth = canvas.width; - var cheight = canvas.height; + let context = canvas.getContext("2d"); + let cwidth = canvas.width; + let cheight = canvas.height; context.clearRect(0, 0, cwidth, cheight); } function hud(canvas, score, coins) { - var score_string = String(score); - var coin_string = String(coins); - var context = canvas.getContext("2d"); + let score_string = String(score); + let coin_string = String(coins); + let context = canvas.getContext("2d"); context.font = "10px 'Press Start 2P'"; context.fillText("Score: " + score_string, canvas.width - 140, 18); context.fillText("Coins: " + coin_string, 120, 18); } function fps(canvas, fps_val) { - var fps_str = String(fps_val | 0); - var context = canvas.getContext("2d"); + let fps_str = String(fps_val | 0); + let context = canvas.getContext("2d"); context.fillText(fps_str, 10, 18); } @@ -1501,7 +1501,7 @@ function game_loss(ctx) { }); } -var Draw = { +let Draw = { render: render, clear_canvas: clear_canvas, draw_bgd: draw_bgd, @@ -1530,17 +1530,17 @@ function make$3(param, param$1) { } function calc_viewport_point(cc, vc, mc) { - var vc_half = vc / 2; + let vc_half = vc / 2; return Caml.caml_float_min(Caml.caml_float_max(cc - vc_half, 0), Caml.caml_float_min(mc - vc, Math.abs(cc - vc_half))); } function in_viewport(v, pos) { - var v_min_x = v.pos.x - 32; - var v_max_x = v.pos.x + v.v_dim.x; - var v_min_y = v.pos.y - 32; - var v_max_y = v.pos.y + v.v_dim.y; - var x = pos.x; - var y = pos.y; + let v_min_x = v.pos.x - 32; + let v_max_x = v.pos.x + v.v_dim.x; + let v_min_y = v.pos.y - 32; + let v_max_y = v.pos.y + v.v_dim.y; + let x = pos.x; + let y = pos.y; if (x >= v_min_x && x <= v_max_x && y >= v_min_y) { return y <= v_max_y; } else { @@ -1549,7 +1549,7 @@ function in_viewport(v, pos) { } function out_of_viewport_below(v, y) { - var v_max_y = v.pos.y + v.v_dim.y; + let v_max_y = v.pos.y + v.v_dim.y; return y >= v_max_y; } @@ -1561,9 +1561,9 @@ function coord_to_viewport(viewport, coord) { } function update(vpt, ctr) { - var new_x = calc_viewport_point(ctr.x, vpt.v_dim.x, vpt.m_dim.x); - var new_y = calc_viewport_point(ctr.y, vpt.v_dim.y, vpt.m_dim.y); - var pos = { + let new_x = calc_viewport_point(ctr.x, vpt.v_dim.x, vpt.m_dim.x); + let new_y = calc_viewport_point(ctr.y, vpt.v_dim.y, vpt.m_dim.y); + let pos = { x: new_x, y: new_y }; @@ -1574,7 +1574,7 @@ function update(vpt, ctr) { }; } -var Viewport = { +let Viewport = { make: make$3, calc_viewport_point: calc_viewport_point, in_viewport: in_viewport, @@ -1583,7 +1583,7 @@ var Viewport = { update: update }; -var pressed_keys = { +let pressed_keys = { left: false, right: false, up: false, @@ -1591,20 +1591,20 @@ var pressed_keys = { bbox: 0 }; -var collid_objs = { +let collid_objs = { contents: /* [] */0 }; -var particles = { +let particles = { contents: /* [] */0 }; -var last_time = { +let last_time = { contents: 0 }; function calc_fps(t0, t1) { - var delta = (t1 - t0) / 1000; + let delta = (t1 - t0) / 1000; return 1 / delta; } @@ -1613,25 +1613,25 @@ function update_score(state, i) { } function process_collision(dir, c1, c2, state) { - var context = state.ctx; - var exit = 0; - var s1; - var o1; - var typ; - var s2; - var o2; - var s1$1; - var o1$1; - var t2; - var s2$1; - var o2$1; - var o1$2; - var t2$1; - var o2$2; + let context = state.ctx; + let exit = 0; + let s1; + let o1; + let typ; + let s2; + let o2; + let s1$1; + let o1$1; + let t2; + let s2$1; + let o2$1; + let o1$2; + let t2$1; + let o2$2; switch (c1.TAG | 0) { case /* Player */0 : - var o1$3 = c1._2; - var s1$2 = c1._1; + let o1$3 = c1._2; + let s1$2 = c1._1; switch (c2.TAG | 0) { case /* Player */0 : return [ @@ -1639,7 +1639,7 @@ function process_collision(dir, c1, c2, state) { undefined ]; case /* Enemy */1 : - var typ$1 = c2._0; + let typ$1 = c2._0; if (dir !== 1) { s1$1 = s1$2; o1$1 = o1$3; @@ -1663,7 +1663,7 @@ function process_collision(dir, c1, c2, state) { exit = 3; break; case /* Block */3 : - var t = c2._0; + let t = c2._0; if (dir) { if (t === 4) { game_win(state.ctx); @@ -1686,7 +1686,7 @@ function process_collision(dir, c1, c2, state) { ]; } } - var o2$3 = c2._2; + let o2$3 = c2._2; if (typeof t === "number") { if (t !== 1) { if (t !== 4) { @@ -1717,8 +1717,8 @@ function process_collision(dir, c1, c2, state) { ]; } } - var updated_block = evolve_block(o2$3, context); - var spawned_item = spawn_above(o1$3.dir, o2$3, t._0, context); + let updated_block = evolve_block(o2$3, context); + let spawned_item = spawn_above(o1$3.dir, o2$3, t._0, context); collide_block(undefined, dir, o1$3); return [ spawned_item, @@ -1728,9 +1728,9 @@ function process_collision(dir, c1, c2, state) { } break; case /* Enemy */1 : - var o1$4 = c1._2; - var s1$3 = c1._1; - var t1 = c1._0; + let o1$4 = c1._2; + let s1$3 = c1._1; + let t1 = c1._0; switch (c2.TAG | 0) { case /* Player */0 : if (dir) { @@ -1750,9 +1750,9 @@ function process_collision(dir, c1, c2, state) { } break; case /* Enemy */1 : - var t2$2 = c2._0; - var s2$2 = c2._1; - var o2$4 = c2._2; + let t2$2 = c2._0; + let s2$2 = c2._1; + let o2$4 = c2._2; if (t1 !== 3) { if (t1 < 4) { if (t2$2 >= 3) { @@ -1819,8 +1819,8 @@ function process_collision(dir, c1, c2, state) { undefined ]; case /* Block */3 : - var t2$3 = c2._0; - var o2$5 = c2._2; + let t2$3 = c2._0; + let o2$5 = c2._2; if (dir >= 2) { if (t1 >= 3) { if (typeof t2$3 === "number") { @@ -1839,8 +1839,8 @@ function process_collision(dir, c1, c2, state) { ]; } } - var updated_block$1 = evolve_block(o2$5, context); - var spawned_item$1 = spawn_above(o1$4.dir, o2$5, t2$3._0, context); + let updated_block$1 = evolve_block(o2$5, context); + let spawned_item$1 = spawn_above(o1$4.dir, o2$5, t2$3._0, context); rev_dir(o1$4, t1, s1$3); return [ updated_block$1, @@ -1862,7 +1862,7 @@ function process_collision(dir, c1, c2, state) { } break; case /* Item */2 : - var o2$6 = c1._2; + let o2$6 = c1._2; switch (c2.TAG | 0) { case /* Player */0 : o1$2 = c2._2; @@ -1906,7 +1906,7 @@ function process_collision(dir, c1, c2, state) { o1.jumping = false; o1.grounded = true; if (typ >= 3) { - var r2 = 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 [ @@ -1924,7 +1924,7 @@ function process_collision(dir, c1, c2, state) { evolve_enemy(o1.dir, typ, s2, o2, context) ]; } - var score = Math.imul(100, state.multiplier); + let score = Math.imul(100, state.multiplier); update_score(state, score); o2.score = score; state.multiplier = (state.multiplier << 1); @@ -1934,7 +1934,7 @@ function process_collision(dir, c1, c2, state) { ]; case 2 : if (t2 >= 3) { - var 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); + 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 @@ -1985,7 +1985,7 @@ function process_collision(dir, c1, c2, state) { } function broad_phase(collid, all_collids, state) { - var obj = collid._2; + let obj = collid._2; return Stdlib__List.filter((function (c) { if (in_viewport(state.vpt, obj.pos) || is_player(collid)) { return true; @@ -1999,34 +1999,34 @@ function check_collisions(collid, all_collids, state) { if (collid.TAG === /* Block */3) { return /* [] */0; } - var broad = broad_phase(collid, all_collids, state); - var _cs = broad; - var _acc = /* [] */0; + let broad = broad_phase(collid, all_collids, state); + let _cs = broad; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var cs = _cs; + let acc = _acc; + let cs = _cs; if (!cs) { return acc; } - var h = cs.hd; - var c_obj = collid._2; - var new_objs; + let h = cs.hd; + let c_obj = collid._2; + let new_objs; if (equals(collid, h)) { new_objs = [ undefined, undefined ]; } else { - var dir = check_collision(collid, h); + let dir = check_collision(collid, h); new_objs = dir !== undefined && h._2.id !== c_obj.id ? process_collision(dir, collid, h, state) : [ undefined, undefined ]; } - var o = new_objs[0]; - var acc$1; + let o = new_objs[0]; + let acc$1; if (o !== undefined) { - var o2 = new_objs[1]; + let o2 = new_objs[1]; acc$1 = o2 !== undefined ? ({ hd: o, tl: { @@ -2038,7 +2038,7 @@ function check_collisions(collid, all_collids, state) { tl: acc }); } else { - var o$1 = new_objs[1]; + let o$1 = new_objs[1]; acc$1 = o$1 !== undefined ? ({ hd: o$1, tl: acc @@ -2051,17 +2051,17 @@ function check_collisions(collid, all_collids, state) { } function update_collidable(state, collid, all_collids) { - var obj = collid._2; - var spr = collid._1; + let obj = collid._2; + let spr = collid._1; obj.invuln = obj.invuln > 0 ? obj.invuln - 1 | 0 : 0; - var viewport_filter = in_viewport(state.vpt, obj.pos) || is_player(collid) || out_of_viewport_below(state.vpt, obj.pos.y); + let viewport_filter = in_viewport(state.vpt, obj.pos) || is_player(collid) || out_of_viewport_below(state.vpt, obj.pos.y); if (!(!obj.kill && viewport_filter)) { return /* [] */0; } obj.grounded = false; process_obj(obj, state.map); - var evolved = check_collisions(collid, all_collids, state); - var vpt_adj_xy = coord_to_viewport(state.vpt, obj.pos); + let evolved = check_collisions(collid, all_collids, state); + let vpt_adj_xy = coord_to_viewport(state.vpt, obj.pos); render(spr, [ vpt_adj_xy.x, vpt_adj_xy.y @@ -2079,11 +2079,11 @@ function update_collidable(state, collid, all_collids) { } function translate_keys(param) { - var ctrls_0 = [ + let ctrls_0 = [ pressed_keys.left, /* CLeft */0 ]; - var ctrls_1 = { + let ctrls_1 = { hd: [ pressed_keys.right, /* CRight */1 @@ -2102,7 +2102,7 @@ function translate_keys(param) { } } }; - var ctrls = { + let ctrls = { hd: ctrls_0, tl: ctrls_1 }; @@ -2120,13 +2120,13 @@ function translate_keys(param) { function run_update_collid(state, collid, all_collids) { if (collid.TAG === /* Player */0) { - var o = collid._2; - var keys = translate_keys(undefined); + let o = collid._2; + let keys = translate_keys(undefined); o.crouch = false; - var match = update_player(o, keys, state.ctx); - var player; + let match = update_player(o, keys, state.ctx); + let player; if (match !== undefined) { - var new_spr = match[1]; + let new_spr = match[1]; normalize_pos(o.pos, collid._1.params, new_spr.params); player = { TAG: /* Player */0, @@ -2137,33 +2137,33 @@ function run_update_collid(state, collid, all_collids) { } else { player = collid; } - var evolved = update_collidable(state, player, all_collids); + let evolved = update_collidable(state, player, all_collids); collid_objs.contents = Stdlib.$at(collid_objs.contents, evolved); return player; } - var obj = collid._2; - var evolved$1 = update_collidable(state, collid, all_collids); + let obj = collid._2; + let evolved$1 = update_collidable(state, collid, all_collids); if (!obj.kill) { collid_objs.contents = { hd: collid, tl: Stdlib.$at(collid_objs.contents, evolved$1) }; } - var new_parts = obj.kill ? kill(collid, state.ctx) : /* [] */0; + let new_parts = obj.kill ? kill(collid, state.ctx) : /* [] */0; particles.contents = Stdlib.$at(particles.contents, new_parts); return collid; } function update_loop(canvas, param, map_dim) { - var player = param[0]; - var ctx = canvas.getContext("2d"); - var cwidth = canvas.width / 1; - var cheight = canvas.height / 1; - var viewport = make$3([ + let player = param[0]; + let ctx = canvas.getContext("2d"); + let cwidth = canvas.width / 1; + let cheight = canvas.height / 1; + let viewport = make$3([ cwidth, cheight ], map_dim); - var state = { + let state = { bgd: make_bgd(ctx), ctx: ctx, vpt: update(viewport, player._2.pos), @@ -2174,23 +2174,23 @@ function update_loop(canvas, param, map_dim) { game_over: false }; state.ctx.scale(1, 1); - var update_helper = function (time, state, player, objs, parts) { + let update_helper = function (time, state, player, objs, parts) { if (state.game_over === true) { return game_win(state.ctx); } collid_objs.contents = /* [] */0; particles.contents = /* [] */0; - var fps$1 = calc_fps(last_time.contents, time); + let fps$1 = calc_fps(last_time.contents, time); last_time.contents = time; clear_canvas(canvas); - var vpos_x_int = state.vpt.pos.x / 5 | 0; - var bgd_width = state.bgd.params.frame_size[0] | 0; + let vpos_x_int = state.vpt.pos.x / 5 | 0; + let bgd_width = state.bgd.params.frame_size[0] | 0; draw_bgd(state.bgd, Caml_int32.mod_(vpos_x_int, bgd_width)); - var player$1 = run_update_collid(state, player, objs); + let player$1 = run_update_collid(state, player, objs); if (player$1._2.kill === true) { return game_loss(state.ctx); } - var state$1 = { + let state$1 = { bgd: state.bgd, ctx: state.ctx, vpt: update(state.vpt, player$1._2.pos), @@ -2205,8 +2205,8 @@ function update_loop(canvas, param, map_dim) { }), objs); Stdlib__List.iter((function (part) { $$process(part); - var x = part.pos.x - state$1.vpt.pos.x; - var y = part.pos.y - state$1.vpt.pos.y; + let x = part.pos.x - state$1.vpt.pos.x; + let y = part.pos.y - state$1.vpt.pos.y; render(part.params.sprite, [ x, y @@ -2230,7 +2230,7 @@ function update_loop(canvas, param, map_dim) { } function keydown(evt) { - var match = evt.keyCode; + let match = evt.keyCode; if (match >= 41) { switch (match) { case 65 : @@ -2297,7 +2297,7 @@ function keydown(evt) { } function keyup(evt) { - var match = evt.keyCode; + let match = evt.keyCode; if (match >= 68) { if (match !== 83) { if (match !== 87) { @@ -2344,7 +2344,7 @@ function keyup(evt) { return true; } -var Director = { +let Director = { update_loop: update_loop, keydown: keydown, keyup: keyup @@ -2352,7 +2352,7 @@ var Director = { function mem_loc(checkloc, _loclist) { while(true) { - var loclist = _loclist; + let loclist = _loclist; if (!loclist) { return false; } @@ -2368,7 +2368,7 @@ function convert_list(lst) { if (!lst) { return /* [] */0; } - var h = lst.hd; + let h = lst.hd; return Stdlib.$at({ hd: [ h[0], @@ -2421,12 +2421,12 @@ function choose_sblock_typ(typ) { function avoid_overlap(_lst, currentLst) { while(true) { - var lst = _lst; + let lst = _lst; if (!lst) { return /* [] */0; } - var t = lst.tl; - var h = lst.hd; + let t = lst.tl; + let h = lst.hd; if (!mem_loc(h[1], currentLst)) { return Stdlib.$at({ hd: h, @@ -2440,16 +2440,16 @@ function avoid_overlap(_lst, currentLst) { function trim_edges(_lst, blockw, blockh) { while(true) { - var lst = _lst; + let lst = _lst; if (!lst) { return /* [] */0; } - var t = lst.tl; - var h = lst.hd; - var cx = h[1][0]; - var cy = h[1][1]; - var pixx = blockw * 16; - var pixy = blockh * 16; + let t = lst.tl; + let h = lst.hd; + let cx = h[1][0]; + let cy = h[1][1]; + let pixx = blockw * 16; + let pixy = blockh * 16; if (!(cx < 128 || pixx - cx < 528 || cy === 0 || pixy - cy < 48)) { return Stdlib.$at({ hd: h, @@ -2480,16 +2480,16 @@ function generate_clouds(cbx, cby, typ, num) { function generate_coins(_block_coord) { while(true) { - var block_coord = _block_coord; - var place_coin = Stdlib__Random.$$int(2); + let block_coord = _block_coord; + let place_coin = Stdlib__Random.$$int(2); if (!block_coord) { return /* [] */0; } - var t = block_coord.tl; - var h = block_coord.hd; + let t = block_coord.tl; + let h = block_coord.hd; if (place_coin === 0) { - var xc = h[1][0]; - var yc = h[1][1]; + let xc = h[1][0]; + let yc = h[1][1]; return Stdlib.$at({ hd: [ 0, @@ -2510,10 +2510,10 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { if (cbx > blockw || cby > blockh) { return /* [] */0; } - var block_typ = Stdlib__Random.$$int(4); - var stair_typ = Stdlib__Random.$$int(2); - var life_block_chance = Stdlib__Random.$$int(5); - var middle_block = life_block_chance === 0 ? 3 : stair_typ; + let block_typ = Stdlib__Random.$$int(4); + let stair_typ = Stdlib__Random.$$int(2); + let life_block_chance = Stdlib__Random.$$int(5); + let middle_block = life_block_chance === 0 ? 3 : stair_typ; switch (prob) { case 0 : if (blockw - cbx > 2) { @@ -2578,7 +2578,7 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { }; } case 1 : - var num_clouds = Stdlib__Random.$$int(5) + 5 | 0; + let num_clouds = Stdlib__Random.$$int(5) + 5 | 0; if (cby < 5) { return generate_clouds(cbx, cby, 2, num_clouds); } else { @@ -2586,14 +2586,14 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { } case 2 : if (blockh - cby === 1) { - var four_0 = [ + let four_0 = [ stair_typ, [ cbx, cby ] ]; - var four_1 = { + let four_1 = { hd: [ stair_typ, [ @@ -2621,18 +2621,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { } } }; - var four = { + let four = { hd: four_0, tl: four_1 }; - var three_0 = [ + let three_0 = [ stair_typ, [ cbx + 1, cby - 1 ] ]; - var three_1 = { + let three_1 = { hd: [ stair_typ, [ @@ -2651,18 +2651,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { tl: /* [] */0 } }; - var three = { + let three = { hd: three_0, tl: three_1 }; - var two_0 = [ + let two_0 = [ stair_typ, [ cbx + 2, cby - 2 ] ]; - var two_1 = { + let two_1 = { hd: [ stair_typ, [ @@ -2672,18 +2672,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { ], tl: /* [] */0 }; - var two = { + let two = { hd: two_0, tl: two_1 }; - var one_0 = [ + let one_0 = [ stair_typ, [ cbx + 3, cby - 3 ] ]; - var one = { + let one = { hd: one_0, tl: /* [] */0 }; @@ -2693,14 +2693,14 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { } case 3 : if (stair_typ === 0 && blockh - cby > 3) { - var three_0$1 = [ + let three_0$1 = [ stair_typ, [ cbx, cby ] ]; - var three_1$1 = { + let three_1$1 = { hd: [ stair_typ, [ @@ -2719,18 +2719,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { tl: /* [] */0 } }; - var three$1 = { + let three$1 = { hd: three_0$1, tl: three_1$1 }; - var two_0$1 = [ + let two_0$1 = [ stair_typ, [ cbx + 2, cby + 1 ] ]; - var two_1$1 = { + let two_1$1 = { hd: [ stair_typ, [ @@ -2740,18 +2740,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { ], tl: /* [] */0 }; - var two$1 = { + let two$1 = { hd: two_0$1, tl: two_1$1 }; - var one_0$1 = [ + let one_0$1 = [ stair_typ, [ cbx + 5, cby + 2 ] ]; - var one_1 = { + let one_1 = { hd: [ stair_typ, [ @@ -2761,20 +2761,20 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { ], tl: /* [] */0 }; - var one$1 = { + let one$1 = { hd: one_0$1, tl: one_1 }; return Stdlib.$at(three$1, Stdlib.$at(two$1, one$1)); } else if (blockh - cby > 2) { - var one_0$2 = [ + let one_0$2 = [ stair_typ, [ cbx, cby ] ]; - var one_1$1 = { + let one_1$1 = { hd: [ stair_typ, [ @@ -2784,18 +2784,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { ], tl: /* [] */0 }; - var one$2 = { + let one$2 = { hd: one_0$2, tl: one_1$1 }; - var two_0$2 = [ + let two_0$2 = [ stair_typ, [ cbx + 3, cby - 1 ] ]; - var two_1$2 = { + let two_1$2 = { hd: [ stair_typ, [ @@ -2805,18 +2805,18 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { ], tl: /* [] */0 }; - var two$2 = { + let two$2 = { hd: two_0$2, tl: two_1$2 }; - var three_0$2 = [ + let three_0$2 = [ stair_typ, [ cbx + 4, cby - 2 ] ]; - var three_1$2 = { + let three_1$2 = { hd: [ stair_typ, [ @@ -2835,7 +2835,7 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { tl: /* [] */0 } }; - var three$2 = { + let three$2 = { hd: three_0$2, tl: three_1$2 }; @@ -2935,8 +2935,8 @@ function choose_block_pattern(blockw, blockh, cbx, cby, prob) { function generate_enemies(blockw, blockh, _cbx, _cby, acc) { while(true) { - var cby = _cby; - var cbx = _cbx; + let cby = _cby; + let cbx = _cbx; if (cbx > blockw - 32) { return /* [] */0; } @@ -2952,16 +2952,16 @@ function generate_enemies(blockw, blockh, _cbx, _cby, acc) { _cby = cby + 1; continue ; } - var prob = Stdlib__Random.$$int(30); + let prob = Stdlib__Random.$$int(30); if (prob < 3 && blockh - 1 === cby) { - var enemy_0 = [ + let enemy_0 = [ prob, [ cbx * 16, cby * 16 ] ]; - var enemy = { + let enemy = { hd: enemy_0, tl: /* [] */0 }; @@ -2974,17 +2974,17 @@ function generate_enemies(blockw, blockh, _cbx, _cby, acc) { function generate_block_enemies(_block_coord) { while(true) { - var block_coord = _block_coord; - var place_enemy = Stdlib__Random.$$int(20); - var enemy_typ = Stdlib__Random.$$int(3); + let block_coord = _block_coord; + let place_enemy = Stdlib__Random.$$int(20); + let enemy_typ = Stdlib__Random.$$int(3); if (!block_coord) { return /* [] */0; } - var t = block_coord.tl; - var h = block_coord.hd; + let t = block_coord.tl; + let h = block_coord.hd; if (place_enemy === 0) { - var xc = h[1][0]; - var yc = h[1][1]; + let xc = h[1][0]; + let yc = h[1][1]; return Stdlib.$at({ hd: [ enemy_typ, @@ -3003,9 +3003,9 @@ function generate_block_enemies(_block_coord) { function generate_block_locs(blockw, blockh, _cbx, _cby, _acc) { while(true) { - var acc = _acc; - var cby = _cby; - var cbx = _cbx; + let acc = _acc; + let cby = _cby; + let cbx = _cbx; if (blockw - cbx < 33) { return acc; } @@ -3021,11 +3021,11 @@ function generate_block_locs(blockw, blockh, _cbx, _cby, _acc) { _cby = cby + 1; continue ; } - var prob = Stdlib__Random.$$int(100); + let prob = Stdlib__Random.$$int(100); if (prob < 5) { - var newacc = choose_block_pattern(blockw, blockh, cbx, cby, prob); - var undup_lst = avoid_overlap(newacc, acc); - var called_acc = Stdlib.$at(acc, undup_lst); + let newacc = choose_block_pattern(blockw, blockh, cbx, cby, prob); + let undup_lst = avoid_overlap(newacc, acc); + let called_acc = Stdlib.$at(acc, undup_lst); _acc = called_acc; _cby = cby + 1; continue ; @@ -3047,14 +3047,14 @@ function generate_panel(context, blockw, blockh) { function generate_ground(blockw, blockh, _inc, _acc) { while(true) { - var acc = _acc; - var inc = _inc; + let acc = _acc; + let inc = _inc; if (inc > blockw) { return acc; } if (inc > 10) { - var skip = Stdlib__Random.$$int(10); - var newacc = Stdlib.$at(acc, { + let skip = Stdlib__Random.$$int(10); + let newacc = Stdlib.$at(acc, { hd: [ 4, [ @@ -3072,7 +3072,7 @@ function generate_ground(blockw, blockh, _inc, _acc) { _inc = inc + 1; continue ; } - var newacc$1 = Stdlib.$at(acc, { + let newacc$1 = Stdlib.$at(acc, { hd: [ 4, [ @@ -3092,9 +3092,9 @@ function convert_to_block_obj(lst, context) { if (!lst) { return /* [] */0; } - var h = lst.hd; - var sblock_typ = choose_sblock_typ(h[0]); - var ob = spawn({ + let h = lst.hd; + let sblock_typ = choose_sblock_typ(h[0]); + let ob = spawn({ TAG: /* SBlock */3, _0: sblock_typ }, context, h[1]); @@ -3108,9 +3108,9 @@ function convert_to_enemy_obj(lst, context) { if (!lst) { return /* [] */0; } - var h = lst.hd; - var senemy_typ = choose_enemy_typ(h[0]); - var ob = spawn({ + let h = lst.hd; + let senemy_typ = choose_enemy_typ(h[0]); + let ob = spawn({ TAG: /* SEnemy */1, _0: senemy_typ }, context, h[1]); @@ -3124,7 +3124,7 @@ function convert_to_coin_obj(lst, context) { if (!lst) { return /* [] */0; } - var ob = spawn({ + let ob = spawn({ TAG: /* SItem */2, _0: /* Coin */3 }, context, lst.hd[1]); @@ -3135,23 +3135,23 @@ function convert_to_coin_obj(lst, context) { } function generate_helper(blockw, blockh, cx, cy, context) { - var block_locs = generate_block_locs(blockw, blockh, 0, 0, /* [] */0); - var converted_block_locs = trim_edges(convert_list(block_locs), blockw, blockh); - var obj_converted_block_locs = convert_to_block_obj(converted_block_locs, context); - var ground_blocks = generate_ground(blockw, blockh, 0, /* [] */0); - var obj_converted_ground_blocks = convert_to_block_obj(ground_blocks, context); - var block_locations = Stdlib.$at(block_locs, ground_blocks); - var all_blocks = Stdlib.$at(obj_converted_block_locs, obj_converted_ground_blocks); - var enemy_locs = generate_enemies(blockw, blockh, 0, 0, block_locations); - var obj_converted_enemies = convert_to_enemy_obj(enemy_locs, context); - var coin_locs = generate_coins(converted_block_locs); - var undup_coin_locs = trim_edges(avoid_overlap(coin_locs, converted_block_locs), blockw, blockh); - var converted_block_coin_locs = Stdlib.$at(converted_block_locs, coin_locs); - var enemy_block_locs = generate_block_enemies(converted_block_locs); - var undup_enemy_block_locs = avoid_overlap(enemy_block_locs, converted_block_coin_locs); - var obj_enemy_blocks = convert_to_enemy_obj(undup_enemy_block_locs, context); - var coin_objects = convert_to_coin_obj(undup_coin_locs, context); - var obj_panel = generate_panel(context, blockw, blockh); + let block_locs = generate_block_locs(blockw, blockh, 0, 0, /* [] */0); + let converted_block_locs = trim_edges(convert_list(block_locs), blockw, blockh); + let obj_converted_block_locs = convert_to_block_obj(converted_block_locs, context); + let ground_blocks = generate_ground(blockw, blockh, 0, /* [] */0); + let obj_converted_ground_blocks = convert_to_block_obj(ground_blocks, context); + let block_locations = Stdlib.$at(block_locs, ground_blocks); + let all_blocks = Stdlib.$at(obj_converted_block_locs, obj_converted_ground_blocks); + let enemy_locs = generate_enemies(blockw, blockh, 0, 0, block_locations); + let obj_converted_enemies = convert_to_enemy_obj(enemy_locs, context); + let coin_locs = generate_coins(converted_block_locs); + let undup_coin_locs = trim_edges(avoid_overlap(coin_locs, converted_block_locs), blockw, blockh); + let converted_block_coin_locs = Stdlib.$at(converted_block_locs, coin_locs); + let enemy_block_locs = generate_block_enemies(converted_block_locs); + let undup_enemy_block_locs = avoid_overlap(enemy_block_locs, converted_block_coin_locs); + let obj_enemy_blocks = convert_to_enemy_obj(undup_enemy_block_locs, context); + let coin_objects = convert_to_coin_obj(undup_coin_locs, context); + let obj_panel = generate_panel(context, blockw, blockh); return Stdlib.$at(all_blocks, Stdlib.$at(obj_converted_enemies, Stdlib.$at(coin_objects, Stdlib.$at(obj_enemy_blocks, { hd: obj_panel, tl: /* [] */0 @@ -3159,10 +3159,10 @@ function generate_helper(blockw, blockh, cx, cy, context) { } function generate(w, h, context) { - var blockw = w / 16; - var blockh = h / 16 - 1; - var collide_list = generate_helper(blockw, blockh, 0, 0, context); - var player = spawn({ + let blockw = w / 16; + let blockh = h / 16 - 1; + let collide_list = generate_helper(blockw, blockh, 0, 0, context); + let player = spawn({ TAG: /* SPlayer */0, _0: /* SmallM */1, _1: /* Standing */0 @@ -3180,20 +3180,20 @@ function init(param) { Stdlib__Random.self_init(undefined); } -var Procedural_generator = { +let Procedural_generator = { init: init, generate: generate }; -var loadCount = { +let loadCount = { contents: 0 }; function load(param) { Stdlib__Random.self_init(undefined); - var canvas_id = "canvas"; - var el = document.getElementById(canvas_id); - var canvas; + let canvas_id = "canvas"; + let el = document.getElementById(canvas_id); + let canvas; if (el !== null) { canvas = el; } else { @@ -3218,7 +3218,7 @@ function load(param) { _1: "fail" }); } - var context = canvas.getContext("2d"); + let context = canvas.getContext("2d"); document.addEventListener("keydown", keydown, true); document.addEventListener("keyup", keyup, true); Stdlib__Random.self_init(undefined); @@ -3239,8 +3239,8 @@ function inc_counter(param) { function preload(param) { return Stdlib__List.map((function (img_src) { - var img_src$1 = "sprites/" + img_src; - var img = document.createElement("img"); + let img_src$1 = "sprites/" + img_src; + let img = document.createElement("img"); img.src = img_src$1; img.addEventListener("load", (function (ev) { inc_counter(undefined); @@ -3266,7 +3266,7 @@ window.onload = (function (param) { return true; }); -var Main = { +let Main = { loadCount: loadCount, imgsToLoad: 4, level_width: 2400, diff --git a/jscomp/test/dist/jscomp/test/match_case_test.js b/jscomp/test/dist/jscomp/test/match_case_test.js index 3d7a4c3571..2a41079fd7 100644 --- a/jscomp/test/dist/jscomp/test/match_case_test.js +++ b/jscomp/test/dist/jscomp/test/match_case_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/mel_267_test.js b/jscomp/test/dist/jscomp/test/mel_267_test.js index db8610170d..5c5251eb55 100644 --- a/jscomp/test/dist/jscomp/test/mel_267_test.js +++ b/jscomp/test/dist/jscomp/test/mel_267_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function i(obj, s) { return Curry._1(obj.prop, s); } function f(obj, s) { - var p = obj.prop; + let p = obj.prop; return Curry._1(p, s); } diff --git a/jscomp/test/dist/jscomp/test/method_name_test.js b/jscomp/test/dist/jscomp/test/method_name_test.js index e888bbadbe..40062ef15a 100644 --- a/jscomp/test/dist/jscomp/test/method_name_test.js +++ b/jscomp/test/dist/jscomp/test/method_name_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -43,11 +43,11 @@ function ff(x, i, v) { return x._open(3); } -var u = { +let u = { "Content'type": "x" }; -var h = { +let h = { open: 3, end: 32 }; diff --git a/jscomp/test/dist/jscomp/test/minimal_test.js b/jscomp/test/dist/jscomp/test/minimal_test.js index 553b26e4df..c15b4103df 100644 --- a/jscomp/test/dist/jscomp/test/minimal_test.js +++ b/jscomp/test/dist/jscomp/test/minimal_test.js @@ -2,7 +2,7 @@ 'use strict'; -var fake_y = { +let fake_y = { hd: 2, tl: { hd: 3, @@ -10,7 +10,7 @@ var fake_y = { } }; -var fake_z = { +let fake_z = { hd: 1, tl: fake_y }; diff --git a/jscomp/test/dist/jscomp/test/miss_colon_test.js b/jscomp/test/dist/jscomp/test/miss_colon_test.js index 8f2e15c4ac..c2ba6952a4 100644 --- a/jscomp/test/dist/jscomp/test/miss_colon_test.js +++ b/jscomp/test/dist/jscomp/test/miss_colon_test.js @@ -4,10 +4,10 @@ function $plus$colon(_f, _g) { while(true) { - var g = _g; - var f = _f; + let g = _g; + let f = _f; if (f.TAG === /* Int */0) { - var n = f._0; + let n = f._0; if (g.TAG === /* Int */0) { return { TAG: /* Int */0, @@ -48,12 +48,12 @@ function $plus$colon(_f, _g) { function $star$colon(_f, _g) { while(true) { - var g = _g; - var f = _f; - var exit = 0; - var exit$1 = 0; + let g = _g; + let f = _f; + let exit = 0; + let exit$1 = 0; if (f.TAG === /* Int */0) { - var n = f._0; + let n = f._0; if (g.TAG === /* Int */0) { return { TAG: /* Int */0, diff --git a/jscomp/test/dist/jscomp/test/mock_mt.js b/jscomp/test/dist/jscomp/test/mock_mt.js index 69661e79ff..a3a92cf335 100644 --- a/jscomp/test/dist/jscomp/test/mock_mt.js +++ b/jscomp/test/dist/jscomp/test/mock_mt.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); function from_pair_suites(name, suites) { console.log([ @@ -10,8 +10,8 @@ function from_pair_suites(name, suites) { "testing" ]); Stdlib__List.iter((function (param) { - var name = param[0]; - var fn = Curry._1(param[1], undefined); + let name = param[0]; + let fn = Curry._1(param[1], undefined); switch (fn.TAG | 0) { case /* Eq */0 : console.log([ diff --git a/jscomp/test/dist/jscomp/test/module_alias_test.js b/jscomp/test/dist/jscomp/test/module_alias_test.js index 585cfad8f0..4a619b128d 100644 --- a/jscomp/test/dist/jscomp/test/module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/module_alias_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -36,9 +36,9 @@ function f(x) { return Stdlib__List; } -var h = f(/* [] */0); +let h = f(/* [] */0); -var a = Curry._1(h.length, { +let a = Curry._1(h.length, { hd: 1, tl: { hd: 2, diff --git a/jscomp/test/dist/jscomp/test/module_as_class_ffi.js b/jscomp/test/dist/jscomp/test/module_as_class_ffi.js index f70f28487c..34203445c5 100644 --- a/jscomp/test/dist/jscomp/test/module_as_class_ffi.js +++ b/jscomp/test/dist/jscomp/test/module_as_class_ffi.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Foo_class = require("xx/foo_class"); +let Foo_class = require("xx/foo_class"); function f(param) { return new Foo_class(3); diff --git a/jscomp/test/dist/jscomp/test/module_as_function.js b/jscomp/test/dist/jscomp/test/module_as_function.js index ef38413840..6f71e64187 100644 --- a/jscomp/test/dist/jscomp/test/module_as_function.js +++ b/jscomp/test/dist/jscomp/test/module_as_function.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Nightmare = require("nightmare"); +let Nightmare = require("nightmare"); -var v = Nightmare({ +let v = Nightmare({ show: true }); diff --git a/jscomp/test/dist/jscomp/test/module_equality_stdlib_test.js b/jscomp/test/dist/jscomp/test/module_equality_stdlib_test.js index dd0185e0c8..e101dfda7f 100644 --- a/jscomp/test/dist/jscomp/test/module_equality_stdlib_test.js +++ b/jscomp/test/dist/jscomp/test/module_equality_stdlib_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Stdlib__Format = require("melange/format.js"); +let Stdlib__Format = require("melange/format.js"); function write_runtime_coverage(channel) { Stdlib__Format.formatter_of_out_channel(channel); diff --git a/jscomp/test/dist/jscomp/test/module_missing_conversion.js b/jscomp/test/dist/jscomp/test/module_missing_conversion.js index 450ea2b270..8cdc81d075 100644 --- a/jscomp/test/dist/jscomp/test/module_missing_conversion.js +++ b/jscomp/test/dist/jscomp/test/module_missing_conversion.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__MoreLabels = require("melange/moreLabels.js"); -var Stdlib__String = require("melange/string.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__MoreLabels = require("melange/moreLabels.js"); +let Stdlib__String = require("melange/string.js"); function f(x) { return x; } -var XX = { +let XX = { init: Stdlib__Array.init, make_matrix: Stdlib__Array.make_matrix, append: Stdlib__Array.append, @@ -54,11 +54,11 @@ var XX = { f: f }; -var u = [Stdlib__String]; +let u = [Stdlib__String]; -var ghh = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); +let ghh = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); -var hh = 1; +let hh = 1; exports.XX = XX; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/module_parameter_test.js b/jscomp/test/dist/jscomp/test/module_parameter_test.js index bdad1a3017..db1afcf21c 100644 --- a/jscomp/test/dist/jscomp/test/module_parameter_test.js +++ b/jscomp/test/dist/jscomp/test/module_parameter_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib__String = require("melange/string.js"); +let Mt = require("./mt.js"); +let Stdlib__String = require("melange/string.js"); function u(v) { return v; } -var s = Stdlib__String; +let s = Stdlib__String; -var N = { +let N = { s: s }; @@ -18,7 +18,7 @@ function v(x) { return x.length; } -var suites_0 = [ +let suites_0 = [ "const", (function (param) { return { @@ -29,7 +29,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "other", (function (param) { @@ -43,14 +43,14 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; Mt.from_pair_suites("Module_parameter_test", suites); -var v0 = 1; +let v0 = 1; exports.u = u; exports.N = N; diff --git a/jscomp/test/dist/jscomp/test/module_splice_test.js b/jscomp/test/dist/jscomp/test/module_splice_test.js index 763c22e47c..cb2fed8906 100644 --- a/jscomp/test/dist/jscomp/test/module_splice_test.js +++ b/jscomp/test/dist/jscomp/test/module_splice_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var JoinClasses = require("./joinClasses"); -var Caml_splice_call = require("melange.js/caml_splice_call.js"); -var Mt = require("./mt.js"); +let JoinClasses = require("./joinClasses"); +let Caml_splice_call = require("melange.js/caml_splice_call.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -36,9 +36,9 @@ function joinClasses(prim) { return Caml_splice_call.spliceApply(JoinClasses, [prim]); } -var a = JoinClasses(1, 2, 3); +let a = JoinClasses(1, 2, 3); -var pair = [ +let pair = [ a, 6 ]; diff --git a/jscomp/test/dist/jscomp/test/more_poly_variant_test.js b/jscomp/test/dist/jscomp/test/more_poly_variant_test.js index 2b3fab1eae..171e4d05bd 100644 --- a/jscomp/test/dist/jscomp/test/more_poly_variant_test.js +++ b/jscomp/test/dist/jscomp/test/more_poly_variant_test.js @@ -6,7 +6,7 @@ function map(f, param) { if (typeof param === "string") { return "Nil"; } - var match = param.VAL; + let match = param.VAL; return { NAME: "Cons", VAL: [ diff --git a/jscomp/test/dist/jscomp/test/mpr_6033_test.js b/jscomp/test/dist/jscomp/test/mpr_6033_test.js index d651d8b44d..4e6dd7d396 100644 --- a/jscomp/test/dist/jscomp/test/mpr_6033_test.js +++ b/jscomp/test/dist/jscomp/test/mpr_6033_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Mt = require("./mt.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,18 +30,18 @@ function eq(loc, x, y) { } function f(x) { - var y = CamlinternalLazy.force(x); + let y = CamlinternalLazy.force(x); return y + "abc"; } -var x = { +let x = { LAZY_DONE: true, VAL: "def" }; CamlinternalLazy.force(x); -var u = f(x); +let u = f(x); eq("File \"jscomp/test/mpr_6033_test.ml\", line 20, characters 6-13", u, "defabc"); diff --git a/jscomp/test/dist/jscomp/test/mt.js b/jscomp/test/dist/jscomp/test/mt.js index 25d541960f..00319cc7f8 100644 --- a/jscomp/test/dist/jscomp/test/mt.js +++ b/jscomp/test/dist/jscomp/test/mt.js @@ -1,27 +1,27 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); -var Assert = require("assert"); -var Path = require("path"); -var Process = require("process"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); +let Assert = require("assert"); +let Path = require("path"); +let Process = require("process"); function assert_fail(msg) { Assert.fail(undefined, undefined, msg, ""); } function is_mocha(param) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (!match) { return false; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return false; } - var exec = Path.basename(match$1.hd); + let exec = Path.basename(match$1.hd); if (exec === "mocha") { return true; } else { @@ -30,11 +30,11 @@ function is_mocha(param) { } function from_suites(name, suite) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match && is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var partial_arg = param[1]; + let partial_arg = param[1]; it(param[0], (function () { return Curry._1(partial_arg, undefined); })); @@ -46,7 +46,7 @@ function from_suites(name, suite) { } function close_enough(thresholdOpt, a, b) { - var threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; + let threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; return Math.abs(a - b) < threshold; } @@ -68,8 +68,8 @@ function handleCode(spec) { Assert.ok(spec._0); return ; case /* Approx */5 : - var b = spec._1; - var a = spec._0; + let b = spec._1; + let a = spec._0; if (!close_enough(undefined, a, b)) { Assert.deepEqual(a, b); return ; @@ -77,8 +77,8 @@ function handleCode(spec) { return ; } case /* ApproxThreshold */6 : - var b$1 = spec._2; - var a$1 = spec._1; + 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 ; @@ -97,12 +97,12 @@ function handleCode(spec) { } function from_pair_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { return handleCode(Curry._1(code, undefined)); })); @@ -115,8 +115,8 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - var name = param[0]; - var _fn = Curry._1(param[1], undefined); + let name = param[0]; + let _fn = Curry._1(param[1], undefined); switch (_fn.TAG | 0) { case /* Eq */0 : console.log([ @@ -192,15 +192,15 @@ function from_pair_suites(name, suites) { } -var val_unit = Promise.resolve(undefined); +let val_unit = Promise.resolve(undefined); function from_promise_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { return code.then(function (x) { handleCode(x); diff --git a/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js b/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js index 6192afcbbc..9b153b39aa 100644 --- a/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js +++ b/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,13 +18,13 @@ function eqs(loc, x, y) { } function eq(param, param$1) { - var x = param.contents; - var y = param$1.contents; + let x = param.contents; + let y = param$1.contents; return x === y; } function eq2(x, param) { - var y = param.contents; + let y = param.contents; return Caml_obj.caml_equal(x.contents, y); } @@ -40,15 +40,15 @@ eqs("File \"jscomp/test/mutable_uncurry_test.ml\", line 16, characters 7-14", tr contents: 2 })); -var u = { +let u = { hi: (function (param, param$1) { - var x = param.contents; - var y = param$1.contents; + let x = param.contents; + let y = param$1.contents; return x === y; }) }; -var h = u.hi({ +let h = u.hi({ contents: 1 }, { contents: 2 @@ -57,9 +57,9 @@ var h = u.hi({ eqs("File \"jscomp/test/mutable_uncurry_test.ml\", line 26, characters 7-14", h, false); function ut3(param, param$1, param$2) { - var x0 = param.contents; - var x1 = param$1.contents; - var x2 = param$2.contents; + let x0 = param.contents; + let x1 = param$1.contents; + let x2 = param$2.contents; return [ x0, x1, @@ -68,11 +68,11 @@ function ut3(param, param$1, param$2) { } function t3(param) { - var x0 = param.contents; + let x0 = param.contents; return function (param) { - var x1 = param.contents; + let x1 = param.contents; return function (param) { - var x2 = param.contents; + let x2 = param.contents; return [ x0, x1, @@ -83,12 +83,12 @@ function t3(param) { } function ut4(param, param$1, param$2, param$3) { - var x0 = param.contents; - var x1 = param$1.contents; + let x0 = param.contents; + let x1 = param$1.contents; return Curry._2((function (param) { - var x2 = param.contents; + let x2 = param.contents; return function (param) { - var x3 = param.contents; + let x3 = param.contents; return [ x0, x1, @@ -100,13 +100,13 @@ function ut4(param, param$1, param$2, param$3) { } function t4(param) { - var x0 = param.contents; + let x0 = param.contents; return function (param) { - var x1 = param.contents; + let x1 = param.contents; return function (param) { - var x2 = param.contents; + let x2 = param.contents; return function (param) { - var x3 = param.contents; + let x3 = param.contents; return [ x0, x1, @@ -119,14 +119,14 @@ function t4(param) { } function ut5(param, param$1, param$2, param$3, param$4) { - var x0 = param.contents; - var x1 = param$1.contents; + let x0 = param.contents; + let x1 = param$1.contents; return Curry._3((function (param) { - var x2 = param.contents; + let x2 = param.contents; return function (param) { - var x3 = param.contents; + let x3 = param.contents; return function (param) { - var x4 = param.contents; + let x4 = param.contents; return [ x0, x1, @@ -140,15 +140,15 @@ function ut5(param, param$1, param$2, param$3, param$4) { } function t5(param) { - var x0 = param.contents; + let x0 = param.contents; return function (param) { - var x1 = param.contents; + let x1 = param.contents; return function (param) { - var x2 = param.contents; + let x2 = param.contents; return function (param) { - var x3 = param.contents; + let x3 = param.contents; return function (param) { - var x4 = param.contents; + let x4 = param.contents; return [ x0, x1, @@ -163,16 +163,16 @@ function t5(param) { } function nested0(param, param$1, param$2) { - var x0 = param.contents; - var x1 = param$1.contents; - var x2 = param$2.contents; - var a = (x0 + x1 | 0) + x2 | 0; + let x0 = param.contents; + let x1 = param$1.contents; + let x2 = param$2.contents; + let a = (x0 + x1 | 0) + x2 | 0; return function (param) { - var x0 = param.contents; + let x0 = param.contents; return function (param) { - var x1 = param.contents; + let x1 = param.contents; return function (param) { - var x2 = param.contents; + let x2 = param.contents; return ((a + x0 | 0) + x1 | 0) + x2 | 0; }; }; @@ -180,16 +180,16 @@ function nested0(param, param$1, param$2) { } function nested1(param) { - var x0 = param.contents; + let x0 = param.contents; return function (param) { - var x1 = param.contents; + let x1 = param.contents; return function (param) { - var x2 = param.contents; - var a = (x0 + x1 | 0) + x2 | 0; + let x2 = param.contents; + let a = (x0 + x1 | 0) + x2 | 0; return function (param, param$1, param$2) { - var x0 = param.contents; - var x1 = param$1.contents; - var x2 = param$2.contents; + let x0 = param.contents; + let x1 = param$1.contents; + let x2 = param$2.contents; return ((a + x0 | 0) + x1 | 0) + x2 | 0; }; }; diff --git a/jscomp/test/dist/jscomp/test/mutual_non_recursive_type.js b/jscomp/test/dist/jscomp/test/mutual_non_recursive_type.js index 36c51c723c..0c134ad6cc 100644 --- a/jscomp/test/dist/jscomp/test/mutual_non_recursive_type.js +++ b/jscomp/test/dist/jscomp/test/mutual_non_recursive_type.js @@ -6,11 +6,11 @@ function f(x) { return x; } -var U = { +let U = { f: f }; -var v = /* H */{ +let v = /* H */{ _0: /* OT */0 }; diff --git a/jscomp/test/dist/jscomp/test/name_mangle_test.js b/jscomp/test/dist/jscomp/test/name_mangle_test.js index c5d4508bcf..72d6b70438 100644 --- a/jscomp/test/dist/jscomp/test/name_mangle_test.js +++ b/jscomp/test/dist/jscomp/test/name_mangle_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -29,79 +29,79 @@ function eq(loc, x, y) { } function f0(x) { - var old = x.open; + let old = x.open; x.open = old + 1 | 0; return x.open; } function f1(x) { - var old = x.in; + let old = x.in; x.in = old + 1 | 0; return x.in; } function f2(x) { - var old = x.MAX_LENGTH; + let old = x.MAX_LENGTH; x.MAX_LENGTH = old + 1 | 0; return x.MAX_LENGTH; } function f3(x) { - var old = x.Capital; + let old = x.Capital; x.Capital = old + 1 | 0; return x.Capital; } function f4(x) { - var old = x._open; + let old = x._open; x._open = old + 1 | 0; return x._open; } function f5(x) { - var old = x.open; + let old = x.open; x.open = old + 1 | 0; return x.open; } function f6(x) { - var old = x["'x"]; + let old = x["'x"]; x["'x"] = old + 1 | 0; return x["'x"]; } function f7(x) { - var old = x._Capital; + let old = x._Capital; x._Capital = old + 1 | 0; return x._Capital; } function f8(x) { - var old = x._MAX; + let old = x._MAX; x._MAX = old + 1 | 0; return x._MAX; } function f9(x) { - var old = x.__; + let old = x.__; x.__ = old + 1 | 0; return x.__; } function f10(x) { - var old = x.__x; + let old = x.__x; x.__x = old + 1 | 0; return x.__x; } function f11(x) { - var old = x._; + let old = x._; x._ = old + 1 | 0; return x._; } function f12(x) { - var old = x.__; + let old = x.__; x.__ = old + 1 | 0; return x.__; } diff --git a/jscomp/test/dist/jscomp/test/nested_module_alias.js b/jscomp/test/dist/jscomp/test/nested_module_alias.js index c884f8cbf5..76b79ad7ba 100644 --- a/jscomp/test/dist/jscomp/test/nested_module_alias.js +++ b/jscomp/test/dist/jscomp/test/nested_module_alias.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Stdlib__List = require("melange/list.js"); +let Stdlib__List = require("melange/list.js"); function v(x) { return [ diff --git a/jscomp/test/dist/jscomp/test/nested_obj_literal.js b/jscomp/test/dist/jscomp/test/nested_obj_literal.js index 3ca60ca4e6..6ac81bf96e 100644 --- a/jscomp/test/dist/jscomp/test/nested_obj_literal.js +++ b/jscomp/test/dist/jscomp/test/nested_obj_literal.js @@ -2,7 +2,7 @@ 'use strict'; -var structural_obj = { +let structural_obj = { x: { y: { z: 3 @@ -10,7 +10,7 @@ var structural_obj = { } }; -var f_record = { +let f_record = { x: { y: { z: 3 diff --git a/jscomp/test/dist/jscomp/test/nested_obj_test.js b/jscomp/test/dist/jscomp/test/nested_obj_test.js index 336582398d..0b3e6789ab 100644 --- a/jscomp/test/dist/jscomp/test/nested_obj_test.js +++ b/jscomp/test/dist/jscomp/test/nested_obj_test.js @@ -2,7 +2,7 @@ 'use strict'; -var f = { +let f = { x: { y: { z: 3 @@ -10,7 +10,7 @@ var f = { } }; -var f2_0 = { +let f2_0 = { hd: { x: { y: { @@ -30,7 +30,7 @@ var f2_0 = { } }; -var f2_1 = [ +let f2_1 = [ { x: { y: { @@ -47,12 +47,12 @@ var f2_1 = [ } ]; -var f2 = [ +let f2 = [ f2_0, f2_1 ]; -var f3 = { +let f3 = { x: { y: { z: 3 @@ -60,7 +60,7 @@ var f3 = { } }; -var f_record = { +let f_record = { x: { y: { z: 3 diff --git a/jscomp/test/dist/jscomp/test/nested_pattern_match_test.js b/jscomp/test/dist/jscomp/test/nested_pattern_match_test.js index 99eec0c405..7b826015fb 100644 --- a/jscomp/test/dist/jscomp/test/nested_pattern_match_test.js +++ b/jscomp/test/dist/jscomp/test/nested_pattern_match_test.js @@ -6,23 +6,23 @@ function f_list(x) { if (!x) { return 0; } - var match = x.tl; + let match = x.tl; if (!match) { return 0; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return 0; } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (!match$2) { return 0; } - var match$3 = match$2.tl; + let match$3 = match$2.tl; if (!match$3) { return 0; } - var match$4 = match$3.tl; + let match$4 = match$3.tl; if (match$4) { return ((((x.hd + match.hd | 0) + match$1.hd | 0) + match$2.hd | 0) + match$3.hd | 0) + match$4.hd | 0; } else { @@ -34,101 +34,101 @@ function f_arr(x) { if (x.length !== 6) { return 0; } - var a0 = x[0]; - var a1 = x[1]; - var a2 = x[2]; - var a3 = x[3]; - var a4 = x[4]; - var a5 = x[5]; + let a0 = x[0]; + let a1 = x[1]; + let a2 = x[2]; + let a3 = x[3]; + let a4 = x[4]; + let a5 = x[5]; return ((((a0 + a1 | 0) + a2 | 0) + a3 | 0) + a4 | 0) + a5 | 0; } function f_opion(x) { - var match = x.hi; + let match = x.hi; if (match !== 2) { if (match !== 3) { return 0; } - var match$1 = x.lo; + let match$1 = x.lo; if (!match$1) { return 0; } if (match$1.hd !== undefined) { return 0; } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (!match$2) { return 0; } if (match$2.hd !== undefined) { return 0; } - var match$3 = match$2.tl; + let match$3 = match$2.tl; if (!match$3) { return 0; } - var match$4 = match$3.hd; + let match$4 = match$3.hd; if (match$4 === undefined) { return 0; } if (match$4 !== 2) { return 0; } - var match$5 = match$3.tl; + let match$5 = match$3.tl; if (!match$5) { return 0; } - var match$6 = match$5.hd; + let match$6 = match$5.hd; if (match$6 === undefined) { return 0; } if (match$6 !== 1) { return 0; } - var match$7 = match$5.tl; + let match$7 = match$5.tl; if (match$7 && match$7.hd !== undefined) { return 2; } else { return 0; } } - var match$8 = x.lo; + let match$8 = x.lo; if (!match$8) { return 0; } if (match$8.hd !== undefined) { return 0; } - var match$9 = match$8.tl; + let match$9 = match$8.tl; if (!match$9) { return 0; } if (match$9.hd !== undefined) { return 0; } - var match$10 = match$9.tl; + let match$10 = match$9.tl; if (!match$10) { return 0; } - var match$11 = match$10.hd; + let match$11 = match$10.hd; if (match$11 === undefined) { return 0; } if (match$11 !== 2) { return 0; } - var match$12 = match$10.tl; + let match$12 = match$10.tl; if (!match$12) { return 0; } - var match$13 = match$12.hd; + let match$13 = match$12.hd; if (match$13 === undefined) { return 0; } if (match$13 !== 1) { return 0; } - var match$14 = match$12.tl; + let match$14 = match$12.tl; if (match$14 && match$14.hd !== undefined) { return 3; } else { diff --git a/jscomp/test/dist/jscomp/test/noassert.js b/jscomp/test/dist/jscomp/test/noassert.js index 1ca414b1d3..07c0820add 100644 --- a/jscomp/test/dist/jscomp/test/noassert.js +++ b/jscomp/test/dist/jscomp/test/noassert.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/node_fs_test.js b/jscomp/test/dist/jscomp/test/node_fs_test.js index 3cb974d4d7..57c412ab66 100644 --- a/jscomp/test/dist/jscomp/test/node_fs_test.js +++ b/jscomp/test/dist/jscomp/test/node_fs_test.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Fs = require("fs"); +let Fs = require("fs"); -var f = typeof __filename === "undefined" ? undefined : __filename; +let f = typeof __filename === "undefined" ? undefined : __filename; if (f !== undefined) { console.log(Fs.readFileSync(f, "utf8")); diff --git a/jscomp/test/dist/jscomp/test/node_path_test.js b/jscomp/test/dist/jscomp/test/node_path_test.js index 4fad376a32..b805b1c6cc 100644 --- a/jscomp/test/dist/jscomp/test/node_path_test.js +++ b/jscomp/test/dist/jscomp/test/node_path_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Path = require("path"); +let Path = require("path"); console.log(Path.join(".", "Node_path_test")); diff --git a/jscomp/test/dist/jscomp/test/number_lexer.js b/jscomp/test/dist/jscomp/test/number_lexer.js index 133eaf281b..29f5abd26b 100644 --- a/jscomp/test/dist/jscomp/test/number_lexer.js +++ b/jscomp/test/dist/jscomp/test/number_lexer.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Lexing = require("melange/lexing.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Lexing = require("melange/lexing.js"); function l(prim) { console.log(prim); } -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xf6\xff\xf7\xff\xf8\xff\xf9\xff\xfa\xff\xfb\xff\xfc\xff:\0\x85\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\x01\0\xff\xff", lex_default: "\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0", @@ -24,8 +24,8 @@ var __ocaml_lex_tables = { function __ocaml_lex_token_rec(l, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : Curry._1(l, "new line"); diff --git a/jscomp/test/dist/jscomp/test/obj_curry_test.js b/jscomp/test/dist/jscomp/test/obj_curry_test.js index eeb4cc220d..c5341181ee 100644 --- a/jscomp/test/dist/jscomp/test/obj_curry_test.js +++ b/jscomp/test/dist/jscomp/test/obj_curry_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); function f(o) { return Caml_oo_curry.js4(23297, 1, o, 1, 2, 3); } -var $$class = CamlinternalOO.create_table(["hi"]); +let $$class = CamlinternalOO.create_table(["hi"]); -var hi = CamlinternalOO.get_method_label($$class, "hi"); +let hi = CamlinternalOO.get_method_label($$class, "hi"); -var a = f((CamlinternalOO.set_method($$class, hi, (function (self$1, x, y, z) { +let a = f((CamlinternalOO.set_method($$class, hi, (function (self$1, x, y, z) { return (x + y | 0) + z | 0; })), CamlinternalOO.init_class($$class), CamlinternalOO.create_object_opt(undefined, $$class))); diff --git a/jscomp/test/dist/jscomp/test/obj_literal_ppx.js b/jscomp/test/dist/jscomp/test/obj_literal_ppx.js index aa7d6d5ae8..703ec4ba87 100644 --- a/jscomp/test/dist/jscomp/test/obj_literal_ppx.js +++ b/jscomp/test/dist/jscomp/test/obj_literal_ppx.js @@ -2,12 +2,12 @@ 'use strict'; -var a = { +let a = { x: 3, y: [1] }; -var b = { +let b = { x: 3, y: [1], z: 3, @@ -24,11 +24,11 @@ function h(obj) { return obj.u(1, 2); } -var u = f(a); +let u = f(a); -var v = f(b); +let v = f(b); -var vv = h(b); +let vv = h(b); exports.a = a; exports.b = b; diff --git a/jscomp/test/dist/jscomp/test/obj_literal_ppx_test.js b/jscomp/test/dist/jscomp/test/obj_literal_ppx_test.js index 9efef1eee8..740919e038 100644 --- a/jscomp/test/dist/jscomp/test/obj_literal_ppx_test.js +++ b/jscomp/test/dist/jscomp/test/obj_literal_ppx_test.js @@ -2,7 +2,7 @@ 'use strict'; -var a = { +let a = { x: 3, y: { hd: 1, diff --git a/jscomp/test/dist/jscomp/test/obj_magic_test.js b/jscomp/test/dist/jscomp/test/obj_magic_test.js index 4008ed19bf..1b3ec5cc56 100644 --- a/jscomp/test/dist/jscomp/test/obj_magic_test.js +++ b/jscomp/test/dist/jscomp/test/obj_magic_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); function is_block(x) { return typeof x !== "number"; } -var suites_0 = [ +let suites_0 = [ "is_block_test1", (function (param) { return { @@ -18,7 +18,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "is_block_test2", (function (param) { @@ -59,7 +59,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/obj_repr_test.js b/jscomp/test/dist/jscomp/test/obj_repr_test.js index 0857de00ce..43f4a61495 100644 --- a/jscomp/test/dist/jscomp/test/obj_repr_test.js +++ b/jscomp/test/dist/jscomp/test/obj_repr_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var CamlinternalOO = require("melange/camlinternalOO.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); -var $$class = CamlinternalOO.create_table(0); +let $$class = CamlinternalOO.create_table(0); -var ids = CamlinternalOO.new_methods_variables($$class, 0, [ +let ids = CamlinternalOO.new_methods_variables($$class, 0, [ "x0", "x1", "x2", @@ -14,20 +14,20 @@ var ids = CamlinternalOO.new_methods_variables($$class, 0, [ "x5" ]); -var x0 = ids[0]; +let x0 = ids[0]; -var x1 = ids[1]; +let x1 = ids[1]; -var x2 = ids[2]; +let x2 = ids[2]; -var x3 = ids[3]; +let x3 = ids[3]; -var x4 = ids[4]; +let x4 = ids[4]; -var x5 = ids[5]; +let x5 = ids[5]; function obj_init(env) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[x0] = 1; self[x1] = 2; self[x2] = 3; @@ -39,7 +39,7 @@ function obj_init(env) { CamlinternalOO.init_class($$class); -var u = obj_init(undefined); +let u = obj_init(undefined); exports.u = u; /* class Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/obj_test.js b/jscomp/test/dist/jscomp/test/obj_test.js index 30ec7aabb1..a0bddb233f 100644 --- a/jscomp/test/dist/jscomp/test/obj_test.js +++ b/jscomp/test/dist/jscomp/test/obj_test.js @@ -1,28 +1,28 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = [ +let shared = [ "hi", "add" ]; -var shared$1 = [ +let shared$1 = [ "hi", "hello" ]; -var $$class = CamlinternalOO.create_table(shared$1); +let $$class = CamlinternalOO.create_table(shared$1); -var ids = CamlinternalOO.get_method_labels($$class, shared$1); +let ids = CamlinternalOO.get_method_labels($$class, shared$1); -var hi = ids[0]; +let hi = ids[0]; -var hello = ids[1]; +let hello = ids[1]; CamlinternalOO.set_methods($$class, [ hi, @@ -37,21 +37,21 @@ CamlinternalOO.set_methods($$class, [ CamlinternalOO.init_class($$class); -var vv = CamlinternalOO.create_object_opt(undefined, $$class); +let vv = CamlinternalOO.create_object_opt(undefined, $$class); -var $$class$1 = CamlinternalOO.create_table([ +let $$class$1 = CamlinternalOO.create_table([ "x", "y" ]); -var ids$1 = CamlinternalOO.get_method_labels($$class$1, [ +let ids$1 = CamlinternalOO.get_method_labels($$class$1, [ "y", "x" ]); -var y = ids$1[0]; +let y = ids$1[0]; -var x = ids$1[1]; +let x = ids$1[1]; CamlinternalOO.set_methods($$class$1, [ x, @@ -66,29 +66,29 @@ CamlinternalOO.set_methods($$class$1, [ CamlinternalOO.init_class($$class$1); -var v = CamlinternalOO.create_object_opt(undefined, $$class$1); +let v = CamlinternalOO.create_object_opt(undefined, $$class$1); -var $$class$2 = CamlinternalOO.create_table([ +let $$class$2 = CamlinternalOO.create_table([ "hi", "id1", "id2", "hello" ]); -var ids$2 = CamlinternalOO.get_method_labels($$class$2, [ +let ids$2 = CamlinternalOO.get_method_labels($$class$2, [ "id2", "id1", "hi", "hello" ]); -var id2 = ids$2[0]; +let id2 = ids$2[0]; -var id1 = ids$2[1]; +let id1 = ids$2[1]; -var hi$1 = ids$2[2]; +let hi$1 = ids$2[2]; -var hello$1 = ids$2[3]; +let hello$1 = ids$2[3]; CamlinternalOO.set_methods($$class$2, [ hi$1, @@ -111,11 +111,11 @@ CamlinternalOO.set_methods($$class$2, [ CamlinternalOO.init_class($$class$2); -var u = CamlinternalOO.create_object_opt(undefined, $$class$2); +let u = CamlinternalOO.create_object_opt(undefined, $$class$2); -var $$class$3 = CamlinternalOO.create_table(["id"]); +let $$class$3 = CamlinternalOO.create_table(["id"]); -var id = CamlinternalOO.get_method_label($$class$3, "id"); +let id = CamlinternalOO.get_method_label($$class$3, "id"); CamlinternalOO.set_method($$class$3, id, (function (self$4) { return "uu"; @@ -123,11 +123,11 @@ CamlinternalOO.set_method($$class$3, id, (function (self$4) { CamlinternalOO.init_class($$class$3); -var uu = CamlinternalOO.create_object_opt(undefined, $$class$3); +let uu = CamlinternalOO.create_object_opt(undefined, $$class$3); -var $$class$4 = CamlinternalOO.create_table(["add"]); +let $$class$4 = CamlinternalOO.create_table(["add"]); -var add = CamlinternalOO.get_method_label($$class$4, "add"); +let add = CamlinternalOO.get_method_label($$class$4, "add"); CamlinternalOO.set_method($$class$4, add, (function (self$5, x, y) { return x + y | 0; @@ -135,15 +135,15 @@ CamlinternalOO.set_method($$class$4, add, (function (self$5, x, y) { CamlinternalOO.init_class($$class$4); -var uuu = CamlinternalOO.create_object_opt(undefined, $$class$4); +let uuu = CamlinternalOO.create_object_opt(undefined, $$class$4); -var $$class$5 = CamlinternalOO.create_table(shared); +let $$class$5 = CamlinternalOO.create_table(shared); -var ids$3 = CamlinternalOO.get_method_labels($$class$5, shared); +let ids$3 = CamlinternalOO.get_method_labels($$class$5, shared); -var hi$2 = ids$3[0]; +let hi$2 = ids$3[0]; -var add$1 = ids$3[1]; +let add$1 = ids$3[1]; CamlinternalOO.set_methods($$class$5, [ add$1, @@ -158,9 +158,9 @@ CamlinternalOO.set_methods($$class$5, [ CamlinternalOO.init_class($$class$5); -var vvvv = CamlinternalOO.create_object_opt(undefined, $$class$5); +let vvvv = CamlinternalOO.create_object_opt(undefined, $$class$5); -var suites_0 = [ +let suites_0 = [ "single_obj", (function (param) { return { @@ -177,7 +177,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "single_obj_cache", (function (param) { @@ -329,7 +329,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js b/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js index 58174d55b8..a8db9ad4c4 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Curry = require("melange.js/curry.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Curry = require("melange.js/curry.js"); -var N = {}; +let N = {}; function forEach(xs, f) { Belt__Belt_Array.forEach(xs, (function (x) { @@ -12,7 +12,7 @@ function forEach(xs, f) { })); } -var Y = { +let Y = { forEach: forEach }; @@ -30,7 +30,7 @@ function g(X, xs) { })); } -var g_result = g(Y, []); +let g_result = g(Y, []); exports.N = N; exports.Y = Y; diff --git a/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js b/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js index c9a574469c..40d4ebb20b 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js @@ -1,60 +1,60 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Arg = require("melange/arg.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Parsing = require("melange/parsing.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); -var Assert = require("assert"); -var Path = require("path"); -var Process = require("process"); +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Arg = require("melange/arg.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Parsing = require("melange/parsing.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); +let Assert = require("assert"); +let Path = require("path"); +let Process = require("process"); try { Caml_sys.caml_sys_getenv("BSLIB"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } -var fast = { +let fast = { contents: false }; -var applicative_functors = { +let applicative_functors = { contents: true }; -var bs_vscode; +let bs_vscode; try { Caml_sys.caml_sys_getenv("BS_VSCODE"); @@ -64,11 +64,11 @@ catch (exn$1){ bs_vscode = false; } -var color = { +let color = { contents: undefined }; -var Fatal_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Misc.Fatal_error"); +let Fatal_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Misc.Fatal_error"); function fatal_error(msg) { Stdlib.prerr_string(">> Fatal error: "); @@ -79,7 +79,7 @@ function fatal_error(msg) { } function create_hashtable(size, init) { - var tbl = Stdlib__Hashtbl.create(undefined, size); + let tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { Stdlib__Hashtbl.add(tbl, param[0], param[1]); }), init); @@ -128,13 +128,13 @@ function code_of_style(param) { } function ansi_of_style_l(l) { - var s = l ? ( + let s = l ? ( l.tl ? Stdlib__String.concat(";", Stdlib__List.map(code_of_style, l)) : code_of_style(l.hd) ) : "0"; return "\x1b[" + (s + "m"); } -var default_styles = { +let default_styles = { error: { hd: /* Bold */0, tl: { @@ -161,7 +161,7 @@ var default_styles = { } }; -var cur_styles = { +let cur_styles = { contents: default_styles }; @@ -223,17 +223,17 @@ function style_of_tag(param) { } } -var color_enabled = { +let color_enabled = { contents: true }; function set_color_tag_handling(ppf) { - var functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); - var partial_arg = functions.mark_open_stag; - var partial_arg$1 = functions.mark_close_stag; - var functions$p_mark_open_stag = function (param) { + let functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); + let partial_arg = functions.mark_open_stag; + let partial_arg$1 = functions.mark_close_stag; + let functions$p_mark_open_stag = function (param) { try { - var style = style_of_tag(param); + let style = style_of_tag(param); if (color_enabled.contents) { return ansi_of_style_l(style); } else { @@ -241,14 +241,14 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_mark_close_stag = function (param) { + let functions$p_mark_close_stag = function (param) { try { style_of_tag(param); if (color_enabled.contents) { @@ -261,16 +261,16 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg$1, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_print_open_stag = functions.print_open_stag; - var functions$p_print_close_stag = functions.print_close_stag; - var functions$p = { + let functions$p_print_open_stag = functions.print_open_stag; + let functions$p_print_close_stag = functions.print_close_stag; + let functions$p = { mark_open_stag: functions$p_mark_open_stag, mark_close_stag: functions$p_mark_close_stag, print_open_stag: functions$p_print_open_stag, @@ -280,11 +280,11 @@ function set_color_tag_handling(ppf) { Stdlib__Format.pp_set_formatter_stag_functions(ppf, functions$p); } -var first = { +let first = { contents: true }; -var formatter_l_1 = { +let formatter_l_1 = { hd: Stdlib__Format.err_formatter, tl: { hd: Stdlib__Format.str_formatter, @@ -292,7 +292,7 @@ var formatter_l_1 = { } }; -var formatter_l = { +let formatter_l = { hd: Stdlib__Format.std_formatter, tl: formatter_l_1 }; @@ -302,7 +302,7 @@ function setup(o) { first.contents = false; Stdlib__Format.set_mark_tags(true); Stdlib__List.iter(set_color_tag_handling, formatter_l); - var tmp; + let tmp; if (o !== undefined) { switch (o) { case /* Always */1 : @@ -322,7 +322,7 @@ function setup(o) { } -var Misc_Color = { +let Misc_Color = { ansi_of_style_l: ansi_of_style_l, default_styles: default_styles, get_styles: get_styles, @@ -462,7 +462,7 @@ function loop(i) { } } -var letter_all = loop(104); +let letter_all = loop(104); function letter(param) { switch (param) { @@ -629,7 +629,7 @@ function letter(param) { } } -var current = { +let current = { contents: { active: Caml_array.make(105, true), error: Caml_array.make(105, false) @@ -641,27 +641,27 @@ function is_active(x) { } function parse_opt(error, active, flags, s) { - var set = function (i) { + let set = function (i) { Caml_array.set(flags, i, true); }; - var clear = function (i) { + let clear = function (i) { Caml_array.set(flags, i, false); }; - var set_all = function (i) { + let set_all = function (i) { Caml_array.set(active, i, true); Caml_array.set(error, i, true); }; - var get_num = function (_n, _i) { + let get_num = function (_n, _i) { while(true) { - var i = _i; - var n = _n; + let i = _i; + let n = _n; if (i >= s.length) { return [ i, n ]; } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match > 57 || match < 48) { return [ i, @@ -673,10 +673,10 @@ function parse_opt(error, active, flags, s) { continue ; }; }; - var get_range = function (i) { - var match = get_num(0, i); - var n1 = match[1]; - var i$1 = match[0]; + let get_range = function (i) { + let match = get_num(0, i); + let n1 = match[1]; + let i$1 = match[0]; if (!((i$1 + 2 | 0) < s.length && Caml_string.get(s, i$1) === /* '.' */46 && Caml_string.get(s, i$1 + 1 | 0) === /* '.' */46)) { return [ i$1, @@ -684,8 +684,8 @@ function parse_opt(error, active, flags, s) { n1 ]; } - var match$1 = get_num(0, i$1 + 2 | 0); - var n2 = match$1[1]; + let match$1 = get_num(0, i$1 + 2 | 0); + let n2 = match$1[1]; if (n2 < n1) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, @@ -698,13 +698,13 @@ function parse_opt(error, active, flags, s) { n2 ]; }; - var loop = function (_i) { + let loop = function (_i) { while(true) { - var i = _i; + let i = _i; if (i >= s.length) { return ; } - var c = Caml_string.get(s, i); + let c = Caml_string.get(s, i); if (c >= 65) { if (c >= 97) { if (c >= 123) { @@ -757,14 +757,14 @@ function parse_opt(error, active, flags, s) { } }; }; - var loop_letter_num = function (myset, i) { + let loop_letter_num = function (myset, i) { if (i >= s.length) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, _1: "Ill-formed list of warnings" }); } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match >= 65) { if (match >= 97) { if (match >= 123) { @@ -791,8 +791,8 @@ function parse_opt(error, active, flags, s) { _1: "Ill-formed list of warnings" }); } - var match$1 = get_range(i); - for(var n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ + let match$1 = get_range(i); + for(let n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ Curry._1(myset, n); } loop(match$1[0]); @@ -801,8 +801,8 @@ function parse_opt(error, active, flags, s) { } function parse_options(errflag, s) { - var error = Stdlib__Array.copy(current.contents.error); - var active = Stdlib__Array.copy(current.contents.active); + let error = Stdlib__Array.copy(current.contents.error); + let active = Stdlib__Array.copy(current.contents.active); parse_opt(error, active, errflag ? error : active, s); current.contents = { active: active, @@ -858,16 +858,16 @@ function message(param) { case /* Deprecated */0 : return "deprecated: " + param._0; case /* Fragile_match */1 : - var s = param._0; + let s = param._0; if (s === "") { return "this pattern-matching is fragile."; } else { return "this pattern-matching is fragile.\nIt will remain exhaustive when constructors are added to type " + (s + "."); } case /* Method_override */2 : - var match = param._0; + let match = param._0; if (match) { - var lab = match.hd; + let lab = match.hd; if (match.tl) { return Stdlib__String.concat(" ", { hd: "the following methods are overridden by the class", @@ -892,7 +892,7 @@ function message(param) { ] }); case /* Partial_match */3 : - var s$1 = param._0; + let s$1 = param._0; if (s$1 === "") { return "this pattern-matching is not exhaustive."; } else { @@ -901,9 +901,9 @@ function message(param) { case /* Non_closed_record_pattern */4 : return "the following labels are not bound in this record pattern:\n" + (param._0 + "\nEither bind these labels explicitly or add '; _' to the pattern."); case /* Instance_variable_override */5 : - var match$1 = param._0; + let match$1 = param._0; if (match$1) { - var lab$1 = match$1.hd; + let lab$1 = match$1.hd; if (match$1.tl) { return Stdlib__String.concat(" ", { hd: "the following instance variables are overridden by the class", @@ -1023,7 +1023,7 @@ function message(param) { case /* Unused_ancestor */20 : return "unused ancestor variable " + (param._0 + "."); case /* Unused_constructor */21 : - var s$2 = param._0; + let s$2 = param._0; if (param._1) { return "constructor " + (s$2 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -1032,7 +1032,7 @@ function message(param) { return "unused constructor " + (s$2 + "."); } case /* Unused_extension */22 : - var s$3 = param._0; + let s$3 = param._0; if (param._1) { return "extension constructor " + (s$3 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -1041,8 +1041,8 @@ function message(param) { return "unused extension constructor " + (s$3 + "."); } case /* Name_out_of_scope */23 : - var slist = param._1; - var ty = param._0; + let slist = param._1; + let ty = param._0; if (slist && !slist.tl && !param._2) { return slist.hd + (" was selected from type " + (ty + ".\nIt is not visible in the current scope, and will not \nbe selected if the type becomes unknown.")); } @@ -1059,7 +1059,7 @@ function message(param) { }); break; case /* Ambiguous_name */24 : - var slist$1 = param._0; + let slist$1 = param._0; if (slist$1 && !slist$1.tl && !param._2) { return slist$1.hd + (" belongs to several types: " + (Stdlib__String.concat(" ", param._1) + "\nThe first one was selected. Please disambiguate if this is wrong.")); } @@ -1172,7 +1172,7 @@ function message(param) { _1: "illegal payload for attribute '%s'.\n%s" }), param._0, param._1); case /* Eliminated_optional_arguments */31 : - var sl = param._0; + let sl = param._0; return Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -1212,13 +1212,13 @@ function message(param) { } } -var nerrors = { +let nerrors = { contents: 0 }; function print(ppf, w) { - var msg = message(w); - var num = number(w); + let msg = message(w); + let num = number(w); Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Int */4, @@ -1245,14 +1245,14 @@ function print(ppf, w) { } -var Errors = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Warnings.Errors"); +let Errors = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Warnings.Errors"); -var absname = { +let absname = { contents: false }; function in_file(name) { - var loc = { + let loc = { pos_fname: name, pos_lnum: 1, pos_bol: 0, @@ -1265,7 +1265,7 @@ function in_file(name) { }; } -var none = in_file("_none_"); +let none = in_file("_none_"); function curr(lexbuf) { return { @@ -1299,32 +1299,32 @@ function rhs_loc(n) { }; } -var input_name = { +let input_name = { contents: "_none_" }; -var input_lexbuf = { +let input_lexbuf = { contents: undefined }; -var status = { +let status = { contents: /* Uninitialised */0 }; -var num_loc_lines = { +let num_loc_lines = { contents: 0 }; function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var lines = num_loc_lines.contents; - for(var i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ + let lines = num_loc_lines.contents; + for(let i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ if (Caml_bytes.get(lb.lex_buffer, i) === /* '\n' */10) { lines = lines + 1 | 0; } @@ -1337,9 +1337,9 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } Caml_io.caml_ml_flush(Stdlib.stdout); Caml_external_polyfill.resolve("caml_terminfo_backup")(lines); - var bol = false; + let bol = false; Stdlib.print_string("# "); - for(var pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ + for(let pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ if (bol) { Stdlib.print_string(" "); bol = false; @@ -1358,7 +1358,7 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { }(pos)), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } - var c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); + let c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); Stdlib.print_char(c); bol = c === /* '\n' */10; } @@ -1368,16 +1368,16 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } function highlight_dumb(ppf, lb, loc) { - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; - var line_start = 0; - var line_end = 0; - for(var pos = 0; pos <= end_pos; ++pos){ + let end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; + let line_start = 0; + let line_end = 0; + for(let pos = 0; pos <= end_pos; ++pos){ if (Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0) === /* '\n' */10) { if (loc.loc_start.pos_cnum > pos) { line_start = line_start + 1 | 0; @@ -1422,10 +1422,10 @@ function highlight_dumb(ppf, lb, loc) { _1: "Characters %i-%i:@." }), loc.loc_start.pos_cnum, loc.loc_end.pos_cnum); Stdlib__Format.pp_print_string(ppf, " "); - var line = 0; - var pos_at_bol = 0; - for(var pos$1 = 0; pos$1 <= end_pos; ++pos$1){ - var c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); + let line = 0; + let pos_at_bol = 0; + for(let pos$1 = 0; pos$1 <= end_pos; ++pos$1){ + let c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); if (c !== 10) { if (c !== 13) { if (line === line_start && line === line_end) { @@ -1462,10 +1462,10 @@ function highlight_dumb(ppf, lb, loc) { }, _1: "@. " }); - for(var _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ + for(let _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ Stdlib__Format.pp_print_char(ppf, /* ' ' */32); } - for(var _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ + for(let _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ Stdlib__Format.pp_print_char(ppf, /* '^' */94); } } @@ -1491,19 +1491,19 @@ function highlight_dumb(ppf, lb, loc) { function highlight_locations(ppf, locs) { while(true) { - var num_lines = status.contents; + let num_lines = status.contents; if (typeof num_lines === "number") { if (num_lines) { - var lb = input_lexbuf.contents; + let lb = input_lexbuf.contents; if (lb === undefined) { return false; } - var norepeat; + let norepeat; try { norepeat = Caml_sys.caml_sys_getenv("TERM") === "norepeat"; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { norepeat = false; } else { @@ -1513,13 +1513,13 @@ function highlight_locations(ppf, locs) { if (norepeat) { return false; } - var loc1 = Stdlib__List.hd(locs); + let loc1 = Stdlib__List.hd(locs); try { highlight_dumb(ppf, lb, loc1); return true; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -1530,7 +1530,7 @@ function highlight_locations(ppf, locs) { continue ; } } else { - var lb$1 = input_lexbuf.contents; + let lb$1 = input_lexbuf.contents; if (lb$1 === undefined) { return false; } @@ -1539,7 +1539,7 @@ function highlight_locations(ppf, locs) { return true; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -1551,12 +1551,12 @@ function highlight_locations(ppf, locs) { function show_filename(file) { if (absname.contents) { - var s = Curry._1(Stdlib__Filename.is_relative, file) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), file) : file; - var aux = function (_s) { + let s = Curry._1(Stdlib__Filename.is_relative, file) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), file) : file; + let aux = function (_s) { while(true) { - var s = _s; - var base = Curry._1(Stdlib__Filename.basename, s); - var dir = Curry._1(Stdlib__Filename.dirname, s); + let s = _s; + let base = Curry._1(Stdlib__Filename.basename, s); + let dir = Curry._1(Stdlib__Filename.dirname, s); if (dir === s) { return dir; } @@ -1598,11 +1598,11 @@ function get_pos_info(pos) { function print_loc(ppf, loc) { Curry._1(Misc_Color.setup, color.contents); - var match = get_pos_info(loc.loc_start); - var startchar = match[2]; - var file = match[0]; - var startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; - var endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; + let match = get_pos_info(loc.loc_start); + let startchar = match[2]; + let file = match[0]; + let startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; + let endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; if (file === "//toplevel//") { if (highlight_locations(ppf, { hd: loc, @@ -1752,7 +1752,7 @@ function print$1(ppf, loc) { } } -var error_prefix = "Error"; +let error_prefix = "Error"; function print_error(ppf, loc) { print$1(ppf, loc); @@ -1834,23 +1834,23 @@ function default_warning_printer(loc, ppf, w) { } -var warning_printer = { +let warning_printer = { contents: default_warning_printer }; -var formatter_for_warnings = { +let formatter_for_warnings = { contents: Stdlib__Format.err_formatter }; function prerr_warning(loc, w) { - var ppf = formatter_for_warnings.contents; - var f = Curry._1(warning_printer.contents, loc); - var out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); - var out_string = function (str, start, len) { - var count = function (_i, _c) { + let ppf = formatter_for_warnings.contents; + let f = Curry._1(warning_printer.contents, loc); + let out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); + let out_string = function (str, start, len) { + let count = function (_i, _c) { while(true) { - var c = _c; - var i = _i; + let c = _c; + let i = _i; if (i === (start + len | 0)) { return c; } @@ -1883,11 +1883,11 @@ function print_phanton_error_prefix(ppf) { } function errorf(locOpt, subOpt, if_highlightOpt, fmt) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; - var before = print_phanton_error_prefix; - var k = function (msg) { + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let before = print_phanton_error_prefix; + let k = function (msg) { return { loc: loc, msg: msg, @@ -1895,8 +1895,8 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { if_highlight: if_highlight }; }; - var buf = Stdlib__Buffer.create(64); - var ppf = Stdlib__Format.formatter_of_buffer(buf); + let buf = Stdlib__Buffer.create(64); + let ppf = Stdlib__Format.formatter_of_buffer(buf); Curry._1(Misc_Color.set_color_tag_handling, ppf); if (before !== undefined) { Curry._1(before, ppf); @@ -1907,7 +1907,7 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { }), ppf, fmt); } -var error_of_exn = { +let error_of_exn = { contents: /* [] */0 }; @@ -1970,7 +1970,7 @@ register_error_of_exn(function (param) { } }); -var $$Error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Location.Error"); +let $$Error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Location.Error"); register_error_of_exn(function (param) { if (param.MEL_EXN_ID === $$Error) { @@ -1996,15 +1996,15 @@ function assert_fail(msg) { } function is_mocha(param) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (!match) { return false; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return false; } - var exec = Path.basename(match$1.hd); + let exec = Path.basename(match$1.hd); if (exec === "mocha") { return true; } else { @@ -2013,19 +2013,19 @@ function is_mocha(param) { } function close_enough(thresholdOpt, a, b) { - var threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; + let threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; return Math.abs(a - b) < threshold; } function from_pair_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { - var spec = Curry._1(code, undefined); + let spec = Curry._1(code, undefined); switch (spec.TAG | 0) { case /* Eq */0 : Assert.deepEqual(spec._0, spec._1); @@ -2043,8 +2043,8 @@ function from_pair_suites(name, suites) { Assert.ok(spec._0); return ; case /* Approx */5 : - var b = spec._1; - var a = spec._0; + let b = spec._1; + let a = spec._0; if (!close_enough(undefined, a, b)) { Assert.deepEqual(a, b); return ; @@ -2052,8 +2052,8 @@ function from_pair_suites(name, suites) { return ; } case /* ApproxThreshold */6 : - var b$1 = spec._2; - var a$1 = spec._1; + 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 ; @@ -2079,8 +2079,8 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - var name = param[0]; - var fn = Curry._1(param[1], undefined); + let name = param[0]; + let fn = Curry._1(param[1], undefined); switch (fn.TAG | 0) { case /* Eq */0 : console.log([ @@ -2158,7 +2158,7 @@ function from_pair_suites(name, suites) { Promise.resolve(undefined); -var docstrings = { +let docstrings = { contents: /* [] */0 }; @@ -2168,7 +2168,7 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - var match = ds.ds_attached; + let match = ds.ds_attached; switch (match) { case /* Unattached */0 : return prerr_warning(ds.ds_loc, { @@ -2178,7 +2178,7 @@ function warn_bad_docstrings(param) { case /* Info */1 : return ; case /* Docs */2 : - var match$1 = ds.ds_associated; + let match$1 = ds.ds_associated; if (match$1 >= 2) { return prerr_warning(ds.ds_loc, { TAG: /* Bad_docstring */33, @@ -2195,7 +2195,7 @@ function warn_bad_docstrings(param) { } function docstring(body, loc) { - var ds = { + let ds = { ds_body: body, ds_loc: loc, ds_attached: /* Unattached */0, @@ -2208,18 +2208,18 @@ function docstring(body, loc) { return ds; } -var empty_docs = { +let empty_docs = { docs_pre: undefined, docs_post: undefined }; -var doc_loc = { +let doc_loc = { txt: "ocaml.doc", loc: none }; function docs_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -2227,19 +2227,19 @@ function docs_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -2256,12 +2256,12 @@ function docs_attr(ds) { } function add_docs_attrs(docs, attrs) { - var ds = docs.docs_pre; - var attrs$1 = ds !== undefined ? ({ + let ds = docs.docs_pre; + let attrs$1 = ds !== undefined ? ({ hd: docs_attr(ds), tl: attrs }) : attrs; - var ds$1 = docs.docs_post; + let ds$1 = docs.docs_post; if (ds$1 !== undefined) { return Stdlib.$at(attrs$1, { hd: docs_attr(ds$1), @@ -2283,13 +2283,13 @@ function add_info_attrs(info, attrs) { } } -var text_loc = { +let text_loc = { txt: "ocaml.text", loc: none }; function text_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -2297,19 +2297,19 @@ function text_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -2330,14 +2330,14 @@ function add_text_attrs(dsl, attrs) { } function get_docstring(info, dsl) { - var _param = dsl; + let _param = dsl; while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = info ? /* Info */1 : /* Docs */2; return ds; @@ -2348,16 +2348,16 @@ function get_docstring(info, dsl) { } function get_docstrings(dsl) { - var _acc = /* [] */0; - var _param = dsl; + let _acc = /* [] */0; + let _param = dsl; while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return Stdlib__List.rev(acc); } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = /* Docs */2; _param = param.tl; @@ -2374,7 +2374,7 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - var match = ds.ds_associated; + let match = ds.ds_associated; if (match) { ds.ds_associated = /* Many */2; } else { @@ -2383,7 +2383,7 @@ function associate_docstrings(dsl) { }), dsl); } -var pre_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -2394,12 +2394,12 @@ function set_pre_docstrings(pos, dsl) { function get_pre_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(pre_table, pos); + let dsl = Stdlib__Hashtbl.find(pre_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -2412,7 +2412,7 @@ function mark_pre_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(pre_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -2420,7 +2420,7 @@ function mark_pre_docs(pos) { } } -var post_table = Stdlib__Hashtbl.create(undefined, 50); +let post_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -2431,12 +2431,12 @@ function set_post_docstrings(pos, dsl) { function get_post_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -2449,7 +2449,7 @@ function mark_post_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(post_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -2459,11 +2459,11 @@ function mark_post_docs(pos) { function get_info(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); return get_docstring(true, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -2471,7 +2471,7 @@ function get_info(pos) { } } -var floating_table = Stdlib__Hashtbl.create(undefined, 50); +let floating_table = Stdlib__Hashtbl.create(undefined, 50); function set_floating_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -2485,7 +2485,7 @@ function get_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(floating_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -2493,7 +2493,7 @@ function get_text(pos) { } } -var pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -2507,7 +2507,7 @@ function get_pre_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(pre_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -2515,7 +2515,7 @@ function get_pre_extra_text(pos) { } } -var post_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let post_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -2529,7 +2529,7 @@ function get_post_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(post_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -2545,8 +2545,8 @@ function symbol_docs(param) { } function symbol_docs_lazy(param) { - var p1 = Stdlib__Parsing.symbol_start_pos(undefined); - var p2 = Stdlib__Parsing.symbol_end_pos(undefined); + let p1 = Stdlib__Parsing.symbol_start_pos(undefined); + let p2 = Stdlib__Parsing.symbol_end_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -2569,7 +2569,7 @@ function mark_rhs_docs(pos1, pos2) { } function symbol_text_lazy(param) { - var pos = Stdlib__Parsing.symbol_start_pos(undefined); + let pos = Stdlib__Parsing.symbol_start_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -2587,13 +2587,13 @@ function init(param) { Stdlib__Hashtbl.reset(post_extra_table); } -var default_loc = { +let default_loc = { contents: none }; function mk(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ptyp_desc: d, ptyp_loc: loc, @@ -2613,8 +2613,8 @@ function attr(d, a) { } function mk$1(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ppat_desc: d, ppat_loc: loc, @@ -2634,8 +2634,8 @@ function attr$1(d, a) { } function mk$2(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pexp_desc: d, pexp_loc: loc, @@ -2934,8 +2934,8 @@ function $$case(lhs, guard, rhs) { } function mk$3(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmty_desc: d, pmty_loc: loc, @@ -2962,8 +2962,8 @@ function alias(loc, attrs, a) { } function mk$4(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmod_desc: d, pmod_loc: loc, @@ -2983,7 +2983,7 @@ function attr$4(d, a) { } function mk$5(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { psig_desc: d, psig_loc: loc @@ -2992,8 +2992,8 @@ function mk$5(locOpt, d) { function text(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$5(loc, { TAG: /* Psig_attribute */11, _0: a @@ -3002,7 +3002,7 @@ function text(txt) { } function mk$6(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { pstr_desc: d, pstr_loc: loc @@ -3011,8 +3011,8 @@ function mk$6(locOpt, d) { function text$1(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$6(loc, { TAG: /* Pstr_attribute */13, _0: a @@ -3021,8 +3021,8 @@ function text$1(txt) { } function mk$7(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcl_desc: d, pcl_loc: loc, @@ -3042,8 +3042,8 @@ function attr$5(d, a) { } function mk$8(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcty_desc: d, pcty_loc: loc, @@ -3063,9 +3063,9 @@ function attr$6(d, a) { } function mk$9(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pctf_desc: d, pctf_loc: loc, @@ -3146,9 +3146,9 @@ function attr$7(d, a) { } function mk$10(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pcf_desc: d, pcf_loc: loc, @@ -3251,10 +3251,10 @@ function attr$8(d, a) { } function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var prim = primOpt !== undefined ? primOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let prim = primOpt !== undefined ? primOpt : /* [] */0; return { pval_name: name, pval_type: typ, @@ -3265,10 +3265,10 @@ function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { } function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmd_name: name, pmd_type: typ, @@ -3278,10 +3278,10 @@ function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { } function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmtd_name: name, pmtd_type: typ, @@ -3291,10 +3291,10 @@ function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { } function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmb_name: name, pmb_expr: expr, @@ -3304,10 +3304,10 @@ function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { } function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; return { popen_lid: lid, popen_override: override, @@ -3317,9 +3317,9 @@ function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { } function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pincl_mod: mexpr, pincl_loc: loc, @@ -3328,10 +3328,10 @@ function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { } function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pvb_pat: pat, pvb_expr: expr, @@ -3341,12 +3341,12 @@ function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { } function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; return { pci_virt: virt, pci_params: params, @@ -3358,14 +3358,14 @@ function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, exp } function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, privOpt, manifest, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; - var kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; + let kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptype_name: name, ptype_params: params, @@ -3379,10 +3379,10 @@ function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, } function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pcd_name: name, pcd_args: args, @@ -3393,10 +3393,10 @@ function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { } function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; return { pld_name: name, pld_mutable: mut, @@ -3407,10 +3407,10 @@ function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { } function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptyext_path: path, ptyext_params: params, @@ -3421,11 +3421,11 @@ function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { } function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pext_name: name, pext_kind: { @@ -3439,10 +3439,10 @@ function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { } function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; return { pext_name: name, pext_kind: { @@ -3454,7 +3454,7 @@ function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { }; } -var Ast_helper_Exp = { +let Ast_helper_Exp = { mk: mk$2, attr: attr$2, ident: ident, @@ -3494,7 +3494,7 @@ var Ast_helper_Exp = { $$case: $$case }; -var Ast_helper_Ctf = { +let Ast_helper_Ctf = { mk: mk$9, attr: attr$7, inherit_: inherit_, @@ -3506,7 +3506,7 @@ var Ast_helper_Ctf = { text: text$2 }; -var Ast_helper_Cf = { +let Ast_helper_Cf = { mk: mk$10, attr: attr$8, inherit_: inherit_$1, @@ -3521,15 +3521,15 @@ var Ast_helper_Cf = { concrete: concrete }; -var $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Syntaxerr.Error"); +let $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Syntaxerr.Error"); -var Escape_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Syntaxerr.Escape_error"); +let Escape_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Syntaxerr.Escape_error"); function prepare_error(param) { switch (param.TAG | 0) { case /* Unclosed */0 : - var closing = param._3; - var opening = param._1; + let closing = param._3; + let opening = param._1; return Curry._1(errorf(param._2, { hd: Curry._1(errorf(param._0, undefined, undefined, /* Format */{ _0: { @@ -3631,7 +3631,7 @@ function prepare_error(param) { _1: "Syntax error: applicative paths of the form F(X).t are not supported when the option -no-app-func is set." }); case /* Variable_in_scope */4 : - var $$var = param._1; + let $$var = param._1; return Curry._2(errorf(param._0, undefined, undefined, /* Format */{ _0: { TAG: /* String_literal */11, @@ -3734,10 +3734,10 @@ function mkcf(attrs, docs, d) { } function mkoption(d) { - var init = d.ptyp_loc; - var loc_loc_start = init.loc_start; - var loc_loc_end = init.loc_end; - var loc = { + let init = d.ptyp_loc; + let loc_loc_start = init.loc_start; + let loc_loc_end = init.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true @@ -3779,7 +3779,7 @@ function reloc_exp(x) { } function mkoperator(name, pos) { - var loc = rhs_loc(pos); + let loc = rhs_loc(pos); return Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_ident */0, _0: { @@ -3872,16 +3872,16 @@ function mkpat_cons(consloc, args, loc) { function mktailexp(nilloc, param) { if (param) { - var e1 = param.hd; - var exp_el = mktailexp(nilloc, param.tl); - var loc_loc_start = e1.pexp_loc.loc_start; - var loc_loc_end = exp_el.pexp_loc.loc_end; - var loc = { + let e1 = param.hd; + let exp_el = mktailexp(nilloc, param.tl); + let loc_loc_start = e1.pexp_loc.loc_start; + let loc_loc_end = exp_el.pexp_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { + let arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_tuple */8, _0: { hd: e1, @@ -3897,18 +3897,18 @@ function mktailexp(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -3921,16 +3921,16 @@ function mktailexp(nilloc, param) { function mktailpat(nilloc, param) { if (param) { - var p1 = param.hd; - var pat_pl = mktailpat(nilloc, param.tl); - var loc_loc_start = p1.ppat_loc.loc_start; - var loc_loc_end = pat_pl.ppat_loc.loc_end; - var loc = { + let p1 = param.hd; + let pat_pl = mktailpat(nilloc, param.tl); + let loc_loc_start = p1.ppat_loc.loc_start; + let loc_loc_end = pat_pl.ppat_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = mk$1(loc, undefined, { + let arg = mk$1(loc, undefined, { TAG: /* Ppat_tuple */4, _0: { hd: p1, @@ -3946,18 +3946,18 @@ function mktailpat(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -3980,8 +3980,8 @@ function mkstrexp(e, attrs) { } function mkexp_constraint(e, param) { - var t2 = param[1]; - var t1 = param[0]; + let t2 = param[1]; + let t1 = param[0]; if (t1 !== undefined) { if (t2 !== undefined) { return ghexp({ @@ -4084,7 +4084,7 @@ function bigarray_function(str, name) { } function bigarray_untuplify(exp) { - var explist = exp.pexp_desc; + let explist = exp.pexp_desc; if (explist.TAG === /* Pexp_tuple */8) { return explist._0; } else { @@ -4096,7 +4096,7 @@ function bigarray_untuplify(exp) { } function exp_of_label(lbl, pos) { - var rhs = { + let rhs = { TAG: /* Lident */0, _0: last(lbl) }; @@ -4110,7 +4110,7 @@ function exp_of_label(lbl, pos) { } function pat_of_label(lbl, pos) { - var rhs = last(lbl); + let rhs = last(lbl); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -4135,15 +4135,15 @@ function check_variable(vl, loc, v) { } function varify_constructors(var_names, t) { - var loop = function (t) { - var x = t.ptyp_desc; - var desc; + let loop = function (t) { + let x = t.ptyp_desc; + let desc; if (typeof x === "number") { desc = /* Ptyp_any */0; } else { switch (x.TAG | 0) { case /* Ptyp_var */0 : - var x$1 = x._0; + let x$1 = x._0; check_variable(var_names, t.ptyp_loc, x$1); desc = { TAG: /* Ptyp_var */0, @@ -4165,15 +4165,15 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_constr */3 : - var longident = x._0; - var exit = 0; - var s = longident.txt; + let longident = x._0; + let exit = 0; + let s = longident.txt; switch (s.TAG | 0) { case /* Lident */0 : if (x._1) { exit = 1; } else { - var s$1 = s._0; + let s$1 = s._0; if (Stdlib__List.mem(s$1, var_names)) { desc = { TAG: /* Ptyp_var */0, @@ -4219,7 +4219,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_alias */6 : - var string = x._1; + let string = x._1; check_variable(var_names, t.ptyp_loc, string); desc = { TAG: /* Ptyp_alias */6, @@ -4236,8 +4236,8 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_poly */8 : - var string_lst = x._0; - var partial_arg = t.ptyp_loc; + let string_lst = x._0; + let partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { return check_variable(var_names, partial_arg, param); }), string_lst); @@ -4248,7 +4248,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_package */9 : - var match = x._0; + let match = x._0; desc = { TAG: /* Ptyp_package */9, _0: [ @@ -4263,7 +4263,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_extension */10 : - var match$1 = x._0; + let match$1 = x._0; desc = { TAG: /* Ptyp_extension */10, _0: [ @@ -4281,7 +4281,7 @@ function varify_constructors(var_names, t) { ptyp_attributes: t.ptyp_attributes }; }; - var loop_row_field = function (param) { + let loop_row_field = function (param) { if (param.TAG === /* Rtag */0) { return { TAG: /* Rtag */0, @@ -4301,12 +4301,12 @@ function varify_constructors(var_names, t) { } function wrap_type_annotation(newtypes, core_type, body) { - var exp = mkexp({ + let exp = mkexp({ TAG: /* Pexp_constraint */19, _0: body, _1: core_type }); - var exp$1 = Stdlib__List.fold_right((function (newtype, exp) { + let exp$1 = Stdlib__List.fold_right((function (newtype, exp) { return mkexp({ TAG: /* Pexp_newtype */30, _0: newtype, @@ -4324,11 +4324,11 @@ function wrap_type_annotation(newtypes, core_type, body) { } function wrap_exp_attrs(body, param) { - var ext = param[0]; - var body_pexp_desc = body.pexp_desc; - var body_pexp_loc = body.pexp_loc; - var body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); - var body$1 = { + let ext = param[0]; + let body_pexp_desc = body.pexp_desc; + let body_pexp_loc = body.pexp_loc; + let body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); + let body$1 = { pexp_desc: body_pexp_desc, pexp_loc: body_pexp_loc, pexp_attributes: body_pexp_attributes @@ -4363,8 +4363,8 @@ function text_def(pos) { } function extra_text(text, pos, items) { - var pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); - var post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); + let pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); + let post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); return Stdlib.$at(Curry._1(text, pre_extras), Stdlib.$at(items, Curry._1(text, post_extras))); } @@ -4380,8 +4380,8 @@ function add_nonrec(rf, attrs, pos) { if (rf) { return attrs; } - var name_loc = rhs_loc(pos); - var name = { + let name_loc = rhs_loc(pos); + let name = { txt: "nonrec", loc: name_loc }; @@ -4408,7 +4408,7 @@ function mklb(param, attrs) { }; } -var yytransl_const = [ +let yytransl_const = [ 257, 258, 259, @@ -4513,7 +4513,7 @@ var yytransl_const = [ 0 ]; -var yytransl_block = [ +let yytransl_block = [ 268, 287, 298, @@ -4537,7 +4537,7 @@ var yytransl_block = [ 0 ]; -var yyact = [ +let yyact = [ (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -4545,15 +4545,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text$1, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_def */0, _0: extra_text(text$1, 1, _1) @@ -4568,8 +4568,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), tl: /* [] */0 @@ -4582,16 +4582,16 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var pos = 1; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; return extra_text((function (txt) { return { hd: { @@ -4606,9 +4606,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -4627,9 +4627,9 @@ var yyact = [ return text_def(1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { @@ -4643,8 +4643,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { TAG: /* Ptop_def */0, @@ -4657,8 +4657,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: _2, @@ -4666,8 +4666,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -4680,8 +4680,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 1); return Stdlib.$at(text_def(1), { hd: _1, @@ -4707,8 +4707,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { txt: _2, @@ -4724,22 +4724,22 @@ var yyact = [ return "_"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_ident */0, _0: { @@ -4749,7 +4749,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_structure */1, _0: extra_text(text$1, 2, _2) @@ -4760,8 +4760,8 @@ var yyact = [ return unclosed("struct", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmod({ TAG: /* Pmod_functor */2, @@ -4772,8 +4772,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -4781,7 +4781,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -4797,8 +4797,8 @@ var yyact = [ return unclosed("(", 2, ")", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_constraint */4, _0: _2, @@ -4818,15 +4818,15 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -4840,9 +4840,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -4860,8 +4860,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -4888,21 +4888,21 @@ var yyact = [ return unclosed("(", 1, ")", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$4(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 2); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), @@ -4916,26 +4916,26 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = lbs.lbs_bindings; - var str; - var exit = 0; + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = lbs.lbs_bindings; + let str; + let exit = 0; if (bindings) { - var lb = bindings.hd; + let lb = bindings.hd; if (typeof lb.lb_pattern.ppat_desc === "number" && !bindings.tl) { - var exp = wrap_exp_attrs(lb.lb_expression, [ + let exp = wrap_exp_attrs(lb.lb_expression, [ undefined, lbs.lbs_attributes ]); @@ -4961,7 +4961,7 @@ var yyact = [ } }); } - var bindings$1 = Stdlib__List.map((function (lb) { + let bindings$1 = Stdlib__List.map((function (lb) { return mk$17(lb.lb_loc, lb.lb_attributes, CamlinternalLazy.force(lb.lb_docs), CamlinternalLazy.force(lb.lb_text), lb.lb_pattern, lb.lb_expression); }), bindings); str = mkstr({ @@ -4970,9 +4970,9 @@ var yyact = [ _1: Stdlib__List.rev(bindings$1) }); } - var id = lbs.lbs_extension; + let id = lbs.lbs_extension; if (id !== undefined) { - var d = { + let d = { TAG: /* Pstr_extension */14, _0: [ id, @@ -4992,85 +4992,85 @@ var yyact = [ } }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_primitive */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_type */3, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_typext */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_exception */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_module */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_recmodule */7, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_modtype */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_open */9, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class_type */11, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_include */12, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_extension */14, _0: _1, @@ -5078,7 +5078,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkstr({ TAG: /* Pstr_attribute */13, @@ -5086,16 +5086,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_constraint */4, _0: _4, @@ -5103,8 +5103,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_functor */2, _0: _1[0], @@ -5113,49 +5113,49 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_ident */0, _0: { @@ -5165,7 +5165,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmty({ TAG: /* Pmty_signature */1, _0: extra_text(text, 2, _2) @@ -5176,8 +5176,8 @@ var yyact = [ return unclosed("sig", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmty({ TAG: /* Pmty_functor */2, @@ -5188,8 +5188,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_with */3, _0: _1, @@ -5197,7 +5197,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_typeof */4, _0: _4 @@ -5211,126 +5211,126 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$3(_1, _2); }), (function (__caml_parser_env) { return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_type */1, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_typext */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_exception */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_recmodule */5, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_modtype */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_open */7, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_include */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class */9, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class_type */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_extension */12, _0: _1, @@ -5338,7 +5338,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mksig({ TAG: /* Psig_attribute */11, @@ -5346,26 +5346,26 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$15(symbol_rloc(undefined), _4, symbol_docs(undefined), _2, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -5377,7 +5377,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -5389,18 +5389,18 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -5410,33 +5410,33 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) @@ -5449,46 +5449,46 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$13(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, _4, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -5498,8 +5498,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constraint */5, _0: _4, @@ -5507,8 +5507,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -5524,8 +5524,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -5535,8 +5535,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -5552,8 +5552,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_apply */3, _0: _1, @@ -5561,9 +5561,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -5604,20 +5604,20 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$5(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -5628,7 +5628,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -5639,7 +5639,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_structure */1, _0: _2 @@ -5650,8 +5650,8 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_constraint */5, _0: _2, @@ -5671,8 +5671,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcstr_self: _1, pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) @@ -5682,8 +5682,8 @@ var yyact = [ return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -5697,18 +5697,18 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Cf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_5, symbol_docs(undefined), { TAG: /* Pcf_inherit */0, _0: _2, @@ -5717,47 +5717,47 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_method */2, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_initializer */4, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_2, symbol_docs(undefined), { TAG: /* Pcf_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkcf(undefined, undefined, { TAG: /* Pcf_attribute */5, @@ -5771,9 +5771,9 @@ var yyact = [ }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -5792,9 +5792,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -5808,10 +5808,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -5826,12 +5826,12 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var e = mkexp_constraint(_6, _4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let e = mkexp_constraint(_6, _4); return [ { txt: _3, @@ -5846,9 +5846,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -5867,10 +5867,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -5889,10 +5889,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -5911,11 +5911,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -5934,13 +5934,13 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_6, _8, _10); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_6, _8, _10); return [ { txt: _3, @@ -5962,9 +5962,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _2, @@ -5973,9 +5973,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _1, @@ -5984,9 +5984,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: _1, @@ -5995,8 +5995,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "", @@ -6005,8 +6005,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -6017,7 +6017,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -6028,7 +6028,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkcty({ TAG: /* Pcty_signature */1, _0: _2 @@ -6039,20 +6039,20 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$6(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_extension */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcsig_self: _1, pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) @@ -6068,34 +6068,34 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Ctf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_inherit */0, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_6, symbol_docs(undefined), { TAG: /* Pctf_method */2, _0: [ @@ -6107,23 +6107,23 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_2, symbol_docs(undefined), { TAG: /* Pctf_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkctf(undefined, undefined, { TAG: /* Pctf_attribute */4, @@ -6131,9 +6131,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, _2, @@ -6142,9 +6142,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, /* Mutable */1, @@ -6153,8 +6153,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, /* Immutable */0, @@ -6163,8 +6163,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3, @@ -6172,82 +6172,82 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _8, symbol_docs(undefined), undefined, _3, _4, { txt: _5, loc: rhs_loc(5) }, _7); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -6260,8 +6260,8 @@ var yyact = [ return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_sequence */16, _0: _1, @@ -6269,8 +6269,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _3[0], _4, @@ -6278,7 +6278,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], undefined, @@ -6286,9 +6286,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _1, _4, @@ -6296,8 +6296,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, undefined, @@ -6305,7 +6305,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _3[0], undefined, @@ -6313,7 +6313,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2[0], undefined, @@ -6321,8 +6321,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, undefined, @@ -6330,7 +6330,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", undefined, @@ -6338,7 +6338,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -6360,8 +6360,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1[0], mkpat({ @@ -6372,7 +6372,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkpat({ @@ -6388,8 +6388,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constraint */10, _0: _1, @@ -6400,8 +6400,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: _1, @@ -6409,9 +6409,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -6424,9 +6424,9 @@ var yyact = [ } return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); }), _1.lbs_bindings); - var d_0 = _1.lbs_rec; - var d_1 = Stdlib__List.rev(bindings); - var d = { + let d_0 = _1.lbs_rec; + let d_1 = Stdlib__List.rev(bindings); + let d = { TAG: /* Pexp_let */2, _0: d_0, _1: d_1, @@ -6438,15 +6438,15 @@ var yyact = [ ]); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_0 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_0 = { txt: _4, loc: rhs_loc(4) }; - var d = { + let d = { TAG: /* Pexp_letmodule */25, _0: d_0, _1: _5, @@ -6455,15 +6455,15 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = { txt: _5, loc: rhs_loc(5) }; - var d = { + let d = { TAG: /* Pexp_open */32, _0: _3, _1: d_1, @@ -6472,19 +6472,19 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_function */3, _0: Stdlib__List.rev(_4) }; return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_fun */4, _0: _3[0], @@ -6494,9 +6494,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_newtype */30, _0: _5, @@ -6504,12 +6504,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_match */6, _0: _3, _1: d_1 @@ -6517,12 +6517,12 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_try */7, _0: _3, _1: d_1 @@ -6537,15 +6537,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_tuple */8, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -6556,8 +6556,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -6565,10 +6565,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -6577,9 +6577,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -6588,9 +6588,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_while */17, _0: _3, @@ -6598,12 +6598,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_for */18, _0: _3, @@ -6614,8 +6614,8 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -6628,8 +6628,8 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -6642,119 +6642,119 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "*", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "%", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "<", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ">", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "or", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "||", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ":=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = _2.pexp_desc; + let exit = 0; switch (_1) { case "-" : if (match.TAG === /* Pexp_constant */1) { - var n = match._0; + let n = match._0; switch (n.TAG | 0) { case /* Const_int */0 : return mkexp({ @@ -6802,7 +6802,7 @@ var yyact = [ } if (exit === 2 && match.TAG === /* Pexp_constant */1) { - var f = match._0; + let f = match._0; if (f.TAG === /* Const_float */3) { return mkexp({ TAG: /* Pexp_constant */1, @@ -6827,10 +6827,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var desc = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let desc = _2.pexp_desc; + let exit = 0; switch (_1) { case "+" : if (desc.TAG === /* Pexp_constant */1) { @@ -6869,9 +6869,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setfield */13, _0: _1, @@ -6883,9 +6883,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -6914,9 +6914,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -6945,14 +6945,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var set = fast.contents ? "unsafe_set" : "set"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let set = fast.contents ? "unsafe_set" : "set"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -6981,8 +6981,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -7090,8 +7090,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setinstvar */23, _0: { @@ -7102,24 +7102,24 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_assert */26, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_lazy */27, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_object */29, _0: _3 @@ -7131,12 +7131,12 @@ var yyact = [ return unclosed("object", 1, "end", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._2(Ast_helper_Exp.attr, _1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_ident */0, _0: { @@ -7146,14 +7146,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_constant */1, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -7164,7 +7164,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -7179,20 +7179,20 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(reloc_exp(_3), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var d_0 = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let d_0 = { txt: { TAG: /* Lident */0, _0: "()" }, loc: symbol_rloc(undefined) }; - var d = { + let d = { TAG: /* Pexp_construct */9, _0: d_0, _1: undefined @@ -7205,13 +7205,13 @@ var yyact = [ return unclosed("begin", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_constraint(_2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_field */12, _0: _1, @@ -7222,8 +7222,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -7240,8 +7240,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -7269,8 +7269,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -7298,13 +7298,13 @@ var yyact = [ return unclosed("[", 3, "]", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var get = fast.contents ? "unsafe_get" : "get"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let get = fast.contents ? "unsafe_get" : "get"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -7327,8 +7327,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -7423,7 +7423,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_record */11, _0: _2[1], @@ -7435,9 +7435,9 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var rec_exp = mkexp({ + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let rec_exp = mkexp({ TAG: /* Pexp_record */11, _0: _4[1], _1: _4[0] @@ -7458,7 +7458,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_array */14, @@ -7477,8 +7477,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -7500,7 +7500,7 @@ var yyact = [ return unclosed("[|", 3, "|]", 6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_exp(mktailexp(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -7510,10 +7510,10 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + let list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -7531,8 +7531,8 @@ var yyact = [ return unclosed("[", 3, "]", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator(_1, 1), @@ -7546,7 +7546,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator("!", 1), @@ -7560,9 +7560,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_new */22, _0: { txt: _3, @@ -7572,7 +7572,7 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_override */24, @@ -7591,8 +7591,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -7614,8 +7614,8 @@ var yyact = [ return unclosed("{<", 3, ">}", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_send */21, _0: _1, @@ -7623,21 +7623,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_pack */31, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_constraint */19, _0: ghexp({ @@ -7655,9 +7655,9 @@ var yyact = [ return unclosed("(", 1, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -7684,29 +7684,29 @@ var yyact = [ return unclosed("(", 3, ")", 7); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_extension */33, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", _1 @@ -7716,8 +7716,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _2 @@ -7727,22 +7727,22 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], _2[1] ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkexp({ @@ -7758,33 +7758,33 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ mkpatvar(_1, 1), _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -7799,11 +7799,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_4, _6, _8); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_4, _6, _8); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -7814,17 +7814,17 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -7838,8 +7838,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { lbs_bindings: { hd: _2, @@ -7852,11 +7852,11 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var lb = mklb(_4, _5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); return { lbs_bindings: { hd: lb, @@ -7869,24 +7869,24 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mklb(_2, _3); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_constraint(_3, _1); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -7896,8 +7896,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -7905,37 +7905,37 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -7945,8 +7945,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -7954,16 +7954,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -7973,45 +7973,45 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -8021,7 +8021,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -8031,8 +8031,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -8045,9 +8045,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -8060,37 +8060,37 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _2 @@ -8110,8 +8110,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_alias */1, _0: _1, @@ -8126,15 +8126,15 @@ var yyact = [ return expecting(3, "identifier"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_tuple */4, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -8145,8 +8145,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -8154,8 +8154,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -8172,8 +8172,8 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -8191,8 +8191,8 @@ var yyact = [ return unclosed("(", 4, ")", 8); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_or */9, _0: _1, @@ -8204,26 +8204,26 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_lazy */12, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_exception */14, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$1(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -8239,15 +8239,15 @@ var yyact = [ return mkpat(/* Ppat_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constant */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_interval */3, _0: _1, @@ -8255,7 +8255,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -8266,7 +8266,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -8274,7 +8274,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_type */11, _0: { @@ -8284,7 +8284,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_record */7, _0: _2[0], @@ -8296,7 +8296,7 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_pat(mktailpat(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -8306,7 +8306,7 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_array */8, @@ -8332,8 +8332,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -8350,7 +8350,7 @@ var yyact = [ return expecting(4, "type"); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_unpack */13, _0: { @@ -8360,8 +8360,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: mkpat({ @@ -8383,23 +8383,23 @@ var yyact = [ return unclosed("(", 1, ")", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_extension */15, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -8413,22 +8413,22 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -8438,7 +8438,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { hd: _1, @@ -8448,7 +8448,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -8459,8 +8459,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -8470,8 +8470,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -8481,7 +8481,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -8491,80 +8491,80 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _7, symbol_docs(undefined), _6, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), add_nonrec(_2, _7, 2), symbol_docs(undefined), undefined, _3, Stdlib__List.rev(_6), _5[0], _5[1], _5[2], { txt: _4, loc: rhs_loc(4) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, Stdlib__List.rev(_5), _4[0], _4[1], _4[2], { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -8581,7 +8581,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Public */1, @@ -8589,7 +8589,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Private */0, @@ -8597,7 +8597,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -8608,7 +8608,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -8626,8 +8626,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -8638,9 +8638,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -8651,7 +8651,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return [ /* Ptype_open */1, /* Public */1, @@ -8659,9 +8659,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -8675,7 +8675,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -8685,30 +8685,30 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -8721,7 +8721,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -8731,8 +8731,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 @@ -8748,62 +8748,62 @@ var yyact = [ return /* Contravariant */1; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _3, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _4, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -8813,10 +8813,10 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), Stdlib.$at(_5, _6), symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -8826,10 +8826,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), Stdlib.$at(_4, _5), symbol_docs(undefined), undefined, _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -8842,79 +8842,79 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* [] */0, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return field$1(symbol_rloc(undefined), _5, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - var info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + let info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); return field$1(symbol_rloc(undefined), Stdlib.$at(_5, _7), Caml_option.some(info), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -8924,12 +8924,12 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -8939,93 +8939,93 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _3, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _1, loc: rhs_loc(1) @@ -9035,9 +9035,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _5, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _2, loc: rhs_loc(2) @@ -9047,27 +9047,27 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var rhs = last(_3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let rhs = last(_3); return { TAG: /* Pwith_type */0, _0: { @@ -9081,9 +9081,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_typesubst */2, _0: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, undefined, undefined, undefined, _5, { @@ -9093,8 +9093,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_module */1, _0: { @@ -9108,8 +9108,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_modsubst */3, _0: { @@ -9129,15 +9129,15 @@ var yyact = [ return /* Private */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -9147,8 +9147,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -9159,8 +9159,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -9171,16 +9171,16 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr(_1, _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_alias */6, _0: _1, @@ -9191,9 +9191,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _2, @@ -9202,9 +9202,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _1, @@ -9213,9 +9213,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: _1, @@ -9224,8 +9224,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "", @@ -9237,7 +9237,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -9254,7 +9254,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -9268,7 +9268,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -9278,7 +9278,7 @@ var yyact = [ return mktyp(/* Ptyp_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -9289,8 +9289,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -9304,8 +9304,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -9316,7 +9316,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_object */4, _0: _2[0], @@ -9331,7 +9331,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -9342,8 +9342,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -9357,8 +9357,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -9369,7 +9369,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -9381,7 +9381,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -9390,8 +9390,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -9404,7 +9404,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -9422,7 +9422,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -9432,8 +9432,8 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -9442,21 +9442,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_package */9, _0: _3 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_extension */10, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -9466,8 +9466,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -9477,8 +9477,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _2, @@ -9488,30 +9488,30 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -9521,17 +9521,17 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rinherit */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -9541,8 +9541,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -9558,30 +9558,30 @@ var yyact = [ return false; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 @@ -9591,8 +9591,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -9605,8 +9605,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -9616,53 +9616,53 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -9672,7 +9672,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -9689,9 +9689,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _4, @@ -9702,21 +9702,21 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_char */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_string */2, _0: _1[0], @@ -9724,28 +9724,28 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _1 @@ -9755,70 +9755,70 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: "-" + _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: Caml_int64.neg(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _2 @@ -9931,15 +9931,15 @@ var yyact = [ return "true"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -9974,15 +9974,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -9990,15 +9990,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10006,15 +10006,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10022,15 +10022,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10038,8 +10038,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (applicative_functors.contents) { return { TAG: /* Lapply */2, @@ -10056,15 +10056,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10072,15 +10072,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10088,15 +10088,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -10104,7 +10104,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10112,8 +10112,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10124,8 +10124,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10136,8 +10136,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10148,8 +10148,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10160,7 +10160,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10171,7 +10171,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -10431,39 +10431,39 @@ var yyact = [ return "with"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1, loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1 + ("." + _3.txt), loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 @@ -10473,8 +10473,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -10484,8 +10484,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -10498,8 +10498,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, { @@ -10509,45 +10509,45 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PStr */0, _0: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PTyp */1, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -10555,8 +10555,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -10607,7 +10607,7 @@ var yyact = [ }) ]; -var yytables = { +let yytables = { actions: yyact, transl_const: yytransl_const, transl_block: yytransl_block, @@ -10663,11 +10663,11 @@ function string_of_type_directive(x) { } } -var $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Lexer.Error"); +let $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_parsetree_test.Lexer.Error"); function assert_same_type(lexbuf, x, y) { - var lhs = type_of_directive(x); - var rhs = type_of_directive(y); + let lhs = type_of_directive(x); + let rhs = type_of_directive(y); if (lhs !== rhs) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -10682,25 +10682,25 @@ function assert_same_type(lexbuf, x, y) { return y; } -var directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); +let directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); Stdlib__Hashtbl.replace(directive_built_in_values, "OCAML_VERSION", { TAG: /* Dir_string */3, _0: Stdlib__Sys.ocaml_version }); -var tmp; +let tmp; -var exit = 0; +let exit = 0; -var i; +let i; try { i = Stdlib__String.rindex(Stdlib__Sys.ocaml_version, /* '+' */43); exit = 1; } catch (raw_exn$1){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { tmp = ""; } else { @@ -10733,24 +10733,24 @@ Stdlib__Hashtbl.replace(directive_built_in_values, "WORD_SIZE", { }); function semantic_version_parse(str, start, last_index) { - var aux = function (_start, _acc, last_index) { + let aux = function (_start, _acc, last_index) { while(true) { - var acc = _acc; - var start = _start; + let acc = _acc; + let start = _start; if (start > last_index) { return [ acc, start ]; } - var c = str.charCodeAt(start); + let c = str.charCodeAt(start); if (c === /* '.' */46) { return [ acc, start + 1 | 0 ]; } - var v = c - /* '0' */48 | 0; + let v = c - /* '0' */48 | 0; if (!(v >= 0 && v <= 9)) { return [ acc, @@ -10762,11 +10762,11 @@ function semantic_version_parse(str, start, last_index) { continue ; }; }; - var match = aux(start, 0, last_index); - var match$1 = aux(match[1], 0, last_index); - var match$2 = aux(match$1[1], 0, last_index); - var patch_end = match$2[1]; - var additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); + let match = aux(start, 0, last_index); + let match$1 = aux(match[1], 0, last_index); + let match$2 = aux(match$1[1], 0, last_index); + let patch_end = match$2[1]; + let additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); return [ [ match[0], @@ -10778,7 +10778,7 @@ function semantic_version_parse(str, start, last_index) { } function defined(str) { - var val; + let val; try { val = Stdlib__Hashtbl.find(directive_built_in_values, str); } @@ -10799,21 +10799,21 @@ function defined(str) { } function query(loc, str) { - var v; + let v; try { v = Stdlib__Hashtbl.find(directive_built_in_values, str); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var exit = 0; - var v$1; + let exit = 0; + let v$1; try { v$1 = Caml_sys.caml_sys_getenv(str); exit = 2; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* Dir_bool */0, @@ -10917,18 +10917,18 @@ function value_of_token(loc, t) { } function directive_parse(token_with_comments, lexbuf) { - var look_ahead = { + let look_ahead = { contents: undefined }; - var token = function (param) { - var v = look_ahead.contents; + let token = function (param) { + let v = look_ahead.contents; if (v !== undefined) { look_ahead.contents = undefined; return v; } - var _param; + let _param; while(true) { - var t = Curry._1(token_with_comments, lexbuf); + let t = Curry._1(token_with_comments, lexbuf); if (typeof t === "number") { switch (t) { case /* EOF */25 : @@ -10955,7 +10955,7 @@ function directive_parse(token_with_comments, lexbuf) { } }; }; - var push = function (e) { + let push = function (e) { if (look_ahead.contents !== undefined) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -10968,9 +10968,9 @@ function directive_parse(token_with_comments, lexbuf) { } look_ahead.contents = e; }; - var token_op = function (calc, no, lhs) { - var op = token(undefined); - var exit = 0; + let token_op = function (calc, no, lhs) { + let op = token(undefined); + let exit = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -10990,20 +10990,20 @@ function directive_parse(token_with_comments, lexbuf) { if (!calc) { return true; } - var exit$1 = 0; + let exit$1 = 0; if (typeof lhs === "number" || lhs.TAG !== /* Dir_string */3) { exit$1 = 2; } else { - var curr_loc = curr(lexbuf); - var rhs = value_of_token(curr_loc, token(undefined)); - var exit$2 = 0; + let curr_loc = curr(lexbuf); + let rhs = value_of_token(curr_loc, token(undefined)); + let exit$2 = 0; if (typeof rhs === "number") { exit$2 = 3; } else { if (rhs.TAG === /* Dir_string */3) { - var lhs$1 = lhs._0; - var str = rhs._0; - var last_index = str.length - 1 | 0; + let lhs$1 = lhs._0; + let str = rhs._0; + let last_index = str.length - 1 | 0; if (last_index < 0) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -11014,9 +11014,9 @@ function directive_parse(token_with_comments, lexbuf) { _2: curr_loc }); } - var v = str.charCodeAt(0); - var match; - var exit$3 = 0; + let v = str.charCodeAt(0); + let match; + let exit$3 = 0; if (v !== 94) { if (v >= 63) { if (v !== 126) { @@ -11087,11 +11087,11 @@ function directive_parse(token_with_comments, lexbuf) { semantic_version_parse(str, 0, last_index) ]; } - var version = match[1][0]; - var major = version[0]; - var pred = match[0]; - var match$1 = semantic_version_parse(lhs$1, 0, lhs$1.length - 1 | 0); - var lversion = match$1[0]; + let version = match[1][0]; + let major = version[0]; + let pred = match[0]; + let match$1 = semantic_version_parse(lhs$1, 0, lhs$1.length - 1 | 0); + let lversion = match$1[0]; if (pred === "Ge") { return Caml_obj.caml_greaterequal(lversion, version); } @@ -11107,7 +11107,7 @@ function directive_parse(token_with_comments, lexbuf) { if (pred === "Exact") { return Caml_obj.caml_equal(lversion, version); } - var l_major = lversion[0]; + let l_major = lversion[0]; if (pred === "Compatible") { return major === l_major; } else if (major === l_major) { @@ -11153,8 +11153,8 @@ function directive_parse(token_with_comments, lexbuf) { } } if (exit === 1) { - var f; - var exit$4 = 0; + let f; + let exit$4 = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -11193,8 +11193,8 @@ function directive_parse(token_with_comments, lexbuf) { ] }); } - var curr_loc$1 = curr(lexbuf); - var rhs$1 = value_of_token(curr_loc$1, token(undefined)); + let curr_loc$1 = curr(lexbuf); + let rhs$1 = value_of_token(curr_loc$1, token(undefined)); if (calc) { return Curry._2(f, lhs, assert_same_type(lexbuf, lhs, rhs$1)); } else { @@ -11203,15 +11203,15 @@ function directive_parse(token_with_comments, lexbuf) { } }; - var parse_and_aux = function (calc, v) { - var e = token(undefined); + let parse_and_aux = function (calc, v) { + let e = token(undefined); if (typeof e === "number") { if (e) { push(e); return v; } - var calc$1 = calc && v; - var b = parse_and_aux(calc$1, parse_relation(calc$1)); + let calc$1 = calc && v; + let b = parse_and_aux(calc$1, parse_relation(calc$1)); if (v) { return b; } else { @@ -11221,16 +11221,16 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var parse_relation = function (calc) { - var curr_token = token(undefined); - var curr_loc = curr(lexbuf); + let parse_relation = function (calc) { + let curr_token = token(undefined); + let curr_loc = curr(lexbuf); if (typeof curr_token === "number") { switch (curr_token) { case /* FALSE */29 : return false; case /* LPAREN */54 : - var v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); - var match = token(undefined); + let v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); + let match = token(undefined); if (match === 81) { return v; } @@ -11266,7 +11266,7 @@ function directive_parse(token_with_comments, lexbuf) { _0: Caml_format.caml_float_of_string(curr_token._0) }); case /* INT */7 : - var v$1 = curr_token._0; + let v$1 = curr_token._0; return token_op(calc, (function (e) { push(e); return v$1 !== 0; @@ -11275,7 +11275,7 @@ function directive_parse(token_with_comments, lexbuf) { _0: v$1 }); case /* LIDENT */11 : - var r = curr_token._0; + let r = curr_token._0; switch (r) { case "defined" : case "undefined" : @@ -11287,8 +11287,8 @@ function directive_parse(token_with_comments, lexbuf) { _2: curr_loc }); } - var t = token(undefined); - var loc = curr(lexbuf); + let t = token(undefined); + let loc = curr(lexbuf); if (typeof t === "number") { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -11297,7 +11297,7 @@ function directive_parse(token_with_comments, lexbuf) { }); } if (t.TAG === /* UIDENT */17) { - var s = t._0; + let s = t._0; if (calc) { if (Caml_string.get(r, 0) === /* 'u' */117) { return !defined(s); @@ -11330,13 +11330,13 @@ function directive_parse(token_with_comments, lexbuf) { _0: curr_token._0[0] }); case /* UIDENT */17 : - var value_v = query(curr_loc, curr_token._0); + let value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { push(e); if (typeof value_v !== "number" && value_v.TAG === /* Dir_bool */0) { return value_v._0; } - var ty = type_of_directive(value_v); + let ty = type_of_directive(value_v); throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -11356,11 +11356,11 @@ function directive_parse(token_with_comments, lexbuf) { } } }; - var parse_or_aux = function (calc, v) { - var e = token(undefined); + let parse_or_aux = function (calc, v) { + let e = token(undefined); if (e === 8) { - var calc$1 = calc && !v; - var b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); + let calc$1 = calc && !v; + let b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); if (v) { return true; } else { @@ -11370,8 +11370,8 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); - var match = token(undefined); + let v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); + let match = token(undefined); if (match === 88) { return v; } @@ -11390,7 +11390,7 @@ function is_elif(i) { } } -var keyword_table = create_hashtable(149, { +let keyword_table = create_hashtable(149, { hd: [ "and", /* AND */2 @@ -11749,13 +11749,13 @@ var keyword_table = create_hashtable(149, { } }); -var initial_string_buffer = Caml_bytes.caml_create_bytes(256); +let initial_string_buffer = Caml_bytes.caml_create_bytes(256); -var string_buff = { +let string_buff = { contents: initial_string_buffer }; -var string_index = { +let string_index = { contents: 0 }; @@ -11766,7 +11766,7 @@ function reset_string_buffer(param) { function store_string_char(c) { if (string_index.contents >= string_buff.contents.length) { - var new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); + let new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); Stdlib__Bytes.blit(string_buff.contents, 0, new_buff, 0, string_buff.contents.length); string_buff.contents = new_buff; } @@ -11775,55 +11775,55 @@ function store_string_char(c) { } function store_string(s) { - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ store_string_char(Caml_string.get(s, i)); } } function get_stored_string(param) { - var s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); + let s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); string_buff.contents = initial_string_buffer; return s; } -var string_start_loc = { +let string_start_loc = { contents: none }; -var comment_start_loc = { +let comment_start_loc = { contents: /* [] */0 }; -var is_in_string = { +let is_in_string = { contents: false }; -var print_warnings = { +let print_warnings = { contents: true }; -var if_then_else = { +let if_then_else = { contents: /* Dir_out */2 }; -var sharp_look_ahead = { +let sharp_look_ahead = { contents: undefined }; function with_comment_buffer(comment, lexbuf) { - var start_loc = curr(lexbuf); + let start_loc = curr(lexbuf); comment_start_loc.contents = { hd: start_loc, tl: /* [] */0 }; reset_string_buffer(undefined); - var end_loc = Curry._1(comment, lexbuf); - var s = get_stored_string(undefined); + let end_loc = Curry._1(comment, lexbuf); + let s = get_stored_string(undefined); reset_string_buffer(undefined); - var loc_loc_start = start_loc.loc_start; - var loc_loc_end = end_loc.loc_end; - var loc_loc_ghost = start_loc.loc_ghost; - var loc = { + let loc_loc_start = start_loc.loc_start; + let loc_loc_end = end_loc.loc_end; + let loc_loc_ghost = start_loc.loc_ghost; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: loc_loc_ghost @@ -11862,7 +11862,7 @@ function char_for_backslash(c) { } function char_for_decimal_code(lexbuf, i) { - var c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; + let c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; if (!(c < 0 || c > 255)) { return Stdlib__Char.chr(c); } @@ -11880,12 +11880,12 @@ function char_for_decimal_code(lexbuf, i) { } function char_for_hexadecimal_code(lexbuf, i) { - var d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); - var val1 = d1 >= 97 ? d1 - 87 | 0 : ( + let d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); + let val1 = d1 >= 97 ? d1 - 87 | 0 : ( d1 >= 65 ? d1 - 55 | 0 : d1 - 48 | 0 ); - var d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); - var val2 = d2 >= 97 ? d2 - 87 | 0 : ( + let d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); + let val2 = d2 >= 97 ? d2 - 87 | 0 : ( d2 >= 65 ? d2 - 55 | 0 : d2 - 48 | 0 ); return Stdlib__Char.chr((val1 << 4) + val2 | 0); @@ -11915,13 +11915,13 @@ function cvt_nativeint_literal(s) { } function remove_underscores(s) { - var l = s.length; - var b = Caml_bytes.caml_create_bytes(l); - var _src = 0; - var _dst = 0; + let l = s.length; + let b = Caml_bytes.caml_create_bytes(l); + let _src = 0; + let _dst = 0; while(true) { - var dst = _dst; - var src = _src; + let dst = _dst; + let src = _src; if (src >= l) { if (dst >= l) { return s; @@ -11929,7 +11929,7 @@ function remove_underscores(s) { return Stdlib__Bytes.sub_string(b, 0, dst); } } - var c = Caml_string.get(s, src); + let c = Caml_string.get(s, src); if (c !== 95) { Caml_bytes.set(b, dst, c); _dst = dst + 1 | 0; @@ -11942,8 +11942,8 @@ function remove_underscores(s) { } function get_label_name(lexbuf) { - var s = Stdlib__Lexing.lexeme(lexbuf); - var name = Stdlib__String.sub(s, 1, s.length - 2 | 0); + let s = Stdlib__Lexing.lexeme(lexbuf); + let name = Stdlib__String.sub(s, 1, s.length - 2 | 0); if (Stdlib__Hashtbl.mem(keyword_table, name)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -11958,8 +11958,8 @@ function get_label_name(lexbuf) { } function update_loc(lexbuf, file, line, absolute, chars) { - var pos = lexbuf.lex_curr_p; - var new_file = file !== undefined ? file : pos.pos_fname; + let pos = lexbuf.lex_curr_p; + let new_file = file !== undefined ? file : pos.pos_fname; lexbuf.lex_curr_p = { pos_fname: new_file, pos_lnum: absolute ? line : pos.pos_lnum + line | 0, @@ -11968,15 +11968,15 @@ function update_loc(lexbuf, file, line, absolute, chars) { }; } -var preprocessor = { +let preprocessor = { contents: undefined }; -var escaped_newlines = { +let escaped_newlines = { contents: false }; -var comment_list = { +let comment_list = { contents: /* [] */0 }; @@ -12207,7 +12207,7 @@ register_error_of_exn(function (param) { }); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xa4\xff\xa5\xff\xe0\0\x03\x01&\x01I\x01l\x01\x8f\x01\xbc\xff\xb2\x01\xd7\x01\xc4\xff[\0\xfc\x01\x1f\x02D\0G\0T\0B\x02\xd5\xff\xd7\xff\xda\xffe\x02\xc4\x02\xe7\x02Y\0\xff\0\x05\x03\xec\xffR\x03s\x03\xbc\x03\x8c\x04\\\x05,\x06\x0b\x07g\x077\b}\0\xfe\xff\x01\0\x05\0\xff\xff\x06\0\x07\0\x16\t4\t\x04\n\xfa\xff\xf9\xff\xd4\n\xa4\x0b\xf7\xff\xf6\xff\xed\xff\xee\xff\xef\xff]\0v\x02[\0n\0\xe7\x02\x07\x04\xd7\x04e\x02\xfe\x02v\0\xc2\xff\xeb\xffx\x05\x84\f`\0q\0\x0b\0\xea\xff\xe9\xff\xe5\xff\xe5\x04\x80\0s\0\xe8\xff\xe0\0u\0\xe7\xffw\x06\x93\0\xe6\xff\x92\0\xe1\xff\x94\0\xe0\xff\xd9\0\x84\f\xdf\xff\xab\f\xaf\b\xae\x06\xde\xff\f\0\x18\x01,\x01P\x01-\x01\xde\xff\r\0\xd9\f\0\r#\rI\r\xd2\xff\xce\xff\xcf\xff\xd0\xff\xcc\xffl\r\x9a\0\xb7\0\xc5\xff\xc6\xff\xc7\xff\xc7\0\xb6\xff\xb8\xff\xbf\xff\x8f\r\xbb\xff\xbd\xff\xb2\r\xd5\r\xf8\r\x1b\x0e\xeb\x05\xf3\xff\xf4\xff\x11\0\xf5\xff>\x02\xac\x07\xfd\xff\xdf\0\xf1\0\xff\xff\xfe\xff\xfc\xff\xc8\x07-\x0e\xfa\0\xfc\0\x12\0\xfb\xff\xfa\xff\xf9\xff\x80\t\x1e\x03\x03\x01\xf8\xff\\\x03\x04\x01\xf7\xffO\n\x05\x01\xf6\xff+\x01\xc7\x01\xf7\xff\xf8\xff\xf9\xff;\x01v\x0e\xff\xff\xfa\xff\x1f\x0b$\x04\xfd\xff&\x01E\x01^\x01\xfc\x04\xfc\xff\xef\x0b\xfb\xff_\x01\xb5\x01\xfc\xff\xee\x06\xfe\xff\xff\xffo\x01p\x01\xfd\xffJ\x07\x10\x01\x13\x012\x01?\x01\x1a\x01k\x01!\x01\x13\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xffX\0W\0T\0S\0L\0J\0\xff\xffA\0>\0\xff\xff7\x006\x004\x002\0.\0,\0O\0\xff\xff\xff\xff\xff\xff#\0\"\0)\0'\0&\0<\0\xff\xff\x0e\0\x0e\0\r\0\f\0\x0b\0\n\0\x07\0\x04\0\x03\0\x02\0\xff\xff[\0[\0\xff\xff\xff\xff\xff\xffR\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\x0e\0\x0e\0\x0e\0\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\0\x1a\0\x1a\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\0\xff\xff\x1c\0\xff\xff\x1d\0V\0\xff\xffY\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff$\0U\0P\0+\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\0F\0E\0\xff\xff\xff\xff\xff\xffH\0\xff\xff\xff\xff\xff\xff?\0\xff\xff\xff\xffQ\0K\0N\0M\0\xff\xff\xff\xff\xff\xff\f\0\xff\xff\f\0\f\0\xff\xff\f\0\f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\b\0\b\0\xff\xff\xff\xff\x05\0\x05\0\xff\xff\x01\0\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", lex_default: "\x01\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffH\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xffM\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xffd\0\xff\xff\0\0\xff\xffd\0e\0d\0g\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\x85\0\0\0\0\0\xff\xff\0\0\x93\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xa5\0\0\0\0\0\0\0\xff\xff\xab\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xb8\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xc2\0\xc5\0\xff\xff\xc5\0\xff\xff\xff\xff\0\0", @@ -12223,10 +12223,10 @@ var __ocaml_lex_tables = { function token(lexbuf) { lexbuf.lex_mem = Caml_array.make(8, -1); - var ___ocaml_lex_state = 0; + let ___ocaml_lex_state = 0; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : if (!escaped_newlines.contents) { @@ -12281,12 +12281,12 @@ function token(lexbuf) { _0: get_label_name(lexbuf) }; case 10 : - var s = Stdlib__Lexing.lexeme(lexbuf); + let s = Stdlib__Lexing.lexeme(lexbuf); try { return Stdlib__Hashtbl.find(keyword_table, s); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* LIDENT */11, @@ -12326,7 +12326,7 @@ function token(lexbuf) { }; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12352,7 +12352,7 @@ function token(lexbuf) { }; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12373,7 +12373,7 @@ function token(lexbuf) { }; } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12394,7 +12394,7 @@ function token(lexbuf) { }; } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12410,7 +12410,7 @@ function token(lexbuf) { case 19 : reset_string_buffer(undefined); is_in_string.contents = true; - var string_start = lexbuf.lex_start_p; + let string_start = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); string(lexbuf); is_in_string.contents = false; @@ -12424,10 +12424,10 @@ function token(lexbuf) { }; case 20 : reset_string_buffer(undefined); - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); is_in_string.contents = true; - var string_start$1 = lexbuf.lex_start_p; + let string_start$1 = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); is_in_string.contents = false; @@ -12466,8 +12466,8 @@ function token(lexbuf) { _0: char_for_hexadecimal_code(lexbuf, 3) }; case 26 : - var l = Stdlib__Lexing.lexeme(lexbuf); - var esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); + let l = Stdlib__Lexing.lexeme(lexbuf); + let esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -12477,7 +12477,7 @@ function token(lexbuf) { _2: curr(lexbuf) }); case 27 : - var match = with_comment_buffer(comment, lexbuf); + let match = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -12486,14 +12486,14 @@ function token(lexbuf) { ] }; case 28 : - var match$1 = with_comment_buffer(comment, lexbuf); + let match$1 = with_comment_buffer(comment, lexbuf); return { TAG: /* DOCSTRING */19, _0: docstring(match$1[0], match$1[1]) }; case 29 : - var stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); - var match$2 = with_comment_buffer((function(stars){ + let stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let match$2 = with_comment_buffer((function(stars){ return function (lexbuf) { store_string("*" + stars); return __ocaml_lex_comment_rec(lexbuf, 132); @@ -12510,7 +12510,7 @@ function token(lexbuf) { if (print_warnings.contents) { prerr_warning(curr(lexbuf), /* Comment_start */0); } - var match$3 = with_comment_buffer(comment, lexbuf); + let match$3 = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -12519,7 +12519,7 @@ function token(lexbuf) { ] }; case 31 : - var stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); + let stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); return { TAG: /* COMMENT */18, _0: [ @@ -12528,10 +12528,10 @@ function token(lexbuf) { ] }; case 32 : - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Comment_not_end */1); lexbuf.lex_curr_pos = lexbuf.lex_curr_pos - 1 | 0; - var curpos = lexbuf.lex_curr_p; + let curpos = lexbuf.lex_curr_p; lexbuf.lex_curr_p = { pos_fname: curpos.pos_fname, pos_lnum: curpos.pos_lnum, @@ -12540,8 +12540,8 @@ function token(lexbuf) { }; return /* STAR */86; case 33 : - var num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); + let num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); update_loc(lexbuf, name, Caml_format.caml_int_of_string(num), true, 0); return token(lexbuf); case 34 : @@ -12714,15 +12714,15 @@ function token(lexbuf) { function string(lexbuf) { lexbuf.lex_mem = Caml_array.make(2, -1); - var ___ocaml_lex_state = 164; + let ___ocaml_lex_state = 164; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return ; case 1 : - var space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); update_loc(lexbuf, undefined, 1, false, space.length); return string(lexbuf); case 2 : @@ -12738,7 +12738,7 @@ function string(lexbuf) { if (Caml_obj.caml_notequal(comment_start_loc.contents, /* [] */0)) { return string(lexbuf); } - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Illegal_backslash */7); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 0)); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 1)); @@ -12774,8 +12774,8 @@ function comment(lexbuf) { function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : update_loc(lexbuf, undefined, 1, false, 0); @@ -12790,8 +12790,8 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { _2: string_start_loc.contents }); case 2 : - var edelim = Stdlib__Lexing.lexeme(lexbuf); - var edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); + let edelim = Stdlib__Lexing.lexeme(lexbuf); + let edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); if (delim === edelim$1) { return ; } @@ -12812,8 +12812,8 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : comment_start_loc.contents = { @@ -12824,7 +12824,7 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 1 : - var match = comment_start_loc.contents; + let match = comment_start_loc.contents; if (match) { if (match.tl) { comment_start_loc.contents = match.tl; @@ -12851,16 +12851,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { string(lexbuf); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$2) { - var match$1 = exn._1; + let match$1 = exn._1; if (typeof match$1 === "number") { if (match$1) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var match$2 = comment_start_loc.contents; + let match$2 = comment_start_loc.contents; if (match$2) { - var start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12890,8 +12890,8 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 3 : - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); string_start_loc.contents = curr(lexbuf); store_string(Stdlib__Lexing.lexeme(lexbuf)); is_in_string.contents = true; @@ -12899,16 +12899,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === $$Error$2) { - var match$3 = exn$1._1; + let match$3 = exn$1._1; if (typeof match$3 === "number") { if (match$3) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var match$4 = comment_start_loc.contents; + let match$4 = comment_start_loc.contents; if (match$4) { - var start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12945,9 +12945,9 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 10 : - var match$5 = comment_start_loc.contents; + let match$5 = comment_start_loc.contents; if (match$5) { - var start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12989,12 +12989,12 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { } function at_bol(lexbuf) { - var pos = lexbuf.lex_start_p; + let pos = lexbuf.lex_start_p; return pos.pos_cnum === pos.pos_bol; } function token_with_comments(lexbuf) { - var match = preprocessor.contents; + let match = preprocessor.contents; if (match !== undefined) { return Curry._2(match[1], token, lexbuf); } else { @@ -13003,13 +13003,13 @@ function token_with_comments(lexbuf) { } function token$1(lexbuf) { - var post_pos = lexbuf.lex_curr_p; - var attach = function (lines, docs, pre_pos) { + let post_pos = lexbuf.lex_curr_p; + let attach = function (lines, docs, pre_pos) { if (typeof docs === "number") { return ; } if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a)); return set_pre_extra_docstrings(pre_pos, Stdlib__List.rev(a)); @@ -13018,9 +13018,9 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, a); } } - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a$1)); set_post_extra_docstrings(post_pos, Stdlib__List.rev_append(f, Stdlib__List.rev(b))); @@ -13034,26 +13034,26 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, b); } }; - var loop = function (_lines, _docs, lexbuf) { + let loop = function (_lines, _docs, lexbuf) { while(true) { - var docs = _docs; - var lines = _lines; - var doc = token_with_comments(lexbuf); + let docs = _docs; + let lines = _lines; + let doc = token_with_comments(lexbuf); if (typeof doc === "number") { switch (doc) { case /* SHARP */84 : if (at_bol(lexbuf)) { - var cont = (function(lines,docs){ + let cont = (function(lines,docs){ return function cont(lexbuf) { return loop(lines, docs, lexbuf); } }(lines,docs)); - var look_ahead = function (token) { + let look_ahead = function (token) { sharp_look_ahead.contents = token; return /* SHARP */84; }; - var if_then_else$1 = if_then_else.contents; - var match = token_with_comments(lexbuf); + let if_then_else$1 = if_then_else.contents; + let match = token_with_comments(lexbuf); if (typeof match === "number") { switch (match) { case /* ELSE */23 : @@ -13081,9 +13081,9 @@ function token$1(lexbuf) { if_then_else.contents = /* Dir_if_true */0; return Curry._1(cont, lexbuf); } else { - var _param; + let _param; while(true) { - var token = token_with_comments(lexbuf); + let token = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -13092,7 +13092,7 @@ function token$1(lexbuf) { }); } if (Caml_obj.caml_equal(token, /* SHARP */84) && at_bol(lexbuf)) { - var token$1 = token_with_comments(lexbuf); + let token$1 = token_with_comments(lexbuf); if (typeof token$1 === "number") { if (token$1 === 24 || token$1 === 23) { if (token$1 >= 24) { @@ -13151,10 +13151,10 @@ function token$1(lexbuf) { if (if_then_else$1) { return Curry._1(look_ahead, match); } - var _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); + let _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); while(true) { - var else_seen = _else_seen; - var token$2 = token_with_comments(lexbuf); + let else_seen = _else_seen; + let token$2 = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token$2, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -13163,7 +13163,7 @@ function token$1(lexbuf) { }); } if (Caml_obj.caml_equal(token$2, /* SHARP */84) && at_bol(lexbuf)) { - var token$3 = token_with_comments(lexbuf); + let token$3 = token_with_comments(lexbuf); if (typeof token$3 === "number") { if (token$3 === 24 || token$3 === 23) { if (token$3 >= 24) { @@ -13203,7 +13203,7 @@ function token$1(lexbuf) { } break; case /* EOL */100 : - var lines$p = lines ? /* BlankLine */2 : /* NewLine */1; + let lines$p = lines ? /* BlankLine */2 : /* NewLine */1; _lines = lines$p; continue ; default: @@ -13212,18 +13212,18 @@ function token$1(lexbuf) { } else { switch (doc.TAG | 0) { case /* COMMENT */18 : - var match$1 = doc._0; + let match$1 = doc._0; add_comment([ match$1[0], match$1[1] ]); - var lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; + let lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; _lines = lines$p$1; continue ; case /* DOCSTRING */19 : - var doc$1 = doc._0; + let doc$1 = doc._0; add_docstring_comment(doc$1); - var docs$p; + let docs$p; if (typeof docs === "number") { docs$p = lines >= 2 ? ({ TAG: /* Before */1, @@ -13241,7 +13241,7 @@ function token$1(lexbuf) { } }); } else if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a, @@ -13258,9 +13258,9 @@ function token$1(lexbuf) { } }); } else { - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a$1, @@ -13290,7 +13290,7 @@ function token$1(lexbuf) { return doc; }; }; - var token$2 = sharp_look_ahead.contents; + let token$2 = sharp_look_ahead.contents; if (token$2 !== undefined) { sharp_look_ahead.contents = undefined; return token$2; @@ -13305,7 +13305,7 @@ function init$1(param) { is_in_string.contents = false; comment_start_loc.contents = /* [] */0; comment_list.contents = /* [] */0; - var match = preprocessor.contents; + let match = preprocessor.contents; if (match !== undefined) { return Curry._1(match[0], undefined); } @@ -13315,7 +13315,7 @@ function init$1(param) { function skip_phrase(lexbuf) { while(true) { try { - var match = token$1(lexbuf); + let match = token$1(lexbuf); if (typeof match === "number" && !(match !== 25 && match !== 83)) { return ; } else { @@ -13323,9 +13323,9 @@ function skip_phrase(lexbuf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$2) { - var tmp = exn._1; + let tmp = exn._1; if (typeof tmp === "number") { if (tmp === /* Unterminated_string */0) { continue ; @@ -13360,15 +13360,15 @@ function wrap(parsing_fun, lexbuf) { try { init(undefined); init$1(undefined); - var ast = Curry._2(parsing_fun, token$1, lexbuf); + let ast = Curry._2(parsing_fun, token$1, lexbuf); Stdlib__Parsing.clear_parser(undefined); warn_bad_docstrings(undefined); return ast; } catch (raw_err){ - var err = Caml_js_exceptions.internalToOCamlException(raw_err); + let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.MEL_EXN_ID === $$Error$2) { - var tmp = err._1; + let tmp = err._1; if (typeof tmp === "number") { throw new Caml_js_exceptions.MelangeError(err.MEL_EXN_ID, err); } @@ -13393,7 +13393,7 @@ function wrap(parsing_fun, lexbuf) { } } - var loc = curr(lexbuf); + let loc = curr(lexbuf); if (input_name.contents === "//toplevel//") { maybe_skip_phrase(lexbuf); } @@ -13407,11 +13407,11 @@ function wrap(parsing_fun, lexbuf) { } } -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -13432,188 +13432,188 @@ function eq(loc, x, y) { }; } -var match = wrap(implementation, Stdlib__Lexing.from_string(undefined, "let v str = \n str \n |> Lexing.from_string \n |> Parse.implementation\n")); +let match = wrap(implementation, Stdlib__Lexing.from_string(undefined, "let v str = \n str \n |> Lexing.from_string \n |> Parse.implementation\n")); if (match) { - var match$1 = match.hd.pstr_desc; + let match$1 = match.hd.pstr_desc; if (match$1.TAG === /* Pstr_value */1 && !match$1._0) { - var match$2 = match$1._1; + let match$2 = match$1._1; if (match$2) { - var match$3 = match$2.hd; - var match$4 = match$3.pvb_pat; - var match$5 = match$4.ppat_desc; + let match$3 = match$2.hd; + let match$4 = match$3.pvb_pat; + let match$5 = match$4.ppat_desc; if (typeof match$5 === "number" || match$5.TAG !== /* Ppat_var */0) { eq("File \"ocaml_parsetree_main_bspack.ml\", line 216, characters 12-19", true, false); } else { - var match$6 = match$5._0; + let match$6 = match$5._0; if (match$6.txt === "v") { - var match$7 = match$6.loc; - var match$8 = match$7.loc_start; + let match$7 = match$6.loc; + let match$8 = match$7.loc_start; if (match$8.pos_fname === "" && !(match$8.pos_lnum !== 1 || match$8.pos_bol !== 0 || match$8.pos_cnum !== 4)) { - var match$9 = match$7.loc_end; + let match$9 = match$7.loc_end; if (match$9.pos_fname === "" && !(match$9.pos_lnum !== 1 || match$9.pos_bol !== 0 || match$9.pos_cnum !== 5 || match$7.loc_ghost)) { - var match$10 = match$4.ppat_loc; - var match$11 = match$10.loc_start; + let match$10 = match$4.ppat_loc; + let match$11 = match$10.loc_start; if (match$11.pos_fname === "" && !(match$11.pos_lnum !== 1 || match$11.pos_bol !== 0 || match$11.pos_cnum !== 4)) { - var match$12 = match$10.loc_end; + let match$12 = match$10.loc_end; if (match$12.pos_fname === "" && !(match$12.pos_lnum !== 1 || match$12.pos_bol !== 0 || match$12.pos_cnum !== 5 || match$10.loc_ghost || match$4.ppat_attributes)) { - var match$13 = match$3.pvb_expr; - var match$14 = match$13.pexp_desc; + let match$13 = match$3.pvb_expr; + let match$14 = match$13.pexp_desc; if (match$14.TAG === /* Pexp_fun */4 && match$14._0 === "" && match$14._1 === undefined) { - var match$15 = match$14._2; - var match$16 = match$15.ppat_desc; + let match$15 = match$14._2; + let match$16 = match$15.ppat_desc; if (typeof match$16 === "number" || match$16.TAG !== /* Ppat_var */0) { eq("File \"ocaml_parsetree_main_bspack.ml\", line 216, characters 12-19", true, false); } else { - var match$17 = match$16._0; + let match$17 = match$16._0; if (match$17.txt === "str") { - var match$18 = match$17.loc; - var match$19 = match$18.loc_start; + let match$18 = match$17.loc; + let match$19 = match$18.loc_start; if (match$19.pos_fname === "" && !(match$19.pos_lnum !== 1 || match$19.pos_bol !== 0 || match$19.pos_cnum !== 6)) { - var match$20 = match$18.loc_end; + let match$20 = match$18.loc_end; if (match$20.pos_fname === "" && !(match$20.pos_lnum !== 1 || match$20.pos_bol !== 0 || match$20.pos_cnum !== 9 || match$18.loc_ghost)) { - var match$21 = match$15.ppat_loc; - var match$22 = match$21.loc_start; + let match$21 = match$15.ppat_loc; + let match$22 = match$21.loc_start; if (match$22.pos_fname === "" && !(match$22.pos_lnum !== 1 || match$22.pos_bol !== 0 || match$22.pos_cnum !== 6)) { - var match$23 = match$21.loc_end; + let match$23 = match$21.loc_end; if (match$23.pos_fname === "" && !(match$23.pos_lnum !== 1 || match$23.pos_bol !== 0 || match$23.pos_cnum !== 9 || match$21.loc_ghost || match$15.ppat_attributes)) { - var match$24 = match$14._3; - var match$25 = match$24.pexp_desc; + let match$24 = match$14._3; + let match$25 = match$24.pexp_desc; if (match$25.TAG === /* Pexp_apply */5) { - var match$26 = match$25._0; - var match$27 = match$26.pexp_desc; + let match$26 = match$25._0; + let match$27 = match$26.pexp_desc; if (match$27.TAG === /* Pexp_ident */0) { - var match$28 = match$27._0; - var match$29 = match$28.txt; + let match$28 = match$27._0; + let match$29 = match$28.txt; switch (match$29.TAG | 0) { case /* Lident */0 : if (match$29._0 === "|>") { - var match$30 = match$28.loc; - var match$31 = match$30.loc_start; + let match$30 = match$28.loc; + let match$31 = match$30.loc_start; if (match$31.pos_fname === "" && !(match$31.pos_lnum !== 4 || match$31.pos_bol !== 46 || match$31.pos_cnum !== 48)) { - var match$32 = match$30.loc_end; + let match$32 = match$30.loc_end; if (match$32.pos_fname === "" && !(match$32.pos_lnum !== 4 || match$32.pos_bol !== 46 || match$32.pos_cnum !== 50 || match$30.loc_ghost)) { - var match$33 = match$26.pexp_loc; - var match$34 = match$33.loc_start; + let match$33 = match$26.pexp_loc; + let match$34 = match$33.loc_start; if (match$34.pos_fname === "" && !(match$34.pos_lnum !== 4 || match$34.pos_bol !== 46 || match$34.pos_cnum !== 48)) { - var match$35 = match$33.loc_end; + let match$35 = match$33.loc_end; if (match$35.pos_fname === "" && !(match$35.pos_lnum !== 4 || match$35.pos_bol !== 46 || match$35.pos_cnum !== 50 || match$33.loc_ghost || match$26.pexp_attributes)) { - var match$36 = match$25._1; + let match$36 = match$25._1; if (match$36) { - var match$37 = match$36.hd; + let match$37 = match$36.hd; if (match$37[0] === "") { - var match$38 = match$37[1]; - var match$39 = match$38.pexp_desc; + let match$38 = match$37[1]; + let match$39 = match$38.pexp_desc; if (match$39.TAG === /* Pexp_apply */5) { - var match$40 = match$39._0; - var match$41 = match$40.pexp_desc; + let match$40 = match$39._0; + let match$41 = match$40.pexp_desc; if (match$41.TAG === /* Pexp_ident */0) { - var match$42 = match$41._0; - var match$43 = match$42.txt; + let match$42 = match$41._0; + let match$43 = match$42.txt; switch (match$43.TAG | 0) { case /* Lident */0 : if (match$43._0 === "|>") { - var match$44 = match$42.loc; - var match$45 = match$44.loc_start; + let match$44 = match$42.loc; + let match$45 = match$44.loc_start; if (match$45.pos_fname === "" && !(match$45.pos_lnum !== 3 || match$45.pos_bol !== 21 || match$45.pos_cnum !== 23)) { - var match$46 = match$44.loc_end; + let match$46 = match$44.loc_end; if (match$46.pos_fname === "" && !(match$46.pos_lnum !== 3 || match$46.pos_bol !== 21 || match$46.pos_cnum !== 25 || match$44.loc_ghost)) { - var match$47 = match$40.pexp_loc; - var match$48 = match$47.loc_start; + let match$47 = match$40.pexp_loc; + let match$48 = match$47.loc_start; if (match$48.pos_fname === "" && !(match$48.pos_lnum !== 3 || match$48.pos_bol !== 21 || match$48.pos_cnum !== 23)) { - var match$49 = match$47.loc_end; + let match$49 = match$47.loc_end; if (match$49.pos_fname === "" && !(match$49.pos_lnum !== 3 || match$49.pos_bol !== 21 || match$49.pos_cnum !== 25 || match$47.loc_ghost || match$40.pexp_attributes)) { - var match$50 = match$39._1; + let match$50 = match$39._1; if (match$50) { - var match$51 = match$50.hd; + let match$51 = match$50.hd; if (match$51[0] === "") { - var match$52 = match$51[1]; - var match$53 = match$52.pexp_desc; + let match$52 = match$51[1]; + let match$53 = match$52.pexp_desc; if (match$53.TAG === /* Pexp_ident */0) { - var match$54 = match$53._0; - var match$55 = match$54.txt; + let match$54 = match$53._0; + let match$55 = match$54.txt; switch (match$55.TAG | 0) { case /* Lident */0 : if (match$55._0 === "str") { - var match$56 = match$54.loc; - var match$57 = match$56.loc_start; + let match$56 = match$54.loc; + let match$57 = match$56.loc_start; if (match$57.pos_fname === "" && !(match$57.pos_lnum !== 2 || match$57.pos_bol !== 13 || match$57.pos_cnum !== 15)) { - var match$58 = match$56.loc_end; + let match$58 = match$56.loc_end; if (match$58.pos_fname === "" && !(match$58.pos_lnum !== 2 || match$58.pos_bol !== 13 || match$58.pos_cnum !== 18 || match$56.loc_ghost)) { - var match$59 = match$52.pexp_loc; - var match$60 = match$59.loc_start; + let match$59 = match$52.pexp_loc; + let match$60 = match$59.loc_start; if (match$60.pos_fname === "" && !(match$60.pos_lnum !== 2 || match$60.pos_bol !== 13 || match$60.pos_cnum !== 15)) { - var match$61 = match$59.loc_end; + let match$61 = match$59.loc_end; if (match$61.pos_fname === "" && !(match$61.pos_lnum !== 2 || match$61.pos_bol !== 13 || match$61.pos_cnum !== 18 || match$59.loc_ghost || match$52.pexp_attributes)) { - var match$62 = match$50.tl; + let match$62 = match$50.tl; if (match$62) { - var match$63 = match$62.hd; + let match$63 = match$62.hd; if (match$63[0] === "") { - var match$64 = match$63[1]; - var match$65 = match$64.pexp_desc; + let match$64 = match$63[1]; + let match$65 = match$64.pexp_desc; if (match$65.TAG === /* Pexp_ident */0) { - var match$66 = match$65._0; - var match$67 = match$66.txt; + let match$66 = match$65._0; + let match$67 = match$66.txt; switch (match$67.TAG | 0) { case /* Ldot */1 : - var match$68 = match$67._0; + let match$68 = match$67._0; switch (match$68.TAG | 0) { case /* Lident */0 : if (match$68._0 === "Lexing" && match$67._1 === "from_string") { - var match$69 = match$66.loc; - var match$70 = match$69.loc_start; + let match$69 = match$66.loc; + let match$70 = match$69.loc_start; if (match$70.pos_fname === "" && !(match$70.pos_lnum !== 3 || match$70.pos_bol !== 21 || match$70.pos_cnum !== 26)) { - var match$71 = match$69.loc_end; + let match$71 = match$69.loc_end; if (match$71.pos_fname === "" && !(match$71.pos_lnum !== 3 || match$71.pos_bol !== 21 || match$71.pos_cnum !== 44 || match$69.loc_ghost)) { - var match$72 = match$64.pexp_loc; - var match$73 = match$72.loc_start; + let match$72 = match$64.pexp_loc; + let match$73 = match$72.loc_start; if (match$73.pos_fname === "" && !(match$73.pos_lnum !== 3 || match$73.pos_bol !== 21 || match$73.pos_cnum !== 26)) { - var match$74 = match$72.loc_end; + let match$74 = match$72.loc_end; if (match$74.pos_fname === "" && !(match$74.pos_lnum !== 3 || match$74.pos_bol !== 21 || match$74.pos_cnum !== 44 || match$72.loc_ghost || match$64.pexp_attributes || match$62.tl)) { - var match$75 = match$38.pexp_loc; - var match$76 = match$75.loc_start; + let match$75 = match$38.pexp_loc; + let match$76 = match$75.loc_start; if (match$76.pos_fname === "" && !(match$76.pos_lnum !== 2 || match$76.pos_bol !== 13 || match$76.pos_cnum !== 15)) { - var match$77 = match$75.loc_end; + let match$77 = match$75.loc_end; if (match$77.pos_fname === "" && !(match$77.pos_lnum !== 3 || match$77.pos_bol !== 21 || match$77.pos_cnum !== 44 || match$75.loc_ghost || match$38.pexp_attributes)) { - var match$78 = match$36.tl; + let match$78 = match$36.tl; if (match$78) { - var match$79 = match$78.hd; + let match$79 = match$78.hd; if (match$79[0] === "") { - var match$80 = match$79[1]; - var match$81 = match$80.pexp_desc; + let match$80 = match$79[1]; + let match$81 = match$80.pexp_desc; if (match$81.TAG === /* Pexp_ident */0) { - var match$82 = match$81._0; - var match$83 = match$82.txt; + let match$82 = match$81._0; + let match$83 = match$82.txt; switch (match$83.TAG | 0) { case /* Ldot */1 : - var match$84 = match$83._0; + let match$84 = match$83._0; switch (match$84.TAG | 0) { case /* Lident */0 : if (match$84._0 === "Parse" && match$83._1 === "implementation") { - var match$85 = match$82.loc; - var match$86 = match$85.loc_start; + let match$85 = match$82.loc; + let match$86 = match$85.loc_start; if (match$86.pos_fname === "" && !(match$86.pos_lnum !== 4 || match$86.pos_bol !== 46 || match$86.pos_cnum !== 51)) { - var match$87 = match$85.loc_end; + let match$87 = match$85.loc_end; if (match$87.pos_fname === "" && !(match$87.pos_lnum !== 4 || match$87.pos_bol !== 46 || match$87.pos_cnum !== 71 || match$85.loc_ghost)) { - var match$88 = match$80.pexp_loc; - var match$89 = match$88.loc_start; + let match$88 = match$80.pexp_loc; + let match$89 = match$88.loc_start; if (match$89.pos_fname === "" && !(match$89.pos_lnum !== 4 || match$89.pos_bol !== 46 || match$89.pos_cnum !== 51)) { - var match$90 = match$88.loc_end; + let match$90 = match$88.loc_end; if (match$90.pos_fname === "" && !(match$90.pos_lnum !== 4 || match$90.pos_bol !== 46 || match$90.pos_cnum !== 71 || match$88.loc_ghost || match$80.pexp_attributes || match$78.tl)) { - var match$91 = match$24.pexp_loc; - var match$92 = match$91.loc_start; + let match$91 = match$24.pexp_loc; + let match$92 = match$91.loc_start; if (match$92.pos_fname === "" && !(match$92.pos_lnum !== 2 || match$92.pos_bol !== 13 || match$92.pos_cnum !== 15)) { - var match$93 = match$91.loc_end; + let match$93 = match$91.loc_end; if (match$93.pos_fname === "" && !(match$93.pos_lnum !== 4 || match$93.pos_bol !== 46 || match$93.pos_cnum !== 71 || match$91.loc_ghost || match$24.pexp_attributes)) { - var match$94 = match$13.pexp_loc; - var match$95 = match$94.loc_start; + let match$94 = match$13.pexp_loc; + let match$95 = match$94.loc_start; if (match$95.pos_fname === "" && !(match$95.pos_lnum !== 1 || match$95.pos_bol !== 0 || match$95.pos_cnum !== 6)) { - var match$96 = match$94.loc_end; + let match$96 = match$94.loc_end; if (match$96.pos_fname === "" && !(match$96.pos_lnum !== 4 || match$96.pos_bol !== 46 || match$96.pos_cnum !== 71 || !(match$94.loc_ghost && !(match$13.pexp_attributes || match$3.pvb_attributes)))) { - var match$97 = match$3.pvb_loc; - var match$98 = match$97.loc_start; + let match$97 = match$3.pvb_loc; + let match$98 = match$97.loc_start; if (match$98.pos_fname === "" && !(match$98.pos_lnum !== 1 || match$98.pos_bol !== 0 || match$98.pos_cnum !== 0)) { - var match$99 = match$97.loc_end; + let match$99 = match$97.loc_end; if (match$99.pos_fname === "" && !(match$99.pos_lnum !== 4 || match$99.pos_bol !== 46 || match$99.pos_cnum !== 71 || match$97.loc_ghost || match$2.tl)) { eq("File \"ocaml_parsetree_main_bspack.ml\", line 215, characters 10-17", true, true); } else { diff --git a/jscomp/test/dist/jscomp/test/ocaml_proto_test.js b/jscomp/test/dist/jscomp/test/ocaml_proto_test.js index 059f664205..7a4453f92b 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_proto_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_proto_test.js @@ -1,29 +1,29 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Parsing = require("melange/parsing.js"); -var Stdlib__Printexc = require("melange/printexc.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__String = require("melange/string.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Parsing = require("melange/parsing.js"); +let Stdlib__Printexc = require("melange/printexc.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__String = require("melange/string.js"); function field(optionsOpt, label, number, type_, name) { - var options = optionsOpt !== undefined ? optionsOpt : /* [] */0; + let options = optionsOpt !== undefined ? optionsOpt : /* [] */0; return { field_name: name, field_number: number, @@ -34,7 +34,7 @@ function field(optionsOpt, label, number, type_, name) { } function map(map_optionsOpt, number, key_type, value_type, name) { - var map_options = map_optionsOpt !== undefined ? map_optionsOpt : /* [] */0; + let map_options = map_optionsOpt !== undefined ? map_optionsOpt : /* [] */0; return { map_name: name, map_number: number, @@ -45,7 +45,7 @@ function map(map_optionsOpt, number, key_type, value_type, name) { } function oneof_field(optionsOpt, number, type_, name) { - var options = optionsOpt !== undefined ? optionsOpt : /* [] */0; + let options = optionsOpt !== undefined ? optionsOpt : /* [] */0; return { field_name: name, field_number: number, @@ -55,12 +55,12 @@ function oneof_field(optionsOpt, number, type_, name) { }; } -var message_counter = { +let message_counter = { contents: 0 }; function extension_range_range(from, to_) { - var to_$1 = typeof to_ === "string" ? /* To_max */0 : /* To_number */({ + let to_$1 = typeof to_ === "string" ? /* To_max */0 : /* To_number */({ _0: to_.VAL }); return { @@ -96,7 +96,7 @@ function extend(extend_name, extend_body) { } function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$1, extend, param) { - var proto$2 = proto$1 !== undefined ? proto$1 : ({ + let proto$2 = proto$1 !== undefined ? proto$1 : ({ syntax: syntax, imports: /* [] */0, file_options: /* [] */0, @@ -105,7 +105,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ enums: /* [] */0, extends: /* [] */0 }); - var proto$3 = syntax !== undefined ? ({ + let proto$3 = syntax !== undefined ? ({ syntax: syntax, imports: proto$2.imports, file_options: proto$2.file_options, @@ -114,7 +114,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ enums: proto$2.enums, extends: proto$2.extends }) : proto$2; - var proto$4 = $$package !== undefined ? ({ + let proto$4 = $$package !== undefined ? ({ syntax: proto$3.syntax, imports: proto$3.imports, file_options: proto$3.file_options, @@ -123,7 +123,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ enums: proto$3.enums, extends: proto$3.extends }) : proto$3; - var proto$5 = message !== undefined ? ({ + let proto$5 = message !== undefined ? ({ syntax: proto$4.syntax, imports: proto$4.imports, file_options: proto$4.file_options, @@ -135,7 +135,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ enums: proto$4.enums, extends: proto$4.extends }) : proto$4; - var proto$6 = $$enum !== undefined ? ({ + let proto$6 = $$enum !== undefined ? ({ syntax: proto$5.syntax, imports: proto$5.imports, file_options: proto$5.file_options, @@ -147,7 +147,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ }, extends: proto$5.extends }) : proto$5; - var proto$7 = $$import !== undefined ? ({ + let proto$7 = $$import !== undefined ? ({ syntax: proto$6.syntax, imports: { hd: $$import, @@ -159,7 +159,7 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ enums: proto$6.enums, extends: proto$6.extends }) : proto$6; - var proto$8 = file_option !== undefined ? ({ + let proto$8 = file_option !== undefined ? ({ syntax: proto$7.syntax, imports: proto$7.imports, file_options: { @@ -190,12 +190,12 @@ function proto(syntax, file_option, $$package, $$import, message, $$enum, proto$ } function file_option(file_options, name) { - var x; + let x; try { x = Stdlib__List.assoc(name, file_options); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -205,17 +205,17 @@ function file_option(file_options, name) { } function rev_split_by_char(c, s) { - var loop = function (i, l) { + let loop = function (i, l) { try { - var i$p = Stdlib__String.index_from(s, i, c); - var s$p = Stdlib__String.sub(s, i, i$p - i | 0); + let i$p = Stdlib__String.index_from(s, i, c); + let s$p = Stdlib__String.sub(s, i, i$p - i | 0); return loop(i$p + 1 | 0, s$p === "" ? l : ({ hd: s$p, tl: l })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: Stdlib__String.sub(s, i, s.length - i | 0), @@ -247,11 +247,11 @@ function pop_last(param) { function apply_until(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var x = Curry._1(f, param.hd); + let x = Curry._1(f, param.hd); if (x !== undefined) { return x; } @@ -280,12 +280,12 @@ function string_of_string_list(l) { } function string_fold_lefti(f, e0, s) { - var len = s.length; - var _acc = e0; - var _i = 0; + let len = s.length; + let _acc = e0; + let _i = 0; while(true) { - var i = _i; - var acc = _acc; + let i = _i; + let acc = _acc; if (i === len) { return acc; } @@ -304,9 +304,9 @@ function option_default(x, param) { } function from_lexbuf(lexbuf) { - var x = lexbuf.lex_curr_p.pos_fname; - var file_name = x === "" ? undefined : x; - var line = lexbuf.lex_curr_p.pos_lnum; + let x = lexbuf.lex_curr_p.pos_fname; + let file_name = x === "" ? undefined : x; + let line = lexbuf.lex_curr_p.pos_lnum; return { file_name: file_name, line: line @@ -351,7 +351,7 @@ function to_string(param) { } function string_of_programmatic_error(e) { - var tmp; + let tmp; switch (e) { case /* Invalid_string_split */0 : tmp = "string split error"; @@ -370,7 +370,7 @@ function string_of_programmatic_error(e) { return "Programatic_error" + tmp; } -var Compilation_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_proto_test.Exception.Compilation_error"); +let Compilation_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_proto_test.Exception.Compilation_error"); function prepare_error(param) { if (typeof param === "number") { @@ -385,7 +385,7 @@ function prepare_error(param) { } switch (param.TAG | 0) { case /* Unresolved_type */0 : - var match = param._0; + let match = param._0; return Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -419,7 +419,7 @@ function prepare_error(param) { _1: "unresolved type for field name : %s (type:%s, in message: %s)" }), match.field_name, match.type_, match.message_name); case /* Duplicated_field_number */1 : - var match$1 = param._0; + let match$1 = param._0; return Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -453,7 +453,7 @@ function prepare_error(param) { _1: "duplicated field number for field name: %s (previous field name:%s, message: %s)" }), match$1.field_name, match$1.previous_field_name, match$1.message_name); case /* Invalid_default_value */2 : - var match$2 = param._0; + let match$2 = param._0; return Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -479,7 +479,7 @@ function prepare_error(param) { _1: "invalid default value for field name:%s (info: %s)" }), option_default("", match$2.field_name), match$2.info); case /* Unsupported_field_type */3 : - var match$3 = param._0; + let match$3 = param._0; return Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -704,7 +704,7 @@ function prepare_error(param) { function add_loc(loc, exn) { if (exn.MEL_EXN_ID === Compilation_error) { - var tmp = exn._1; + let tmp = exn._1; if (typeof tmp !== "number") { switch (tmp.TAG | 0) { case /* Invalid_import_qualifier */5 : @@ -720,9 +720,9 @@ function add_loc(loc, exn) { } } - var file_name$1 = option_default("", file_name(loc)); - var line$1 = line(loc); - var detail = Stdlib__Printexc.to_string(exn); + let file_name$1 = option_default("", file_name(loc)); + let line$1 = line(loc); + let detail = Stdlib__Printexc.to_string(exn); return { MEL_EXN_ID: Compilation_error, _1: { @@ -779,7 +779,7 @@ function invalid_enum_specification(enum_name, loc) { }); } -var yytransl_const = [ +let yytransl_const = [ 257, 258, 259, @@ -809,7 +809,7 @@ var yytransl_const = [ 0 ]; -var yytransl_block = [ +let yytransl_block = [ 260, 264, 284, @@ -819,7 +819,7 @@ var yytransl_block = [ 0 ]; -var yyact = [ +let yyact = [ (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -863,86 +863,86 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(_1, undefined, undefined, undefined, undefined, undefined, _2, undefined, undefined); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, undefined, undefined, undefined, _1, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, _1, undefined, undefined, _2, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, _1, undefined, undefined, undefined, undefined, _2, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, _1, undefined, undefined, undefined, _2, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, _1, undefined, _2, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, undefined, _1, _2, undefined, undefined); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return proto(undefined, undefined, undefined, undefined, undefined, undefined, _2, _1, undefined); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return _3; }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return $$import(undefined, _2); }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return $$import(Caml_option.some(undefined), _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); @@ -955,31 +955,31 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return _2[1]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return message(_4, _2[1]); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return message(/* [] */0, _2[1]); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -1028,46 +1028,46 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return extend(_2[1], _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return extend(_2[1], /* [] */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return _2; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 @@ -1080,21 +1080,21 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return extension_range_range(_1, { NAME: "Number", VAL: _3 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return extension_range_range(_1, "Max"); }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { oneof_name: _2[1], @@ -1102,7 +1102,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); throw new Caml_js_exceptions.MelangeError(Compilation_error, { @@ -1117,64 +1117,64 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return oneof_field(_5, _4, _1[1], _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return oneof_field(undefined, _4, _1[1], _2); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return map(undefined, _9, _3[1], _5[1], _7); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return map(_10, _9, _3[1], _5[1], _7); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return field(_6, _1, _5, _2[1], _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return field(undefined, _1, _5, _2[1], _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); Stdlib__Parsing.peek_val(__caml_parser_env, 4); Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); @@ -1188,7 +1188,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); @@ -1263,7 +1263,7 @@ var yyact = [ return "Optional"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { @@ -1279,31 +1279,31 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1[1], _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2[1], _5 @@ -1319,13 +1319,13 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return _1 + _2[1]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, @@ -1333,22 +1333,22 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Constant_int */2, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Constant_float */3, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var litteral = _1[1]; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let litteral = _1[1]; switch (litteral) { case "false" : return { @@ -1368,19 +1368,19 @@ var yyact = [ } }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Constant_string */0, _0: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var enum_valuesOpt = _4; - var enum_name = _2[1]; - var enum_values = enum_valuesOpt !== undefined ? enum_valuesOpt : /* [] */0; + let enum_valuesOpt = _4; + let enum_name = _2[1]; + let enum_values = enum_valuesOpt !== undefined ? enum_valuesOpt : /* [] */0; message_counter.contents = message_counter.contents + 1 | 0; return { enum_id: message_counter.contents, @@ -1392,16 +1392,16 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { enum_value_name: _1[1], @@ -1409,10 +1409,10 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var enum_value = _1[1]; - var loc = _1[0]; + let enum_value = _1[1]; + let loc = _1[0]; throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { @@ -1423,20 +1423,20 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return invalid_enum_specification(_1[1], _1[0]); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return invalid_enum_specification(_1[1], _1[0]); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return invalid_enum_specification(_1[1], _1[0]); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return invalid_enum_specification(_1[1], _1[0]); }), (function (__caml_parser_env) { @@ -1525,7 +1525,7 @@ var yyact = [ }) ]; -var yytables = { +let yytables = { actions: yyact, transl_const: yytransl_const, transl_block: yytransl_block, @@ -1549,7 +1549,7 @@ function proto_(lexfun, lexbuf) { } function update_loc(lexbuf) { - var pos = lexbuf.lex_curr_p; + let pos = lexbuf.lex_curr_p; lexbuf.lex_curr_p = { pos_fname: pos.pos_fname, pos_lnum: pos.pos_lnum + 1 | 0, @@ -1558,7 +1558,7 @@ function update_loc(lexbuf) { }; } -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xea\xff\xeb\xffN\0\xed\xff\xee\xff\x01\0\xa0\0\xf0\0;\x01\x88\x01\x9e\x01\xf2\xff\x10\0\xf5\xff\xf6\xff\xf7\xff\xf8\xff\xf9\xff\xfa\xff\xfb\xff\xfc\xff\xfd\xff\xfe\xff\xff\xff\xf3\xff\xf4\xff\x1a\0\xbe\x01\xc8\x01\x92\x01\xa8\x01#\0\xef\xff\xed\x01:\x02\x87\x02\xd4\x02!\x03n\x03\x05\0\x12\x01\xfd\xff\xfe\xff\xff\xff\x06\0\x07\0!\x01\xfc\xff\xfd\xff\x11\0\xff\xff\x0b\0\f\0\xfe\xff\xc2\x01\xfc\xff\xfd\xff\xfe\xff\xc9\x03\xff\xff", lex_backtrk: "\x0f\0\xff\xff\xff\xff\x13\0\xff\xff\xff\xff\x15\0\x13\0\x13\0\x0f\0\x0e\0\x0f\0\xff\xff\x15\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\x13\0\x0f\0\x13\0\x13\0\x10\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\x02\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff", lex_default: "\x01\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff+\0\0\0\0\0\0\0\xff\xff\xff\xff1\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\x009\0\0\0\0\0\0\0\xff\xff\0\0", @@ -1574,9 +1574,9 @@ var __ocaml_lex_tables = { function __ocaml_lex_comment_rec(_l, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var l = _l; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let l = _l; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : update_loc(lexbuf); @@ -1602,9 +1602,9 @@ function __ocaml_lex_comment_rec(_l, lexbuf, ___ocaml_lex_state) { function __ocaml_lex_multi_line_comment_rec(_l, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var l = _l; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let l = _l; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : update_loc(lexbuf); @@ -1634,12 +1634,12 @@ function __ocaml_lex_multi_line_comment_rec(_l, lexbuf, ___ocaml_lex_state) { function __ocaml_lex_string_rec(_l, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var l = _l; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let l = _l; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : - var c = Stdlib__Lexing.lexeme_char(lexbuf, 1); + let c = Stdlib__Lexing.lexeme_char(lexbuf, 1); ___ocaml_lex_state = 55; _l = { hd: Stdlib__Char.escaped(c), @@ -1668,10 +1668,10 @@ function __ocaml_lex_string_rec(_l, lexbuf, ___ocaml_lex_state) { } function lexer(lexbuf) { - var ___ocaml_lex_state = 0; + let ___ocaml_lex_state = 0; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return /* LBRACE */15; @@ -1696,21 +1696,21 @@ function lexer(lexbuf) { case 10 : return /* COMMA */24; case 11 : - var match = __ocaml_lex_comment_rec(/* [] */0, lexbuf, 41); + let match = __ocaml_lex_comment_rec(/* [] */0, lexbuf, 41); if (!match) { return /* EOF */25; } ___ocaml_lex_state = 0; continue ; case 12 : - var match$1 = __ocaml_lex_multi_line_comment_rec(/* [] */0, lexbuf, 47); + let match$1 = __ocaml_lex_multi_line_comment_rec(/* [] */0, lexbuf, 47); if (!match$1) { return /* EOF */25; } ___ocaml_lex_state = 0; continue ; case 13 : - var s = __ocaml_lex_string_rec(/* [] */0, lexbuf, 55); + let s = __ocaml_lex_string_rec(/* [] */0, lexbuf, 55); if (s) { return { TAG: /* STRING */2, @@ -1742,8 +1742,8 @@ function lexer(lexbuf) { ___ocaml_lex_state = 0; continue ; case 19 : - var loc = from_lexbuf(lexbuf); - var ident = Stdlib__Lexing.lexeme(lexbuf); + let loc = from_lexbuf(lexbuf); + let ident = Stdlib__Lexing.lexeme(lexbuf); switch (ident) { case "enum" : return /* ENUM */4; @@ -1795,7 +1795,7 @@ function lexer(lexbuf) { case 20 : return /* EOF */25; case 21 : - var s$1 = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let s$1 = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "Unknown character found ", @@ -1853,8 +1853,8 @@ function string_of_field_type(param) { } else if (param.TAG === /* Ft_basic_type */0) { return string_of_basic_type(param._0); } else { - var param$1 = param._0; - var module_ = param$1.udt_module; + let param$1 = param._0; + let module_ = param$1.udt_module; if (module_ !== undefined) { return module_ + ("." + param$1.udt_type_name); } else { @@ -1870,12 +1870,12 @@ function string_of_record_field_type(param) { case /* Rft_optional */1 : return string_of_field_type(param._0[0]) + " option"; case /* Rft_repeated_field */2 : - var match = param._0; + let match = param._0; return string_of_field_type(match[1]) + (" " + ( match[0] ? "Pbrt.Repeated_field.t" : "list" )); case /* Rft_associative_field */3 : - var match$1 = param._0; + let match$1 = param._0; if (match$1[0]) { return Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1942,7 +1942,7 @@ function string_of_record_field_type(param) { } function function_name_of_user_defined(prefix, param) { - var module_ = param.udt_module; + let module_ = param.udt_module; if (module_ !== undefined) { return Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -1989,7 +1989,7 @@ function function_name_of_user_defined(prefix, param) { } function string_of_payload_kind(capitalize, payload_kind, packed) { - var s; + let s; if (typeof payload_kind === "number") { switch (payload_kind) { case /* Pk_bits32 */0 : @@ -2024,7 +2024,7 @@ function line$1(scope, s) { } function scope(scope$1, f) { - var sub_scope = { + let sub_scope = { items: /* [] */0 }; Curry._1(f, sub_scope); @@ -2063,14 +2063,14 @@ function indentation_prefix(n) { } function print(scope) { - var loop = function (_acc, i, _param) { + let loop = function (_acc, i, _param) { while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return acc; } - var s = param.hd; + let s = param.hd; if (s.TAG === /* Line */0) { _param = param.tl; _acc = { @@ -2079,8 +2079,8 @@ function print(scope) { }; continue ; } - var items = s._0.items; - var sub = loop(/* [] */0, i + 1 | 0, items); + let items = s._0.items; + let sub = loop(/* [] */0, i + 1 | 0, items); _param = param.tl; _acc = Stdlib.$at(sub, acc); continue ; @@ -2090,9 +2090,9 @@ function print(scope) { } function runtime_function(param) { - var match = param[0]; + let match = param[0]; if (match === "Decode") { - var match$1 = param[1]; + let match$1 = param[1]; if (typeof match$1 === "number") { switch (match$1) { case /* Pk_bits32 */0 : @@ -2132,7 +2132,7 @@ function runtime_function(param) { } case /* Pk_bytes */2 : - var match$2 = param[2]; + let match$2 = param[2]; if (match$2 === 5) { return "Pbrt.Decoder.bytes"; } @@ -2184,7 +2184,7 @@ function runtime_function(param) { } } } else if (match === "Encode") { - var match$3 = param[1]; + let match$3 = param[1]; if (typeof match$3 === "number") { switch (match$3) { case /* Pk_bits32 */0 : @@ -2224,7 +2224,7 @@ function runtime_function(param) { } case /* Pk_bytes */2 : - var match$4 = param[2]; + let match$4 = param[2]; if (match$4 === 5) { return "Pbrt.Encoder.bytes"; } @@ -2298,8 +2298,8 @@ function decode_field_f(field_type, pk) { if (field_type.TAG === /* Ft_basic_type */0) { return decode_basic_type(field_type._0, pk) + " d"; } - var t = field_type._0; - var f_name = function_name_of_user_defined("decode", t); + let t = field_type._0; + let f_name = function_name_of_user_defined("decode", t); if (t.udt_nested) { return f_name + " (Pbrt.Decoder.nested d)"; } else { @@ -2308,10 +2308,10 @@ function decode_field_f(field_type, pk) { } function gen_decode_record(and_, param, sc) { - var r_fields = param.r_fields; - var r_name = param.r_name; - var all_lists = Stdlib__List.fold_left((function (acc, param) { - var rf_field_type = param.rf_field_type; + let r_fields = param.r_fields; + let r_name = param.r_name; + let all_lists = Stdlib__List.fold_left((function (acc, param) { + let rf_field_type = param.rf_field_type; switch (rf_field_type.TAG | 0) { case /* Rft_repeated_field */2 : case /* Rft_associative_field */3 : @@ -2328,7 +2328,7 @@ function gen_decode_record(and_, param, sc) { }; } }), /* [] */0, r_fields); - var process_field_common = function (sc, encoding_number, pk_as_string, f) { + let process_field_common = function (sc, encoding_number, pk_as_string, f) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -2423,7 +2423,7 @@ function gen_decode_record(and_, param, sc) { })); line$1(sc, ")"); }; - var mutable_record_name = r_name + "_mutable"; + let mutable_record_name = r_name + "_mutable"; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -2495,13 +2495,13 @@ function gen_decode_record(and_, param, sc) { })); line$1(sc, ")"); Stdlib__List.iter((function (param) { - var rf_field_type = param.rf_field_type; - var rf_label = param.rf_label; + let rf_field_type = param.rf_field_type; + let rf_label = param.rf_label; switch (rf_field_type.TAG | 0) { case /* Rft_required */0 : - var param$1 = rf_field_type._0; - var pk = param$1[2]; - var field_type = param$1[0]; + let param$1 = rf_field_type._0; + let pk = param$1[2]; + let field_type = param$1[0]; return process_field_common(sc, param$1[1], string_of_payload_kind(Caml_option.some(undefined), pk, false), (function (sc) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -2529,9 +2529,9 @@ function gen_decode_record(and_, param, sc) { }), rf_label, decode_field_f(field_type, pk))); })); case /* Rft_optional */1 : - var param$2 = rf_field_type._0; - var pk$1 = param$2[2]; - var field_type$1 = param$2[0]; + let param$2 = rf_field_type._0; + let pk$1 = param$2[2]; + let field_type$1 = param$2[0]; return process_field_common(sc, param$2[1], string_of_payload_kind(Caml_option.some(undefined), pk$1, false), (function (sc) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -2559,11 +2559,11 @@ function gen_decode_record(and_, param, sc) { }), rf_label, decode_field_f(field_type$1, pk$1))); })); case /* Rft_repeated_field */2 : - var param$3 = rf_field_type._0; - var is_packed = param$3[4]; - var pk$2 = param$3[3]; - var encoding_number = param$3[2]; - var field_type$2 = param$3[1]; + let param$3 = rf_field_type._0; + let is_packed = param$3[4]; + let pk$2 = param$3[3]; + let encoding_number = param$3[2]; + let field_type$2 = param$3[1]; if (param$3[0]) { if (is_packed) { return process_field_common(sc, encoding_number, "Bytes", (function (sc) { @@ -2688,20 +2688,20 @@ function gen_decode_record(and_, param, sc) { })); } case /* Rft_associative_field */3 : - var param$4 = rf_field_type._0; - var match = param$4[3]; - var value_pk = match[1]; - var value_type = match[0]; - var match$1 = param$4[2]; - var at = param$4[0]; - var decode_key_f = decode_basic_type(match$1[0], match$1[1]); + let param$4 = rf_field_type._0; + let match = param$4[3]; + let value_pk = match[1]; + let value_type = match[0]; + let match$1 = param$4[2]; + let at = param$4[0]; + let decode_key_f = decode_basic_type(match$1[0], match$1[1]); return process_field_common(sc, param$4[1], "Bytes", (function (sc) { line$1(sc, "let decode_value = (fun d ->"); scope(sc, (function (sc) { line$1(sc, decode_field_f(value_type, value_pk)); })); line$1(sc, ") in"); - var decode_expression = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let decode_expression = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "(Pbrt.Decoder.map_entry d ~decode_key:", @@ -2793,11 +2793,11 @@ function gen_decode_record(and_, param, sc) { } })); case /* Rft_variant_field */4 : - var param$5 = rf_field_type._0; + let param$5 = rf_field_type._0; return Stdlib__List.iter((function (param) { - var pk = param.vc_payload_kind; - var vc_field_type = param.vc_field_type; - var vc_constructor = param.vc_constructor; + let pk = param.vc_payload_kind; + let vc_field_type = param.vc_field_type; + let vc_constructor = param.vc_constructor; process_field_common(sc, param.vc_encoding_number, string_of_payload_kind(Caml_option.some(undefined), pk, false), (function (sc) { if (vc_field_type) { return line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ @@ -2889,8 +2889,8 @@ function gen_decode_record(and_, param, sc) { } function gen_decode_variant(and_, param, sc) { - var v_constructors = param.v_constructors; - var v_name = param.v_name; + let v_constructors = param.v_constructors; + let v_name = param.v_name; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -2940,9 +2940,9 @@ function gen_decode_variant(and_, param, sc) { scope(sc, (function (sc) { line$1(sc, "| None -> failwith \"None of the known key is found\""); Stdlib__List.iter((function (ctor) { - var vc_encoding_number = ctor.vc_encoding_number; - var vc_field_type = ctor.vc_field_type; - var vc_constructor = ctor.vc_constructor; + let vc_encoding_number = ctor.vc_encoding_number; + let vc_field_type = ctor.vc_field_type; + let vc_constructor = ctor.vc_constructor; if (vc_field_type) { return line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -3021,8 +3021,8 @@ function gen_decode_variant(and_, param, sc) { } function gen_decode_const_variant(and_, param, sc) { - var cv_constructors = param.cv_constructors; - var cv_name = param.cv_name; + let cv_constructors = param.cv_constructors; + let cv_name = param.cv_name; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -3101,8 +3101,8 @@ function gen_decode_const_variant(and_, param, sc) { } function gen_struct(and_, t, sc) { - var r = t.spec; - var tmp; + let r = t.spec; + let tmp; switch (r.TAG | 0) { case /* Record */0 : tmp = [ @@ -3128,7 +3128,7 @@ function gen_struct(and_, t, sc) { } function gen_sig(and_, t, sc) { - var f = function (type_name) { + let f = function (type_name) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3174,8 +3174,8 @@ function gen_sig(and_, t, sc) { _1: "(** [decode_%s decoder] decodes a [%s] value from [decoder] *)" }), type_name, type_name)); }; - var match = t.spec; - var tmp; + let match = t.spec; + let tmp; switch (match.TAG | 0) { case /* Record */0 : tmp = [ @@ -3200,18 +3200,18 @@ function gen_sig(and_, t, sc) { return tmp[1]; } -var Codegen_decode = { +let Codegen_decode = { gen_sig: gen_sig, gen_struct: gen_struct, ocamldoc_title: "Protobuf Decoding" }; -var __log__ = { +let __log__ = { contents: undefined }; function log(x) { - var oc = __log__.contents; + let oc = __log__.contents; if (oc !== undefined) { return Stdlib__Printf.fprintf(Caml_option.valFromOption(oc), x); } else { @@ -3253,8 +3253,8 @@ function gen_pp_field(field_type) { } function gen_pp_record(and_, param, sc) { - var r_fields = param.r_fields; - var r_name = param.r_name; + let r_fields = param.r_fields; + let r_name = param.r_name; Curry._1(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3304,9 +3304,9 @@ function gen_pp_record(and_, param, sc) { scope(sc, (function (sc) { line$1(sc, "Format.pp_open_vbox fmt 1;"); Stdlib__List.iter((function (record_field) { - var rf_field_type = record_field.rf_field_type; - var rf_label = record_field.rf_label; - var var_name = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let rf_field_type = record_field.rf_field_type; + let rf_label = record_field.rf_label; + let var_name = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "v.", @@ -3320,7 +3320,7 @@ function gen_pp_record(and_, param, sc) { }), rf_label); switch (rf_field_type.TAG | 0) { case /* Rft_required */0 : - var field_string_of = gen_pp_field(rf_field_type._0[0]); + let field_string_of = gen_pp_field(rf_field_type._0[0]); return line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3354,7 +3354,7 @@ function gen_pp_record(and_, param, sc) { _1: "Pbrt.Pp.pp_record_field \"%s\" %s fmt %s;" }), rf_label, field_string_of, var_name)); case /* Rft_optional */1 : - var field_string_of$1 = gen_pp_field(rf_field_type._0[0]); + let field_string_of$1 = gen_pp_field(rf_field_type._0[0]); return line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3388,8 +3388,8 @@ function gen_pp_record(and_, param, sc) { _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.pp_option %s) fmt %s;" }), rf_label, field_string_of$1, var_name)); case /* Rft_repeated_field */2 : - var match = rf_field_type._0; - var field_string_of$2 = gen_pp_field(match[1]); + let match = rf_field_type._0; + let field_string_of$2 = gen_pp_field(match[1]); if (match[0]) { return line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -3458,13 +3458,13 @@ function gen_pp_record(and_, param, sc) { }), rf_label, field_string_of$2, var_name)); } case /* Rft_associative_field */3 : - var match$1 = rf_field_type._0; - var pp_runtime_function = match$1[0] ? "pp_hastable" : "pp_associative_list"; - var pp_key = gen_pp_field({ + let match$1 = rf_field_type._0; + let pp_runtime_function = match$1[0] ? "pp_hastable" : "pp_associative_list"; + let pp_key = gen_pp_field({ TAG: /* Ft_basic_type */0, _0: match$1[2][0] }); - var pp_value = gen_pp_field(match$1[3][0]); + let pp_value = gen_pp_field(match$1[3][0]); return line$1(sc, Curry._5(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3557,8 +3557,8 @@ function gen_pp_record(and_, param, sc) { } function gen_pp_variant(and_, param, sc) { - var v_constructors = param.v_constructors; - var v_name = param.v_name; + let v_constructors = param.v_constructors; + let v_name = param.v_name; line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -3590,8 +3590,8 @@ function gen_pp_variant(and_, param, sc) { scope(sc, (function (sc) { line$1(sc, "match v with"); Stdlib__List.iter((function (param) { - var vc_field_type = param.vc_field_type; - var vc_constructor = param.vc_constructor; + let vc_field_type = param.vc_field_type; + let vc_constructor = param.vc_constructor; if (!vc_field_type) { return line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -3618,7 +3618,7 @@ function gen_pp_variant(and_, param, sc) { _1: "| %s -> Format.fprintf fmt \"%s\"" }), vc_constructor, vc_constructor)); } - var field_string_of = gen_pp_field(vc_field_type._0); + let field_string_of = gen_pp_field(vc_field_type._0); line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3682,8 +3682,8 @@ function gen_pp_variant(and_, param, sc) { } function gen_pp_const_variant(and_, param, sc) { - var cv_constructors = param.cv_constructors; - var cv_name = param.cv_name; + let cv_constructors = param.cv_constructors; + let cv_name = param.cv_name; line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -3715,7 +3715,7 @@ function gen_pp_const_variant(and_, param, sc) { scope(sc, (function (sc) { line$1(sc, "match v with"); Stdlib__List.iter((function (param) { - var name = param[0]; + let name = param[0]; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3745,7 +3745,7 @@ function gen_pp_const_variant(and_, param, sc) { } function gen_struct$1(and_, t, sc) { - var r = t.spec; + let r = t.spec; switch (r.TAG | 0) { case /* Record */0 : gen_pp_record(and_, r._0, sc); @@ -3762,7 +3762,7 @@ function gen_struct$1(and_, t, sc) { } function gen_sig$1(and_, t, sc) { - var f = function (type_name) { + let f = function (type_name) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -3804,7 +3804,7 @@ function gen_sig$1(and_, t, sc) { _1: "(** [pp_%s v] formats v] *)" }), type_name)); }; - var v = t.spec; + let v = t.spec; switch (v.TAG | 0) { case /* Record */0 : f(v._0.r_name); @@ -3820,15 +3820,15 @@ function gen_sig$1(and_, t, sc) { return true; } -var Codegen_pp = { +let Codegen_pp = { gen_sig: gen_sig$1, gen_struct: gen_struct$1, ocamldoc_title: "Formatters" }; -var compare = Caml_obj.caml_compare; +let compare = Caml_obj.caml_compare; -var funarg = { +let funarg = { compare: compare }; @@ -3841,8 +3841,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -3853,14 +3853,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -3887,10 +3887,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -3918,11 +3918,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -3937,14 +3937,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -3954,9 +3954,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -3973,9 +3973,9 @@ function map$1(f, param) { if (!param) { return /* Empty */0; } - var l$p = map$1(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map$1(f, param.r); + let l$p = map$1(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map$1(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -3987,8 +3987,8 @@ function map$1(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -3998,12 +3998,12 @@ function fold(f, _m, _accu) { }; } -var empty_graph = /* Empty */0; +let empty_graph = /* Empty */0; function min_value(param) { - var x = param[0]; + let x = param[0]; if (x !== undefined) { - var y = param[1]; + let y = param[1]; if (y !== undefined) { return Caml_option.some(Caml_obj.caml_min(Caml_option.valFromOption(x), Caml_option.valFromOption(y))); } @@ -4019,9 +4019,9 @@ function min_value(param) { } function eq_value(param) { - var x = param[0]; + let x = param[0]; if (x !== undefined) { - var y = param[1]; + let y = param[1]; if (y !== undefined) { return Caml_obj.caml_equal(Caml_option.valFromOption(x), Caml_option.valFromOption(y)); } @@ -4101,16 +4101,16 @@ function strong_connect(g, sccs, stack, index, v) { }), v.core.id, index); v.index = index; v.lowlink = index; - var stack$1 = { + let stack$1 = { hd: v, tl: stack }; v.on_stack = true; - var match = Stdlib__List.fold_left((function (param, id) { - var index = param[2]; - var stack = param[1]; - var sccs = param[0]; - var w = Curry._2(find, id, g); + let match = Stdlib__List.fold_left((function (param, id) { + let index = param[2]; + let stack = param[1]; + let sccs = param[0]; + let w = Curry._2(find, id, g); Curry._2(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -4139,7 +4139,7 @@ function strong_connect(g, sccs, stack, index, v) { }), w.core.id, string_of_option((function (prim) { return String(prim); }), w.index)); - var match = w.index; + let match = w.index; if (match !== undefined) { if (w.on_stack) { v.lowlink = min_value([ @@ -4153,7 +4153,7 @@ function strong_connect(g, sccs, stack, index, v) { index ]; } - var match$1 = strong_connect(g, sccs, stack, index + 1 | 0, w); + let match$1 = strong_connect(g, sccs, stack, index + 1 | 0, w); v.lowlink = min_value([ v.lowlink, w.lowlink @@ -4168,9 +4168,9 @@ function strong_connect(g, sccs, stack, index, v) { stack$1, index ], v.core.sub); - var index$1 = match[2]; - var stack$2 = match[1]; - var sccs$1 = match[0]; + let index$1 = match[2]; + let stack$2 = match[1]; + let sccs$1 = match[0]; Curry._3(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -4237,10 +4237,10 @@ function strong_connect(g, sccs, stack, index, v) { index$1 ]; } - var match$1 = Stdlib__List.fold_left((function (param, n) { - var splitted = param[2]; - var stack = param[1]; - var scc = param[0]; + let match$1 = Stdlib__List.fold_left((function (param, n) { + let splitted = param[2]; + let stack = param[1]; + let scc = param[0]; if (splitted) { return [ scc, @@ -4288,12 +4288,12 @@ function strong_connect(g, sccs, stack, index, v) { } function tarjan(g) { - var g$1 = reset(g); + let g$1 = reset(g); return Curry._3(fold, (function (param, n, param$1) { - var index = param$1[2]; - var stack = param$1[1]; - var sccs = param$1[0]; - var match = n.index; + let index = param$1[2]; + let stack = param$1[1]; + let sccs = param$1[0]; + let match = n.index; if (match !== undefined) { return [ sccs, @@ -4335,12 +4335,12 @@ function field_options(param) { } function find_field_option(field_options, option_name) { - var x; + let x; try { x = Stdlib__List.assoc(option_name, field_options); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4413,7 +4413,7 @@ function scope_of_package(param) { } function unresolved_of_string(s) { - var match = rev_split_by_char(/* '.' */46, s); + let match = rev_split_by_char(/* '.' */46, s); if (match) { return { scope: Stdlib__List.rev(match.tl), @@ -4470,13 +4470,13 @@ function field_type_of_string(s) { } function compile_default_p2(all_types, field) { - var field_name$1 = field_name(field); - var field_type$1 = field_type(field); - var field_default$1 = field_default(field); + let field_name$1 = field_name(field); + let field_type$1 = field_type(field); + let field_default$1 = field_default(field); if (field_default$1 === undefined) { return ; } - var exit = 0; + let exit = 0; if (typeof field_type$1 === "number") { switch (field_type$1) { case /* Field_type_double */0 : @@ -4517,14 +4517,14 @@ function compile_default_p2(all_types, field) { if (field_default$1.TAG !== /* Constant_litteral */4) { return invalid_default_value(field_name$1, "default value not supported for message", undefined); } - var default_enum_value = field_default$1._0; - var match = type_of_id(all_types, field_type$1._0); - var spec = match.spec; + let default_enum_value = field_default$1._0; + let match = type_of_id(all_types, field_type$1._0); + let spec = match.spec; if (spec.TAG !== /* Enum */0) { return invalid_default_value(field_name$1, "field of type message cannot have a default litteral value", undefined); } - var default_enum_value$1 = apply_until((function (param) { - var enum_value_name = param.enum_value_name; + let default_enum_value$1 = apply_until((function (param) { + let enum_value_name = param.enum_value_name; if (enum_value_name === default_enum_value) { return enum_value_name; } @@ -4570,12 +4570,12 @@ function compile_default_p2(all_types, field) { } function get_default(field_name, field_options, field_type) { - var constant; + let constant; try { constant = Stdlib__List.assoc("default", field_options); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4585,9 +4585,9 @@ function get_default(field_name, field_options, field_type) { } function compile_field_p1(field_parsed) { - var field_options = field_parsed.field_options; - var field_type = field_type_of_string(field_parsed.field_type); - var field_default = get_default(field_parsed.field_name, field_options, field_type); + let field_options = field_parsed.field_options; + let field_type = field_type_of_string(field_parsed.field_type); + let field_default = get_default(field_parsed.field_name, field_options, field_type); return { field_parsed: field_parsed, field_type: field_type, @@ -4619,7 +4619,7 @@ function not_found(f) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return true; } @@ -4629,9 +4629,9 @@ function not_found(f) { function list_assoc2(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var match = param.hd; + let match = param.hd; if (Caml_obj.caml_equal(match[1], x)) { return match[0]; } @@ -4655,7 +4655,7 @@ function type_of_spec(file_name, file_options, id, scope, spec) { } function compile_enum_p1(file_name, file_options, scope, param) { - var enum_values = Stdlib__List.map((function (enum_value) { + let enum_values = Stdlib__List.map((function (enum_value) { return { enum_value_name: enum_value.enum_value_name, enum_value_int: enum_value.enum_value_int @@ -4671,23 +4671,23 @@ function compile_enum_p1(file_name, file_options, scope, param) { } function compile_message_p1(file_name, file_options, message_scope, param) { - var message_name = param.message_name; - var sub_scope_packages = message_scope.packages; - var sub_scope_message_names = Stdlib.$at(message_scope.message_names, { + let message_name = param.message_name; + let sub_scope_packages = message_scope.packages; + let sub_scope_message_names = Stdlib.$at(message_scope.message_names, { hd: message_name, tl: /* [] */0 }); - var sub_scope = { + let sub_scope = { packages: sub_scope_packages, message_names: sub_scope_message_names }; - var match = Stdlib__List.fold_left((function (param, param$1) { - var all_types = param[2]; - var extensions = param[1]; - var message_body = param[0]; + let match = Stdlib__List.fold_left((function (param, param$1) { + let all_types = param[2]; + let extensions = param[1]; + let message_body = param[0]; switch (param$1.TAG | 0) { case /* Message_field */0 : - var field = { + let field = { TAG: /* Message_field */0, _0: compile_field_p1(param$1._0) }; @@ -4700,7 +4700,7 @@ function compile_message_p1(file_name, file_options, message_scope, param) { all_types ]; case /* Message_map_field */1 : - var field$1 = { + let field$1 = { TAG: /* Message_map_field */2, _0: compile_map_p1(param$1._0) }; @@ -4713,7 +4713,7 @@ function compile_message_p1(file_name, file_options, message_scope, param) { all_types ]; case /* Message_oneof_field */2 : - var field$2 = { + let field$2 = { TAG: /* Message_oneof_field */1, _0: compile_oneof_p1(param$1._0) }; @@ -4726,7 +4726,7 @@ function compile_message_p1(file_name, file_options, message_scope, param) { all_types ]; case /* Message_sub */3 : - var all_sub_types = compile_message_p1(file_name, file_options, sub_scope, param$1._0); + let all_sub_types = compile_message_p1(file_name, file_options, sub_scope, param$1._0); return [ message_body, extensions, @@ -4754,10 +4754,10 @@ function compile_message_p1(file_name, file_options, message_scope, param) { /* [] */0, /* [] */0 ], param.message_body); - var message_body = Stdlib__List.rev(match[0]); - var validate_duplicate = function (number_index, field) { - var number = field_number(field); - var name = field_name(field); + let message_body = Stdlib__List.rev(match[0]); + let validate_duplicate = function (number_index, field) { + let number = field_number(field); + let name = field_name(field); if (not_found(function (param) { Stdlib__List.assoc(number, number_index); }) && not_found(function (param) { @@ -4771,7 +4771,7 @@ function compile_message_p1(file_name, file_options, message_scope, param) { tl: number_index }; } else { - var previous_field_name = ""; + let previous_field_name = ""; throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { @@ -4810,9 +4810,9 @@ function compile_message_p1(file_name, file_options, message_scope, param) { } function compile_proto_p1(file_name, param) { - var file_options = param.file_options; - var scope = scope_of_package(param.package); - var pbtt_msgs = Stdlib__List.fold_right((function (e, pbtt_msgs) { + let file_options = param.file_options; + let scope = scope_of_package(param.package); + let pbtt_msgs = Stdlib__List.fold_right((function (e, pbtt_msgs) { return { hd: compile_enum_p1(file_name, file_options, scope, e), tl: pbtt_msgs @@ -4828,7 +4828,7 @@ function type_scope_of_type(param) { } function is_empty_message(param) { - var match = param.spec; + let match = param.spec; if (match.TAG === /* Enum */0) { return false; } else { @@ -4837,7 +4837,7 @@ function is_empty_message(param) { } function type_name_of_type(param) { - var match = param.spec; + let match = param.spec; if (match.TAG === /* Enum */0) { return match._0.enum_name; } else { @@ -4847,29 +4847,29 @@ function type_name_of_type(param) { function find_all_types_in_field_scope(all_types, scope) { return Stdlib__List.filter((function (t) { - var match = type_scope_of_type(t); - var dec_scope = Stdlib.$at(match.packages, match.message_names); + let match = type_scope_of_type(t); + let dec_scope = Stdlib.$at(match.packages, match.message_names); return Caml_obj.caml_equal(dec_scope, scope); }), all_types); } function compile_message_p2(types, param, message) { - var message_name = message.message_name; - var message_scope = Stdlib.$at(param.packages, Stdlib.$at(param.message_names, { + let message_name = message.message_name; + let message_scope = Stdlib.$at(param.packages, Stdlib.$at(param.message_names, { hd: message_name, tl: /* [] */0 })); - var search_scopes = function (field_scope, from_root) { + let search_scopes = function (field_scope, from_root) { if (from_root) { return { hd: field_scope, tl: /* [] */0 }; } - var loop = function (_scopes, _l) { + let loop = function (_scopes, _l) { while(true) { - var l = _l; - var scopes = _scopes; + let l = _l; + let scopes = _scopes; if (!l) { return { hd: field_scope, @@ -4886,7 +4886,7 @@ function compile_message_p2(types, param, message) { }; return Stdlib__List.rev(loop(/* [] */0, message_scope)); }; - var compile_field_p2 = function (field_name, field_type) { + let compile_field_p2 = function (field_name, field_type) { Curry._1(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -4915,10 +4915,10 @@ function compile_message_p2(types, param, message) { } }); } - var unresolved = field_type._0; - var type_name = unresolved.type_name; + let unresolved = field_type._0; + let type_name = unresolved.type_name; endline("[pbtt] " + string_of_unresolved(unresolved)); - var search_scopes$1 = search_scopes(unresolved.scope, unresolved.from_root); + let search_scopes$1 = search_scopes(unresolved.scope, unresolved.from_root); Curry._1(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -4967,16 +4967,16 @@ function compile_message_p2(types, param, message) { _1: "[pbtt] search_scope[%2i] : %s\n" }), i, string_of_string_list(scope)); }), search_scopes$1); - var id = apply_until((function (scope) { - var types$1 = find_all_types_in_field_scope(types, scope); + let id = apply_until((function (scope) { + let types$1 = find_all_types_in_field_scope(types, scope); try { - var t = Stdlib__List.find((function (t) { + let t = Stdlib__List.find((function (t) { return type_name === type_name_of_type(t); }), types$1); return type_id_of_type(t); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -5001,27 +5001,27 @@ function compile_message_p2(types, param, message) { }); } }; - var message_body = Stdlib__List.fold_left((function (message_body, param) { + let message_body = Stdlib__List.fold_left((function (message_body, param) { switch (param.TAG | 0) { case /* Message_field */0 : - var field = param._0; - var field_name$1 = field_name(field); - var field_type$1 = field_type(field); - var field_field_parsed = field.field_parsed; - var field_field_type = compile_field_p2(field_name$1, field_type$1); - var field_field_default = field.field_default; - var field_field_options = field.field_options; - var field$1 = { + let field = param._0; + let field_name$1 = field_name(field); + let field_type$1 = field_type(field); + let field_field_parsed = field.field_parsed; + let field_field_type = compile_field_p2(field_name$1, field_type$1); + let field_field_default = field.field_default; + let field_field_options = field.field_options; + let field$1 = { field_parsed: field_field_parsed, field_type: field_field_type, field_default: field_field_default, field_options: field_field_options }; - var field_field_parsed$1 = field_field_parsed; - var field_field_type$1 = field_field_type; - var field_field_default$1 = compile_default_p2(types, field$1); - var field_field_options$1 = field_field_options; - var field$2 = { + let field_field_parsed$1 = field_field_parsed; + let field_field_type$1 = field_field_type; + let field_field_default$1 = compile_default_p2(types, field$1); + let field_field_options$1 = field_field_options; + let field$2 = { field_parsed: field_field_parsed$1, field_type: field_field_type$1, field_default: field_field_default$1, @@ -5035,11 +5035,11 @@ function compile_message_p2(types, param, message) { tl: message_body }; case /* Message_oneof_field */1 : - var oneof = param._0; - var oneof_fields = Stdlib__List.fold_left((function (oneof_fields, field) { - var field_name$2 = field_name(field); - var field_type$2 = field_type(field); - var field_type$3 = compile_field_p2(field_name$2, field_type$2); + let oneof = param._0; + let oneof_fields = Stdlib__List.fold_left((function (oneof_fields, field) { + let field_name$2 = field_name(field); + let field_type$2 = field_type(field); + let field_type$3 = compile_field_p2(field_name$2, field_type$2); return { hd: { field_parsed: field.field_parsed, @@ -5050,7 +5050,7 @@ function compile_message_p2(types, param, message) { tl: oneof_fields }; }), /* [] */0, oneof.oneof_fields); - var oneof_fields$1 = Stdlib__List.rev(oneof_fields); + let oneof_fields$1 = Stdlib__List.rev(oneof_fields); return { hd: { TAG: /* Message_oneof_field */1, @@ -5062,11 +5062,11 @@ function compile_message_p2(types, param, message) { tl: message_body }; case /* Message_map_field */2 : - var map = param._0; - var map_name = map.map_name; - var map_key_type = compile_field_p2(map_name, map.map_key_type); - var map_value_type = compile_field_p2(map_name, map.map_value_type); - var resolved_map = { + let map = param._0; + let map_name = map.map_name; + let map_key_type = compile_field_p2(map_name, map.map_key_type); + let map_value_type = compile_field_p2(map_name, map.map_value_type); + let resolved_map = { TAG: /* Message_map_field */2, _0: { map_name: map_name, @@ -5083,7 +5083,7 @@ function compile_message_p2(types, param, message) { } }), /* [] */0, message.message_body); - var message_body$1 = Stdlib__List.rev(message_body); + let message_body$1 = Stdlib__List.rev(message_body); return { extensions: message.extensions, message_name: message.message_name, @@ -5092,18 +5092,18 @@ function compile_message_p2(types, param, message) { } function node_of_proto_type(param) { - var match = param.spec; - var id = param.id; + let match = param.spec; + let id = param.id; if (match.TAG === /* Enum */0) { return { id: id, sub: /* [] */0 }; } - var sub = Stdlib__List.flatten(Stdlib__List.map((function (param) { + let sub = Stdlib__List.flatten(Stdlib__List.map((function (param) { switch (param.TAG | 0) { case /* Message_field */0 : - var field_type = param._0.field_type; + let field_type = param._0.field_type; if (typeof field_type === "number") { return /* [] */0; } else { @@ -5114,7 +5114,7 @@ function node_of_proto_type(param) { } case /* Message_oneof_field */1 : return Stdlib__List.flatten(Stdlib__List.map((function (param) { - var field_type = param.field_type; + let field_type = param.field_type; if (typeof field_type === "number") { return /* [] */0; } else { @@ -5125,7 +5125,7 @@ function node_of_proto_type(param) { } }), param._0.oneof_fields)); case /* Message_map_field */2 : - var map_value_type = param._0.map_value_type; + let map_value_type = param._0.map_value_type; if (typeof map_value_type === "number") { return /* [] */0; } else { @@ -5144,11 +5144,11 @@ function node_of_proto_type(param) { } function group(proto) { - var g = Stdlib__List.map(node_of_proto_type, proto); - var g$1 = Stdlib__List.fold_left((function (m, n) { + let g = Stdlib__List.map(node_of_proto_type, proto); + let g$1 = Stdlib__List.fold_left((function (m, n) { return Curry._3(add, n.id, n, m); }), empty_graph, g); - var sccs = tarjan(g$1); + let sccs = tarjan(g$1); return Stdlib__List.map((function (l) { return Stdlib__List.map((function (id) { return Stdlib__List.find((function (param) { @@ -5167,10 +5167,10 @@ function type_decl_of_and(param) { } function gen_type_record(mutable_, and_, param, sc) { - var r_fields = param.r_fields; - var r_name = param.r_name; - var mutable_$1 = mutable_ !== undefined; - var is_imperative_type = function (param) { + let r_fields = param.r_fields; + let r_name = param.r_name; + let mutable_$1 = mutable_ !== undefined; + let is_imperative_type = function (param) { switch (param.TAG | 0) { case /* Rft_repeated_field */2 : case /* Rft_associative_field */3 : @@ -5183,14 +5183,14 @@ function gen_type_record(mutable_, and_, param, sc) { return false; } }; - var field_prefix = function (field_type, field_mutable) { + let field_prefix = function (field_type, field_mutable) { if (field_mutable || !(is_imperative_type(field_type) || !mutable_$1)) { return "mutable "; } else { return ""; } }; - var r_name$1 = mutable_$1 ? r_name + "_mutable" : r_name; + let r_name$1 = mutable_$1 ? r_name + "_mutable" : r_name; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5213,9 +5213,9 @@ function gen_type_record(mutable_, and_, param, sc) { }), type_decl_of_and(and_), r_name$1)); scope(sc, (function (sc) { Stdlib__List.iter((function (param) { - var rf_field_type = param.rf_field_type; - var prefix = field_prefix(rf_field_type, param.rf_mutable); - var type_string = string_of_record_field_type(rf_field_type); + let rf_field_type = param.rf_field_type; + let prefix = field_prefix(rf_field_type, param.rf_mutable); + let type_string = string_of_record_field_type(rf_field_type); line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5246,7 +5246,7 @@ function gen_type_record(mutable_, and_, param, sc) { } function gen_type_variant(and_, variant, sc) { - var v_constructors = variant.v_constructors; + let v_constructors = variant.v_constructors; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5269,8 +5269,8 @@ function gen_type_variant(and_, variant, sc) { }), type_decl_of_and(and_), variant.v_name)); scope(sc, (function (sc) { Stdlib__List.iter((function (param) { - var vc_field_type = param.vc_field_type; - var vc_constructor = param.vc_constructor; + let vc_field_type = param.vc_field_type; + let vc_constructor = param.vc_constructor; if (!vc_field_type) { return line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -5285,7 +5285,7 @@ function gen_type_variant(and_, variant, sc) { _1: "| %s" }), vc_constructor)); } - var type_string = string_of_field_type(vc_field_type._0); + let type_string = string_of_field_type(vc_field_type._0); line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5311,7 +5311,7 @@ function gen_type_variant(and_, variant, sc) { } function gen_type_const_variant(and_, param, sc) { - var cv_constructors = param.cv_constructors; + let cv_constructors = param.cv_constructors; line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5355,10 +5355,10 @@ function gen_type_const_variant(and_, param, sc) { } function gen_struct$2(and_, t, scope) { - var r = t.spec; + let r = t.spec; switch (r.TAG | 0) { case /* Record */0 : - var r$1 = r._0; + let r$1 = r._0; gen_type_record(undefined, and_, r$1, scope); line$1(scope, ""); gen_type_record(Caml_option.some(undefined), Caml_option.some(undefined), r$1, scope); @@ -5375,7 +5375,7 @@ function gen_struct$2(and_, t, scope) { } function gen_sig$2(and_, t, scope) { - var r = t.spec; + let r = t.spec; switch (r.TAG | 0) { case /* Record */0 : gen_type_record(undefined, and_, r._0, scope); @@ -5391,15 +5391,15 @@ function gen_sig$2(and_, t, scope) { return true; } -var Codegen_type = { +let Codegen_type = { gen_sig: gen_sig$2, gen_struct: gen_struct$2, ocamldoc_title: "Types" }; function gen_encode_field_key(sc, number, pk, is_packed) { - var s = string_of_payload_kind(undefined, pk, is_packed); - var s$1 = Caml_bytes.bytes_to_string(Stdlib__Bytes.lowercase_ascii(Caml_bytes.bytes_of_string(s))); + let s = string_of_payload_kind(undefined, pk, is_packed); + let s$1 = Caml_bytes.bytes_to_string(Stdlib__Bytes.lowercase_ascii(Caml_bytes.bytes_of_string(s))); line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5437,7 +5437,7 @@ function encode_basic_type(bt, pk) { } function gen_encode_field_type(with_key, sc, var_name, encoding_number, pk, is_packed, field_type) { - var encode_key = function (sc) { + let encode_key = function (sc) { if (with_key !== undefined) { return gen_encode_field_key(sc, encoding_number, pk, is_packed); } @@ -5449,7 +5449,7 @@ function gen_encode_field_type(with_key, sc, var_name, encoding_number, pk, is_p } if (field_type.TAG === /* Ft_basic_type */0) { encode_key(sc); - var rt = encode_basic_type(field_type._0, pk); + let rt = encode_basic_type(field_type._0, pk); return line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5471,9 +5471,9 @@ function gen_encode_field_type(with_key, sc, var_name, encoding_number, pk, is_p _1: "%s %s encoder;" }), rt, var_name)); } - var ud = field_type._0; + let ud = field_type._0; encode_key(sc); - var f_name = function_name_of_user_defined("encode", ud); + let f_name = function_name_of_user_defined("encode", ud); if (ud.udt_nested) { return line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -5524,8 +5524,8 @@ function gen_encode_field_type(with_key, sc, var_name, encoding_number, pk, is_p } function gen_encode_record(and_, param, sc) { - var r_fields = param.r_fields; - var r_name = param.r_name; + let r_fields = param.r_fields; + let r_name = param.r_name; Curry._1(log(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5572,12 +5572,12 @@ function gen_encode_record(and_, param, sc) { }), let_decl_of_and(and_), r_name, r_name)); scope(sc, (function (sc) { Stdlib__List.iter((function (record_field) { - var rf_field_type = record_field.rf_field_type; - var rf_label = record_field.rf_label; + let rf_field_type = record_field.rf_field_type; + let rf_label = record_field.rf_label; switch (rf_field_type.TAG | 0) { case /* Rft_required */0 : - var match = rf_field_type._0; - var var_name = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let match = rf_field_type._0; + let var_name = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "v.", @@ -5591,10 +5591,10 @@ function gen_encode_record(and_, param, sc) { }), rf_label); return gen_encode_field_type(Caml_option.some(undefined), sc, var_name, match[1], match[2], false, match[0]); case /* Rft_optional */1 : - var match$1 = rf_field_type._0; - var pk = match$1[2]; - var encoding_number = match$1[1]; - var field_type = match$1[0]; + let match$1 = rf_field_type._0; + let pk = match$1[2]; + let encoding_number = match$1[1]; + let field_type = match$1[0]; line$1(sc, "("); scope(sc, (function (sc) { line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ @@ -5629,11 +5629,11 @@ function gen_encode_record(and_, param, sc) { })); return line$1(sc, ");"); case /* Rft_repeated_field */2 : - var match$2 = rf_field_type._0; - var is_packed = match$2[4]; - var pk$1 = match$2[3]; - var encoding_number$1 = match$2[2]; - var field_type$1 = match$2[1]; + let match$2 = rf_field_type._0; + let is_packed = match$2[4]; + let pk$1 = match$2[3]; + let encoding_number$1 = match$2[2]; + let field_type$1 = match$2[1]; if (match$2[0]) { if (is_packed) { gen_encode_field_key(sc, encoding_number$1, pk$1, is_packed); @@ -5732,13 +5732,13 @@ function gen_encode_record(and_, param, sc) { }), rf_label)); } case /* Rft_associative_field */3 : - var match$3 = rf_field_type._0; - var match$4 = match$3[3]; - var value_pk = match$4[1]; - var value_type = match$4[0]; - var match$5 = match$3[2]; - var key_pk = match$5[1]; - var encoding_number$2 = match$3[1]; + let match$3 = rf_field_type._0; + let match$4 = match$3[3]; + let value_pk = match$4[1]; + let value_type = match$4[0]; + let match$5 = match$3[2]; + let key_pk = match$5[1]; + let encoding_number$2 = match$3[1]; line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5810,7 +5810,7 @@ function gen_encode_record(and_, param, sc) { _1: ") v.%s;" }), rf_label)); case /* Rft_variant_field */4 : - var v_constructors = rf_field_type._0.v_constructors; + let v_constructors = rf_field_type._0.v_constructors; line$1(sc, "("); scope(sc, (function (sc) { line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ @@ -5830,12 +5830,12 @@ function gen_encode_record(and_, param, sc) { _1: "match v.%s with" }), rf_label)); Stdlib__List.iter((function (param) { - var vc_payload_kind = param.vc_payload_kind; - var vc_encoding_number = param.vc_encoding_number; - var vc_field_type = param.vc_field_type; - var vc_constructor = param.vc_constructor; + let vc_payload_kind = param.vc_payload_kind; + let vc_encoding_number = param.vc_encoding_number; + let vc_field_type = param.vc_field_type; + let vc_constructor = param.vc_constructor; if (vc_field_type) { - var field_type = vc_field_type._0; + let field_type = vc_field_type._0; line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5889,8 +5889,8 @@ function gen_encode_record(and_, param, sc) { } function gen_encode_variant(and_, variant, sc) { - var v_constructors = variant.v_constructors; - var v_name = variant.v_name; + let v_constructors = variant.v_constructors; + let v_name = variant.v_name; line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -5922,12 +5922,12 @@ function gen_encode_variant(and_, variant, sc) { scope(sc, (function (sc) { line$1(sc, "match v with"); Stdlib__List.iter((function (param) { - var vc_payload_kind = param.vc_payload_kind; - var vc_encoding_number = param.vc_encoding_number; - var vc_field_type = param.vc_field_type; - var vc_constructor = param.vc_constructor; + let vc_payload_kind = param.vc_payload_kind; + let vc_encoding_number = param.vc_encoding_number; + let vc_field_type = param.vc_field_type; + let vc_constructor = param.vc_constructor; if (vc_field_type) { - var field_type = vc_field_type._0; + let field_type = vc_field_type._0; line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -5975,8 +5975,8 @@ function gen_encode_variant(and_, variant, sc) { } function gen_encode_const_variant(and_, param, sc) { - var cv_constructors = param.cv_constructors; - var cv_name = param.cv_name; + let cv_constructors = param.cv_constructors; + let cv_name = param.cv_name; line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -6008,8 +6008,8 @@ function gen_encode_const_variant(and_, param, sc) { scope(sc, (function (sc) { line$1(sc, "match v with"); Stdlib__List.iter((function (param) { - var value = param[1]; - var name = param[0]; + let value = param[1]; + let name = param[0]; line$1(sc, value > 0 ? Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6066,8 +6066,8 @@ function gen_encode_const_variant(and_, param, sc) { } function gen_struct$3(and_, t, sc) { - var r = t.spec; - var tmp; + let r = t.spec; + let tmp; switch (r.TAG | 0) { case /* Record */0 : tmp = [ @@ -6093,7 +6093,7 @@ function gen_struct$3(and_, t, sc) { } function gen_sig$3(and_, t, sc) { - var f = function (type_name) { + let f = function (type_name) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6135,8 +6135,8 @@ function gen_sig$3(and_, t, sc) { _1: "(** [encode_%s v encoder] encodes [v] with the given [encoder] *)" }), type_name)); }; - var v = t.spec; - var tmp; + let v = t.spec; + let tmp; switch (v.TAG | 0) { case /* Record */0 : tmp = [ @@ -6161,7 +6161,7 @@ function gen_sig$3(and_, t, sc) { return tmp[1]; } -var Codegen_encode = { +let Codegen_encode = { gen_sig: gen_sig$3, gen_struct: gen_struct$3, ocamldoc_title: "Protobuf Toding" @@ -6171,7 +6171,7 @@ function default_value_of_field_type(field_name, field_type, field_default) { if (typeof field_type === "number") { return "()"; } else if (field_type.TAG === /* Ft_basic_type */0) { - var basic_type = field_type._0; + let basic_type = field_type._0; switch (basic_type) { case /* Bt_string */0 : if (field_default !== undefined) { @@ -6296,7 +6296,7 @@ function default_value_of_field_type(field_name, field_type, field_default) { if (field_default.TAG !== /* Constant_bool */1) { return invalid_default_value(field_name, "invalid default type", undefined); } - var b = field_default._0; + let b = field_default._0; if (b) { return "true"; } else { @@ -6310,21 +6310,21 @@ function default_value_of_field_type(field_name, field_type, field_default) { } function record_field_default_info(record_field) { - var rf_field_type = record_field.rf_field_type; - var rf_label = record_field.rf_label; - var type_string = string_of_record_field_type(rf_field_type); - var dfvft = function (field_type, defalut_value) { + let rf_field_type = record_field.rf_field_type; + let rf_label = record_field.rf_label; + let type_string = string_of_record_field_type(rf_field_type); + let dfvft = function (field_type, defalut_value) { return default_value_of_field_type(rf_label, field_type, defalut_value); }; - var default_value; + let default_value; switch (rf_field_type.TAG | 0) { case /* Rft_required */0 : - var match = rf_field_type._0; + let match = rf_field_type._0; default_value = dfvft(match[0], match[3]); break; case /* Rft_optional */1 : - var match$1 = rf_field_type._0; - var default_value$1 = match$1[3]; + let match$1 = rf_field_type._0; + let default_value$1 = match$1[3]; default_value = default_value$1 !== undefined ? Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6343,7 +6343,7 @@ function record_field_default_info(record_field) { }), dfvft(match$1[0], default_value$1)) : "None"; break; case /* Rft_repeated_field */2 : - var match$2 = rf_field_type._0; + let match$2 = rf_field_type._0; default_value = match$2[0] ? Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6365,11 +6365,11 @@ function record_field_default_info(record_field) { default_value = rf_field_type._0[0] ? "Hashtbl.create 128" : "[]"; break; case /* Rft_variant_field */4 : - var v_constructors = rf_field_type._0.v_constructors; + let v_constructors = rf_field_type._0.v_constructors; if (v_constructors) { - var match$3 = v_constructors.hd; - var vc_field_type = match$3.vc_field_type; - var vc_constructor = match$3.vc_constructor; + let match$3 = v_constructors.hd; + let vc_field_type = match$3.vc_field_type; + let vc_constructor = match$3.vc_constructor; default_value = vc_field_type ? Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -6411,10 +6411,10 @@ function record_field_default_info(record_field) { } function gen_default_record(mutable_, and_, param, sc) { - var r_name = param.r_name; - var fields_default_info = Stdlib__List.map(record_field_default_info, param.r_fields); + let r_name = param.r_name; + let fields_default_info = Stdlib__List.map(record_field_default_info, param.r_fields); if (mutable_ !== undefined) { - var rn = r_name + "_mutable"; + let rn = r_name + "_mutable"; line$1(sc, Curry._3(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -6490,7 +6490,7 @@ function gen_default_record(mutable_, and_, param, sc) { }), let_decl_of_and(and_), r_name)); scope(sc, (function (sc) { Stdlib__List.iter((function (param) { - var fname = param[0]; + let fname = param[0]; line$1(sc, Curry._4(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Char_literal */12, @@ -6570,13 +6570,13 @@ function gen_default_record(mutable_, and_, param, sc) { } function gen_default_variant(and_, param, sc) { - var v_constructors = param.v_constructors; - var v_name = param.v_name; + let v_constructors = param.v_constructors; + let v_name = param.v_name; if (v_constructors) { - var match = v_constructors.hd; - var vc_field_type = match.vc_field_type; - var vc_constructor = match.vc_constructor; - var decl = let_decl_of_and(and_); + let match = v_constructors.hd; + let vc_field_type = match.vc_field_type; + let vc_constructor = match.vc_constructor; + let decl = let_decl_of_and(and_); if (!vc_field_type) { return line$1(sc, Curry._4(Stdlib__Printf.sprintf(/* Format */{ _0: { @@ -6611,7 +6611,7 @@ function gen_default_variant(and_, param, sc) { _1: "%s default_%s (): %s = %s" }), decl, v_name, v_name, vc_constructor)); } - var default_value = default_value_of_field_type(v_name, vc_field_type._0, undefined); + let default_value = default_value_of_field_type(v_name, vc_field_type._0, undefined); return line$1(sc, Curry._5(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String */2, @@ -6664,9 +6664,9 @@ function gen_default_variant(and_, param, sc) { } function gen_default_const_variant(and_, param, sc) { - var cv_constructors = param.cv_constructors; - var cv_name = param.cv_name; - var first_constructor_name; + let cv_constructors = param.cv_constructors; + let cv_name = param.cv_name; + let first_constructor_name; if (cv_constructors) { first_constructor_name = cv_constructors.hd[0]; } else { @@ -6714,11 +6714,11 @@ function gen_default_const_variant(and_, param, sc) { } function gen_struct$4(and_, t, sc) { - var r = t.spec; - var tmp; + let r = t.spec; + let tmp; switch (r.TAG | 0) { case /* Record */0 : - var r$1 = r._0; + let r$1 = r._0; tmp = [ (gen_default_record(undefined, and_, r$1, sc), line$1(sc, ""), gen_default_record(Caml_option.some(undefined), Caml_option.some(undefined), r$1, sc)), true @@ -6742,7 +6742,7 @@ function gen_struct$4(and_, t, sc) { } function gen_sig_record(sc, param) { - var r_name = param.r_name; + let r_name = param.r_name; line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6759,7 +6759,7 @@ function gen_sig_record(sc, param) { }, _1: "val default_%s : " }), r_name)); - var fields_default_info = Stdlib__List.map(record_field_default_info, param.r_fields); + let fields_default_info = Stdlib__List.map(record_field_default_info, param.r_fields); scope(sc, (function (sc) { Stdlib__List.iter((function (param) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ @@ -6817,7 +6817,7 @@ function gen_sig_record(sc, param) { } function gen_sig$4(and_, t, sc) { - var f = function (type_name) { + let f = function (type_name) { line$1(sc, Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -6863,8 +6863,8 @@ function gen_sig$4(and_, t, sc) { _1: "(** [default_%s ()] is the default value for type [%s] *)" }), type_name, type_name)); }; - var r = t.spec; - var tmp; + let r = t.spec; + let tmp; switch (r.TAG | 0) { case /* Record */0 : tmp = [ @@ -6889,21 +6889,21 @@ function gen_sig$4(and_, t, sc) { return tmp[1]; } -var Codegen_default = { +let Codegen_default = { gen_sig: gen_sig$4, gen_struct: gen_struct$4, ocamldoc_title: "Default values" }; function rev_split_by_naming_convention(s) { - var is_uppercase = function (c) { + let is_uppercase = function (c) { if (64 < c) { return c < 91; } else { return false; } }; - var add_sub_string = function (start_i, end_i, l) { + let add_sub_string = function (start_i, end_i, l) { if (start_i === end_i) { return l; } else { @@ -6913,9 +6913,9 @@ function rev_split_by_naming_convention(s) { }; } }; - var match = string_fold_lefti((function (param, i, c) { - var start_i = param[1]; - var l = param[0]; + let match = string_fold_lefti((function (param, i, c) { + let start_i = param[1]; + let l = param[0]; if (c !== 95) { if (param[2] || !is_uppercase(c)) { return [ @@ -6942,7 +6942,7 @@ function rev_split_by_naming_convention(s) { 0, false ], s); - var len = s.length; + let len = s.length; return add_sub_string(match[1], len, match[0]); } @@ -7011,24 +7011,24 @@ function fix_ocaml_keyword_conflict(s) { } function constructor_name(s) { - var s$1 = Stdlib__String.concat("_", Stdlib__List.rev(rev_split_by_naming_convention(s))); - var s$2 = Caml_bytes.bytes_to_string(Stdlib__Bytes.lowercase_ascii(Caml_bytes.bytes_of_string(s$1))); + let s$1 = Stdlib__String.concat("_", Stdlib__List.rev(rev_split_by_naming_convention(s))); + let s$2 = Caml_bytes.bytes_to_string(Stdlib__Bytes.lowercase_ascii(Caml_bytes.bytes_of_string(s$1))); return Caml_bytes.bytes_to_string(Stdlib__Bytes.capitalize_ascii(Caml_bytes.bytes_of_string(s$2))); } function label_name_of_field_name(s) { - var s$1 = Stdlib__String.concat("_", Stdlib__List.rev(rev_split_by_naming_convention(s))); + let s$1 = Stdlib__String.concat("_", Stdlib__List.rev(rev_split_by_naming_convention(s))); return fix_ocaml_keyword_conflict(Caml_bytes.bytes_to_string(Stdlib__Bytes.lowercase_ascii(Caml_bytes.bytes_of_string(s$1)))); } function module_of_file_name(file_name) { - var file_name$1 = Curry._1(Stdlib__Filename.basename, file_name); - var dot_index; + let file_name$1 = Curry._1(Stdlib__Filename.basename, file_name); + let dot_index; try { dot_index = Stdlib__String.rindex(file_name$1, /* '.' */46); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, @@ -7044,14 +7044,14 @@ function module_of_file_name(file_name) { } function type_name(message_scope, name) { - var all_names = Stdlib.$at(message_scope, { + let all_names = Stdlib.$at(message_scope, { hd: name, tl: /* [] */0 }); - var all_names$1 = Stdlib__List.map((function (s) { + let all_names$1 = Stdlib__List.map((function (s) { return Stdlib__List.map(Stdlib__String.lowercase_ascii, Stdlib__List.rev(rev_split_by_naming_convention(s))); }), all_names); - var all_names$2 = Stdlib__List.flatten(all_names$1); + let all_names$2 = Stdlib__List.flatten(all_names$1); if (all_names$2) { if (all_names$2.tl) { return Stdlib__String.concat("_", all_names$2); @@ -7095,7 +7095,7 @@ function encoding_info_of_field_type(all_types, field_type) { } } else { - var match = type_of_id(all_types, field_type._0); + let match = type_of_id(all_types, field_type._0); if (match.spec.TAG === /* Enum */0) { return /* Pk_varint */{ _0: false @@ -7107,13 +7107,13 @@ function encoding_info_of_field_type(all_types, field_type) { } function encoding_of_field(all_types, field) { - var match = field_option(field, "packed"); - var packed; + let match = field_option(field, "packed"); + let packed; if (match !== undefined) { if (match.TAG === /* Constant_bool */1) { packed = match._0; } else { - var field_name$1 = field_name(field); + let field_name$1 = field_name(field); throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { @@ -7125,7 +7125,7 @@ function encoding_of_field(all_types, field) { } else { packed = false; } - var pk = encoding_info_of_field_type(all_types, field_type(field)); + let pk = encoding_info_of_field_type(all_types, field_type(field)); return [ pk, field_number(field), @@ -7135,18 +7135,18 @@ function encoding_of_field(all_types, field) { } function compile_field_type(field_name, all_types, file_options, field_options, file_name, field_type) { - var match = find_field_option(field_options, "ocaml_type"); - var ocaml_type = match !== undefined && match.TAG === /* Constant_litteral */4 && match._0 === "int_t" ? "Int_t" : "None"; - var match$1 = file_option(file_options, "int32_type"); - var int32_type = match$1 !== undefined && match$1.TAG === /* Constant_litteral */4 && match$1._0 === "int_t" ? ({ + let match = find_field_option(field_options, "ocaml_type"); + let ocaml_type = match !== undefined && match.TAG === /* Constant_litteral */4 && match._0 === "int_t" ? "Int_t" : "None"; + let match$1 = file_option(file_options, "int32_type"); + let int32_type = match$1 !== undefined && match$1.TAG === /* Constant_litteral */4 && match$1._0 === "int_t" ? ({ TAG: /* Ft_basic_type */0, _0: /* Bt_int */2 }) : ({ TAG: /* Ft_basic_type */0, _0: /* Bt_int32 */3 }); - var match$2 = file_option(file_options, "int64_type"); - var int64_type = match$2 !== undefined && match$2.TAG === /* Constant_litteral */4 && match$2._0 === "int_t" ? ({ + let match$2 = file_option(file_options, "int64_type"); + let int64_type = match$2 !== undefined && match$2.TAG === /* Constant_litteral */4 && match$2._0 === "int_t" ? ({ TAG: /* Ft_basic_type */0, _0: /* Bt_int */2 }) : ({ @@ -7154,14 +7154,14 @@ function compile_field_type(field_name, all_types, file_options, field_options, _0: /* Bt_int64 */4 }); if (typeof field_type !== "number") { - var i = field_type._0; - var module_ = module_of_file_name(file_name); - var t; + let i = field_type._0; + let module_ = module_of_file_name(file_name); + let t; try { t = type_of_id(all_types, i); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, @@ -7176,11 +7176,11 @@ function compile_field_type(field_name, all_types, file_options, field_options, if (is_empty_message(t)) { return /* Ft_unit */0; } - var udt_nested; + let udt_nested; udt_nested = t.spec.TAG === /* Enum */0 ? false : true; - var field_type_module = module_of_file_name(t.file_name); - var match$3 = type_scope_of_type(t); - var udt_type_name = type_name(match$3.message_names, type_name_of_type(t)); + let field_type_module = module_of_file_name(t.file_name); + let match$3 = type_scope_of_type(t); + let udt_type_name = type_name(match$3.message_names, type_name_of_type(t)); if (field_type_module === module_) { return { TAG: /* Ft_user_defined_type */1, @@ -7256,7 +7256,7 @@ function compile_field_type(field_name, all_types, file_options, field_options, } function is_mutable(field_name, field_options) { - var match = find_field_option(field_options, "ocaml_mutable"); + let match = find_field_option(field_options, "ocaml_mutable"); if (match === undefined) { return false; } @@ -7273,7 +7273,7 @@ function is_mutable(field_name, field_options) { } function ocaml_container(field_options) { - var match = find_field_option(field_options, "ocaml_container"); + let match = find_field_option(field_options, "ocaml_container"); if (match !== undefined && match.TAG === /* Constant_litteral */4) { return match._0; } @@ -7281,11 +7281,11 @@ function ocaml_container(field_options) { } function variant_of_oneof(include_oneof_name, outer_message_names, all_types, file_options, file_name, oneof_field) { - var v_constructors = Stdlib__List.map((function (field) { - var pbtt_field_type = field_type(field); - var field_type$1 = compile_field_type(field_name(field), all_types, file_options, field_options(field), file_name, pbtt_field_type); - var match = encoding_of_field(all_types, field); - var vc_constructor = constructor_name(field_name(field)); + let v_constructors = Stdlib__List.map((function (field) { + let pbtt_field_type = field_type(field); + let field_type$1 = compile_field_type(field_name(field), all_types, file_options, field_options(field), file_name, pbtt_field_type); + let match = encoding_of_field(all_types, field); + let vc_constructor = constructor_name(field_name(field)); return { vc_constructor: vc_constructor, vc_field_type: typeof field_type$1 === "number" ? /* Vct_nullary */0 : /* Vct_non_nullary_constructor */({ @@ -7295,7 +7295,7 @@ function variant_of_oneof(include_oneof_name, outer_message_names, all_types, fi vc_payload_kind: match[0] }; }), oneof_field.oneof_fields); - var v_name = include_oneof_name !== undefined ? type_name(outer_message_names, oneof_field.oneof_name) : type_name(outer_message_names, ""); + let v_name = include_oneof_name !== undefined ? type_name(outer_message_names, oneof_field.oneof_name) : type_name(outer_message_names, ""); return { v_name: v_name, v_constructors: v_constructors @@ -7303,8 +7303,8 @@ function variant_of_oneof(include_oneof_name, outer_message_names, all_types, fi } function compile_enum(file_name, scope, param) { - var module_ = module_of_file_name(file_name); - var cv_constructors = Stdlib__List.map((function (param) { + let module_ = module_of_file_name(file_name); + let cv_constructors = Stdlib__List.map((function (param) { return [ constructor_name(param.enum_value_name), param.enum_value_int @@ -7322,7 +7322,7 @@ function compile_enum(file_name, scope, param) { }; } -var all_code_gen_1 = { +let all_code_gen_1 = { hd: Codegen_default, tl: { hd: Codegen_decode, @@ -7336,28 +7336,28 @@ var all_code_gen_1 = { } }; -var all_code_gen = { +let all_code_gen = { hd: Codegen_type, tl: all_code_gen_1 }; function compile(proto_definition) { - var lexbuf = Stdlib__Lexing.from_string(undefined, proto_definition); - var proto; + let lexbuf = Stdlib__Lexing.from_string(undefined, proto_definition); + let proto; try { proto = proto_(lexer, lexbuf); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); throw new Caml_js_exceptions.MelangeError(add_loc(from_lexbuf(lexbuf), exn).MEL_EXN_ID, add_loc(from_lexbuf(lexbuf), exn)); } - var all_pbtt_msgs = compile_proto_p1("tmp.proto", proto); - var all_pbtt_msgs$1 = Stdlib__List.map((function (param) { - var m = param.spec; - var file_options = param.file_options; - var file_name = param.file_name; - var id = param.id; - var scope = param.scope; + let all_pbtt_msgs = compile_proto_p1("tmp.proto", proto); + let all_pbtt_msgs$1 = Stdlib__List.map((function (param) { + let m = param.spec; + let file_options = param.file_options; + let file_name = param.file_name; + let id = param.id; + let scope = param.scope; if (m.TAG === /* Enum */0) { return { scope: scope, @@ -7379,36 +7379,36 @@ function compile(proto_definition) { }; } }), all_pbtt_msgs); - var grouped_pbtt_msgs = Stdlib__List.rev(group(all_pbtt_msgs$1)); - var grouped_ocaml_types = Stdlib__List.map((function (pbtt_msgs) { + let grouped_pbtt_msgs = Stdlib__List.rev(group(all_pbtt_msgs$1)); + let grouped_ocaml_types = Stdlib__List.map((function (pbtt_msgs) { return Stdlib__List.map((function (pbtt_msg) { - var m = pbtt_msg.spec; - var file_name = pbtt_msg.file_name; - var scope = pbtt_msg.scope; + let m = pbtt_msg.spec; + let file_name = pbtt_msg.file_name; + let scope = pbtt_msg.scope; if (m.TAG === /* Enum */0) { return { hd: compile_enum(file_name, scope, m._0), tl: /* [] */0 }; } else { - var file_options = pbtt_msg.file_options; - var message = m._0; - var module_ = module_of_file_name(file_name); - var message_names = scope.message_names; - var message_body = message.message_body; - var message_name = message.message_name; + let file_options = pbtt_msg.file_options; + let message = m._0; + let module_ = module_of_file_name(file_name); + let message_names = scope.message_names; + let message_body = message.message_body; + let message_name = message.message_name; if (!message_body) { return /* [] */0; } - var f = message_body.hd; + let f = message_body.hd; switch (f.TAG | 0) { case /* Message_oneof_field */1 : if (!message_body.tl) { - var outer_message_names = Stdlib.$at(message_names, { + let outer_message_names = Stdlib.$at(message_names, { hd: message_name, tl: /* [] */0 }); - var variant = variant_of_oneof(undefined, outer_message_names, all_pbtt_msgs$1, file_options, file_name, f._0); + let variant = variant_of_oneof(undefined, outer_message_names, all_pbtt_msgs$1, file_options, file_name, f._0); return { hd: { module_: module_, @@ -7426,22 +7426,22 @@ function compile(proto_definition) { break; } - var match = Stdlib__List.fold_left((function (param, param$1) { - var fields = param[1]; - var variants = param[0]; + let match = Stdlib__List.fold_left((function (param, param$1) { + let fields = param[1]; + let variants = param[0]; switch (param$1.TAG | 0) { case /* Message_field */0 : - var field = param$1._0; - var match = encoding_of_field(all_pbtt_msgs$1, field); - var encoding_number = match[1]; - var pk = match[0]; - var field_name$1 = field_name(field); - var field_options$1 = field_options(field); - var field_type$1 = compile_field_type(field_name$1, all_pbtt_msgs$1, file_options, field_options$1, file_name, field_type(field)); - var field_default$1 = field_default(field); - var mutable_ = is_mutable(field_name$1, field_options$1); - var match$1 = field_label(field); - var record_field_type; + let field = param$1._0; + let match = encoding_of_field(all_pbtt_msgs$1, field); + let encoding_number = match[1]; + let pk = match[0]; + let field_name$1 = field_name(field); + let field_options$1 = field_options(field); + let field_type$1 = compile_field_type(field_name$1, all_pbtt_msgs$1, file_options, field_options$1, file_name, field_type(field)); + let field_default$1 = field_default(field); + let mutable_ = is_mutable(field_name$1, field_options$1); + let match$1 = field_label(field); + let record_field_type; if (match$1 === "Optional") { record_field_type = { TAG: /* Rft_optional */1, @@ -7463,8 +7463,8 @@ function compile(proto_definition) { ] }; } else { - var match$2 = ocaml_container(field_options$1); - var repeated_type; + let match$2 = ocaml_container(field_options$1); + let repeated_type; if (match$2 !== undefined) { if (match$2 === "repeated_field") { repeated_type = /* Rt_repeated_field */1; @@ -7488,8 +7488,8 @@ function compile(proto_definition) { ] }; } - var record_field_rf_label = label_name_of_field_name(field_name$1); - var record_field = { + let record_field_rf_label = label_name_of_field_name(field_name$1); + let record_field = { rf_label: record_field_rf_label, rf_field_type: record_field_type, rf_mutable: mutable_ @@ -7502,34 +7502,34 @@ function compile(proto_definition) { } ]; case /* Message_oneof_field */1 : - var field$1 = param$1._0; - var outer_message_names = Stdlib.$at(message_names, { + let field$1 = param$1._0; + let outer_message_names = Stdlib.$at(message_names, { hd: message_name, tl: /* [] */0 }); - var variant = variant_of_oneof(Caml_option.some(undefined), outer_message_names, all_pbtt_msgs$1, file_options, file_name, field$1); - var record_field_rf_label$1 = label_name_of_field_name(field$1.oneof_name); - var record_field_rf_field_type = { + let variant = variant_of_oneof(Caml_option.some(undefined), outer_message_names, all_pbtt_msgs$1, file_options, file_name, field$1); + let record_field_rf_label$1 = label_name_of_field_name(field$1.oneof_name); + let record_field_rf_field_type = { TAG: /* Rft_variant_field */4, _0: variant }; - var record_field$1 = { + let record_field$1 = { rf_label: record_field_rf_label$1, rf_field_type: record_field_rf_field_type, rf_mutable: false }; - var variants_0 = { + let variants_0 = { module_: module_, spec: { TAG: /* Variant */1, _0: variant } }; - var variants$1 = { + let variants$1 = { hd: variants_0, tl: variants }; - var fields$1 = { + let fields$1 = { hd: record_field$1, tl: fields }; @@ -7538,12 +7538,12 @@ function compile(proto_definition) { fields$1 ]; case /* Message_map_field */2 : - var mf = param$1._0; - var map_options = mf.map_options; - var map_value_type = mf.map_value_type; - var map_key_type = mf.map_key_type; - var map_name = mf.map_name; - var key_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let mf = param$1._0; + let map_options = mf.map_options; + let map_value_type = mf.map_value_type; + let map_key_type = mf.map_key_type; + let map_name = mf.map_name; + let key_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "key of ", @@ -7555,8 +7555,8 @@ function compile(proto_definition) { }, _1: "key of %s" }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_key_type); - var key_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_key_type); - var key_type$1; + let key_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_key_type); + let key_type$1; if (typeof key_type === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -7571,7 +7571,7 @@ function compile(proto_definition) { _1: "Only Basic Types are supported for map keys" }); } - var value_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let value_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "value of ", @@ -7583,9 +7583,9 @@ function compile(proto_definition) { }, _1: "value of %s" }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_value_type); - var value_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_value_type); - var match$3 = ocaml_container(map_options); - var associative_type; + let value_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_value_type); + let match$3 = ocaml_container(map_options); + let associative_type; if (match$3 !== undefined) { if (match$3 === "hashtbl") { associative_type = /* At_hashtable */1; @@ -7598,7 +7598,7 @@ function compile(proto_definition) { } else { associative_type = /* At_list */0; } - var record_field_type$1 = { + let record_field_type$1 = { TAG: /* Rft_associative_field */3, _0: [ associative_type, @@ -7613,9 +7613,9 @@ function compile(proto_definition) { ] ] }; - var record_field_rf_label$2 = label_name_of_field_name(map_name); - var record_field_rf_mutable = is_mutable(map_name, map_options); - var record_field$2 = { + let record_field_rf_label$2 = label_name_of_field_name(map_name); + let record_field_rf_mutable = is_mutable(map_name, map_options); + let record_field$2 = { rf_label: record_field_rf_label$2, rf_field_type: record_field_type$1, rf_mutable: record_field_rf_mutable @@ -7633,17 +7633,17 @@ function compile(proto_definition) { /* [] */0, /* [] */0 ], message_body); - var record_r_name = type_name(message_names, message_name); - var record_r_fields = Stdlib__List.rev(match[1]); - var record = { + let record_r_name = type_name(message_names, message_name); + let record_r_fields = Stdlib__List.rev(match[1]); + let record = { r_name: record_r_name, r_fields: record_r_fields }; - var type__spec = { + let type__spec = { TAG: /* Record */0, _0: record }; - var type_ = { + let type_ = { module_: module_, spec: type__spec }; @@ -7654,12 +7654,12 @@ function compile(proto_definition) { } }), pbtt_msgs); }), grouped_pbtt_msgs); - var all_ocaml_types = Stdlib__List.flatten(grouped_ocaml_types); - var proto_file_name = "tmp.proto"; - var gen = function (otypes, sc, fs) { + let all_ocaml_types = Stdlib__List.flatten(grouped_ocaml_types); + let proto_file_name = "tmp.proto"; + let gen = function (otypes, sc, fs) { Stdlib__List.iter((function (param) { - var ocamldoc_title = param[1]; - var f = param[0]; + let ocamldoc_title = param[1]; + let f = param[0]; if (ocamldoc_title !== undefined) { line$1(sc, ""); line$1(sc, Curry._1(Stdlib__Printf.sprintf(/* Format */{ @@ -7682,7 +7682,7 @@ function compile(proto_definition) { } Stdlib__List.iter((function (types) { Stdlib__List.fold_left((function (first, type_) { - var has_encoded = first ? Curry._3(f, undefined, type_, sc) : Curry._3(f, Caml_option.some(undefined), type_, sc); + let has_encoded = first ? Curry._3(f, undefined, type_, sc) : Curry._3(f, Caml_option.some(undefined), type_, sc); line$1(sc, ""); if (first) { return !has_encoded; @@ -7693,7 +7693,7 @@ function compile(proto_definition) { }), otypes); }), fs); }; - var sc = { + let sc = { items: /* [] */0 }; line$1(sc, "[@@@ocaml.warning \"-30\"]"); @@ -7704,8 +7704,8 @@ function compile(proto_definition) { undefined ]; }), all_code_gen)); - var struct_string = print(sc); - var sc$1 = { + let struct_string = print(sc); + let sc$1 = { items: /* [] */0 }; line$1(sc$1, Curry._1(Stdlib__Printf.sprintf(/* Format */{ @@ -7730,20 +7730,20 @@ function compile(proto_definition) { m.ocamldoc_title ]; }), all_code_gen)); - var sig_string = print(sc$1); + let sig_string = print(sc$1); return [ sig_string, struct_string ]; } -var match = compile("message T {required int32 j = 1; }"); +let match = compile("message T {required int32 j = 1; }"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/ocaml_re_test.js b/jscomp/test/dist/jscomp/test/ocaml_re_test.js index 164acc4ee7..f366edee14 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_re_test.js @@ -1,30 +1,30 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); - -var suites = { +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -47,22 +47,22 @@ function eq(loc, x, y) { function union(_l, _l$p) { while(true) { - var l$p = _l$p; - var l = _l; + let l$p = _l$p; + let l = _l; if (!l$p) { return l; } if (!l) { return l$p; } - var r$p = l$p.tl; - var match = l$p.hd; - var c2$p = match[1]; - var c1$p = match[0]; - var r = l.tl; - var match$1 = l.hd; - var c2 = match$1[1]; - var c1 = match$1[0]; + let r$p = l$p.tl; + let match = l$p.hd; + let c2$p = match[1]; + let c1$p = match[0]; + let r = l.tl; + let match$1 = l.hd; + let c2 = match$1[1]; + let c1 = match$1[0]; if ((c2 + 1 | 0) < c1$p) { return { hd: [ @@ -106,22 +106,22 @@ function union(_l, _l$p) { function inter(_l, _l$p) { while(true) { - var l$p = _l$p; - var l = _l; + let l$p = _l$p; + let l = _l; if (!l$p) { return /* [] */0; } if (!l) { return /* [] */0; } - var r$p = l$p.tl; - var match = l$p.hd; - var c2$p = match[1]; - var c1$p = match[0]; - var r = l.tl; - var match$1 = l.hd; - var c2 = match$1[1]; - var c1 = match$1[0]; + let r$p = l$p.tl; + let match = l$p.hd; + let c2$p = match[1]; + let c1$p = match[0]; + let r = l.tl; + let match$1 = l.hd; + let c2 = match$1[1]; + let c1 = match$1[0]; if (Caml_obj.caml_lessthan(c2, c1$p)) { _l = r; continue ; @@ -152,22 +152,22 @@ function inter(_l, _l$p) { function diff(_l, _l$p) { while(true) { - var l$p = _l$p; - var l = _l; + let l$p = _l$p; + let l = _l; if (!l$p) { return l; } if (!l) { return /* [] */0; } - var r$p = l$p.tl; - var match = l$p.hd; - var c2$p = match[1]; - var c1$p = match[0]; - var r = l.tl; - var match$1 = l.hd; - var c2 = match$1[1]; - var c1 = match$1[0]; + let r$p = l$p.tl; + let match = l$p.hd; + let c2$p = match[1]; + let c1$p = match[0]; + let r = l.tl; + let match$1 = l.hd; + let c2 = match$1[1]; + let c1 = match$1[0]; if (c2 < c1$p) { return { hd: [ @@ -181,7 +181,7 @@ function diff(_l, _l$p) { _l$p = r$p; continue ; } - var r$p$p = c2$p < c2 ? ({ + let r$p$p = c2$p < c2 ? ({ hd: [ c2$p + 1 | 0, c2 @@ -237,7 +237,7 @@ function offset(o, l) { if (!l) { return /* [] */0; } - var match = l.hd; + let match = l.hd; return { hd: [ match[0] + o | 0, @@ -249,11 +249,11 @@ function offset(o, l) { function mem(c, _s) { while(true) { - var s = _s; + let s = _s; if (!s) { return false; } - var match = s.hd; + let match = s.hd; if (c <= match[1]) { return c >= match[0]; } @@ -266,7 +266,7 @@ function hash_rec(param) { if (!param) { return 0; } - var match = param.hd; + let match = param.hd; return (match[0] + Math.imul(13, match[1]) | 0) + Math.imul(257, hash_rec(param.tl)) | 0; } @@ -277,8 +277,8 @@ function one_char(param) { if (param.tl) { return ; } - var match = param.hd; - var i = match[0]; + let match = param.hd; + let i = match[0]; if (Caml_obj.caml_equal(i, match[1])) { return Caml_option.some(i); } @@ -286,7 +286,7 @@ function one_char(param) { } function compare(param, param$1) { - var c = Caml_obj.caml_compare(param[0], param$1[0]); + let c = Caml_obj.caml_compare(param[0], param$1[0]); if (c !== 0) { return c; } else { @@ -294,7 +294,7 @@ function compare(param, param$1) { } } -var funarg = { +let funarg = { compare: compare }; @@ -307,8 +307,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -319,14 +319,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -353,10 +353,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -384,11 +384,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -403,14 +403,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -420,9 +420,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -435,7 +435,7 @@ function find(x, _param) { }; } -var cany = { +let cany = { hd: [ 0, 255 @@ -495,9 +495,9 @@ function from_char(param) { } } -var compare$1 = Caml.caml_int_compare; +let compare$1 = Caml.caml_int_compare; -var funarg$1 = { +let funarg$1 = { compare: compare$1 }; @@ -510,8 +510,8 @@ function height$1(param) { } function create$1(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -521,13 +521,13 @@ function create$1(l, v, r) { } function bal$1(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, create$1(lr, v, r)); } @@ -553,9 +553,9 @@ function bal$1(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, v, rl), rv, rr); } @@ -582,22 +582,22 @@ function add$1(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$1(x, l); + let ll = add$1(x, l); if (l === ll) { return t; } else { return bal$1(ll, v, r); } } - var rr = add$1(x, r); + let rr = add$1(x, r); if (r === rr) { return t; } else { @@ -609,23 +609,23 @@ function hash_combine(h, accu) { return Math.imul(accu, 65599) + h | 0; } -var empty_pmarks = /* Empty */0; +let empty_pmarks = /* Empty */0; -var empty = { +let empty = { marks: /* [] */0, pmarks: empty_pmarks }; function hash(m, accu) { - var _l = m.marks; - var _accu = hash_combine(Stdlib__Hashtbl.hash(m.pmarks), accu); + let _l = m.marks; + let _accu = hash_combine(Stdlib__Hashtbl.hash(m.pmarks), accu); while(true) { - var accu$1 = _accu; - var l = _l; + let accu$1 = _accu; + let l = _l; if (!l) { return accu$1; } - var match = l.hd; + let match = l.hd; _accu = hash_combine(match[0], hash_combine(match[1], accu$1)); _l = l.tl; continue ; @@ -636,7 +636,7 @@ function marks_set_idx(idx, marks) { if (!marks) { return marks; } - var match = marks.hd; + let match = marks.hd; if (match[1] !== -1) { return marks; } else { @@ -659,11 +659,11 @@ function marks_set_idx$1(marks, idx) { function first(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var res = Curry._1(f, param.hd); + let res = Curry._1(f, param.hd); if (res !== undefined) { return res; } @@ -672,7 +672,7 @@ function first(f, _param) { }; } -var eps_expr = { +let eps_expr = { id: 0, def: /* Eps */0 }; @@ -718,9 +718,9 @@ function alt(ids, l) { } function seq$1(ids, kind, x, y) { - var match = x.def; - var match$1 = y.def; - var exit = 0; + let match = x.def; + let match$1 = y.def; + let exit = 0; if (typeof match === "number") { return y; } @@ -752,7 +752,7 @@ function seq$1(ids, kind, x, y) { } function is_eps(expr) { - var match = expr.def; + let match = expr.def; if (typeof match === "number") { return true; } else { @@ -778,7 +778,7 @@ function erase(ids, m, m$p) { } function rename(ids, x) { - var l = x.def; + let l = x.def; if (typeof l === "number") { return mk_expr(ids, x.def); } @@ -811,8 +811,8 @@ function rename(ids, x) { function equal(_l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -820,13 +820,13 @@ function equal(_l1, _l2) { return true; } } - var marks1 = l1.hd; + let marks1 = l1.hd; switch (marks1.TAG | 0) { case /* TSeq */0 : if (!l2) { return false; } - var match = l2.hd; + let match = l2.hd; switch (match.TAG | 0) { case /* TSeq */0 : if (marks1._1.id !== match._1.id) { @@ -847,7 +847,7 @@ function equal(_l1, _l2) { if (!l2) { return false; } - var match$1 = l2.hd; + let match$1 = l2.hd; switch (match$1.TAG | 0) { case /* TExp */1 : if (marks1._1.id !== match$1._1.id) { @@ -868,7 +868,7 @@ function equal(_l1, _l2) { if (!l2) { return false; } - var marks2 = l2.hd; + let marks2 = l2.hd; switch (marks2.TAG | 0) { case /* TSeq */0 : case /* TExp */1 : @@ -889,12 +889,12 @@ function equal(_l1, _l2) { function hash$1(_l, _accu) { while(true) { - var accu = _accu; - var l = _l; + let accu = _accu; + let l = _l; if (!l) { return accu; } - var marks = l.hd; + let marks = l.hd; switch (marks.TAG | 0) { case /* TSeq */0 : _accu = hash_combine(388635598, hash_combine(marks._1.id, hash$1(marks._0, accu))); @@ -917,7 +917,7 @@ function tseq(kind, x, y, rem) { if (!x) { return rem; } - var match = x.hd; + let match = x.hd; switch (match.TAG | 0) { case /* TExp */1 : if (typeof match._1.def === "number" && !x.tl) { @@ -947,7 +947,7 @@ function tseq(kind, x, y, rem) { }; } -var dummy = { +let dummy = { idx: -1, category: -1, desc: /* [] */0, @@ -992,7 +992,7 @@ function hash$3(t) { return t.hash; } -var Table = Stdlib__Hashtbl.Make({ +let Table = Stdlib__Hashtbl.Make({ equal: equal$1, hash: hash$3 }); @@ -1013,7 +1013,7 @@ function mark_used_indices(tbl) { } Stdlib__List.iter((function (param) { - var i = param[1]; + let i = param[1]; if (i >= 0) { return Caml_array.set(tbl, i, true); } @@ -1025,7 +1025,7 @@ function mark_used_indices(tbl) { function find_free(tbl, _idx, len) { while(true) { - var idx = _idx; + let idx = _idx; if (idx === len || !Caml_array.get(tbl, idx)) { return idx; } @@ -1035,11 +1035,11 @@ function find_free(tbl, _idx, len) { } function free_index(tbl_ref, l) { - var tbl = tbl_ref.contents; + let tbl = tbl_ref.contents; reset_table(tbl); mark_used_indices(tbl)(l); - var len = tbl.length; - var idx = find_free(tbl, 0, len); + let len = tbl.length; + let idx = find_free(tbl, 0, len); if (idx === len) { tbl_ref.contents = Caml_array.make((len << 1), false); } @@ -1061,10 +1061,10 @@ function remove_matches(param) { function split_at_match_rec(_l$p, _param) { while(true) { - var param = _param; - var l$p = _l$p; + let param = _param; + let l$p = _l$p; if (param) { - var x = param.hd; + let x = param.hd; switch (x.TAG | 0) { case /* TSeq */0 : case /* TExp */1 : @@ -1096,31 +1096,31 @@ function split_at_match_rec(_l$p, _param) { function remove_duplicates(prev, _l, y) { while(true) { - var l = _l; + let l = _l; if (!l) { return [ /* [] */0, prev ]; } - var x = l.hd; + let x = l.hd; switch (x.TAG | 0) { case /* TSeq */0 : - var x$1 = x._1; - var match = remove_duplicates(prev, x._0, x$1); - var match$1 = remove_duplicates(match[1], l.tl, y); + 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 */1 : if (typeof x._1.def === "number") { - var r = l.tl; + let r = l.tl; if (Stdlib__List.memq(y.id, prev)) { _l = r; continue ; } - var match$2 = remove_duplicates({ + let match$2 = remove_duplicates({ hd: y.id, tl: prev }, r, y); @@ -1132,13 +1132,13 @@ function remove_duplicates(prev, _l, y) { match$2[1] ]; } - var r$1 = l.tl; - var x$2 = x._1; + let r$1 = l.tl; + let x$2 = x._1; if (Stdlib__List.memq(x$2.id, prev)) { _l = r$1; continue ; } - var match$3 = remove_duplicates({ + let match$3 = remove_duplicates({ hd: x$2.id, tl: prev }, r$1, y); @@ -1166,7 +1166,7 @@ function set_idx(idx, param) { if (!param) { return /* [] */0; } - var marks = param.hd; + let marks = param.hd; switch (marks.TAG | 0) { case /* TSeq */0 : return { @@ -1202,7 +1202,7 @@ function set_idx(idx, param) { function filter_marks(b, e, marks) { return { marks: Stdlib__List.filter((function (param) { - var i = param[0]; + let i = param[0]; if (i < b) { return true; } else { @@ -1214,7 +1214,7 @@ function filter_marks(b, e, marks) { } function delta_1(marks, c, next_cat, prev_cat, x, rem) { - var s = x.def; + let s = x.def; if (typeof s === "number") { return { hd: { @@ -1241,12 +1241,12 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { case /* Alt */1 : return delta_2(marks, c, next_cat, prev_cat, s._0, rem); case /* Seq */2 : - var y$p = delta_1(marks, c, next_cat, prev_cat, s._1, /* [] */0); + 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 */3 : - var kind = s._1; - var y$p$1 = delta_1(marks, c, next_cat, prev_cat, s._2, /* [] */0); - var marks$p = first((function (param) { + let kind = s._1; + let y$p$1 = delta_1(marks, c, next_cat, prev_cat, s._2, /* [] */0); + let marks$p = first((function (param) { switch (param.TAG | 0) { case /* TSeq */0 : case /* TExp */1 : @@ -1256,14 +1256,14 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { } }), y$p$1); - var match = marks$p !== undefined ? [ + let match = marks$p !== undefined ? [ remove_matches(y$p$1), marks$p ] : [ y$p$1, marks ]; - var y$p$p = match[0]; + let y$p$p = match[0]; if (s._0 === "Non_greedy") { return { hd: { @@ -1282,16 +1282,16 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { }); } case /* Mark */4 : - var i = s._0; - var marks_marks = { + let i = s._0; + let marks_marks = { hd: [ i, -1 ], tl: Stdlib__List.remove_assq(i, marks.marks) }; - var marks_pmarks = marks.pmarks; - var marks$1 = { + let marks_pmarks = marks.pmarks; + let marks$1 = { marks: marks_marks, pmarks: marks_pmarks }; @@ -1335,9 +1335,9 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { return rem; } case /* Pmark */8 : - var marks_marks$1 = marks.marks; - var marks_pmarks$1 = Curry._2(add$1, s._0, marks.pmarks); - var marks$2 = { + let marks_marks$1 = marks.marks; + let marks_pmarks$1 = Curry._2(add$1, s._0, marks.pmarks); + let marks$2 = { marks: marks_marks$1, pmarks: marks_pmarks$1 }; @@ -1361,7 +1361,7 @@ function delta_2(marks, c, next_cat, prev_cat, l, rem) { } function delta_seq(c, next_cat, prev_cat, kind, y, z, rem) { - var marks = first((function (param) { + let marks = first((function (param) { switch (param.TAG | 0) { case /* TSeq */0 : case /* TExp */1 : @@ -1380,17 +1380,17 @@ function delta_seq(c, next_cat, prev_cat, kind, y, z, rem) { if (kind !== "First") { return delta_1(marks, c, next_cat, prev_cat, z, tseq(kind, remove_matches(y), z, rem)); } - var match = split_at_match_rec(/* [] */0, y); + let match = split_at_match_rec(/* [] */0, y); return tseq(kind, match[0], z, delta_1(marks, c, next_cat, prev_cat, z, tseq(kind, match[1], z, rem))); } function delta_4(c, next_cat, prev_cat, l, rem) { if (l) { - var x = l.hd; - var rem$1 = delta_4(c, next_cat, prev_cat, l.tl, rem); + let x = l.hd; + let rem$1 = delta_4(c, next_cat, prev_cat, l.tl, rem); switch (x.TAG | 0) { case /* TSeq */0 : - var y$p = delta_4(c, next_cat, prev_cat, x._0, /* [] */0); + 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 */1 : return delta_1(x._0, c, next_cat, prev_cat, x._1, rem$1); @@ -1407,19 +1407,19 @@ function delta_4(c, next_cat, prev_cat, l, rem) { } function delta(tbl_ref, next_cat, $$char, st) { - var prev_cat = st.category; - var match = remove_duplicates(/* [] */0, delta_4($$char, next_cat, prev_cat, st.desc, /* [] */0), eps_expr); - var expr$p = match[0]; - var idx = free_index(tbl_ref, expr$p); - var expr$p$p = set_idx(idx, expr$p); + let prev_cat = st.category; + let match = remove_duplicates(/* [] */0, delta_4($$char, next_cat, prev_cat, st.desc, /* [] */0), eps_expr); + let expr$p = match[0]; + let idx = free_index(tbl_ref, expr$p); + let expr$p$p = set_idx(idx, expr$p); return mk(idx, next_cat, expr$p$p); } function flatten_match(m) { - var ma = Stdlib__List.fold_left((function (ma, param) { + let ma = Stdlib__List.fold_left((function (ma, param) { return Caml.caml_int_max(ma, param[0]); }), -1, m); - var res = Caml_array.make(ma + 1 | 0, -1); + let res = Caml_array.make(ma + 1 | 0, -1); Stdlib__List.iter((function (param) { Caml_array.set(res, param[0], param[1]); }), m); @@ -1427,21 +1427,21 @@ function flatten_match(m) { } function status(s) { - var st = s.status; + let st = s.status; if (st !== undefined) { return st; } - var match = s.desc; - var st$1; + let match = s.desc; + let st$1; if (match) { - var m = match.hd; + let m = match.hd; switch (m.TAG | 0) { case /* TSeq */0 : case /* TExp */1 : st$1 = /* Running */1; break; case /* TMatch */2 : - var m$1 = m._0; + let m$1 = m._0; st$1 = /* Match */{ _0: flatten_match(m$1.marks), _1: m$1.pmarks @@ -1456,7 +1456,7 @@ function status(s) { return st$1; } -var Re_automata_Category = { +let Re_automata_Category = { $plus$plus: $plus$plus, from_char: from_char, inexistant: 1, @@ -1467,7 +1467,7 @@ var Re_automata_Category = { search_boundary: 32 }; -var Re_automata_State = { +let Re_automata_State = { dummy: dummy, create: create$2, Table: Table @@ -1475,8 +1475,8 @@ var Re_automata_State = { function iter(_n, f, _v) { while(true) { - var v = _v; - var n = _n; + let v = _v; + let n = _n; if (n === 0) { return v; } @@ -1496,9 +1496,9 @@ function category(re, c) { } } -var dummy_next = []; +let dummy_next = []; -var unknown_state = { +let unknown_state = { idx: -2, real_idx: 0, next: dummy_next, @@ -1507,8 +1507,8 @@ var unknown_state = { }; function mk_state(ncol, desc) { - var match = status(desc); - var break_state = typeof match === "number" && match ? false : true; + let match = status(desc); + let break_state = typeof match === "number" && match ? false : true; return { idx: break_state ? -3 : desc.idx, real_idx: desc.idx, @@ -1523,9 +1523,9 @@ function find_state(re, desc) { return Curry._2(Re_automata_State.Table.find, re.states, desc); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var st = mk_state(re.ncol, desc); + let st = mk_state(re.ncol, desc); Curry._3(Re_automata_State.Table.add, re.states, desc, st); return st; } @@ -1534,10 +1534,10 @@ function find_state(re, desc) { } function delta$1(info, cat, c, st) { - var desc = delta(info.re.tbl, cat, c, st.desc); - var len = info.positions.length; + let desc = delta(info.re.tbl, cat, c, st.desc); + let len = info.positions.length; if (desc.idx === len && len > 0) { - var pos = info.positions; + let pos = info.positions; info.positions = Caml_array.make((len << 1), 0); Stdlib__Array.blit(pos, 0, info.positions, 0, len); } @@ -1545,10 +1545,10 @@ function delta$1(info, cat, c, st) { } function validate(info, s, pos, st) { - var c = Caml_bytes.get(info.i_cols, Caml_string.get(s, pos)); - var cat = category(info.re, c); - var desc$p = delta$1(info, cat, c, st); - var st$p = find_state(info.re, desc$p); + let c = Caml_bytes.get(info.i_cols, Caml_string.get(s, pos)); + let cat = category(info.re, c); + let desc$p = delta$1(info, cat, c, st); + let st$p = find_state(info.re, desc$p); Caml_array.set(st.next, c, st$p); } @@ -1556,14 +1556,14 @@ function loop(info, s, pos, st) { if (pos >= info.last) { return st; } - var st$p = Caml_array.get(st.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos))); - var _pos = pos; - var _st = st; - var _st$p = st$p; + let st$p = Caml_array.get(st.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos))); + let _pos = pos; + let _st = st; + let _st$p = st$p; while(true) { - var st$p$1 = _st$p; - var st$1 = _st; - var pos$1 = _pos; + let st$p$1 = _st$p; + let st$1 = _st; + let pos$1 = _pos; if (st$p$1.idx < 0) { if (st$p$1.idx === -3) { Caml_array.set(info.positions, st$p$1.real_idx, pos$1 + 1 | 0); @@ -1573,9 +1573,9 @@ function loop(info, s, pos, st) { return loop(info, s, pos$1, st$1); } } - var pos$2 = pos$1 + 1 | 0; + let pos$2 = pos$1 + 1 | 0; if (pos$2 < info.last) { - var st$p$p = Caml_array.get(st$p$1.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos$2))); + let st$p$p = Caml_array.get(st$p$1.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos$2))); Caml_array.set(info.positions, st$p$1.idx, pos$2); _st$p = st$p$p; _st = st$p$1; @@ -1592,12 +1592,12 @@ function $$final(info, st, cat) { return Stdlib__List.assq(cat, st.final); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var st$p = delta$1(info, cat, -1, st); - var res_0 = st$p.idx; - var res_1 = status(st$p); - var res = [ + let st$p = delta$1(info, cat, -1, st); + let res_0 = st$p.idx; + let res_1 = status(st$p); + let res = [ res_0, res_1 ]; @@ -1619,9 +1619,9 @@ function find_initial_state(re, cat) { return Stdlib__List.assq(cat, re.initial_states); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var st = find_state(re, Curry._2(Re_automata_State.create, cat, re.initial)); + let st = find_state(re, Curry._2(Re_automata_State.create, cat, re.initial)); re.initial_states = { hd: [ cat, @@ -1639,7 +1639,7 @@ function get_color(re, s, pos) { if (pos < 0) { return -1; } - var slen = s.length; + let slen = s.length; if (pos >= slen) { return -1; } else if (pos === (slen - 1 | 0) && re.lnl !== -1 && Caml_string.get(s, pos) === /* '\n' */10) { @@ -1650,21 +1650,21 @@ function get_color(re, s, pos) { } function scan_str(info, s, initial_state, groups) { - var pos = info.pos; - var last = info.last; + let pos = info.pos; + let last = info.last; if (!(last === s.length && info.re.lnl !== -1 && last > pos && Caml_string.get(s, last - 1 | 0) === /* '\n' */10)) { if (groups) { return loop(info, s, pos, initial_state); } else { - var _pos = pos; - var _st = initial_state; + let _pos = pos; + let _st = initial_state; while(true) { - var st = _st; - var pos$1 = _pos; + let st = _st; + let pos$1 = _pos; if (pos$1 >= last) { return st; } - var st$p = Caml_array.get(st.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos$1))); + let st$p = Caml_array.get(st.next, Caml_bytes.get(info.i_cols, Caml_string.get(s, pos$1))); if (st$p.idx >= 0) { _st = st$p; _pos = pos$1 + 1 | 0; @@ -1678,20 +1678,20 @@ function scan_str(info, s, initial_state, groups) { }; } } - var info$1 = { + let info$1 = { re: info.re, i_cols: info.i_cols, positions: info.positions, pos: info.pos, last: last - 1 | 0 }; - var st$1 = scan_str(info$1, s, initial_state, groups); + let st$1 = scan_str(info$1, s, initial_state, groups); if (st$1.idx === -3) { return st$1; } else { - var pos$2 = last - 1 | 0; + let pos$2 = last - 1 | 0; while(true) { - var st$p$1 = Caml_array.get(st$1.next, info$1.re.lnl); + let st$p$1 = Caml_array.get(st$1.next, info$1.re.lnl); if (st$p$1.idx >= 0) { if (groups) { Caml_array.set(info$1.positions, st$p$1.idx, pos$2 + 1 | 0); @@ -1704,11 +1704,11 @@ function scan_str(info, s, initial_state, groups) { } return st$p$1; } - var c = info$1.re.lnl; - var real_c = Caml_bytes.get(info$1.i_cols, /* '\n' */10); - var cat = category(info$1.re, c); - var desc$p = delta$1(info$1, cat, real_c, st$1); - var st$p$2 = find_state(info$1.re, desc$p); + let c = info$1.re.lnl; + let real_c = Caml_bytes.get(info$1.i_cols, /* '\n' */10); + let cat = category(info$1.re, c); + let desc$p = delta$1(info$1, cat, real_c, st$1); + let st$p$2 = find_state(info$1.re, desc$p); Caml_array.set(st$1.next, c, st$p$2); continue ; }; @@ -1720,12 +1720,12 @@ function cadd(c, s) { } function trans_set(cache, cm, s) { - var i = one_char(s); + let i = one_char(s); if (i !== undefined) { return single(Caml_bytes.get(cm, i)); } - var v_0 = hash_rec(s); - var v = [ + let v_0 = hash_rec(s); + let v = [ v_0, s ]; @@ -1733,9 +1733,9 @@ function trans_set(cache, cm, s) { return Curry._2(find, v, cache.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var l = Stdlib__List.fold_right((function (param, l) { + let l = Stdlib__List.fold_right((function (param, l) { return union(seq(Caml_bytes.get(cm, param[0]), Caml_bytes.get(cm, param[1])), l); }), s, /* [] */0); cache.contents = Curry._3(add, v, l, cache.contents); @@ -1747,7 +1747,7 @@ function trans_set(cache, cm, s) { function is_charset(_param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { return false; } @@ -1780,28 +1780,28 @@ function is_charset(_param) { } function split(s, cm) { - var _t = s; - var f = function (i, j) { + let _t = s; + let f = function (i, j) { Caml_bytes.set(cm, i, /* '\001' */1); Caml_bytes.set(cm, j + 1 | 0, /* '\001' */1); }; while(true) { - var t = _t; + let t = _t; if (!t) { return ; } - var match = t.hd; + let match = t.hd; Curry._2(f, match[0], match[1]); _t = t.tl; continue ; }; } -var cupper = union(seq(/* 'A' */65, /* 'Z' */90), union(seq(/* '\192' */192, /* '\214' */214), seq(/* '\216' */216, /* '\222' */222))); +let cupper = union(seq(/* 'A' */65, /* 'Z' */90), union(seq(/* '\192' */192, /* '\214' */214), seq(/* '\216' */216, /* '\222' */222))); -var clower = offset(32, cupper); +let clower = offset(32, cupper); -var calpha = Stdlib__List.fold_right(cadd, { +let calpha = Stdlib__List.fold_right(cadd, { hd: /* '\170' */170, tl: { hd: /* '\181' */181, @@ -1818,11 +1818,11 @@ var calpha = Stdlib__List.fold_right(cadd, { } }, union(clower, cupper)); -var cdigit = seq(/* '0' */48, /* '9' */57); +let cdigit = seq(/* '0' */48, /* '9' */57); -var calnum = union(calpha, cdigit); +let calnum = union(calpha, cdigit); -var cword = union({ +let cword = union({ hd: [ /* '_' */95, /* '_' */95 @@ -1831,12 +1831,12 @@ var cword = union({ }, calnum); function colorize(c, regexp) { - var lnl = { + let lnl = { contents: false }; - var colorize$1 = function (_regexp) { + let colorize$1 = function (_regexp) { while(true) { - var regexp = _regexp; + let regexp = _regexp; if (typeof regexp === "number") { switch (regexp) { case /* Beg_of_line */0 : @@ -1898,12 +1898,12 @@ function colorize(c, regexp) { } function flatten_cmap(cm) { - var c = Caml_bytes.caml_create_bytes(256); - var col_repr = Caml_bytes.caml_create_bytes(256); - var v = 0; + let c = Caml_bytes.caml_create_bytes(256); + let col_repr = Caml_bytes.caml_create_bytes(256); + let v = 0; Caml_bytes.set(c, 0, /* '\000' */0); Caml_bytes.set(col_repr, 0, /* '\000' */0); - for(var i = 1; i <= 255; ++i){ + for(let i = 1; i <= 255; ++i){ if (Caml_bytes.get(cm, i) !== /* '\000' */0) { v = v + 1 | 0; } @@ -1919,8 +1919,8 @@ function flatten_cmap(cm) { function equal$2(_x1, _x2) { while(true) { - var x2 = _x2; - var x1 = _x1; + let x2 = _x2; + let x1 = _x1; if (typeof x1 === "number") { switch (x1) { case /* Beg_of_line */0 : @@ -2103,8 +2103,8 @@ function equal$2(_x1, _x2) { function eq_list(_l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -2137,26 +2137,26 @@ function sequence(l) { function merge_sequences(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var l$p = param.hd; + let l$p = param.hd; if (typeof l$p !== "number") { switch (l$p.TAG | 0) { case /* Sequence */1 : - var match = l$p._0; + let match = l$p._0; if (match) { - var y = match.tl; - var x = match.hd; - var r$p = merge_sequences(param.tl); - var exit = 0; + let y = match.tl; + let x = match.hd; + let r$p = merge_sequences(param.tl); + let exit = 0; if (r$p) { - var match$1 = r$p.hd; + let match$1 = r$p.hd; if (typeof match$1 === "number" || match$1.TAG !== /* Sequence */1) { exit = 2; } else { - var match$2 = match$1._0; + let match$2 = match$1._0; if (match$2) { if (equal$2(x, match$2.hd)) { return { @@ -2229,13 +2229,13 @@ function enforce_kind(ids, kind, kind$p, cr) { function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _param) { while(true) { - var param = _param; - var greedy = _greedy; - var ign_group = _ign_group; + let param = _param; + let greedy = _greedy; + let ign_group = _ign_group; if (typeof param === "number") { switch (param) { case /* Beg_of_line */0 : - var c$1 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.newline); + let c$1 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.newline); return [ mk_expr(ids, { TAG: /* After */7, @@ -2244,7 +2244,7 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* End_of_line */1 : - var c$2 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.newline); + let c$2 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.newline); return [ mk_expr(ids, { TAG: /* Before */6, @@ -2253,8 +2253,8 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* Beg_of_word */2 : - var c$3 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.not_letter); - var c$4 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.letter); + let c$3 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.not_letter); + let c$4 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.letter); return [ seq$1(ids, "First", mk_expr(ids, { TAG: /* After */7, @@ -2266,8 +2266,8 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* End_of_word */3 : - var c$5 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.letter); - var c$6 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.not_letter); + let c$5 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.letter); + let c$6 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.not_letter); return [ seq$1(ids, "First", mk_expr(ids, { TAG: /* After */7, @@ -2318,7 +2318,7 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* Last_end_of_line */7 : - var c$7 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.lastnewline); + let c$7 = Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.inexistant, Re_automata_Category.lastnewline); return [ mk_expr(ids, { TAG: /* Before */6, @@ -2357,9 +2357,9 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* Alternative */2 : - var merged_sequences = merge_sequences(param._0); + let merged_sequences = merge_sequences(param._0); if (merged_sequences && !merged_sequences.tl) { - var match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, merged_sequences.hd); + 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 @@ -2368,21 +2368,21 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par return [ alt(ids, Stdlib__List.map((function(ign_group,greedy){ return function (r$p) { - var match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, 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]); } }(ign_group,greedy)), merged_sequences)), kind ]; case /* Repeat */3 : - var j = param._2; - var i = param._1; - var match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._0); - var kind$p = match$1[1]; - var cr = match$1[0]; - var rem; + let j = param._2; + let i = param._1; + let match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._0); + let kind$p = match$1[1]; + let cr = match$1[0]; + let rem; if (j !== undefined) { - var f = greedy === "Non_greedy" ? (function(cr,kind$p){ + let f = greedy === "Non_greedy" ? (function(cr,kind$p){ return function (rem) { return alt(ids, { hd: mk_expr(ids, /* Eps */0), @@ -2416,8 +2416,8 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par kind ]; case /* Sem */4 : - var kind$p$1 = param._0; - var match$2 = translate(ids, kind$p$1, ign_group, ign_case, greedy, pos, cache, c, param._1); + let kind$p$1 = param._0; + let match$2 = translate(ids, kind$p$1, ign_group, ign_case, greedy, pos, cache, c, param._1); return [ enforce_kind(ids, kind$p$1, match$2[1], match$2[0]), kind$p$1 @@ -2427,14 +2427,14 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par _greedy = param._0; continue ; case /* Group */6 : - var r$p = param._0; + let r$p = param._0; if (ign_group) { _param = r$p; continue ; } - var p = pos.contents; + let p = pos.contents; pos.contents = pos.contents + 2 | 0; - var match$3 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); + 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 */4, @@ -2450,11 +2450,11 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par _ign_group = true; continue ; case /* Nest */8 : - var b = pos.contents; - var match$4 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._0); - var kind$p$2 = match$4[1]; - var cr$1 = match$4[0]; - var e = pos.contents - 1 | 0; + let b = pos.contents; + let match$4 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._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, @@ -2467,7 +2467,7 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _par ]; } case /* Pmark */14 : - var match$5 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._1); + let match$5 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param._1); return [ seq$1(ids, "First", mk_expr(ids, { TAG: /* Pmark */8, @@ -2493,11 +2493,11 @@ function trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param) if (!param) { return mk_expr(ids, /* Eps */0); } - var r = param.hd; + let r = param.hd; if (param.tl) { - var match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r); - var cr$p = match[0]; - var cr$p$p = trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param.tl); + let match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r); + let cr$p = match[0]; + let cr$p$p = trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param.tl); if (is_eps(cr$p$p)) { return cr$p; } else if (is_eps(cr$p)) { @@ -2506,7 +2506,7 @@ function trans_seq(ids, kind, ign_group, ign_case, greedy, pos, cache, c, param) return seq$1(ids, match[1], cr$p, cr$p$p); } } - var match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r); + let match$1 = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r); return enforce_kind(ids, kind, match$1[1], match$1[0]); } @@ -2540,14 +2540,14 @@ function as_set(param) { function handle_case(_ign_case, _r) { while(true) { - var r = _r; - var ign_case = _ign_case; + let r = _r; + let ign_case = _ign_case; if (typeof r === "number") { return r; } switch (r.TAG | 0) { case /* Set */0 : - var s = r._0; + let s = r._0; return { TAG: /* Set */0, _0: ign_case ? case_insens(s) : s @@ -2562,7 +2562,7 @@ function handle_case(_ign_case, _r) { }(ign_case)), r._0) }; case /* Alternative */2 : - var l$p = Stdlib__List.map((function(ign_case){ + let l$p = Stdlib__List.map((function(ign_case){ return function (param) { return handle_case(ign_case, param); } @@ -2591,7 +2591,7 @@ function handle_case(_ign_case, _r) { _2: r._2 }; case /* Sem */4 : - var r$p = handle_case(ign_case, r._1); + let r$p = handle_case(ign_case, r._1); if (is_charset(r$p)) { return r$p; } else { @@ -2602,7 +2602,7 @@ function handle_case(_ign_case, _r) { }; } case /* Sem_greedy */5 : - var r$p$1 = handle_case(ign_case, r._1); + let r$p$1 = handle_case(ign_case, r._1); if (is_charset(r$p$1)) { return r$p$1; } else { @@ -2618,7 +2618,7 @@ function handle_case(_ign_case, _r) { _0: handle_case(ign_case, r._0) }; case /* No_group */7 : - var r$p$2 = handle_case(ign_case, r._0); + let r$p$2 = handle_case(ign_case, r._0); if (is_charset(r$p$2)) { return r$p$2; } else { @@ -2628,7 +2628,7 @@ function handle_case(_ign_case, _r) { }; } case /* Nest */8 : - var r$p$3 = handle_case(ign_case, r._0); + let r$p$3 = handle_case(ign_case, r._0); if (is_charset(r$p$3)) { return r$p$3; } else { @@ -2646,7 +2646,7 @@ function handle_case(_ign_case, _r) { _ign_case = true; continue ; case /* Intersection */11 : - var l$p$1 = Stdlib__List.map((function(ign_case){ + let l$p$1 = Stdlib__List.map((function(ign_case){ return function (r) { return handle_case(ign_case, r); } @@ -2658,7 +2658,7 @@ function handle_case(_ign_case, _r) { }), cany, l$p$1) }; case /* Complement */12 : - var l$p$2 = Stdlib__List.map((function(ign_case){ + let l$p$2 = Stdlib__List.map((function(ign_case){ return function (r) { return handle_case(ign_case, r); } @@ -2687,7 +2687,7 @@ function handle_case(_ign_case, _r) { function anchored(_param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { switch (param) { case /* Beg_of_str */5 : @@ -2749,7 +2749,7 @@ function seq$2(l) { } } -var epsilon = { +let epsilon = { TAG: /* Sequence */1, _0: /* [] */0 }; @@ -2776,8 +2776,8 @@ function repn(r, i, j) { } function set(str) { - var s = /* [] */0; - for(var i = 0 ,i_finish = str.length; i < i_finish; ++i){ + let s = /* [] */0; + for(let i = 0 ,i_finish = str.length; i < i_finish; ++i){ s = union(single(Caml_string.get(str, i)), s); } return { @@ -2787,7 +2787,7 @@ function set(str) { } function compl(l) { - var r = { + let r = { TAG: /* Complement */12, _0: l }; @@ -2800,12 +2800,12 @@ function compl(l) { }); } -var any = { +let any = { TAG: /* Set */0, _0: cany }; -var notnl = { +let notnl = { TAG: /* Set */0, _0: diff(cany, { hd: [ @@ -2816,7 +2816,7 @@ var notnl = { }) }; -var lower = alt$1({ +let lower = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* 'a' */97, /* 'z' */122) @@ -2848,7 +2848,7 @@ var lower = alt$1({ } }); -var upper = alt$1({ +let upper = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* 'A' */65, /* 'Z' */90) @@ -2868,7 +2868,7 @@ var upper = alt$1({ } }); -var alpha = alt$1({ +let alpha = alt$1({ hd: lower, tl: { hd: upper, @@ -2900,12 +2900,12 @@ var alpha = alt$1({ } }); -var digit = { +let digit = { TAG: /* Set */0, _0: seq(/* '0' */48, /* '9' */57) }; -var alnum = alt$1({ +let alnum = alt$1({ hd: alpha, tl: { hd: digit, @@ -2913,7 +2913,7 @@ var alnum = alt$1({ } }); -var wordc = alt$1({ +let wordc = alt$1({ hd: alnum, tl: { hd: { @@ -2930,14 +2930,14 @@ var wordc = alt$1({ } }); -var ascii = { +let ascii = { TAG: /* Set */0, _0: seq(/* '\000' */0, /* '\127' */127) }; -var blank = set("\t "); +let blank = set("\t "); -var cntrl = alt$1({ +let cntrl = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* '\000' */0, /* '\031' */31) @@ -2951,7 +2951,7 @@ var cntrl = alt$1({ } }); -var graph = alt$1({ +let graph = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* '!' */33, /* '~' */126) @@ -2965,7 +2965,7 @@ var graph = alt$1({ } }); -var print = alt$1({ +let print = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* ' ' */32, /* '~' */126) @@ -2979,7 +2979,7 @@ var print = alt$1({ } }); -var punct = alt$1({ +let punct = alt$1({ hd: { TAG: /* Set */0, _0: seq(/* '!' */33, /* '/' */47) @@ -3053,7 +3053,7 @@ var punct = alt$1({ } }); -var space = alt$1({ +let space = alt$1({ hd: { TAG: /* Set */0, _0: { @@ -3073,7 +3073,7 @@ var space = alt$1({ } }); -var xdigit = alt$1({ +let xdigit = alt$1({ hd: digit, tl: { hd: { @@ -3091,7 +3091,7 @@ var xdigit = alt$1({ }); function compile(r) { - var regexp = anchored(r) ? ({ + let regexp = anchored(r) ? ({ TAG: /* Group */6, _0: r }) : seq$2({ @@ -3108,26 +3108,26 @@ function compile(r) { tl: /* [] */0 } }); - var regexp$1 = handle_case(false, regexp); - var c = Stdlib__Bytes.make(257, /* '\000' */0); - var need_lnl = colorize(c, regexp$1); - var match = flatten_cmap(c); - var ncol = match[2]; - var col = match[0]; - var lnl = need_lnl ? ncol : -1; - var ncol$1 = need_lnl ? ncol + 1 | 0 : ncol; - var ids = { + let regexp$1 = handle_case(false, regexp); + let c = Stdlib__Bytes.make(257, /* '\000' */0); + let need_lnl = colorize(c, regexp$1); + let match = flatten_cmap(c); + let ncol = match[2]; + let col = match[0]; + let lnl = need_lnl ? ncol : -1; + let ncol$1 = need_lnl ? ncol + 1 | 0 : ncol; + let ids = { contents: 0 }; - var pos = { + let pos = { contents: 0 }; - var match$1 = translate(ids, "First", false, false, "Greedy", pos, { + let match$1 = translate(ids, "First", false, false, "Greedy", pos, { contents: /* Empty */0 }, col, regexp$1); - var r$1 = enforce_kind(ids, "First", match$1[1], match$1[0]); - var col_repr = match[1]; - var group_count = pos.contents / 2 | 0; + let r$1 = enforce_kind(ids, "First", match$1[1], match$1[0]); + let col_repr = match[1]; + let group_count = pos.contents / 2 | 0; return { initial: r$1, initial_states: /* [] */0, @@ -3144,20 +3144,20 @@ function compile(r) { } function exec_internal(name, posOpt, lenOpt, groups, re, s) { - var pos = posOpt !== undefined ? posOpt : 0; - var len = lenOpt !== undefined ? lenOpt : -1; + let pos = posOpt !== undefined ? posOpt : 0; + let len = lenOpt !== undefined ? lenOpt : -1; if (pos < 0 || len < -1 || (pos + len | 0) > s.length) { throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", _1: name }); } - var partial = false; - var slen = s.length; - var last = len === -1 ? slen : pos + len | 0; - var tmp; + let partial = false; + let slen = s.length; + let last = len === -1 ? slen : pos + len | 0; + let tmp; if (groups) { - var n = re.tbl.contents.length + 1 | 0; + let n = re.tbl.contents.length + 1 | 0; tmp = n <= 10 ? [ 0, 0, @@ -3173,22 +3173,22 @@ function exec_internal(name, posOpt, lenOpt, groups, re, s) { } else { tmp = []; } - var info = { + let info = { re: re, i_cols: re.cols, positions: tmp, pos: pos, last: last }; - var initial_cat = pos === 0 ? Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, Re_automata_Category.inexistant) : Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, category(re, get_color(re, s, pos - 1 | 0))); - var initial_state = find_initial_state(re, initial_cat); - var st = scan_str(info, s, initial_state, groups); - var res; + let initial_cat = pos === 0 ? Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, Re_automata_Category.inexistant) : Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, category(re, get_color(re, s, pos - 1 | 0))); + let initial_state = find_initial_state(re, initial_cat); + let st = scan_str(info, s, initial_state, groups); + let res; if (st.idx === -3 || partial) { res = status(st.desc); } else { - var final_cat = last === slen ? Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, Re_automata_Category.inexistant) : Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, category(re, get_color(re, s, last))); - var match = $$final(info, st, final_cat); + let final_cat = last === slen ? Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, Re_automata_Category.inexistant) : Curry._2(Re_automata_Category.$plus$plus, Re_automata_Category.search_boundary, category(re, get_color(re, s, last))); + let match = $$final(info, st, final_cat); if (groups) { Caml_array.set(info.positions, match[0], last + 1 | 0); } @@ -3219,14 +3219,14 @@ function offset$1(t, i) { MEL_EXN_ID: Stdlib.Not_found }); } - var m1 = Caml_array.get(t.marks, (i << 1)); + let m1 = Caml_array.get(t.marks, (i << 1)); if (m1 === -1) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var p1 = Caml_array.get(t.gpos, m1) - 1 | 0; - var p2 = Caml_array.get(t.gpos, Caml_array.get(t.marks, (i << 1) + 1 | 0)) - 1 | 0; + 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; return [ p1, p2 @@ -3234,14 +3234,14 @@ function offset$1(t, i) { } function get(t, i) { - var match = offset$1(t, i); - var p1 = match[0]; + let match = offset$1(t, i); + let p1 = match[0]; return Stdlib__String.sub(t.s, p1, match[1] - p1 | 0); } -var Parse_error = /* @__PURE__ */Caml_exceptions.create("Parse_error"); +let Parse_error = /* @__PURE__ */Caml_exceptions.create("Parse_error"); -var Not_supported = /* @__PURE__ */Caml_exceptions.create("Not_supported"); +let Not_supported = /* @__PURE__ */Caml_exceptions.create("Not_supported"); function posix_class_of_string(class_) { switch (class_) { @@ -3272,7 +3272,7 @@ function posix_class_of_string(class_) { case "xdigit" : return xdigit; default: - var s = "Invalid pcre class: " + class_; + let s = "Invalid pcre class: " + class_; throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", _1: s @@ -3281,28 +3281,28 @@ function posix_class_of_string(class_) { } function parse(multiline, dollar_endonly, dotall, ungreedy, s) { - var i = { + let i = { contents: 0 }; - var l = s.length; - var test = function (c) { + let l = s.length; + let test = function (c) { if (i.contents !== l) { return Caml_string.get(s, i.contents) === c; } else { return false; } }; - var accept = function (c) { - var r = test(c); + let accept = function (c) { + let r = test(c); if (r) { i.contents = i.contents + 1 | 0; } return r; }; - var accept_s = function (s$p) { - var len = s$p.length; + let accept_s = function (s$p) { + let len = s$p.length; try { - for(var 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 Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -3321,21 +3321,21 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return true; } catch (raw_exn){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$1.MEL_EXN_ID === Stdlib.Exit) { return false; } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } }; - var get = function (param) { - var r = Caml_string.get(s, i.contents); + let get = function (param) { + let r = Caml_string.get(s, i.contents); i.contents = i.contents + 1 | 0; return r; }; - var greedy_mod = function (r) { - var gr = accept(/* '?' */63); - var gr$1 = ungreedy ? !gr : gr; + let greedy_mod = function (r) { + let gr = accept(/* '?' */63); + let gr$1 = ungreedy ? !gr : gr; if (gr$1) { return { TAG: /* Sem_greedy */5, @@ -3350,15 +3350,15 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; } }; - var bracket = function (_s) { + let bracket = function (_s) { while(true) { - var s = _s; + let s = _s; if (Caml_obj.caml_notequal(s, /* [] */0) && accept(/* ']' */93)) { return s; } - var match = $$char(undefined); + let match = $$char(undefined); if (match.NAME === "Char") { - var c = match.VAL; + let c = match.VAL; if (accept(/* '-' */45)) { if (accept(/* ']' */93)) { return { @@ -3381,7 +3381,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } }; } - var match$1 = $$char(undefined); + let match$1 = $$char(undefined); if (match$1.NAME !== "Char") { return { hd: { @@ -3431,9 +3431,9 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { continue ; }; }; - var regexp$p = function (_left) { + let regexp$p = function (_left) { while(true) { - var left = _left; + let left = _left; if (!accept(/* '|' */124)) { return left; } @@ -3447,9 +3447,9 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { continue ; }; }; - var branch$p = function (_left) { + let branch$p = function (_left) { while(true) { - var left = _left; + let left = _left; if (i.contents === l || test(/* '|' */124) || test(/* ')' */41)) { return seq$2(Stdlib__List.rev(left)); } @@ -3460,7 +3460,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { continue ; }; }; - var atom = function (param) { + let atom = function (param) { if (accept(/* '.' */46)) { if (dotall) { return any; @@ -3471,7 +3471,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { if (accept(/* '(' */40)) { if (accept(/* '?' */63)) { if (accept(/* ':' */58)) { - var r = regexp$p(branch$p(/* [] */0)); + let r = regexp$p(branch$p(/* [] */0)); if (!accept(/* ')' */41)) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -3480,7 +3480,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { return r; } if (accept(/* '#' */35)) { - var _param; + let _param; while(true) { if (accept(/* ')' */41)) { return epsilon; @@ -3494,7 +3494,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { MEL_EXN_ID: Parse_error }); } - var r$1 = regexp$p(branch$p(/* [] */0)); + let r$1 = regexp$p(branch$p(/* [] */0)); if (!accept(/* ')' */41)) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -3534,7 +3534,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { MEL_EXN_ID: Parse_error }); } - var c = get(undefined); + let c = get(undefined); switch (c) { case 48 : case 49 : @@ -3687,7 +3687,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { MEL_EXN_ID: Parse_error }); } - var c$1 = get(undefined); + let c$1 = get(undefined); if (c$1 >= 64) { if (c$1 !== 92) { if (c$1 !== 123) { @@ -3726,27 +3726,27 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; } }; - var integer = function (param) { + let integer = function (param) { if (i.contents === l) { return ; } - var d = get(undefined); + let d = get(undefined); if (d > 57 || d < 48) { i.contents = i.contents - 1 | 0; return ; } else { - var _i = d - /* '0' */48 | 0; + let _i = d - /* '0' */48 | 0; while(true) { - var i$1 = _i; + let i$1 = _i; if (i.contents === l) { return i$1; } - var d$1 = get(undefined); + let d$1 = get(undefined); if (d$1 > 57 || d$1 < 48) { i.contents = i.contents - 1 | 0; return i$1; } - var i$p = Math.imul(10, i$1) + (d$1 - /* '0' */48 | 0) | 0; + let i$p = Math.imul(10, i$1) + (d$1 - /* '0' */48 | 0) | 0; if (i$p < i$1) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -3757,13 +3757,13 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; } }; - var $$char = function (param) { + let $$char = function (param) { if (i.contents === l) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error }); } - var c = get(undefined); + let c = get(undefined); if (c === /* '[' */91) { if (accept(/* '=' */61)) { throw new Caml_js_exceptions.MelangeError(Not_supported, { @@ -3771,8 +3771,8 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }); } if (accept(/* ':' */58)) { - var compl$1 = accept(/* '^' */94); - var cls; + let compl$1 = accept(/* '^' */94); + let cls; try { cls = Stdlib__List.find(accept_s, { hd: "alnum", @@ -3816,7 +3816,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -3829,8 +3829,8 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { MEL_EXN_ID: Parse_error }); } - var posix_class = posix_class_of_string(cls); - var re = compl$1 ? compl({ + let posix_class = posix_class_of_string(cls); + let re = compl$1 ? compl({ hd: posix_class, tl: /* [] */0 }) : posix_class; @@ -3850,7 +3850,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { MEL_EXN_ID: Parse_error }); } - var c$1 = get(undefined); + let c$1 = get(undefined); if (!accept(/* '.' */46)) { throw new Caml_js_exceptions.MelangeError(Not_supported, { MEL_EXN_ID: Not_supported @@ -3872,7 +3872,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { VAL: c }; } - var c$2 = get(undefined); + let c$2 = get(undefined); if (c$2 >= 58) { if (c$2 >= 123) { return { @@ -4043,8 +4043,8 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { }; } }; - var piece = function (param) { - var r = atom(undefined); + let piece = function (param) { + let r = atom(undefined); if (accept(/* '*' */42)) { return greedy_mod(repn(r, 0, undefined)); } @@ -4057,9 +4057,9 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { if (!accept(/* '{' */123)) { return r; } - var i$1 = integer(undefined); + let i$1 = integer(undefined); if (i$1 !== undefined) { - var j = accept(/* ',' */44) ? integer(undefined) : i$1; + let j = accept(/* ',' */44) ? integer(undefined) : i$1; if (!accept(/* '}' */125)) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -4075,7 +4075,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { i.contents = i.contents - 1 | 0; return r; }; - var res = regexp$p(branch$p(/* [] */0)); + let res = regexp$p(branch$p(/* [] */0)); if (i.contents !== l) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error @@ -4085,8 +4085,8 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } function re(flagsOpt, pat) { - var flags = flagsOpt !== undefined ? flagsOpt : /* [] */0; - var opts = Stdlib__List.map((function (param) { + let flags = flagsOpt !== undefined ? flagsOpt : /* [] */0; + let opts = Stdlib__List.map((function (param) { if (param === "CASELESS") { return "Caseless"; } else if (param === "ANCHORED") { @@ -4095,10 +4095,10 @@ function re(flagsOpt, pat) { return "Multiline"; } }), flags); - var optsOpt = opts; - var opts$1 = optsOpt !== undefined ? optsOpt : /* [] */0; - var r = parse(Stdlib__List.memq("Multiline", opts$1), Stdlib__List.memq("Dollar_endonly", opts$1), Stdlib__List.memq("Dotall", opts$1), Stdlib__List.memq("Ungreedy", opts$1), pat); - var r$1 = Stdlib__List.memq("Anchored", opts$1) ? seq$2({ + let optsOpt = opts; + let opts$1 = optsOpt !== undefined ? optsOpt : /* [] */0; + let r = parse(Stdlib__List.memq("Multiline", opts$1), Stdlib__List.memq("Dollar_endonly", opts$1), Stdlib__List.memq("Dotall", opts$1), Stdlib__List.memq("Ungreedy", opts$1), pat); + let r$1 = Stdlib__List.memq("Anchored", opts$1) ? seq$2({ hd: /* Start */8, tl: { hd: r, @@ -4116,8 +4116,8 @@ function re(flagsOpt, pat) { } function exec(rex, pos, s) { - var len; - var substr = exec_internal("Re.exec", pos, len, true, rex, s); + let len; + let substr = exec_internal("Re.exec", pos, len, true, rex, s); if (typeof substr === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -4126,7 +4126,7 @@ function exec(rex, pos, s) { return substr._0; } -var s = Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1048575, /* 'a' */97)) + "b"; +let s = Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1048575, /* 'a' */97)) + "b"; eq("File \"xx.ml\", line 7, characters 3-10", get(exec(compile(re(undefined, "aa?b")), undefined, s), 0), "aab"); diff --git a/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js b/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js index ef99fe0586..5f95c08860 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js @@ -1,144 +1,144 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Arg = require("melange/arg.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Digest = require("melange/digest.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__Int32 = require("melange/int32.js"); -var Stdlib__Int64 = require("melange/int64.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Marshal = require("melange/marshal.js"); -var Stdlib__Parsing = require("melange/parsing.js"); -var Stdlib__Printexc = require("melange/printexc.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Seq = require("melange/seq.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); -var Assert = require("assert"); -var Path = require("path"); -var Process = require("process"); +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Arg = require("melange/arg.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Digest = require("melange/digest.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__Int32 = require("melange/int32.js"); +let Stdlib__Int64 = require("melange/int64.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Marshal = require("melange/marshal.js"); +let Stdlib__Parsing = require("melange/parsing.js"); +let Stdlib__Printexc = require("melange/printexc.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Seq = require("melange/seq.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); +let Assert = require("assert"); +let Path = require("path"); +let Process = require("process"); try { Caml_sys.caml_sys_getenv("BSLIB"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } -var cmi_magic_number = "Caml1999I017"; +let cmi_magic_number = "Caml1999I017"; -var load_path = { +let load_path = { contents: /* [] */0 }; -var interface_suffix = { +let interface_suffix = { contents: ".mli" }; -var print_types = { +let print_types = { contents: false }; -var debug = false; +let debug = false; -var fast = { +let fast = { contents: false }; -var classic = { +let classic = { contents: false }; -var nopervasives = false; +let nopervasives = false; -var annotations = { +let annotations = { contents: false }; -var binary_annotations = { +let binary_annotations = { contents: false }; -var principal = { +let principal = { contents: false }; -var real_paths = { +let real_paths = { contents: true }; -var recursive_types = { +let recursive_types = { contents: false }; -var strict_sequence = { +let strict_sequence = { contents: false }; -var applicative_functors = { +let applicative_functors = { contents: true }; -var error_size = { +let error_size = { contents: 500 }; -var transparent_modules = { +let transparent_modules = { contents: false }; -var native_code = { +let native_code = { contents: false }; -var dont_write_files = { +let dont_write_files = { contents: false }; -var keep_docs = { +let keep_docs = { contents: false }; -var keep_locs = { +let keep_locs = { contents: false }; -var unsafe_string = true; +let unsafe_string = true; -var assume_no_mli = { +let assume_no_mli = { contents: /* Mli_na */0 }; -var record_event_when_debug = true; +let record_event_when_debug = true; -var bs_vscode; +let bs_vscode; try { Caml_sys.caml_sys_getenv("BS_VSCODE"); @@ -148,19 +148,19 @@ catch (exn$1){ bs_vscode = false; } -var dont_record_crc_unit = { +let dont_record_crc_unit = { contents: undefined }; -var bs_only = { +let bs_only = { contents: false }; -var color = { +let color = { contents: undefined }; -var Fatal_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Misc.Fatal_error"); +let Fatal_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Misc.Fatal_error"); function fatal_error(msg) { Stdlib.prerr_string(">> Fatal error: "); @@ -171,7 +171,7 @@ function fatal_error(msg) { } function try_finally(work, cleanup) { - var result; + let result; try { result = Curry._1(work, undefined); } @@ -196,8 +196,8 @@ function map_end(f, l1, l2) { function for_all2(pred, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -230,14 +230,14 @@ function replicate_list(elem, n) { function split_last(param) { if (param) { - var x = param.hd; + let x = param.hd; if (!param.tl) { return [ /* [] */0, x ]; } - var match = split_last(param.tl); + let match = split_last(param.tl); return [ { hd: x, @@ -271,14 +271,14 @@ function may_map(f, param) { } function find_in_path_uncap(path, name) { - var uname = Caml_bytes.bytes_to_string(Stdlib__Bytes.uncapitalize_ascii(Caml_bytes.bytes_of_string(name))); - var _param = path; + let uname = Caml_bytes.bytes_to_string(Stdlib__Bytes.uncapitalize_ascii(Caml_bytes.bytes_of_string(name))); + let _param = path; while(true) { - var param = _param; + let param = _param; if (param) { - var dir = param.hd; - var fullname = Stdlib__Filename.concat(dir, name); - var ufullname = Stdlib__Filename.concat(dir, uname); + let dir = param.hd; + let fullname = Stdlib__Filename.concat(dir, name); + let ufullname = Stdlib__Filename.concat(dir, uname); if (Caml_external_polyfill.resolve("caml_sys_file_exists")(ufullname)) { return ufullname; } @@ -299,7 +299,7 @@ function remove_file(filename) { return Caml_external_polyfill.resolve("caml_sys_remove")(filename); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Sys_error) { return ; } @@ -308,7 +308,7 @@ function remove_file(filename) { } function create_hashtable(size, init) { - var tbl = Stdlib__Hashtbl.create(undefined, size); + let tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { Stdlib__Hashtbl.add(tbl, param[0], param[1]); }), init); @@ -320,7 +320,7 @@ function chop_extension_if_any(fname) { return Stdlib__Filename.chop_extension(fname); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { return fname; } @@ -329,35 +329,35 @@ function chop_extension_if_any(fname) { } function get_ref(r) { - var v = r.contents; + let v = r.contents; r.contents = /* [] */0; return v; } function edit_distance(a, b, cutoff) { - var la = a.length; - var lb = b.length; - var cutoff$1 = Caml.caml_int_min(la > lb ? la : lb, cutoff); + let la = a.length; + let lb = b.length; + let cutoff$1 = Caml.caml_int_min(la > lb ? la : lb, cutoff); if (Stdlib.abs(la - lb | 0) > cutoff$1) { return ; } - var m = Stdlib__Array.make_matrix(la + 1 | 0, lb + 1 | 0, cutoff$1 + 1 | 0); + let m = Stdlib__Array.make_matrix(la + 1 | 0, lb + 1 | 0, cutoff$1 + 1 | 0); Caml_array.set(Caml_array.get(m, 0), 0, 0); - for(var i = 1; i <= la; ++i){ + for(let i = 1; i <= la; ++i){ Caml_array.set(Caml_array.get(m, i), 0, i); } - for(var j = 1; j <= lb; ++j){ + for(let j = 1; j <= lb; ++j){ Caml_array.set(Caml_array.get(m, 0), j, j); } - for(var i$1 = 1; i$1 <= la; ++i$1){ - for(var j$1 = Caml.caml_int_max(1, (i$1 - cutoff$1 | 0) - 1 | 0) ,j_finish = Caml.caml_int_min(lb, (i$1 + cutoff$1 | 0) + 1 | 0); j$1 <= j_finish; ++j$1){ - var cost = Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? 0 : 1; - var best = Caml.caml_int_min(1 + Caml.caml_int_min(Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1), Caml_array.get(Caml_array.get(m, i$1), j$1 - 1 | 0)) | 0, Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1 - 1 | 0) + cost | 0); - var best$1 = i$1 > 1 && j$1 > 1 && Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 2 | 0) && Caml_string.get(a, i$1 - 2 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? Caml.caml_int_min(best, Caml_array.get(Caml_array.get(m, i$1 - 2 | 0), j$1 - 2 | 0) + cost | 0) : best; + for(let i$1 = 1; i$1 <= la; ++i$1){ + for(let j$1 = Caml.caml_int_max(1, (i$1 - cutoff$1 | 0) - 1 | 0) ,j_finish = Caml.caml_int_min(lb, (i$1 + cutoff$1 | 0) + 1 | 0); j$1 <= j_finish; ++j$1){ + let cost = Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? 0 : 1; + let best = Caml.caml_int_min(1 + Caml.caml_int_min(Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1), Caml_array.get(Caml_array.get(m, i$1), j$1 - 1 | 0)) | 0, Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1 - 1 | 0) + cost | 0); + let best$1 = i$1 > 1 && j$1 > 1 && Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 2 | 0) && Caml_string.get(a, i$1 - 2 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? Caml.caml_int_min(best, Caml_array.get(Caml_array.get(m, i$1 - 2 | 0), j$1 - 2 | 0) + cost | 0) : best; Caml_array.set(Caml_array.get(m, i$1), j$1, best$1); } } - var result = Caml_array.get(Caml_array.get(m, la), lb); + let result = Caml_array.get(Caml_array.get(m, la), lb); if (result > cutoff$1) { return ; } else { @@ -407,13 +407,13 @@ function code_of_style(param) { } function ansi_of_style_l(l) { - var s = l ? ( + let s = l ? ( l.tl ? Stdlib__String.concat(";", Stdlib__List.map(code_of_style, l)) : code_of_style(l.hd) ) : "0"; return "\x1b[" + (s + "m"); } -var default_styles = { +let default_styles = { error: { hd: /* Bold */0, tl: { @@ -440,7 +440,7 @@ var default_styles = { } }; -var cur_styles = { +let cur_styles = { contents: default_styles }; @@ -502,17 +502,17 @@ function style_of_tag(param) { } } -var color_enabled = { +let color_enabled = { contents: true }; function set_color_tag_handling(ppf) { - var functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); - var partial_arg = functions.mark_open_stag; - var partial_arg$1 = functions.mark_close_stag; - var functions$p_mark_open_stag = function (param) { + let functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); + let partial_arg = functions.mark_open_stag; + let partial_arg$1 = functions.mark_close_stag; + let functions$p_mark_open_stag = function (param) { try { - var style = style_of_tag(param); + let style = style_of_tag(param); if (color_enabled.contents) { return ansi_of_style_l(style); } else { @@ -520,14 +520,14 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_mark_close_stag = function (param) { + let functions$p_mark_close_stag = function (param) { try { style_of_tag(param); if (color_enabled.contents) { @@ -540,16 +540,16 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg$1, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_print_open_stag = functions.print_open_stag; - var functions$p_print_close_stag = functions.print_close_stag; - var functions$p = { + let functions$p_print_open_stag = functions.print_open_stag; + let functions$p_print_close_stag = functions.print_close_stag; + let functions$p = { mark_open_stag: functions$p_mark_open_stag, mark_close_stag: functions$p_mark_close_stag, print_open_stag: functions$p_print_open_stag, @@ -559,11 +559,11 @@ function set_color_tag_handling(ppf) { Stdlib__Format.pp_set_formatter_stag_functions(ppf, functions$p); } -var first = { +let first = { contents: true }; -var formatter_l_1 = { +let formatter_l_1 = { hd: Stdlib__Format.err_formatter, tl: { hd: Stdlib__Format.str_formatter, @@ -571,7 +571,7 @@ var formatter_l_1 = { } }; -var formatter_l = { +let formatter_l = { hd: Stdlib__Format.std_formatter, tl: formatter_l_1 }; @@ -581,7 +581,7 @@ function setup(o) { first.contents = false; Stdlib__Format.set_mark_tags(true); Stdlib__List.iter(set_color_tag_handling, formatter_l); - var tmp; + let tmp; if (o !== undefined) { switch (o) { case /* Always */1 : @@ -601,7 +601,7 @@ function setup(o) { } -var Misc_Color = { +let Misc_Color = { ansi_of_style_l: ansi_of_style_l, default_styles: default_styles, get_styles: get_styles, @@ -741,7 +741,7 @@ function loop(i) { } } -var letter_all = loop(104); +let letter_all = loop(104); function letter(param) { switch (param) { @@ -908,7 +908,7 @@ function letter(param) { } } -var current = { +let current = { contents: { active: Caml_array.make(105, true), error: Caml_array.make(105, false) @@ -920,27 +920,27 @@ function is_active(x) { } function parse_opt(error, active, flags, s) { - var set = function (i) { + let set = function (i) { Caml_array.set(flags, i, true); }; - var clear = function (i) { + let clear = function (i) { Caml_array.set(flags, i, false); }; - var set_all = function (i) { + let set_all = function (i) { Caml_array.set(active, i, true); Caml_array.set(error, i, true); }; - var get_num = function (_n, _i) { + let get_num = function (_n, _i) { while(true) { - var i = _i; - var n = _n; + let i = _i; + let n = _n; if (i >= s.length) { return [ i, n ]; } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match > 57 || match < 48) { return [ i, @@ -952,10 +952,10 @@ function parse_opt(error, active, flags, s) { continue ; }; }; - var get_range = function (i) { - var match = get_num(0, i); - var n1 = match[1]; - var i$1 = match[0]; + let get_range = function (i) { + let match = get_num(0, i); + let n1 = match[1]; + let i$1 = match[0]; if (!((i$1 + 2 | 0) < s.length && Caml_string.get(s, i$1) === /* '.' */46 && Caml_string.get(s, i$1 + 1 | 0) === /* '.' */46)) { return [ i$1, @@ -963,8 +963,8 @@ function parse_opt(error, active, flags, s) { n1 ]; } - var match$1 = get_num(0, i$1 + 2 | 0); - var n2 = match$1[1]; + let match$1 = get_num(0, i$1 + 2 | 0); + let n2 = match$1[1]; if (n2 < n1) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, @@ -977,13 +977,13 @@ function parse_opt(error, active, flags, s) { n2 ]; }; - var loop = function (_i) { + let loop = function (_i) { while(true) { - var i = _i; + let i = _i; if (i >= s.length) { return ; } - var c = Caml_string.get(s, i); + let c = Caml_string.get(s, i); if (c >= 65) { if (c >= 97) { if (c >= 123) { @@ -1036,14 +1036,14 @@ function parse_opt(error, active, flags, s) { } }; }; - var loop_letter_num = function (myset, i) { + let loop_letter_num = function (myset, i) { if (i >= s.length) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, _1: "Ill-formed list of warnings" }); } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match >= 65) { if (match >= 97) { if (match >= 123) { @@ -1070,8 +1070,8 @@ function parse_opt(error, active, flags, s) { _1: "Ill-formed list of warnings" }); } - var match$1 = get_range(i); - for(var n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ + let match$1 = get_range(i); + for(let n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ Curry._1(myset, n); } loop(match$1[0]); @@ -1080,8 +1080,8 @@ function parse_opt(error, active, flags, s) { } function parse_options(errflag, s) { - var error = Stdlib__Array.copy(current.contents.error); - var active = Stdlib__Array.copy(current.contents.active); + let error = Stdlib__Array.copy(current.contents.error); + let active = Stdlib__Array.copy(current.contents.active); parse_opt(error, active, errflag ? error : active, s); current.contents = { active: active, @@ -1137,16 +1137,16 @@ function message(param) { case /* Deprecated */0 : return "deprecated: " + param._0; case /* Fragile_match */1 : - var s = param._0; + let s = param._0; if (s === "") { return "this pattern-matching is fragile."; } else { return "this pattern-matching is fragile.\nIt will remain exhaustive when constructors are added to type " + (s + "."); } case /* Method_override */2 : - var match = param._0; + let match = param._0; if (match) { - var lab = match.hd; + let lab = match.hd; if (match.tl) { return Stdlib__String.concat(" ", { hd: "the following methods are overridden by the class", @@ -1171,7 +1171,7 @@ function message(param) { ] }); case /* Partial_match */3 : - var s$1 = param._0; + let s$1 = param._0; if (s$1 === "") { return "this pattern-matching is not exhaustive."; } else { @@ -1180,9 +1180,9 @@ function message(param) { case /* Non_closed_record_pattern */4 : return "the following labels are not bound in this record pattern:\n" + (param._0 + "\nEither bind these labels explicitly or add '; _' to the pattern."); case /* Instance_variable_override */5 : - var match$1 = param._0; + let match$1 = param._0; if (match$1) { - var lab$1 = match$1.hd; + let lab$1 = match$1.hd; if (match$1.tl) { return Stdlib__String.concat(" ", { hd: "the following instance variables are overridden by the class", @@ -1302,7 +1302,7 @@ function message(param) { case /* Unused_ancestor */20 : return "unused ancestor variable " + (param._0 + "."); case /* Unused_constructor */21 : - var s$2 = param._0; + let s$2 = param._0; if (param._1) { return "constructor " + (s$2 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -1311,7 +1311,7 @@ function message(param) { return "unused constructor " + (s$2 + "."); } case /* Unused_extension */22 : - var s$3 = param._0; + let s$3 = param._0; if (param._1) { return "extension constructor " + (s$3 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -1320,8 +1320,8 @@ function message(param) { return "unused extension constructor " + (s$3 + "."); } case /* Name_out_of_scope */23 : - var slist = param._1; - var ty = param._0; + let slist = param._1; + let ty = param._0; if (slist && !slist.tl && !param._2) { return slist.hd + (" was selected from type " + (ty + ".\nIt is not visible in the current scope, and will not \nbe selected if the type becomes unknown.")); } @@ -1338,7 +1338,7 @@ function message(param) { }); break; case /* Ambiguous_name */24 : - var slist$1 = param._0; + let slist$1 = param._0; if (slist$1 && !slist$1.tl && !param._2) { return slist$1.hd + (" belongs to several types: " + (Stdlib__String.concat(" ", param._1) + "\nThe first one was selected. Please disambiguate if this is wrong.")); } @@ -1451,7 +1451,7 @@ function message(param) { _1: "illegal payload for attribute '%s'.\n%s" }), param._0, param._1); case /* Eliminated_optional_arguments */31 : - var sl = param._0; + let sl = param._0; return Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -1491,13 +1491,13 @@ function message(param) { } } -var nerrors = { +let nerrors = { contents: 0 }; function print(ppf, w) { - var msg = message(w); - var num = number(w); + let msg = message(w); + let num = number(w); Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Int */4, @@ -1524,14 +1524,14 @@ function print(ppf, w) { } -var Errors = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Warnings.Errors"); +let Errors = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Warnings.Errors"); -var absname = { +let absname = { contents: false }; function in_file(name) { - var loc = { + let loc = { pos_fname: name, pos_lnum: 1, pos_bol: 0, @@ -1544,7 +1544,7 @@ function in_file(name) { }; } -var none = in_file("_none_"); +let none = in_file("_none_"); function curr(lexbuf) { return { @@ -1578,32 +1578,32 @@ function rhs_loc(n) { }; } -var input_name = { +let input_name = { contents: "_none_" }; -var input_lexbuf = { +let input_lexbuf = { contents: undefined }; -var status = { +let status = { contents: /* Uninitialised */0 }; -var num_loc_lines = { +let num_loc_lines = { contents: 0 }; function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var lines = num_loc_lines.contents; - for(var i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ + let lines = num_loc_lines.contents; + for(let i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ if (Caml_bytes.get(lb.lex_buffer, i) === /* '\n' */10) { lines = lines + 1 | 0; } @@ -1616,9 +1616,9 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } Caml_io.caml_ml_flush(Stdlib.stdout); Caml_external_polyfill.resolve("caml_terminfo_backup")(lines); - var bol = false; + let bol = false; Stdlib.print_string("# "); - for(var pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ + for(let pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ if (bol) { Stdlib.print_string(" "); bol = false; @@ -1637,7 +1637,7 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { }(pos)), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } - var c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); + let c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); Stdlib.print_char(c); bol = c === /* '\n' */10; } @@ -1647,16 +1647,16 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } function highlight_dumb(ppf, lb, loc) { - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; - var line_start = 0; - var line_end = 0; - for(var pos = 0; pos <= end_pos; ++pos){ + let end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; + let line_start = 0; + let line_end = 0; + for(let pos = 0; pos <= end_pos; ++pos){ if (Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0) === /* '\n' */10) { if (loc.loc_start.pos_cnum > pos) { line_start = line_start + 1 | 0; @@ -1701,10 +1701,10 @@ function highlight_dumb(ppf, lb, loc) { _1: "Characters %i-%i:@." }), loc.loc_start.pos_cnum, loc.loc_end.pos_cnum); Stdlib__Format.pp_print_string(ppf, " "); - var line = 0; - var pos_at_bol = 0; - for(var pos$1 = 0; pos$1 <= end_pos; ++pos$1){ - var c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); + let line = 0; + let pos_at_bol = 0; + for(let pos$1 = 0; pos$1 <= end_pos; ++pos$1){ + let c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); if (c !== 10) { if (c !== 13) { if (line === line_start && line === line_end) { @@ -1741,10 +1741,10 @@ function highlight_dumb(ppf, lb, loc) { }, _1: "@. " }); - for(var _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ + for(let _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ Stdlib__Format.pp_print_char(ppf, /* ' ' */32); } - for(var _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ + for(let _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ Stdlib__Format.pp_print_char(ppf, /* '^' */94); } } @@ -1770,19 +1770,19 @@ function highlight_dumb(ppf, lb, loc) { function highlight_locations(ppf, locs) { while(true) { - var num_lines = status.contents; + let num_lines = status.contents; if (typeof num_lines === "number") { if (num_lines) { - var lb = input_lexbuf.contents; + let lb = input_lexbuf.contents; if (lb === undefined) { return false; } - var norepeat; + let norepeat; try { norepeat = Caml_sys.caml_sys_getenv("TERM") === "norepeat"; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { norepeat = false; } else { @@ -1792,13 +1792,13 @@ function highlight_locations(ppf, locs) { if (norepeat) { return false; } - var loc1 = Stdlib__List.hd(locs); + let loc1 = Stdlib__List.hd(locs); try { highlight_dumb(ppf, lb, loc1); return true; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -1809,7 +1809,7 @@ function highlight_locations(ppf, locs) { continue ; } } else { - var lb$1 = input_lexbuf.contents; + let lb$1 = input_lexbuf.contents; if (lb$1 === undefined) { return false; } @@ -1818,7 +1818,7 @@ function highlight_locations(ppf, locs) { return true; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -1830,12 +1830,12 @@ function highlight_locations(ppf, locs) { function show_filename(file) { if (absname.contents) { - var s = Curry._1(Stdlib__Filename.is_relative, file) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), file) : file; - var aux = function (_s) { + let s = Curry._1(Stdlib__Filename.is_relative, file) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), file) : file; + let aux = function (_s) { while(true) { - var s = _s; - var base = Curry._1(Stdlib__Filename.basename, s); - var dir = Curry._1(Stdlib__Filename.dirname, s); + let s = _s; + let base = Curry._1(Stdlib__Filename.basename, s); + let dir = Curry._1(Stdlib__Filename.dirname, s); if (dir === s) { return dir; } @@ -1877,11 +1877,11 @@ function get_pos_info(pos) { function print_loc(ppf, loc) { Curry._1(Misc_Color.setup, color.contents); - var match = get_pos_info(loc.loc_start); - var startchar = match[2]; - var file = match[0]; - var startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; - var endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; + let match = get_pos_info(loc.loc_start); + let startchar = match[2]; + let file = match[0]; + let startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; + let endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; if (file === "//toplevel//") { if (highlight_locations(ppf, { hd: loc, @@ -2031,7 +2031,7 @@ function print$1(ppf, loc) { } } -var error_prefix = "Error"; +let error_prefix = "Error"; function print_error(ppf, loc) { print$1(ppf, loc); @@ -2113,23 +2113,23 @@ function default_warning_printer(loc, ppf, w) { } -var warning_printer = { +let warning_printer = { contents: default_warning_printer }; -var formatter_for_warnings = { +let formatter_for_warnings = { contents: Stdlib__Format.err_formatter }; function prerr_warning(loc, w) { - var ppf = formatter_for_warnings.contents; - var f = Curry._1(warning_printer.contents, loc); - var out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); - var out_string = function (str, start, len) { - var count = function (_i, _c) { + let ppf = formatter_for_warnings.contents; + let f = Curry._1(warning_printer.contents, loc); + let out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); + let out_string = function (str, start, len) { + let count = function (_i, _c) { while(true) { - var c = _c; - var i = _i; + let c = _c; + let i = _i; if (i === (start + len | 0)) { return c; } @@ -2162,11 +2162,11 @@ function print_phanton_error_prefix(ppf) { } function errorf(locOpt, subOpt, if_highlightOpt, fmt) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; - var before = print_phanton_error_prefix; - var k = function (msg) { + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let before = print_phanton_error_prefix; + let k = function (msg) { return { loc: loc, msg: msg, @@ -2174,8 +2174,8 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { if_highlight: if_highlight }; }; - var buf = Stdlib__Buffer.create(64); - var ppf = Stdlib__Format.formatter_of_buffer(buf); + let buf = Stdlib__Buffer.create(64); + let ppf = Stdlib__Format.formatter_of_buffer(buf); Curry._1(Misc_Color.set_color_tag_handling, ppf); if (before !== undefined) { Curry._1(before, ppf); @@ -2187,9 +2187,9 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { } function error(locOpt, subOpt, if_highlightOpt, msg) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; return { loc: loc, msg: msg, @@ -2198,7 +2198,7 @@ function error(locOpt, subOpt, if_highlightOpt, msg) { }; } -var error_of_exn = { +let error_of_exn = { contents: /* [] */0 }; @@ -2265,7 +2265,7 @@ register_error_of_exn(function (param) { } }); -var $$Error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Location.Error"); +let $$Error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Location.Error"); register_error_of_exn(function (param) { if (param.MEL_EXN_ID === $$Error) { @@ -2274,7 +2274,7 @@ register_error_of_exn(function (param) { }); -var currentstamp = { +let currentstamp = { contents: 0 }; @@ -2334,7 +2334,7 @@ function $$global(i) { } function print$2(ppf, i) { - var n = i.stamp; + let n = i.stamp; if (n !== -1) { if (n !== 0) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -2390,8 +2390,8 @@ function print$2(ppf, i) { } function mknode(l, d, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; return /* Node */{ _0: l, _1: d, @@ -2401,13 +2401,13 @@ function mknode(l, d, r) { } function balance(l, d, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; if (hl > (hr + 1 | 0)) { if (l) { - var lr = l._2; - var ld = l._1; - var ll = l._0; + let lr = l._2; + let ld = l._1; + let ll = l._0; if (( ll ? ll._3 : 0 ) >= ( @@ -2440,8 +2440,8 @@ function balance(l, d, r) { return mknode(l, d, r); } if (r) { - var rl = r._0; - var rr = r._2; + let rl = r._0; + let rr = r._2; if (( rr ? rr._3 : 0 ) >= ( @@ -2484,10 +2484,10 @@ function add(id, data, param) { _3: 1 }; } - var r = param._2; - var k = param._1; - var l = param._0; - var c = Caml.caml_string_compare(id.name, k.ident.name); + let r = param._2; + let k = param._1; + let l = param._0; + let c = Caml.caml_string_compare(id.name, k.ident.name); if (c === 0) { return /* Node */{ _0: l, @@ -2508,18 +2508,18 @@ function add(id, data, param) { function find_same(id, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var k = param._1; - var c = Caml.caml_string_compare(id.name, k.ident.name); + let k = param._1; + let c = Caml.caml_string_compare(id.name, k.ident.name); if (c === 0) { if (id.stamp === k.ident.stamp) { return k.data; } else { - var s = id.stamp; - var _param$1 = k.previous; + let s = id.stamp; + let _param$1 = k.previous; while(true) { - var param$1 = _param$1; + let param$1 = _param$1; if (param$1 !== undefined) { if (param$1.ident.stamp === s) { return param$1.data; @@ -2544,10 +2544,10 @@ function find_same(id, _param) { function find_name(name, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var k = param._1; - var c = Caml.caml_string_compare(name, k.ident.name); + let k = param._1; + let c = Caml.caml_string_compare(name, k.ident.name); if (c === 0) { return k.data; } @@ -2573,12 +2573,12 @@ function get_all(param) { function find_all(name, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var k = param._1; - var c = Caml.caml_string_compare(name, k.ident.name); + let k = param._1; + let c = Caml.caml_string_compare(name, k.ident.name); if (c === 0) { return { hd: k.data, @@ -2592,11 +2592,11 @@ function find_all(name, _param) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var k = param._1; + let k = param._1; iter(f, param._0); Curry._2(f, k.ident, k.data); _param = param._2; @@ -2606,8 +2606,8 @@ function iter(f, _param) { function same(_p1, _p2) { while(true) { - var p2 = _p2; - var p1 = _p1; + let p2 = _p2; + let p1 = _p1; switch (p1.TAG | 0) { case /* Pident */0 : switch (p2.TAG | 0) { @@ -2653,7 +2653,7 @@ function same(_p1, _p2) { function isfree(id, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return Caml_obj.caml_equal(id, param._0); @@ -2673,7 +2673,7 @@ function isfree(id, _param) { function binding_time(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return param._0.stamp; @@ -2692,12 +2692,12 @@ function kfalse(x) { } function name(parenOpt, param) { - var paren = parenOpt !== undefined ? parenOpt : kfalse; + let paren = parenOpt !== undefined ? parenOpt : kfalse; switch (param.TAG | 0) { case /* Pident */0 : return param._0.name; case /* Pdot */1 : - var s = param._1; + let s = param._1; return name(paren, param._0) + ( Curry._1(paren, s) ? ".( " + (s + " )") : "." + s ); @@ -2709,7 +2709,7 @@ function name(parenOpt, param) { function head(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return param._0; @@ -2732,7 +2732,7 @@ function head(_param) { function last(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return param._0.name; @@ -2748,8 +2748,8 @@ function last(_param) { function flat(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; switch (param.TAG | 0) { case /* Lident */0 : return { @@ -2790,8 +2790,8 @@ function parse_declaration(arity, decl) { if (!decl) { return fatal_error("Primitive.parse_declaration"); } - var name = decl.hd; - var match = decl.tl; + let name = decl.hd; + let match = decl.tl; if (!match) { return { prim_name: name, @@ -2801,12 +2801,12 @@ function parse_declaration(arity, decl) { prim_native_float: false }; } - var name2 = match.hd; + let name2 = match.hd; if (name2 === "noalloc") { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var name2$1 = match$1.hd; - var match$2 = match$1.tl; + let name2$1 = match$1.hd; + let match$2 = match$1.tl; if (match$2 && match$2.hd === "float") { return { prim_name: name, @@ -2827,7 +2827,7 @@ function parse_declaration(arity, decl) { } } else { - var match$3 = match.tl; + let match$3 = match.tl; if (match$3 && match$3.hd === "float") { return { prim_name: name, @@ -2859,16 +2859,16 @@ function parse_declaration(arity, decl) { } function description_list(p) { - var list_0 = p.prim_name; - var list = { + let list_0 = p.prim_name; + let list = { hd: list_0, tl: /* [] */0 }; - var list$1 = p.prim_alloc ? list : ({ + let list$1 = p.prim_alloc ? list : ({ hd: "noalloc", tl: list }); - var list$2 = p.prim_native_name !== "" ? ({ + let list$2 = p.prim_native_name !== "" ? ({ hd: p.prim_native_name, tl: list$1 }) : list$1; @@ -2890,9 +2890,9 @@ function equal$1(t1, t2) { return t1 === t2; } -var compare$1 = Caml.caml_string_compare; +let compare$1 = Caml.caml_string_compare; -var OrderedString = { +let OrderedString = { compare: compare$1 }; @@ -2905,8 +2905,8 @@ function height(param) { } function create$1(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -2927,14 +2927,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } @@ -2961,10 +2961,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } @@ -3000,11 +3000,11 @@ function add$1(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -3019,14 +3019,14 @@ function add$1(x, data, m) { } } if (c < 0) { - var ll = add$1(x, data, l); + let ll = add$1(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add$1(x, data, r); + let rr = add$1(x, data, r); if (r === rr) { return m; } else { @@ -3036,9 +3036,9 @@ function add$1(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(OrderedString.compare, x, param.v); + let c = Curry._2(OrderedString.compare, x, param.v); if (c === 0) { return param.d; } @@ -3053,24 +3053,24 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -3092,26 +3092,26 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -3129,24 +3129,24 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -3168,26 +3168,26 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -3205,11 +3205,11 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(OrderedString.compare, x, param.v); + let c = Curry._2(OrderedString.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -3220,11 +3220,11 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(OrderedString.compare, x, param.v); + let c = Curry._2(OrderedString.compare, x, param.v); if (c === 0) { return true; } @@ -3235,9 +3235,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -3255,11 +3255,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -3273,7 +3273,7 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -3292,7 +3292,7 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -3309,7 +3309,7 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_binding(l), param.v, param.d, param.r); } else { @@ -3329,7 +3329,7 @@ function merge(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return bal(t1, match[0], match[1], remove_min_binding(t2)); } @@ -3337,23 +3337,23 @@ function remove(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { return merge(l, r); } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return m; } else { @@ -3363,17 +3363,17 @@ function remove(x, m) { function update(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -3387,21 +3387,21 @@ function update(x, f, m) { } } if (c < 0) { - var ll = update(x, f, l); + let ll = update(x, f, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = update(x, f, r); + let rr = update(x, f, r); if (r === rr) { return m; } else { return bal(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -3416,7 +3416,7 @@ function update(x, f, m) { } function add_to_list(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -3434,7 +3434,7 @@ function add_to_list(x, data, m) { function iter$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -3449,9 +3449,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map(f, param.r); + let l$p = map(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -3465,10 +3465,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi(f, param.r); + let v = param.v; + let l$p = mapi(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi(f, param.r); return /* Node */{ l: l$p, v: v, @@ -3480,8 +3480,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -3493,7 +3493,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -3510,7 +3510,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -3548,8 +3548,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, l.d, join(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -3566,7 +3566,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -3586,11 +3586,11 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { return [ l, @@ -3599,14 +3599,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -3616,9 +3616,9 @@ function split(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge$1(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$1(f, s1.r, match[2])); } @@ -3626,8 +3626,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split(v2, s1); + let v2 = s2.v; + let match$1 = split(v2, s1); return concat_or_join(merge$1(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$1(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -3647,25 +3647,25 @@ function union(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split(v1, s2); - var d2$1 = match[1]; - var l = union(f, s1.l, match[0]); - var r = union(f, s1.r, match[2]); + let match = split(v1, s2); + let d2$1 = match[1]; + let l = union(f, s1.l, match[0]); + let r = union(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join(l, v1, d1, r); } } - var match$1 = split(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union(f, match$1[0], s2.l); - var r$1 = union(f, match$1[2], s2.r); + let match$1 = split(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union(f, match$1[0], s2.l); + let r$1 = union(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -3677,13 +3677,13 @@ function filter(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -3699,10 +3699,10 @@ function filter_map(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map(f, param.r); + let v = param.v; + let l$p = filter_map(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map(f, param.r); if (fvd !== undefined) { return join(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -3717,15 +3717,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -3741,8 +3741,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -3758,11 +3758,11 @@ function cons_enum(_m, _e) { } function compare$2(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -3773,11 +3773,11 @@ function compare$2(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(OrderedString.compare, e1._0, e2._0); + let c = Curry._2(OrderedString.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -3788,11 +3788,11 @@ function compare$2(cmp, m1, m2) { } function equal$2(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -3825,8 +3825,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -3866,7 +3866,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._2, c._3); + let partial_arg = cons_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -3879,7 +3879,7 @@ function seq_of_enum_(c, param) { } function to_seq(m) { - var partial_arg = cons_enum(m, /* End */0); + let partial_arg = cons_enum(m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -3887,8 +3887,8 @@ function to_seq(m) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -3907,7 +3907,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._2, c._3); + let partial_arg = snoc_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -3920,24 +3920,24 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(OrderedString.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(OrderedString.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -3960,13 +3960,13 @@ function to_seq_from(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var Meths = { +let Meths = { empty: /* Empty */0, add: add$1, add_to_list: add_to_list, @@ -4053,14 +4053,14 @@ function set(x, b, v) { } function mem$1(x) { - var partial_arg = single(x); + let partial_arg = single(x); return function (param) { return subset(partial_arg, param); }; } function swap(f1, f2, v) { - var v$p = set(f1, mem$1(f2)(v), v); + let v$p = set(f1, mem$1(f2)(v), v); return set(f2, mem$1(f1)(v), v$p); } @@ -4093,8 +4093,8 @@ function height$1(param) { } function create$2(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -4104,13 +4104,13 @@ function create$2(l, v, r) { } function bal$1(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$2(ll, lv, create$2(lr, v, r)); } @@ -4136,9 +4136,9 @@ function bal$1(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$2(create$2(l, v, rl), rv, rr); } @@ -4165,22 +4165,22 @@ function add$2(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$2(x, l); + let ll = add$2(x, l); if (l === ll) { return t; } else { return bal$1(ll, v, r); } } - var rr = add$2(x, r); + let rr = add$2(x, r); if (r === rr) { return t; } else { @@ -4220,8 +4220,8 @@ function join$1(l, v, r) { if (!r) { return add_max_element(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$1(l.l, l.v, join$1(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -4233,9 +4233,9 @@ function join$1(l, v, r) { function min_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return param.v; } @@ -4250,7 +4250,7 @@ function min_elt(_param) { function remove_min_elt(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal$1(remove_min_elt(l), param.v, param.r); } else { @@ -4283,10 +4283,10 @@ function split$1(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(OrderedString.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(OrderedString.compare, x, v); if (c === 0) { return [ l, @@ -4295,14 +4295,14 @@ function split$1(x, param) { ]; } if (c < 0) { - var match = split$1(x, l); + let match = split$1(x, l); return [ match[0], match[1], join$1(match[2], v, r) ]; } - var match$1 = split$1(x, r); + let match$1 = split$1(x, r); return [ join$1(l, v, match$1[0]), match$1[1], @@ -4320,11 +4320,11 @@ function is_empty$1(param) { function mem$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(OrderedString.compare, x, param.v); + let c = Curry._2(OrderedString.compare, x, param.v); if (c === 0) { return true; } @@ -4340,21 +4340,21 @@ function union$2(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add$2(v2, s1); } - var match = split$1(v1, s2); + let match = split$1(v1, s2); return join$1(union$2(s1.l, match[0]), v1, union$2(s1.r, match[2])); } if (h1 === 1) { return add$2(v1, s2); } - var match$1 = split$1(v2, s1); + let match$1 = split$1(v2, s1); return join$1(union$2(match$1[0], s2.l), v2, union$2(match$1[2], s2.r)); } @@ -4365,11 +4365,11 @@ function inter$1(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split$1(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split$1(v1, s2); + let l2 = match[0]; if (match[1]) { return join$1(inter$1(l1, l2), v1, inter$1(r1, match[2])); } else { @@ -4384,11 +4384,11 @@ function diff(s1, s2) { if (!s2) { return s1; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split$1(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split$1(v1, s2); + let l2 = match[0]; if (match[1]) { return concat$1(diff(l1, l2), diff(r1, match[2])); } else { @@ -4398,8 +4398,8 @@ function diff(s1, s2) { function cons_enum$1(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -4414,11 +4414,11 @@ function cons_enum$1(_s, _e) { } function compare$3(s1, s2) { - var _e1 = cons_enum$1(s1, /* End */0); - var _e2 = cons_enum$1(s2, /* End */0); + let _e1 = cons_enum$1(s1, /* End */0); + let _e2 = cons_enum$1(s2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -4429,7 +4429,7 @@ function compare$3(s1, s2) { if (!e2) { return 1; } - var c = Curry._2(OrderedString.compare, e1._0, e2._0); + let c = Curry._2(OrderedString.compare, e1._0, e2._0); if (c !== 0) { return c; } @@ -4445,8 +4445,8 @@ function equal$3(s1, s2) { function fold$1(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -4458,8 +4458,8 @@ function fold$1(f, _s, _accu) { function elements_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -4513,13 +4513,13 @@ function equal_tag(t1, t2) { } } -var Types_TypeOps = { +let Types_TypeOps = { compare: compare, equal: equal$1, hash: hash }; -var Types_Variance = { +let Types_Variance = { $$null: 0, full: 127, covariant: 25, @@ -4534,7 +4534,7 @@ var Types_Variance = { get_lower: get_lower }; -var funarg = Types_TypeOps; +let funarg = Types_TypeOps; function height$2(param) { if (param) { @@ -4545,8 +4545,8 @@ function height$2(param) { } function create$3(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -4556,13 +4556,13 @@ function create$3(l, v, r) { } function bal$2(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$2(ll) >= height$2(lr)) { return create$3(ll, lv, create$3(lr, v, r)); } @@ -4588,9 +4588,9 @@ function bal$2(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$2(rr) >= height$2(rl)) { return create$3(create$3(l, v, rl), rv, rr); } @@ -4617,22 +4617,22 @@ function add$3(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$3(x, l); + let ll = add$3(x, l); if (l === ll) { return t; } else { return bal$2(ll, v, r); } } - var rr = add$3(x, r); + let rr = add$3(x, r); if (r === rr) { return t; } else { @@ -4672,8 +4672,8 @@ function join$2(l, v, r) { if (!r) { return add_max_element$1(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$2(l.l, l.v, join$2(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -4685,9 +4685,9 @@ function join$2(l, v, r) { function min_elt$1(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return param.v; } @@ -4702,7 +4702,7 @@ function min_elt$1(_param) { function remove_min_elt$1(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal$2(remove_min_elt$1(l), param.v, param.r); } else { @@ -4735,10 +4735,10 @@ function split$2(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -4747,14 +4747,14 @@ function split$2(x, param) { ]; } if (c < 0) { - var match = split$2(x, l); + let match = split$2(x, l); return [ match[0], match[1], join$2(match[2], v, r) ]; } - var match$1 = split$2(x, r); + let match$1 = split$2(x, r); return [ join$2(l, v, match$1[0]), match$1[1], @@ -4772,11 +4772,11 @@ function is_empty$2(param) { function mem$3(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -4792,21 +4792,21 @@ function union$3(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add$3(v2, s1); } - var match = split$2(v1, s2); + let match = split$2(v1, s2); return join$2(union$3(s1.l, match[0]), v1, union$3(s1.r, match[2])); } if (h1 === 1) { return add$3(v1, s2); } - var match$1 = split$2(v2, s1); + let match$1 = split$2(v2, s1); return join$2(union$3(match$1[0], s2.l), v2, union$3(match$1[2], s2.r)); } @@ -4817,11 +4817,11 @@ function inter$2(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split$2(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split$2(v1, s2); + let l2 = match[0]; if (match[1]) { return join$2(inter$2(l1, l2), v1, inter$2(r1, match[2])); } else { @@ -4836,11 +4836,11 @@ function diff$1(s1, s2) { if (!s2) { return s1; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split$2(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split$2(v1, s2); + let l2 = match[0]; if (match[1]) { return concat$2(diff$1(l1, l2), diff$1(r1, match[2])); } else { @@ -4850,20 +4850,20 @@ function diff$1(s1, s2) { function subset$1(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2.r; - var l2 = s2.l; - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var c = Curry._2(funarg.compare, v1, s2.v); + let r2 = s2.r; + let l2 = s2.l; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let c = Curry._2(funarg.compare, v1, s2.v); if (c === 0) { if (!subset$1(l1, l2)) { return false; @@ -4899,8 +4899,8 @@ function subset$1(_s1, _s2) { function fold$2(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -4912,7 +4912,7 @@ function fold$2(f, _s, _accu) { function exists$1(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -4929,8 +4929,8 @@ function exists$1(p, _param) { function elements_aux$1(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -4947,7 +4947,7 @@ function elements$1(s) { return elements_aux$1(/* [] */0, s); } -var funarg$1 = Types_TypeOps; +let funarg$1 = Types_TypeOps; function height$3(param) { if (param) { @@ -4958,8 +4958,8 @@ function height$3(param) { } function create$4(l, x, d, r) { - var hl = height$3(l); - var hr = height$3(r); + let hl = height$3(l); + let hr = height$3(r); return /* Node */{ l: l, v: x, @@ -4970,14 +4970,14 @@ function create$4(l, x, d, r) { } function bal$3(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$3(ll) >= height$3(lr)) { return create$4(ll, lv, ld, create$4(lr, x, d, r)); } @@ -5004,10 +5004,10 @@ function bal$3(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$3(rr) >= height$3(rl)) { return create$4(create$4(l, x, d, rl), rv, rd, rr); } @@ -5035,11 +5035,11 @@ function add$4(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -5054,14 +5054,14 @@ function add$4(x, data, m) { } } if (c < 0) { - var ll = add$4(x, data, l); + let ll = add$4(x, data, l); if (l === ll) { return m; } else { return bal$3(ll, v, d, r); } } - var rr = add$4(x, data, r); + let rr = add$4(x, data, r); if (r === rr) { return m; } else { @@ -5071,9 +5071,9 @@ function add$4(x, data, m) { function find$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return param.d; } @@ -5088,8 +5088,8 @@ function find$1(x, _param) { function fold$3(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -5099,9 +5099,9 @@ function fold$3(f, _m, _accu) { }; } -var $$let = Types_TypeOps; +let $$let = Types_TypeOps; -var TypeHash = Stdlib__Hashtbl.Make({ +let TypeHash = Stdlib__Hashtbl.Make({ equal: $$let.equal, hash: $$let.hash }); @@ -5117,9 +5117,9 @@ function print_raw(param) { }); } -var pivot_level = -1; +let pivot_level = -1; -var new_id = { +let new_id = { contents: -1 }; @@ -5133,7 +5133,7 @@ function newty2(level, desc) { } function is_Tvar(param) { - var match = param.desc; + let match = param.desc; if (typeof match === "number" || match.TAG !== /* Tvar */0) { return false; } else { @@ -5142,7 +5142,7 @@ function is_Tvar(param) { } function is_Tunivar(param) { - var match = param.desc; + let match = param.desc; if (typeof match === "number" || match.TAG !== /* Tunivar */9) { return false; } else { @@ -5150,15 +5150,15 @@ function is_Tunivar(param) { } } -var dummy_method = "*dummy method*"; +let dummy_method = "*dummy method*"; function field_kind_repr(_kind) { while(true) { - var kind = _kind; + let kind = _kind; if (typeof kind === "number") { return kind; } - var kind$1 = kind._0.contents; + let kind$1 = kind._0.contents; if (kind$1 === undefined) { return kind; } @@ -5169,8 +5169,8 @@ function field_kind_repr(_kind) { function repr(_t) { while(true) { - var t = _t; - var t$p = t.desc; + let t = _t; + let t$p = t.desc; if (typeof t$p === "number") { return t; } @@ -5192,11 +5192,11 @@ function repr(_t) { function commu_repr(_c) { while(true) { - var c = _c; + let c = _c; if (typeof c === "number") { return c; } - var r = c._0; + let r = c._0; if (!Caml_obj.caml_notequal(r.contents, /* Cunknown */1)) { return c; } @@ -5207,8 +5207,8 @@ function commu_repr(_c) { function row_field_repr_aux(_tl, _fi) { while(true) { - var fi = _fi; - var tl = _tl; + let fi = _fi; + let tl = _tl; if (typeof fi === "number") { return fi; } @@ -5222,7 +5222,7 @@ function row_field_repr_aux(_tl, _fi) { return fi; } } - var fi$1 = fi._3.contents; + let fi$1 = fi._3.contents; if (fi$1 === undefined) { return { TAG: /* Reither */1, @@ -5240,8 +5240,8 @@ function row_field_repr_aux(_tl, _fi) { function rev_concat(_l, _ll) { while(true) { - var ll = _ll; - var l = _l; + let ll = _ll; + let l = _l; if (!ll) { return l; } @@ -5253,11 +5253,11 @@ function rev_concat(_l, _ll) { function row_repr_aux(_ll, _row) { while(true) { - var row = _row; - var ll = _ll; - var row$p = repr(row.row_more).desc; + let row = _row; + let ll = _ll; + let row$p = repr(row.row_more).desc; if (typeof row$p !== "number" && row$p.TAG === /* Tvariant */8) { - var f = row.row_fields; + let f = row.row_fields; _row = row$p._0; _ll = Caml_obj.caml_equal(f, /* [] */0) ? ll : ({ hd: f, @@ -5281,19 +5281,19 @@ function row_repr_aux(_ll, _row) { } function row_field(tag, row) { - var _param = row.row_fields; + let _param = row.row_fields; while(true) { - var param = _param; + let param = _param; if (param) { - var match = param.hd; + let match = param.hd; if (tag === match[0]) { return row_field_repr_aux(/* [] */0, match[1]); } _param = param.tl; continue ; } - var match$1 = repr(row.row_more); - var row$p = match$1.desc; + let match$1 = repr(row.row_more); + let row$p = match$1.desc; if (typeof row$p === "number" || row$p.TAG !== /* Tvariant */8) { return /* Rabsent */0; } else { @@ -5304,9 +5304,9 @@ function row_field(tag, row) { function row_more(_row) { while(true) { - var row = _row; - var ty = repr(row.row_more); - var row$p = ty.desc; + let row = _row; + let ty = repr(row.row_more); + let row$p = ty.desc; if (typeof row$p === "number") { return ty; } @@ -5319,11 +5319,11 @@ function row_more(_row) { } function row_fixed(row) { - var row$1 = row_repr_aux(/* [] */0, row); + let row$1 = row_repr_aux(/* [] */0, row); if (row$1.row_fixed) { return true; } - var match = repr(row$1.row_more).desc; + let match = repr(row$1.row_more).desc; if (typeof match === "number") { return false; } @@ -5346,10 +5346,10 @@ function row_fixed(row) { } function static_row(row) { - var row$1 = row_repr_aux(/* [] */0, row); + let row$1 = row_repr_aux(/* [] */0, row); if (row$1.row_closed) { return Stdlib__List.for_all((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG === /* Rpresent */0) { return true; } else { @@ -5362,8 +5362,8 @@ function static_row(row) { } function hash_variant(s) { - var accu = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let accu = 0; + 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; @@ -5375,17 +5375,17 @@ function hash_variant(s) { } function proxy(ty) { - var ty0 = repr(ty); - var row = ty0.desc; + let ty0 = repr(ty); + let row = ty0.desc; if (typeof row === "number") { return ty0; } switch (row.TAG | 0) { case /* Tobject */4 : - var _ty = row._0; + let _ty = row._0; while(true) { - var ty$1 = _ty; - var match = ty$1.desc; + let ty$1 = _ty; + let match = ty$1.desc; if (typeof match === "number") { return ty0; } @@ -5412,7 +5412,7 @@ function proxy(ty) { } }; case /* Tvariant */8 : - var row$1 = row._0; + let row$1 = row._0; if (static_row(row$1)) { return ty0; } else { @@ -5424,16 +5424,16 @@ function proxy(ty) { } function has_constr_row(t) { - var row = repr(t).desc; + let row = repr(t).desc; if (typeof row === "number") { return false; } switch (row.TAG | 0) { case /* Tobject */4 : - var _t = row._0; + let _t = row._0; while(true) { - var t$1 = _t; - var match = repr(t$1).desc; + let t$1 = _t; + let match = repr(t$1).desc; if (typeof match === "number") { return false; } @@ -5448,8 +5448,8 @@ function has_constr_row(t) { } }; case /* Tvariant */8 : - var match$1 = row_more(row._0); - var match$2 = match$1.desc; + let match$1 = row_more(row._0); + let match$2 = match$1.desc; if (typeof match$2 === "number" || match$2.TAG !== /* Tconstr */3) { return false; } else { @@ -5461,7 +5461,7 @@ function has_constr_row(t) { } function is_row_name(s) { - var l = s.length; + let l = s.length; if (l < 4) { return false; } else { @@ -5470,14 +5470,14 @@ function is_row_name(s) { } function is_constr_row(t) { - var match = t.desc; + let match = t.desc; if (typeof match === "number") { return false; } if (match.TAG !== /* Tconstr */3) { return false; } - var id = match._0; + let id = match._0; switch (id.TAG | 0) { case /* Pident */0 : return is_row_name(id._0.name); @@ -5491,22 +5491,22 @@ function is_constr_row(t) { function iter_row(f, _row) { while(true) { - var row = _row; + let row = _row; Stdlib__List.iter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return ; } if (match.TAG !== /* Rpresent */0) { return Stdlib__List.iter(f, match._1); } - var ty = match._0; + let ty = match._0; if (ty !== undefined) { return Curry._1(f, ty); } }), row.row_fields); - var row$1 = repr(row.row_more).desc; + let row$1 = repr(row.row_more).desc; if (typeof row$1 !== "number") { switch (row$1.TAG | 0) { case /* Tvariant */8 : @@ -5535,7 +5535,7 @@ function iter_row(f, _row) { } function iter_type_expr(f, ty) { - var l = ty.desc; + let l = ty.desc; if (typeof l === "number") { return ; } @@ -5548,8 +5548,8 @@ function iter_type_expr(f, ty) { case /* Tconstr */3 : return Stdlib__List.iter(f, l._1); case /* Tobject */4 : - var ty$1 = l._0; - var match = l._1.contents; + let ty$1 = l._0; + let match = l._1.contents; if (match !== undefined) { Curry._1(f, ty$1); return Stdlib__List.iter(f, match[1]); @@ -5563,7 +5563,7 @@ function iter_type_expr(f, ty) { case /* Tsubst */7 : return Curry._1(f, l._0); case /* Tvariant */8 : - var row = l._0; + let row = l._0; iter_row(f, row); return Curry._1(f, row_more(row)); case /* Tpoly */10 : @@ -5578,7 +5578,7 @@ function iter_type_expr(f, ty) { function iter_abbrev(f, _param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { return ; } @@ -5594,7 +5594,7 @@ function iter_abbrev(f, _param) { } function it_signature(it) { - var partial_arg = Curry._1(it.it_signature_item, it); + let partial_arg = Curry._1(it.it_signature_item, it); return function (param) { return Stdlib__List.iter(partial_arg, param); }; @@ -5679,7 +5679,7 @@ function it_class_type(it, param) { Stdlib__List.iter(Curry._1(it.it_type_expr, it), param._1); return Curry._2(it.it_class_type, it, param._2); case /* Cty_signature */1 : - var cs = param._0; + let cs = param._0; Curry._2(it.it_type_expr, it, cs.csig_self); Curry._2(Meths.iter, (function (param, param$1) { Curry._2(it.it_type_expr, it, param$1[2]); @@ -5712,13 +5712,13 @@ function it_type_kind(it, param) { function it_do_type_expr(it, ty) { iter_type_expr(Curry._1(it.it_type_expr, it), ty); - var row = ty.desc; + let row = ty.desc; if (typeof row === "number") { return ; } switch (row.TAG | 0) { case /* Tobject */4 : - var match = row._1.contents; + let match = row._1.contents; if (match !== undefined) { return Curry._1(it.it_path, match[0]); } else { @@ -5741,24 +5741,24 @@ function it_path(p) { } function copy_row(f, fixed, row, keep, more) { - var fields = Stdlib__List.map((function (param) { - var fi = param[1]; - var match = row_field_repr_aux(/* [] */0, fi); - var tmp; + let fields = Stdlib__List.map((function (param) { + let fi = param[1]; + let match = row_field_repr_aux(/* [] */0, fi); + let tmp; if (typeof match === "number") { tmp = fi; } else if (match.TAG === /* Rpresent */0) { - var ty = match._0; + let ty = match._0; tmp = ty !== undefined ? ({ TAG: /* Rpresent */0, _0: Curry._1(f, ty) }) : fi; } else { - var e = keep ? match._3 : ({ + let e = keep ? match._3 : ({ contents: undefined }); - var m = row.row_fixed ? fixed : match._2; - var tl = Stdlib__List.map(f, match._1); + let m = row.row_fixed ? fixed : match._2; + let tl = Stdlib__List.map(f, match._1); tmp = { TAG: /* Reither */1, _0: match._0, @@ -5772,8 +5772,8 @@ function copy_row(f, fixed, row, keep, more) { tmp ]; }), row.row_fields); - var match = row.row_name; - var name = match !== undefined ? [ + let match = row.row_name; + let name = match !== undefined ? [ match[0], Stdlib__List.map(f, match[1]) ] : undefined; @@ -5789,7 +5789,7 @@ function copy_row(f, fixed, row, keep, more) { function copy_kind(_param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { if (!param) { return /* Fpresent */0; @@ -5803,7 +5803,7 @@ function copy_kind(_param) { ] }); } - var k = param._0.contents; + let k = param._0.contents; if (k === undefined) { return /* Fvar */{ _0: { @@ -5830,9 +5830,9 @@ function copy_commu(c) { function copy_type_desc(_keep_namesOpt, f, _ty) { while(true) { - var keep_namesOpt = _keep_namesOpt; - var ty = _ty; - var keep_names = keep_namesOpt !== undefined ? keep_namesOpt : false; + let keep_namesOpt = _keep_namesOpt; + let ty = _ty; + let keep_names = keep_namesOpt !== undefined ? keep_namesOpt : false; if (typeof ty === "number") { return /* Tnil */0; } @@ -5869,8 +5869,8 @@ function copy_type_desc(_keep_namesOpt, f, _ty) { } }; case /* Tobject */4 : - var ty$1 = ty._0; - var match = ty._1.contents; + let ty$1 = ty._0; + let match = ty._1.contents; if (match !== undefined) { return { TAG: /* Tobject */4, @@ -5924,15 +5924,15 @@ function copy_type_desc(_keep_namesOpt, f, _ty) { case /* Tunivar */9 : return ty; case /* Tpoly */10 : - var tyl = Stdlib__List.map((function (x) { - var _ty = Curry._1(f, x); + let tyl = Stdlib__List.map((function (x) { + let _ty = Curry._1(f, x); while(true) { - var ty = _ty; - var ty$1 = ty.desc; + let ty = _ty; + let ty$1 = ty.desc; if (typeof ty$1 !== "number") { switch (ty$1.TAG | 0) { case /* Ttuple */2 : - var match = ty$1._0; + let match = ty$1._0; if (match) { _ty = match.hd; continue ; @@ -5975,7 +5975,7 @@ function copy_type_desc(_keep_namesOpt, f, _ty) { }; } -var saved_desc = { +let saved_desc = { contents: /* [] */0 }; @@ -5989,16 +5989,16 @@ function save_desc(ty, desc) { }; } -var saved_kinds = { +let saved_kinds = { contents: /* [] */0 }; -var new_kinds = { +let new_kinds = { contents: /* [] */0 }; function dup_kind(r) { - var match = r.contents; + let match = r.contents; if (match !== undefined) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -6016,7 +6016,7 @@ function dup_kind(r) { hd: r, tl: saved_kinds.contents }; - var r$p = { + let r$p = { contents: undefined }; new_kinds.contents = { @@ -6041,7 +6041,7 @@ function cleanup_types(param) { } function mark_type(ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level >= 0) { ty$1.level = pivot_level - ty$1.level | 0; return iter_type_expr(mark_type, ty$1); @@ -6050,7 +6050,7 @@ function mark_type(ty) { } function mark_type_node(ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level >= 0) { ty$1.level = pivot_level - ty$1.level | 0; return ; @@ -6059,7 +6059,7 @@ function mark_type_node(ty) { } function it_type_expr(it, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level >= 0) { mark_type_node(ty$1); return Curry._2(it.it_do_type_expr, it, ty$1); @@ -6068,7 +6068,7 @@ function it_type_expr(it, ty) { } function unmark_type(ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level < 0) { ty$1.level = pivot_level - ty$1.level | 0; return iter_type_expr(unmark_type, ty$1); @@ -6080,7 +6080,7 @@ function it_type_expr$1(it, ty) { unmark_type(ty); } -var unmark_iterators = { +let unmark_iterators = { it_signature: it_signature, it_signature_item: it_signature_item, it_value_description: it_value_description, @@ -6113,7 +6113,7 @@ function unmark_class_signature(sign) { function find_expans(priv, p1, _param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { return ; } @@ -6124,13 +6124,13 @@ function find_expans(priv, p1, _param) { _param = param._4; continue ; } - var rem = param._0.contents; + let rem = param._0.contents; _param = rem; continue ; }; } -var memo = { +let memo = { contents: /* [] */0 }; @@ -6181,7 +6181,7 @@ function forget_abbrev_rec(mem, path) { }; } } - var mem$p = mem._0; + let mem$p = mem._0; mem$p.contents = forget_abbrev_rec(mem$p.contents, path); throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit @@ -6194,7 +6194,7 @@ function forget_abbrev(mem, path) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return ; } @@ -6228,12 +6228,12 @@ function prefixed_label_name(l) { function extract_label_aux(_hd, l, _param) { while(true) { - var param = _param; - var hd = _hd; + let param = _param; + let hd = _hd; if (param) { - var ls = param.tl; - var p = param.hd; - var l$p = p[0]; + let ls = param.tl; + let p = param.hd; + let l$p = p[0]; if (label_name(l$p) === l) { return [ l$p, @@ -6269,18 +6269,18 @@ function undo_change(param) { } } -var trail = Caml_array.make(1, undefined); +let trail = Caml_array.make(1, undefined); -var last_snapshot = { +let last_snapshot = { contents: 0 }; function log_change(ch) { - var r = Caml_array.get(trail, 0); + let r = Caml_array.get(trail, 0); if (r === undefined) { return ; } - var r$p = { + let r$p = { contents: /* Unchanged */0 }; r.contents = /* Change */{ @@ -6303,12 +6303,12 @@ function log_type(ty) { function link_type(ty, ty$p) { log_type(ty); - var desc = ty.desc; + let desc = ty.desc; ty.desc = { TAG: /* Tlink */6, _0: ty$p }; - var match = ty$p.desc; + let match = ty$p.desc; if (typeof desc === "number") { return ; } @@ -6321,7 +6321,7 @@ function link_type(ty, ty$p) { if (match.TAG !== /* Tvar */0) { return ; } - var name = desc._0; + let name = desc._0; if (name !== undefined && !(match._0 !== undefined && ty.level >= ty$p.level)) { log_type(ty$p); ty$p.desc = { @@ -6399,16 +6399,16 @@ function set_typeset(rs, s) { } function snapshot(param) { - var old = last_snapshot.contents; + let old = last_snapshot.contents; last_snapshot.contents = new_id.contents; - var r = Caml_array.get(trail, 0); + let r = Caml_array.get(trail, 0); if (r !== undefined) { return [ r, old ]; } - var r$1 = { + let r$1 = { contents: /* Unchanged */0 }; Caml_array.set(trail, 0, r$1); @@ -6420,8 +6420,8 @@ function snapshot(param) { function rev_log(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (typeof param === "number") { if (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -6435,8 +6435,8 @@ function rev_log(_accu, _param) { } return accu; } - var next = param._1; - var d = next.contents; + let next = param._1; + let d = next.contents; next.contents = /* Invalid */1; _param = d; _accu = { @@ -6448,9 +6448,9 @@ function rev_log(_accu, _param) { } function backtrack(param) { - var old = param[1]; - var changes = param[0]; - var change = changes.contents; + let old = param[1]; + let changes = param[0]; + let change = changes.contents; if (typeof change === "number") { if (change) { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -6462,19 +6462,19 @@ function backtrack(param) { return ; } cleanup_abbrev(undefined); - var backlog = rev_log(/* [] */0, change); + let backlog = rev_log(/* [] */0, change); Stdlib__List.iter(undo_change, backlog); changes.contents = /* Unchanged */0; last_snapshot.contents = old; Caml_array.set(trail, 0, changes); } -var $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Cmi_format.Error"); +let $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Cmi_format.Error"); function input_cmi(ic) { - var match = Caml_external_polyfill.resolve("caml_input_value")(ic); - var crcs = Caml_external_polyfill.resolve("caml_input_value")(ic); - var flags = Caml_external_polyfill.resolve("caml_input_value")(ic); + let match = Caml_external_polyfill.resolve("caml_input_value")(ic); + let crcs = Caml_external_polyfill.resolve("caml_input_value")(ic); + let flags = Caml_external_polyfill.resolve("caml_input_value")(ic); return { cmi_name: match[0], cmi_sign: match[1], @@ -6484,14 +6484,14 @@ function input_cmi(ic) { } function read_cmi(filename) { - var ic = Stdlib.open_in_bin(filename); + let ic = Stdlib.open_in_bin(filename); try { - var buffer = Stdlib.really_input_string(ic, cmi_magic_number.length); + let buffer = Stdlib.really_input_string(ic, cmi_magic_number.length); if (buffer !== cmi_magic_number) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); - var pre_len = cmi_magic_number.length - 3 | 0; + let pre_len = cmi_magic_number.length - 3 | 0; if (Stdlib__String.sub(buffer, 0, pre_len) === Stdlib__String.sub(cmi_magic_number, 0, pre_len)) { - var msg = buffer < cmi_magic_number ? "an older" : "a newer"; + let msg = buffer < cmi_magic_number ? "an older" : "a newer"; throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, _1: { @@ -6509,12 +6509,12 @@ function read_cmi(filename) { } }); } - var cmi = input_cmi(ic); + let cmi = input_cmi(ic); Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); return cmi; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); throw new Caml_js_exceptions.MelangeError($$Error$1, { @@ -6553,13 +6553,13 @@ function output_cmi(filename, oc, cmi) { cmi.cmi_sign ], /* [] */0); Caml_io.caml_ml_flush(oc); - var crc = Stdlib__Digest.file(filename); - var crcs_0 = [ + let crc = Stdlib__Digest.file(filename); + let crcs_0 = [ cmi.cmi_name, crc ]; - var crcs_1 = cmi.cmi_crcs; - var crcs = { + let crcs_1 = cmi.cmi_crcs; + let crcs = { hd: crcs_0, tl: crcs_1 }; @@ -6660,7 +6660,7 @@ register_error_of_exn(function (param) { }); -var Inconsistency = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Consistbl.Inconsistency"); +let Inconsistency = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Consistbl.Inconsistency"); function set$1(tbl, name, crc, source) { Stdlib__Hashtbl.add(tbl, name, [ @@ -6670,10 +6670,10 @@ function set$1(tbl, name, crc, source) { } function extract(l, tbl) { - var l$1 = Stdlib__List.sort_uniq(Stdlib__String.compare, l); + let l$1 = Stdlib__List.sort_uniq(Stdlib__String.compare, l); return Stdlib__List.fold_left((function (assc, name) { try { - var match = Stdlib__Hashtbl.find(tbl, name); + let match = Stdlib__Hashtbl.find(tbl, name); return { hd: [ name, @@ -6683,7 +6683,7 @@ function extract(l, tbl) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: [ @@ -6699,18 +6699,18 @@ function extract(l, tbl) { } function free_vars(ty) { - var ret = { + let ret = { contents: /* Empty */0 }; - var loop = function (_ty) { + let loop = function (_ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } ty$1.level = pivot_level - ty$1.level | 0; - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr(loop, ty$1); } @@ -6719,7 +6719,7 @@ function free_vars(ty) { ret.contents = Curry._2(add$3, ty$1, ret.contents); return ; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); iter_row(loop, row$1); if (static_row(row$1)) { return ; @@ -6736,24 +6736,24 @@ function free_vars(ty) { return ret.contents; } -var optional_shape_0 = { +let optional_shape_0 = { txt: "internal.optional", loc: none }; -var optional_shape_1 = { +let optional_shape_1 = { TAG: /* PStr */0, _0: /* [] */0 }; -var optional_shape = [ +let optional_shape = [ optional_shape_0, optional_shape_1 ]; function extension_descr(path_ext, ext) { - var type_ret = ext.ext_ret_type; - var ty_res = type_ret !== undefined ? type_ret : newty2(100000000, { + let type_ret = ext.ext_ret_type; + let ty_res = type_ret !== undefined ? type_ret : newty2(100000000, { TAG: /* Tconstr */3, _0: ext.ext_type_path, _1: ext.ext_type_params, @@ -6761,17 +6761,17 @@ function extension_descr(path_ext, ext) { contents: /* Mnil */0 } }); - var tag_1 = Caml_obj.caml_equal(ext.ext_args, /* [] */0); - var tag = { + let tag_1 = Caml_obj.caml_equal(ext.ext_args, /* [] */0); + let tag = { TAG: /* Cstr_extension */2, _0: path_ext, _1: tag_1 }; - var type_ret$1 = ext.ext_ret_type; - var existentials; + let type_ret$1 = ext.ext_ret_type; + let existentials; if (type_ret$1 !== undefined) { - var ret_vars = free_vars(type_ret$1); - var arg_vars = free_vars(newty2(100000000, { + let ret_vars = free_vars(type_ret$1); + let arg_vars = free_vars(newty2(100000000, { TAG: /* Ttuple */2, _0: ext.ext_args })); @@ -6796,7 +6796,7 @@ function extension_descr(path_ext, ext) { }; } -var none$1 = { +let none$1 = { desc: { TAG: /* Ttuple */2, _0: /* [] */0 @@ -6805,9 +6805,9 @@ var none$1 = { id: -1 }; -var dummy_label_lbl_all = []; +let dummy_label_lbl_all = []; -var dummy_label = { +let dummy_label = { lbl_name: "", lbl_res: none$1, lbl_arg: none$1, @@ -6820,12 +6820,12 @@ var dummy_label = { lbl_attributes: /* [] */0 }; -var builtin_idents = { +let builtin_idents = { contents: /* [] */0 }; function wrap(create, s) { - var id = Curry._1(create, s); + let id = Curry._1(create, s); builtin_idents.contents = { hd: [ s, @@ -6836,112 +6836,112 @@ function wrap(create, s) { return id; } -var ident_int = wrap(create, "int"); +let ident_int = wrap(create, "int"); -var ident_char = wrap(create, "char"); +let ident_char = wrap(create, "char"); -var ident_string = wrap(create, "string"); +let ident_string = wrap(create, "string"); -var ident_float = wrap(create, "float"); +let ident_float = wrap(create, "float"); -var ident_bool = wrap(create, "bool"); +let ident_bool = wrap(create, "bool"); -var ident_unit = wrap(create, "unit"); +let ident_unit = wrap(create, "unit"); -var ident_exn = wrap(create, "exn"); +let ident_exn = wrap(create, "exn"); -var ident_array = wrap(create, "array"); +let ident_array = wrap(create, "array"); -var ident_list = wrap(create, "list"); +let ident_list = wrap(create, "list"); -var ident_option = wrap(create, "option"); +let ident_option = wrap(create, "option"); -var ident_nativeint = wrap(create, "nativeint"); +let ident_nativeint = wrap(create, "nativeint"); -var ident_int32 = wrap(create, "int32"); +let ident_int32 = wrap(create, "int32"); -var ident_int64 = wrap(create, "int64"); +let ident_int64 = wrap(create, "int64"); -var ident_lazy_t = wrap(create, "lazy_t"); +let ident_lazy_t = wrap(create, "lazy_t"); -var ident_bytes = wrap(create, "bytes"); +let ident_bytes = wrap(create, "bytes"); -var path_int = { +let path_int = { TAG: /* Pident */0, _0: ident_int }; -var path_char = { +let path_char = { TAG: /* Pident */0, _0: ident_char }; -var path_string = { +let path_string = { TAG: /* Pident */0, _0: ident_string }; -var path_float = { +let path_float = { TAG: /* Pident */0, _0: ident_float }; -var path_bool = { +let path_bool = { TAG: /* Pident */0, _0: ident_bool }; -var path_unit = { +let path_unit = { TAG: /* Pident */0, _0: ident_unit }; -var path_exn = { +let path_exn = { TAG: /* Pident */0, _0: ident_exn }; -var path_array = { +let path_array = { TAG: /* Pident */0, _0: ident_array }; -var path_list = { +let path_list = { TAG: /* Pident */0, _0: ident_list }; -var path_option = { +let path_option = { TAG: /* Pident */0, _0: ident_option }; -var path_nativeint = { +let path_nativeint = { TAG: /* Pident */0, _0: ident_nativeint }; -var path_int32 = { +let path_int32 = { TAG: /* Pident */0, _0: ident_int32 }; -var path_int64 = { +let path_int64 = { TAG: /* Pident */0, _0: ident_int64 }; -var path_lazy_t = { +let path_lazy_t = { TAG: /* Pident */0, _0: ident_lazy_t }; -var path_bytes = { +let path_bytes = { TAG: /* Pident */0, _0: ident_bytes }; -var type_int = newty2(100000000, { +let type_int = newty2(100000000, { TAG: /* Tconstr */3, _0: path_int, _1: /* [] */0, @@ -6950,7 +6950,7 @@ var type_int = newty2(100000000, { } }); -var type_char = newty2(100000000, { +let type_char = newty2(100000000, { TAG: /* Tconstr */3, _0: path_char, _1: /* [] */0, @@ -6959,7 +6959,7 @@ var type_char = newty2(100000000, { } }); -var type_string = newty2(100000000, { +let type_string = newty2(100000000, { TAG: /* Tconstr */3, _0: path_string, _1: /* [] */0, @@ -6968,7 +6968,7 @@ var type_string = newty2(100000000, { } }); -var type_float = newty2(100000000, { +let type_float = newty2(100000000, { TAG: /* Tconstr */3, _0: path_float, _1: /* [] */0, @@ -6977,7 +6977,7 @@ var type_float = newty2(100000000, { } }); -var type_bool = newty2(100000000, { +let type_bool = newty2(100000000, { TAG: /* Tconstr */3, _0: path_bool, _1: /* [] */0, @@ -6986,7 +6986,7 @@ var type_bool = newty2(100000000, { } }); -var type_unit = newty2(100000000, { +let type_unit = newty2(100000000, { TAG: /* Tconstr */3, _0: path_unit, _1: /* [] */0, @@ -6995,7 +6995,7 @@ var type_unit = newty2(100000000, { } }); -var type_exn = newty2(100000000, { +let type_exn = newty2(100000000, { TAG: /* Tconstr */3, _0: path_exn, _1: /* [] */0, @@ -7046,7 +7046,7 @@ function type_option(t) { }); } -var type_nativeint = newty2(100000000, { +let type_nativeint = newty2(100000000, { TAG: /* Tconstr */3, _0: path_nativeint, _1: /* [] */0, @@ -7055,7 +7055,7 @@ var type_nativeint = newty2(100000000, { } }); -var type_int32 = newty2(100000000, { +let type_int32 = newty2(100000000, { TAG: /* Tconstr */3, _0: path_int32, _1: /* [] */0, @@ -7064,7 +7064,7 @@ var type_int32 = newty2(100000000, { } }); -var type_int64 = newty2(100000000, { +let type_int64 = newty2(100000000, { TAG: /* Tconstr */3, _0: path_int64, _1: /* [] */0, @@ -7096,31 +7096,31 @@ newty2(100000000, { } }); -var ident_match_failure = wrap(create_predef_exn, "Match_failure"); +let ident_match_failure = wrap(create_predef_exn, "Match_failure"); -var ident_out_of_memory = wrap(create_predef_exn, "Out_of_memory"); +let ident_out_of_memory = wrap(create_predef_exn, "Out_of_memory"); -var ident_invalid_argument = wrap(create_predef_exn, "Invalid_argument"); +let ident_invalid_argument = wrap(create_predef_exn, "Invalid_argument"); -var ident_failure = wrap(create_predef_exn, "Failure"); +let ident_failure = wrap(create_predef_exn, "Failure"); -var ident_not_found = wrap(create_predef_exn, "Not_found"); +let ident_not_found = wrap(create_predef_exn, "Not_found"); -var ident_sys_error = wrap(create_predef_exn, "Sys_error"); +let ident_sys_error = wrap(create_predef_exn, "Sys_error"); -var ident_end_of_file = wrap(create_predef_exn, "End_of_file"); +let ident_end_of_file = wrap(create_predef_exn, "End_of_file"); -var ident_division_by_zero = wrap(create_predef_exn, "Division_by_zero"); +let ident_division_by_zero = wrap(create_predef_exn, "Division_by_zero"); -var ident_stack_overflow = wrap(create_predef_exn, "Stack_overflow"); +let ident_stack_overflow = wrap(create_predef_exn, "Stack_overflow"); -var ident_sys_blocked_io = wrap(create_predef_exn, "Sys_blocked_io"); +let ident_sys_blocked_io = wrap(create_predef_exn, "Sys_blocked_io"); -var ident_assert_failure = wrap(create_predef_exn, "Assert_failure"); +let ident_assert_failure = wrap(create_predef_exn, "Assert_failure"); -var ident_undefined_recursive_module = wrap(create_predef_exn, "Undefined_recursive_module"); +let ident_undefined_recursive_module = wrap(create_predef_exn, "Undefined_recursive_module"); -var decl_abstr = { +let decl_abstr = { type_params: /* [] */0, type_arity: 0, type_kind: /* Type_abstract */0, @@ -7142,22 +7142,22 @@ function cstr(id, args) { }; } -var ident_false = wrap(create, "false"); +let ident_false = wrap(create, "false"); -var ident_true = wrap(create, "true"); +let ident_true = wrap(create, "true"); -var ident_void = wrap(create, "()"); +let ident_void = wrap(create, "()"); -var ident_nil = wrap(create, "[]"); +let ident_nil = wrap(create, "[]"); -var ident_cons = wrap(create, "::"); +let ident_cons = wrap(create, "::"); -var ident_none = wrap(create, "None"); +let ident_none = wrap(create, "None"); -var ident_some = wrap(create, "Some"); +let ident_some = wrap(create, "Some"); function common_initial_env(add_type, add_extension, empty_env) { - var decl_bool_type_kind = { + let decl_bool_type_kind = { TAG: /* Type_variant */1, _0: { hd: cstr(ident_false, /* [] */0), @@ -7167,7 +7167,7 @@ function common_initial_env(add_type, add_extension, empty_env) { } } }; - var decl_bool = { + let decl_bool = { type_params: /* [] */0, type_arity: 0, type_kind: decl_bool_type_kind, @@ -7178,14 +7178,14 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var decl_unit_type_kind = { + let decl_unit_type_kind = { TAG: /* Type_variant */1, _0: { hd: cstr(ident_void, /* [] */0), tl: /* [] */0 } }; - var decl_unit = { + let decl_unit = { type_params: /* [] */0, type_arity: 0, type_kind: decl_unit_type_kind, @@ -7196,7 +7196,7 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var decl_exn = { + let decl_exn = { type_params: /* [] */0, type_arity: 0, type_kind: /* Type_open */1, @@ -7207,19 +7207,19 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var tvar = newty2(100000000, { + let tvar = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var decl_array_type_params = { + let decl_array_type_params = { hd: tvar, tl: /* [] */0 }; - var decl_array_type_variance = { + let decl_array_type_variance = { hd: Types_Variance.full, tl: /* [] */0 }; - var decl_array = { + let decl_array = { type_params: decl_array_type_params, type_arity: 1, type_kind: /* Type_abstract */0, @@ -7230,15 +7230,15 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var tvar$1 = newty2(100000000, { + let tvar$1 = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var decl_list_type_params = { + let decl_list_type_params = { hd: tvar$1, tl: /* [] */0 }; - var decl_list_type_kind = { + let decl_list_type_kind = { TAG: /* Type_variant */1, _0: { hd: cstr(ident_nil, /* [] */0), @@ -7254,11 +7254,11 @@ function common_initial_env(add_type, add_extension, empty_env) { } } }; - var decl_list_type_variance = { + let decl_list_type_variance = { hd: Types_Variance.covariant, tl: /* [] */0 }; - var decl_list = { + let decl_list = { type_params: decl_list_type_params, type_arity: 1, type_kind: decl_list_type_kind, @@ -7269,15 +7269,15 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var tvar$2 = newty2(100000000, { + let tvar$2 = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var decl_option_type_params = { + let decl_option_type_params = { hd: tvar$2, tl: /* [] */0 }; - var decl_option_type_kind = { + let decl_option_type_kind = { TAG: /* Type_variant */1, _0: { hd: cstr(ident_none, /* [] */0), @@ -7290,11 +7290,11 @@ function common_initial_env(add_type, add_extension, empty_env) { } } }; - var decl_option_type_variance = { + let decl_option_type_variance = { hd: Types_Variance.covariant, tl: /* [] */0 }; - var decl_option = { + let decl_option = { type_params: decl_option_type_params, type_arity: 1, type_kind: decl_option_type_kind, @@ -7305,19 +7305,19 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var tvar$3 = newty2(100000000, { + let tvar$3 = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var decl_lazy_t_type_params = { + let decl_lazy_t_type_params = { hd: tvar$3, tl: /* [] */0 }; - var decl_lazy_t_type_variance = { + let decl_lazy_t_type_variance = { hd: Types_Variance.covariant, tl: /* [] */0 }; - var decl_lazy_t = { + let decl_lazy_t = { type_params: decl_lazy_t_type_params, type_arity: 1, type_kind: /* Type_abstract */0, @@ -7328,7 +7328,7 @@ function common_initial_env(add_type, add_extension, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var add_extension$1 = function (id, l) { + let add_extension$1 = function (id, l) { return Curry._2(add_extension, id, { ext_type_path: path_exn, ext_type_params: /* [] */0, @@ -7397,10 +7397,10 @@ function common_initial_env(add_type, add_extension, empty_env) { } function build_initial_env(add_type, add_exception, empty_env) { - var common = common_initial_env(add_type, add_exception, empty_env); - var safe_string = Curry._3(add_type, ident_bytes, decl_abstr, common); - var decl_bytes_unsafe_type_manifest = type_string; - var decl_bytes_unsafe = { + let common = common_initial_env(add_type, add_exception, empty_env); + let safe_string = Curry._3(add_type, ident_bytes, decl_abstr, common); + let decl_bytes_unsafe_type_manifest = type_string; + let decl_bytes_unsafe = { type_params: /* [] */0, type_arity: 0, type_kind: /* Type_abstract */0, @@ -7411,7 +7411,7 @@ function build_initial_env(add_type, add_exception, empty_env) { type_loc: none, type_attributes: /* [] */0 }; - var unsafe_string = Curry._3(add_type, ident_bytes, decl_bytes_unsafe, common); + let unsafe_string = Curry._3(add_type, ident_bytes, decl_bytes_unsafe, common); return [ safe_string, unsafe_string @@ -7466,7 +7466,7 @@ set_current_time(999); Stdlib__List.rev(builtin_idents.contents); -var docstrings = { +let docstrings = { contents: /* [] */0 }; @@ -7476,7 +7476,7 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - var match = ds.ds_attached; + let match = ds.ds_attached; switch (match) { case /* Unattached */0 : return prerr_warning(ds.ds_loc, { @@ -7486,7 +7486,7 @@ function warn_bad_docstrings(param) { case /* Info */1 : return ; case /* Docs */2 : - var match$1 = ds.ds_associated; + let match$1 = ds.ds_associated; if (match$1 >= 2) { return prerr_warning(ds.ds_loc, { TAG: /* Bad_docstring */33, @@ -7503,7 +7503,7 @@ function warn_bad_docstrings(param) { } function docstring(body, loc) { - var ds = { + let ds = { ds_body: body, ds_loc: loc, ds_attached: /* Unattached */0, @@ -7516,18 +7516,18 @@ function docstring(body, loc) { return ds; } -var empty_docs = { +let empty_docs = { docs_pre: undefined, docs_post: undefined }; -var doc_loc = { +let doc_loc = { txt: "ocaml.doc", loc: none }; function docs_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -7535,19 +7535,19 @@ function docs_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -7564,12 +7564,12 @@ function docs_attr(ds) { } function add_docs_attrs(docs, attrs) { - var ds = docs.docs_pre; - var attrs$1 = ds !== undefined ? ({ + let ds = docs.docs_pre; + let attrs$1 = ds !== undefined ? ({ hd: docs_attr(ds), tl: attrs }) : attrs; - var ds$1 = docs.docs_post; + let ds$1 = docs.docs_post; if (ds$1 !== undefined) { return Stdlib.$at(attrs$1, { hd: docs_attr(ds$1), @@ -7591,13 +7591,13 @@ function add_info_attrs(info, attrs) { } } -var text_loc = { +let text_loc = { txt: "ocaml.text", loc: none }; function text_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -7605,19 +7605,19 @@ function text_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -7638,14 +7638,14 @@ function add_text_attrs(dsl, attrs) { } function get_docstring(info, dsl) { - var _param = dsl; + let _param = dsl; while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = info ? /* Info */1 : /* Docs */2; return ds; @@ -7656,16 +7656,16 @@ function get_docstring(info, dsl) { } function get_docstrings(dsl) { - var _acc = /* [] */0; - var _param = dsl; + let _acc = /* [] */0; + let _param = dsl; while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return Stdlib__List.rev(acc); } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = /* Docs */2; _param = param.tl; @@ -7682,7 +7682,7 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - var match = ds.ds_associated; + let match = ds.ds_associated; if (match) { ds.ds_associated = /* Many */2; } else { @@ -7691,7 +7691,7 @@ function associate_docstrings(dsl) { }), dsl); } -var pre_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -7702,12 +7702,12 @@ function set_pre_docstrings(pos, dsl) { function get_pre_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(pre_table, pos); + let dsl = Stdlib__Hashtbl.find(pre_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -7720,7 +7720,7 @@ function mark_pre_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(pre_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -7728,7 +7728,7 @@ function mark_pre_docs(pos) { } } -var post_table = Stdlib__Hashtbl.create(undefined, 50); +let post_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -7739,12 +7739,12 @@ function set_post_docstrings(pos, dsl) { function get_post_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -7757,7 +7757,7 @@ function mark_post_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(post_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -7767,11 +7767,11 @@ function mark_post_docs(pos) { function get_info(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); return get_docstring(true, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -7779,7 +7779,7 @@ function get_info(pos) { } } -var floating_table = Stdlib__Hashtbl.create(undefined, 50); +let floating_table = Stdlib__Hashtbl.create(undefined, 50); function set_floating_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -7793,7 +7793,7 @@ function get_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(floating_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -7801,7 +7801,7 @@ function get_text(pos) { } } -var pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -7815,7 +7815,7 @@ function get_pre_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(pre_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -7823,7 +7823,7 @@ function get_pre_extra_text(pos) { } } -var post_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let post_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -7837,7 +7837,7 @@ function get_post_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(post_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -7853,8 +7853,8 @@ function symbol_docs(param) { } function symbol_docs_lazy(param) { - var p1 = Stdlib__Parsing.symbol_start_pos(undefined); - var p2 = Stdlib__Parsing.symbol_end_pos(undefined); + let p1 = Stdlib__Parsing.symbol_start_pos(undefined); + let p2 = Stdlib__Parsing.symbol_end_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -7877,7 +7877,7 @@ function mark_rhs_docs(pos1, pos2) { } function symbol_text_lazy(param) { - var pos = Stdlib__Parsing.symbol_start_pos(undefined); + let pos = Stdlib__Parsing.symbol_start_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -7895,13 +7895,13 @@ function init(param) { Stdlib__Hashtbl.reset(post_extra_table); } -var default_loc = { +let default_loc = { contents: none }; function mk(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ptyp_desc: d, ptyp_loc: loc, @@ -8010,7 +8010,7 @@ function extension(loc, attrs, a) { } function force_poly(t) { - var match = t.ptyp_desc; + let match = t.ptyp_desc; if (typeof match !== "number" && match.TAG === /* Ptyp_poly */8) { return t; } @@ -8018,8 +8018,8 @@ function force_poly(t) { } function mk$1(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ppat_desc: d, ppat_loc: loc, @@ -8158,8 +8158,8 @@ function extension$1(loc, attrs, a) { } function mk$2(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pexp_desc: d, pexp_loc: loc, @@ -8458,8 +8458,8 @@ function $$case(lhs, guard, rhs) { } function mk$3(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmty_desc: d, pmty_loc: loc, @@ -8531,8 +8531,8 @@ function extension$3(loc, attrs, a) { } function mk$4(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmod_desc: d, pmod_loc: loc, @@ -8605,7 +8605,7 @@ function extension$4(loc, attrs, a) { } function mk$5(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { psig_desc: d, psig_loc: loc @@ -8613,7 +8613,7 @@ function mk$5(locOpt, d) { } function extension$5(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$5(loc, { TAG: /* Psig_extension */12, _0: a, @@ -8623,8 +8623,8 @@ function extension$5(loc, attrsOpt, a) { function text(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$5(loc, { TAG: /* Psig_attribute */11, _0: a @@ -8633,7 +8633,7 @@ function text(txt) { } function mk$6(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { pstr_desc: d, pstr_loc: loc @@ -8641,7 +8641,7 @@ function mk$6(locOpt, d) { } function $$eval(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$6(loc, { TAG: /* Pstr_eval */0, _0: a, @@ -8658,7 +8658,7 @@ function value(loc, a, b) { } function extension$6(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$6(loc, { TAG: /* Pstr_extension */14, _0: a, @@ -8668,8 +8668,8 @@ function extension$6(loc, attrsOpt, a) { function text$1(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$6(loc, { TAG: /* Pstr_attribute */13, _0: a @@ -8678,8 +8678,8 @@ function text$1(txt) { } function mk$7(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcl_desc: d, pcl_loc: loc, @@ -8756,8 +8756,8 @@ function extension$7(loc, attrs, a) { } function mk$8(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcty_desc: d, pcty_loc: loc, @@ -8808,9 +8808,9 @@ function extension$8(loc, attrs, a) { } function mk$9(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pctf_desc: d, pctf_loc: loc, @@ -8891,9 +8891,9 @@ function attr$7(d, a) { } function mk$10(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pcf_desc: d, pcf_loc: loc, @@ -8996,10 +8996,10 @@ function attr$8(d, a) { } function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var prim = primOpt !== undefined ? primOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let prim = primOpt !== undefined ? primOpt : /* [] */0; return { pval_name: name, pval_type: typ, @@ -9010,10 +9010,10 @@ function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { } function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmd_name: name, pmd_type: typ, @@ -9023,10 +9023,10 @@ function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { } function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmtd_name: name, pmtd_type: typ, @@ -9036,10 +9036,10 @@ function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { } function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmb_name: name, pmb_expr: expr, @@ -9049,10 +9049,10 @@ function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { } function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; return { popen_lid: lid, popen_override: override, @@ -9062,9 +9062,9 @@ function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { } function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pincl_mod: mexpr, pincl_loc: loc, @@ -9073,10 +9073,10 @@ function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { } function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pvb_pat: pat, pvb_expr: expr, @@ -9086,12 +9086,12 @@ function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { } function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; return { pci_virt: virt, pci_params: params, @@ -9103,14 +9103,14 @@ function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, exp } function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, privOpt, manifest, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; - var kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; + let kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptype_name: name, ptype_params: params, @@ -9124,10 +9124,10 @@ function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, } function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pcd_name: name, pcd_args: args, @@ -9138,10 +9138,10 @@ function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { } function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; return { pld_name: name, pld_mutable: mut, @@ -9152,10 +9152,10 @@ function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { } function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptyext_path: path, ptyext_params: params, @@ -9166,10 +9166,10 @@ function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { } function constructor$1(locOpt, attrsOpt, docsOpt, infoOpt, name, kind) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; return { pext_name: name, pext_kind: kind, @@ -9179,11 +9179,11 @@ function constructor$1(locOpt, attrsOpt, docsOpt, infoOpt, name, kind) { } function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pext_name: name, pext_kind: { @@ -9197,10 +9197,10 @@ function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { } function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; return { pext_name: name, pext_kind: { @@ -9212,7 +9212,7 @@ function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { }; } -var Ast_helper_Exp = { +let Ast_helper_Exp = { mk: mk$2, attr: attr$2, ident: ident, @@ -9252,7 +9252,7 @@ var Ast_helper_Exp = { $$case: $$case }; -var Ast_helper_Ctf = { +let Ast_helper_Ctf = { mk: mk$9, attr: attr$7, inherit_: inherit_, @@ -9264,7 +9264,7 @@ var Ast_helper_Ctf = { text: text$2 }; -var Ast_helper_Cf = { +let Ast_helper_Cf = { mk: mk$10, attr: attr$8, inherit_: inherit_$1, @@ -9315,9 +9315,9 @@ function map_loc(sub, param) { } function map$1(sub, param) { - var desc = param.ptyp_desc; - var loc = Curry._2(sub.location, sub, param.ptyp_loc); - var attrs = Curry._2(sub.attributes, sub, param.ptyp_attributes); + let desc = param.ptyp_desc; + let loc = Curry._2(sub.location, sub, param.ptyp_loc); + let attrs = Curry._2(sub.attributes, sub, param.ptyp_attributes); if (typeof desc === "number") { return mk(loc, attrs, /* Ptyp_any */0); } @@ -9331,7 +9331,7 @@ function map$1(sub, param) { case /* Ptyp_constr */3 : return constr(loc, attrs, map_loc(sub, desc._0), Stdlib__List.map(Curry._1(sub.typ, sub), desc._1)); case /* Ptyp_object */4 : - var f = function (param) { + let f = function (param) { return [ param[0], Curry._2(sub.attributes, sub, param[1]), @@ -9363,8 +9363,8 @@ function map$1(sub, param) { case /* Ptyp_poly */8 : return poly(loc, attrs, desc._0, Curry._2(sub.typ, sub, desc._1)); case /* Ptyp_package */9 : - var match = desc._0; - var partial_arg = Curry._1(sub.typ, sub); + let match = desc._0; + let partial_arg = Curry._1(sub.typ, sub); return $$package(loc, attrs, map_loc(sub, match[0]), Stdlib__List.map((function (param) { return map_tuple((function (param) { return map_loc(sub, param); @@ -9377,10 +9377,10 @@ function map$1(sub, param) { } function map_type_declaration(sub, param) { - var partial_arg = Curry._1(sub.typ, sub); - var partial_arg$1 = Curry._1(sub.location, sub); - var partial_arg$2 = Curry._1(sub.typ, sub); - var partial_arg$3 = Curry._1(sub.typ, sub); + let partial_arg = Curry._1(sub.typ, sub); + let partial_arg$1 = Curry._1(sub.location, sub); + let partial_arg$2 = Curry._1(sub.typ, sub); + let partial_arg$3 = Curry._1(sub.typ, sub); return mk$19(Curry._2(sub.location, sub, param.ptype_loc), Curry._2(sub.attributes, sub, param.ptype_attributes), undefined, undefined, Stdlib__List.map((function (param) { return map_fst(partial_arg, param); }), param.ptype_params), Stdlib__List.map((function (param) { @@ -9413,7 +9413,7 @@ function map_type_kind(sub, param) { } function map_type_extension(sub, param) { - var partial_arg = Curry._1(sub.typ, sub); + let partial_arg = Curry._1(sub.typ, sub); return mk$20(Curry._2(sub.attributes, sub, param.ptyext_attributes), undefined, Stdlib__List.map((function (param) { return map_fst(partial_arg, param); }), param.ptyext_params), param.ptyext_private, map_loc(sub, param.ptyext_path), Stdlib__List.map(Curry._1(sub.extension_constructor, sub), param.ptyext_constructors)); @@ -9439,9 +9439,9 @@ function map_extension_constructor(sub, param) { } function map$2(sub, param) { - var desc = param.pcty_desc; - var loc = Curry._2(sub.location, sub, param.pcty_loc); - var attrs = Curry._2(sub.attributes, sub, param.pcty_attributes); + let desc = param.pcty_desc; + let loc = Curry._2(sub.location, sub, param.pcty_loc); + let attrs = Curry._2(sub.attributes, sub, param.pcty_attributes); switch (desc.TAG | 0) { case /* Pcty_constr */0 : return constr$2(loc, attrs, map_loc(sub, desc._0), Stdlib__List.map(Curry._1(sub.typ, sub), desc._1)); @@ -9456,20 +9456,20 @@ function map$2(sub, param) { } function map_field(sub, param) { - var desc = param.pctf_desc; - var loc = Curry._2(sub.location, sub, param.pctf_loc); - var attrs = Curry._2(sub.attributes, sub, param.pctf_attributes); + let desc = param.pctf_desc; + let loc = Curry._2(sub.location, sub, param.pctf_loc); + let attrs = Curry._2(sub.attributes, sub, param.pctf_attributes); switch (desc.TAG | 0) { case /* Pctf_inherit */0 : return Curry._3(Ast_helper_Ctf.inherit_, loc, attrs, Curry._2(sub.class_type, sub, desc._0)); case /* Pctf_val */1 : - var match = desc._0; + let match = desc._0; return Curry._6(Ast_helper_Ctf.val_, loc, attrs, match[0], match[1], match[2], Curry._2(sub.typ, sub, match[3])); case /* Pctf_method */2 : - var match$1 = desc._0; + let match$1 = desc._0; return Curry._6(Ast_helper_Ctf.method_, loc, attrs, match$1[0], match$1[1], match$1[2], Curry._2(sub.typ, sub, match$1[3])); case /* Pctf_constraint */3 : - var match$2 = desc._0; + let match$2 = desc._0; return Curry._4(Ast_helper_Ctf.constraint_, loc, attrs, Curry._2(sub.typ, sub, match$2[0]), Curry._2(sub.typ, sub, match$2[1])); case /* Pctf_attribute */4 : return Curry._2(Ast_helper_Ctf.attribute, loc, Curry._2(sub.attribute, sub, desc._0)); @@ -9487,9 +9487,9 @@ function map_signature(sub, param) { } function map$3(sub, param) { - var desc = param.pmty_desc; - var loc = Curry._2(sub.location, sub, param.pmty_loc); - var attrs = Curry._2(sub.attributes, sub, param.pmty_attributes); + let desc = param.pmty_desc; + let loc = Curry._2(sub.location, sub, param.pmty_loc); + let attrs = Curry._2(sub.attributes, sub, param.pmty_attributes); switch (desc.TAG | 0) { case /* Pmty_ident */0 : return ident$1(loc, attrs, map_loc(sub, desc._0)); @@ -9539,77 +9539,77 @@ function map_with_constraint(sub, param) { } function map_signature_item(sub, param) { - var desc = param.psig_desc; - var loc = Curry._2(sub.location, sub, param.psig_loc); + let desc = param.psig_desc; + let loc = Curry._2(sub.location, sub, param.psig_loc); switch (desc.TAG | 0) { case /* Psig_value */0 : - var a = Curry._2(sub.value_description, sub, desc._0); + let a = Curry._2(sub.value_description, sub, desc._0); return mk$5(loc, { TAG: /* Psig_value */0, _0: a }); case /* Psig_type */1 : - var a$1 = Stdlib__List.map(Curry._1(sub.type_declaration, sub), desc._0); + let a$1 = Stdlib__List.map(Curry._1(sub.type_declaration, sub), desc._0); return mk$5(loc, { TAG: /* Psig_type */1, _0: a$1 }); case /* Psig_typext */2 : - var a$2 = Curry._2(sub.type_extension, sub, desc._0); + let a$2 = Curry._2(sub.type_extension, sub, desc._0); return mk$5(loc, { TAG: /* Psig_typext */2, _0: a$2 }); case /* Psig_exception */3 : - var a$3 = Curry._2(sub.extension_constructor, sub, desc._0); + let a$3 = Curry._2(sub.extension_constructor, sub, desc._0); return mk$5(loc, { TAG: /* Psig_exception */3, _0: a$3 }); case /* Psig_module */4 : - var a$4 = Curry._2(sub.module_declaration, sub, desc._0); + let a$4 = Curry._2(sub.module_declaration, sub, desc._0); return mk$5(loc, { TAG: /* Psig_module */4, _0: a$4 }); case /* Psig_recmodule */5 : - var a$5 = Stdlib__List.map(Curry._1(sub.module_declaration, sub), desc._0); + let a$5 = Stdlib__List.map(Curry._1(sub.module_declaration, sub), desc._0); return mk$5(loc, { TAG: /* Psig_recmodule */5, _0: a$5 }); case /* Psig_modtype */6 : - var a$6 = Curry._2(sub.module_type_declaration, sub, desc._0); + let a$6 = Curry._2(sub.module_type_declaration, sub, desc._0); return mk$5(loc, { TAG: /* Psig_modtype */6, _0: a$6 }); case /* Psig_open */7 : - var a$7 = Curry._2(sub.open_description, sub, desc._0); + let a$7 = Curry._2(sub.open_description, sub, desc._0); return mk$5(loc, { TAG: /* Psig_open */7, _0: a$7 }); case /* Psig_include */8 : - var a$8 = Curry._2(sub.include_description, sub, desc._0); + let a$8 = Curry._2(sub.include_description, sub, desc._0); return mk$5(loc, { TAG: /* Psig_include */8, _0: a$8 }); case /* Psig_class */9 : - var a$9 = Stdlib__List.map(Curry._1(sub.class_description, sub), desc._0); + let a$9 = Stdlib__List.map(Curry._1(sub.class_description, sub), desc._0); return mk$5(loc, { TAG: /* Psig_class */9, _0: a$9 }); case /* Psig_class_type */10 : - var a$10 = Stdlib__List.map(Curry._1(sub.class_type_declaration, sub), desc._0); + let a$10 = Stdlib__List.map(Curry._1(sub.class_type_declaration, sub), desc._0); return mk$5(loc, { TAG: /* Psig_class_type */10, _0: a$10 }); case /* Psig_attribute */11 : - var a$11 = Curry._2(sub.attribute, sub, desc._0); + let a$11 = Curry._2(sub.attribute, sub, desc._0); return mk$5(loc, { TAG: /* Psig_attribute */11, _0: a$11 @@ -9621,9 +9621,9 @@ function map_signature_item(sub, param) { } function map$4(sub, param) { - var desc = param.pmod_desc; - var loc = Curry._2(sub.location, sub, param.pmod_loc); - var attrs = Curry._2(sub.attributes, sub, param.pmod_attributes); + let desc = param.pmod_desc; + let loc = Curry._2(sub.location, sub, param.pmod_loc); + let attrs = Curry._2(sub.attributes, sub, param.pmod_attributes); switch (desc.TAG | 0) { case /* Pmod_ident */0 : return ident$2(loc, attrs, map_loc(sub, desc._0)); @@ -9644,81 +9644,81 @@ function map$4(sub, param) { } function map_structure_item(sub, param) { - var desc = param.pstr_desc; - var loc = Curry._2(sub.location, sub, param.pstr_loc); + let desc = param.pstr_desc; + let loc = Curry._2(sub.location, sub, param.pstr_loc); switch (desc.TAG | 0) { case /* Pstr_eval */0 : return $$eval(loc, Curry._2(sub.attributes, sub, desc._1), Curry._2(sub.expr, sub, desc._0)); case /* Pstr_value */1 : return value(loc, desc._0, Stdlib__List.map(Curry._1(sub.value_binding, sub), desc._1)); case /* Pstr_primitive */2 : - var a = Curry._2(sub.value_description, sub, desc._0); + let a = Curry._2(sub.value_description, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_primitive */2, _0: a }); case /* Pstr_type */3 : - var a$1 = Stdlib__List.map(Curry._1(sub.type_declaration, sub), desc._0); + let a$1 = Stdlib__List.map(Curry._1(sub.type_declaration, sub), desc._0); return mk$6(loc, { TAG: /* Pstr_type */3, _0: a$1 }); case /* Pstr_typext */4 : - var a$2 = Curry._2(sub.type_extension, sub, desc._0); + let a$2 = Curry._2(sub.type_extension, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_typext */4, _0: a$2 }); case /* Pstr_exception */5 : - var a$3 = Curry._2(sub.extension_constructor, sub, desc._0); + let a$3 = Curry._2(sub.extension_constructor, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_exception */5, _0: a$3 }); case /* Pstr_module */6 : - var a$4 = Curry._2(sub.module_binding, sub, desc._0); + let a$4 = Curry._2(sub.module_binding, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_module */6, _0: a$4 }); case /* Pstr_recmodule */7 : - var a$5 = Stdlib__List.map(Curry._1(sub.module_binding, sub), desc._0); + let a$5 = Stdlib__List.map(Curry._1(sub.module_binding, sub), desc._0); return mk$6(loc, { TAG: /* Pstr_recmodule */7, _0: a$5 }); case /* Pstr_modtype */8 : - var a$6 = Curry._2(sub.module_type_declaration, sub, desc._0); + let a$6 = Curry._2(sub.module_type_declaration, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_modtype */8, _0: a$6 }); case /* Pstr_open */9 : - var a$7 = Curry._2(sub.open_description, sub, desc._0); + let a$7 = Curry._2(sub.open_description, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_open */9, _0: a$7 }); case /* Pstr_class */10 : - var a$8 = Stdlib__List.map(Curry._1(sub.class_declaration, sub), desc._0); + let a$8 = Stdlib__List.map(Curry._1(sub.class_declaration, sub), desc._0); return mk$6(loc, { TAG: /* Pstr_class */10, _0: a$8 }); case /* Pstr_class_type */11 : - var a$9 = Stdlib__List.map(Curry._1(sub.class_type_declaration, sub), desc._0); + let a$9 = Stdlib__List.map(Curry._1(sub.class_type_declaration, sub), desc._0); return mk$6(loc, { TAG: /* Pstr_class_type */11, _0: a$9 }); case /* Pstr_include */12 : - var a$10 = Curry._2(sub.include_declaration, sub, desc._0); + let a$10 = Curry._2(sub.include_declaration, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_include */12, _0: a$10 }); case /* Pstr_attribute */13 : - var a$11 = Curry._2(sub.attribute, sub, desc._0); + let a$11 = Curry._2(sub.attribute, sub, desc._0); return mk$6(loc, { TAG: /* Pstr_attribute */13, _0: a$11 @@ -9730,9 +9730,9 @@ function map_structure_item(sub, param) { } function map$5(sub, param) { - var desc = param.pexp_desc; - var loc = Curry._2(sub.location, sub, param.pexp_loc); - var attrs = Curry._2(sub.attributes, sub, param.pexp_attributes); + let desc = param.pexp_desc; + let loc = Curry._2(sub.location, sub, param.pexp_loc); + let attrs = Curry._2(sub.attributes, sub, param.pexp_attributes); switch (desc.TAG | 0) { case /* Pexp_ident */0 : return Curry._3(Ast_helper_Exp.ident, loc, attrs, map_loc(sub, desc._0)); @@ -9745,7 +9745,7 @@ function map$5(sub, param) { case /* Pexp_fun */4 : return Curry._6(Ast_helper_Exp.fun_, loc, attrs, desc._0, map_opt(Curry._1(sub.expr, sub), desc._1), Curry._2(sub.pat, sub, desc._2), Curry._2(sub.expr, sub, desc._3)); case /* Pexp_apply */5 : - var partial_arg = Curry._1(sub.expr, sub); + let partial_arg = Curry._1(sub.expr, sub); return Curry._4(Ast_helper_Exp.apply, loc, attrs, Curry._2(sub.expr, sub, desc._0), Stdlib__List.map((function (param) { return map_snd(partial_arg, param); }), desc._1)); @@ -9760,7 +9760,7 @@ function map$5(sub, param) { case /* Pexp_variant */10 : return Curry._4(Ast_helper_Exp.variant, loc, attrs, desc._0, map_opt(Curry._1(sub.expr, sub), desc._1)); case /* Pexp_record */11 : - var partial_arg$1 = Curry._1(sub.expr, sub); + let partial_arg$1 = Curry._1(sub.expr, sub); return Curry._4(Ast_helper_Exp.record, loc, attrs, Stdlib__List.map((function (param) { return map_tuple((function (param) { return map_loc(sub, param); @@ -9791,7 +9791,7 @@ function map$5(sub, param) { case /* Pexp_setinstvar */23 : return Curry._4(Ast_helper_Exp.setinstvar, loc, attrs, map_loc(sub, desc._0), Curry._2(sub.expr, sub, desc._1)); case /* Pexp_override */24 : - var partial_arg$2 = Curry._1(sub.expr, sub); + let partial_arg$2 = Curry._1(sub.expr, sub); return Curry._3(Ast_helper_Exp.override, loc, attrs, Stdlib__List.map((function (param) { return map_tuple((function (param) { return map_loc(sub, param); @@ -9820,9 +9820,9 @@ function map$5(sub, param) { } function map$6(sub, param) { - var desc = param.ppat_desc; - var loc = Curry._2(sub.location, sub, param.ppat_loc); - var attrs = Curry._2(sub.attributes, sub, param.ppat_attributes); + let desc = param.ppat_desc; + let loc = Curry._2(sub.location, sub, param.ppat_loc); + let attrs = Curry._2(sub.attributes, sub, param.ppat_attributes); if (typeof desc === "number") { return mk$1(loc, attrs, /* Ppat_any */0); } @@ -9842,7 +9842,7 @@ function map$6(sub, param) { case /* Ppat_variant */6 : return variant$1(loc, attrs, desc._0, map_opt(Curry._1(sub.pat, sub), desc._1)); case /* Ppat_record */7 : - var partial_arg = Curry._1(sub.pat, sub); + let partial_arg = Curry._1(sub.pat, sub); return record(loc, attrs, Stdlib__List.map((function (param) { return map_tuple((function (param) { return map_loc(sub, param); @@ -9869,9 +9869,9 @@ function map$6(sub, param) { } function map$7(sub, param) { - var desc = param.pcl_desc; - var loc = Curry._2(sub.location, sub, param.pcl_loc); - var attrs = Curry._2(sub.attributes, sub, param.pcl_attributes); + let desc = param.pcl_desc; + let loc = Curry._2(sub.location, sub, param.pcl_loc); + let attrs = Curry._2(sub.attributes, sub, param.pcl_attributes); switch (desc.TAG | 0) { case /* Pcl_constr */0 : return constr$1(loc, attrs, map_loc(sub, desc._0), Stdlib__List.map(Curry._1(sub.typ, sub), desc._1)); @@ -9880,7 +9880,7 @@ function map$7(sub, param) { case /* Pcl_fun */2 : return fun_$1(loc, attrs, desc._0, map_opt(Curry._1(sub.expr, sub), desc._1), Curry._2(sub.pat, sub, desc._2), Curry._2(sub.class_expr, sub, desc._3)); case /* Pcl_apply */3 : - var partial_arg = Curry._1(sub.expr, sub); + let partial_arg = Curry._1(sub.expr, sub); return apply$2(loc, attrs, Curry._2(sub.class_expr, sub, desc._0), Stdlib__List.map((function (param) { return map_snd(partial_arg, param); }), desc._1)); @@ -9910,20 +9910,20 @@ function map_kind(sub, param) { } function map_field$1(sub, param) { - var desc = param.pcf_desc; - var loc = Curry._2(sub.location, sub, param.pcf_loc); - var attrs = Curry._2(sub.attributes, sub, param.pcf_attributes); + let desc = param.pcf_desc; + let loc = Curry._2(sub.location, sub, param.pcf_loc); + let attrs = Curry._2(sub.attributes, sub, param.pcf_attributes); switch (desc.TAG | 0) { case /* Pcf_inherit */0 : return Curry._5(Ast_helper_Cf.inherit_, loc, attrs, desc._0, Curry._2(sub.class_expr, sub, desc._1), desc._2); case /* Pcf_val */1 : - var match = desc._0; + let match = desc._0; return Curry._5(Ast_helper_Cf.val_, loc, attrs, map_loc(sub, match[0]), match[1], map_kind(sub, match[2])); case /* Pcf_method */2 : - var match$1 = desc._0; + let match$1 = desc._0; return Curry._5(Ast_helper_Cf.method_, loc, attrs, map_loc(sub, match$1[0]), match$1[1], map_kind(sub, match$1[2])); case /* Pcf_constraint */3 : - var match$2 = desc._0; + let match$2 = desc._0; return Curry._4(Ast_helper_Cf.constraint_, loc, attrs, Curry._2(sub.typ, sub, match$2[0]), Curry._2(sub.typ, sub, match$2[1])); case /* Pcf_initializer */4 : return Curry._3(Ast_helper_Cf.initializer_, loc, attrs, Curry._2(sub.expr, sub, desc._0)); @@ -9943,7 +9943,7 @@ function map_structure(sub, param) { } function class_infos(sub, f, param) { - var partial_arg = Curry._1(sub.typ, sub); + let partial_arg = Curry._1(sub.typ, sub); return mk$18(Curry._2(sub.location, sub, param.pci_loc), Curry._2(sub.attributes, sub, param.pci_attributes), undefined, undefined, param.pci_virt, Stdlib__List.map((function (param) { return map_fst(partial_arg, param); }), param.pci_params), map_loc(sub, param.pci_name), Curry._1(f, param.pci_expr)); @@ -9973,21 +9973,21 @@ function default_mapper_cases($$this, l) { } function default_mapper_class_declaration($$this) { - var partial_arg = Curry._1($$this.class_expr, $$this); + let partial_arg = Curry._1($$this.class_expr, $$this); return function (param) { return class_infos($$this, partial_arg, param); }; } function default_mapper_class_description($$this) { - var partial_arg = Curry._1($$this.class_type, $$this); + let partial_arg = Curry._1($$this.class_type, $$this); return function (param) { return class_infos($$this, partial_arg, param); }; } function default_mapper_class_type_declaration($$this) { - var partial_arg = Curry._1($$this.class_type, $$this); + let partial_arg = Curry._1($$this.class_type, $$this); return function (param) { return class_infos($$this, partial_arg, param); }; @@ -10074,7 +10074,7 @@ function default_mapper_value_description($$this, param) { return mk$11(Curry._2($$this.location, $$this, param.pval_loc), Curry._2($$this.attributes, $$this, param.pval_attributes), undefined, param.pval_prim, map_loc($$this, param.pval_name), Curry._2($$this.typ, $$this, param.pval_type)); } -var default_mapper = { +let default_mapper = { attribute: default_mapper_attribute, attributes: default_mapper_attributes, case: default_mapper_case, @@ -10126,8 +10126,8 @@ function height$4(param) { } function create$5(l, x, d, r) { - var hl = height$4(l); - var hr = height$4(r); + let hl = height$4(l); + let hr = height$4(r); return /* Node */{ _0: l, _1: x, @@ -10138,14 +10138,14 @@ function create$5(l, x, d, r) { } function bal$4(l, x, d, r) { - var hl = height$4(l); - var hr = height$4(r); + let hl = height$4(l); + let hr = height$4(r); if (hl > (hr + 1 | 0)) { if (l) { - var lr = l._3; - var ld = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._3; + let ld = l._2; + let lv = l._1; + let ll = l._0; if (height$4(ll) >= height$4(lr)) { return create$5(ll, lv, ld, create$5(lr, x, d, r)); } @@ -10174,8 +10174,8 @@ function bal$4(l, x, d, r) { return create$5(l, x, d, r); } if (r) { - var rl = r._0; - var rr = r._3; + let rl = r._0; + let rr = r._3; if (height$4(rr) >= height$4(rl)) { return create$5(create$5(l, x, d, rl), r._1, r._2, rr); } @@ -10211,11 +10211,11 @@ function add$5(x, data, param) { _4: 1 }; } - var r = param._3; - var d = param._2; - var v = param._1; - var l = param._0; - var c = Caml_obj.caml_compare(x, v); + let r = param._3; + let d = param._2; + let v = param._1; + let l = param._0; + let c = Caml_obj.caml_compare(x, v); if (c === 0) { return /* Node */{ _0: l, @@ -10233,9 +10233,9 @@ function add$5(x, data, param) { function find$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Caml_obj.caml_compare(x, param._1); + let c = Caml_obj.caml_compare(x, param._1); if (c === 0) { return param._2; } @@ -10250,11 +10250,11 @@ function find$2(x, _param) { function mem$4(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Caml_obj.caml_compare(x, param._1); + let c = Caml_obj.caml_compare(x, param._1); if (c === 0) { return true; } @@ -10265,7 +10265,7 @@ function mem$4(x, _param) { function iter$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -10278,8 +10278,8 @@ function iter$2(f, _param) { function fold$4(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -10289,7 +10289,7 @@ function fold$4(f, _m, _accu) { }; } -var identity = { +let identity = { types: /* Empty */0, modules: /* Empty */0, modtypes: /* Empty */0, @@ -10340,7 +10340,7 @@ function loc(s, x) { } } -var newrecord = Caml_obj.caml_obj_dup(default_mapper); +let newrecord = Caml_obj.caml_obj_dup(default_mapper); newrecord.location = (function (_this, _loc) { return none; @@ -10359,7 +10359,7 @@ function is_not_doc(param) { } function attrs(s, x) { - var x$1 = s.for_saving && !keep_docs.contents ? Stdlib__List.filter(is_not_doc, x) : x; + let x$1 = s.for_saving && !keep_docs.contents ? Stdlib__List.filter(is_not_doc, x) : x; if (s.for_saving && !keep_locs.contents) { return Curry._2(newrecord.attributes, newrecord, x$1); } else { @@ -10374,7 +10374,7 @@ function module_path(s, p) { return find$2(p._0, s.modules); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return p; } @@ -10401,7 +10401,7 @@ function modtype_path(s, p) { switch (p.TAG | 0) { case /* Pident */0 : try { - var p$1 = find$2(p._0, s.modtypes); + let p$1 = find$2(p._0, s.modtypes); if (p$1.TAG === /* Mty_ident */0) { return p$1._0; } else { @@ -10409,7 +10409,7 @@ function modtype_path(s, p) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return p; } @@ -10435,7 +10435,7 @@ function type_path(s, p) { return find$2(p._0, s.types); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return p; } @@ -10454,7 +10454,7 @@ function type_path(s, p) { } } -var new_id$1 = { +let new_id$1 = { contents: -1 }; @@ -10496,9 +10496,9 @@ function norm(d) { } function typexp(s, ty) { - var ty$1 = repr(ty); - var desc = ty$1.desc; - var exit = 0; + let ty$1 = repr(ty); + let desc = ty$1.desc; + let exit = 0; if (typeof desc === "number") { exit = 1; } else { @@ -10515,9 +10515,9 @@ function typexp(s, ty) { } switch (exit) { case 1 : - var desc$1 = ty$1.desc; + let desc$1 = ty$1.desc; save_desc(ty$1, desc$1); - var ty$p = s.for_saving ? newpersty({ + let ty$p = s.for_saving ? newpersty({ TAG: /* Tvar */0, _0: undefined }) : newty2(100000000, { @@ -10528,8 +10528,8 @@ function typexp(s, ty) { TAG: /* Tsubst */7, _0: ty$p }; - var tmp; - var exit$1 = 0; + let tmp; + let exit$1 = 0; if (typeof desc$1 === "number") { exit$1 = 3; } else { @@ -10547,7 +10547,7 @@ function typexp(s, ty) { }; break; case /* Tobject */4 : - var match = desc$1._1.contents; + let match = desc$1._1.contents; tmp = { TAG: /* Tobject */4, _0: typexp(s, desc$1._0), @@ -10562,7 +10562,7 @@ function typexp(s, ty) { }; break; case /* Tfield */5 : - var m = desc$1._0; + let m = desc$1._0; if (s === identity && ty$1.level < 100000000 && m === dummy_method) { tmp = { TAG: /* Tfield */5, @@ -10581,22 +10581,22 @@ function typexp(s, ty) { } break; case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, desc$1._0); - var more = repr(row.row_more); - var match$1 = more.desc; - var exit$2 = 0; + let row = row_repr_aux(/* [] */0, desc$1._0); + let more = repr(row.row_more); + let match$1 = more.desc; + let exit$2 = 0; if (typeof match$1 === "number" || match$1.TAG !== /* Tsubst */7) { exit$2 = 4; } else { - var match$2 = match$1._0.desc; + let match$2 = match$1._0.desc; if (typeof match$2 === "number" || match$2.TAG !== /* Ttuple */2) { exit$2 = 4; } else { - var match$3 = match$2._0; + let match$3 = match$2._0; if (match$3) { - var match$4 = match$3.tl; + let match$4 = match$3.tl; if (match$4 && !match$4.tl) { - var ty2 = match$4.hd; + let ty2 = match$4.hd; ty$1.desc = { TAG: /* Tsubst */7, _0: ty2 @@ -10614,14 +10614,14 @@ function typexp(s, ty) { } } if (exit$2 === 4) { - var dup = true; + let dup = true; if (!s.for_saving) { - var tmp$1 = true; + let tmp$1 = true; if (more.level !== 100000000) { - var tmp$2 = true; + let tmp$2 = true; if (!static_row(row)) { - var match$5 = more.desc; - var tmp$3; + let match$5 = more.desc; + let tmp$3; tmp$3 = typeof match$5 === "number" || match$5.TAG !== /* Tconstr */3 ? false : true; tmp$2 = tmp$3; } @@ -10629,9 +10629,9 @@ function typexp(s, ty) { } dup = tmp$1; } - var ty$2 = more.desc; - var more$p; - var exit$3 = 0; + let ty$2 = more.desc; + let more$p; + let exit$3 = 0; if (typeof ty$2 === "number") { more$p = typexp(s, more); } else { @@ -10676,10 +10676,10 @@ function typexp(s, ty) { } }) }; - var row$1 = copy_row((function (param) { + let row$1 = copy_row((function (param) { return typexp(s, param); }), true, row, !dup, more$p); - var match$6 = row$1.row_name; + let match$6 = row$1.row_name; tmp = match$6 !== undefined ? ({ TAG: /* Tvariant */8, _0: { @@ -10724,7 +10724,7 @@ function typexp(s, ty) { if (!(s.for_saving || ty$1.id < 0)) { return ty$1; } - var ty$p$1 = s.for_saving ? newpersty(norm(desc)) : newty2(ty$1.level, desc); + let ty$p$1 = s.for_saving ? newpersty(norm(desc)) : newty2(ty$1.level, desc); save_desc(ty$1, desc); ty$1.desc = { TAG: /* Tsubst */7, @@ -10736,14 +10736,14 @@ function typexp(s, ty) { } function type_expr(s, ty) { - var ty$p = typexp(s, ty); + let ty$p = typexp(s, ty); cleanup_types(undefined); return ty$p; } function type_declaration(s, decl) { - var cstrs = decl.type_kind; - var tmp; + let cstrs = decl.type_kind; + let tmp; tmp = typeof cstrs === "number" ? ( cstrs === /* Type_abstract */0 ? /* Type_abstract */0 : /* Type_open */1 ) : ( @@ -10776,17 +10776,17 @@ function type_declaration(s, decl) { }), cstrs._0) }) ); - var ty = decl.type_manifest; - var decl_type_params = Stdlib__List.map((function (param) { + let ty = decl.type_manifest; + let decl_type_params = Stdlib__List.map((function (param) { return typexp(s, param); }), decl.type_params); - var decl_type_arity = decl.type_arity; - var decl_type_private = decl.type_private; - var decl_type_manifest = ty !== undefined ? typexp(s, ty) : undefined; - var decl_type_variance = decl.type_variance; - var decl_type_loc = loc(s, decl.type_loc); - var decl_type_attributes = attrs(s, decl.type_attributes); - var decl$1 = { + let decl_type_arity = decl.type_arity; + let decl_type_private = decl.type_private; + let decl_type_manifest = ty !== undefined ? typexp(s, ty) : undefined; + let decl_type_variance = decl.type_variance; + let decl_type_loc = loc(s, decl.type_loc); + let decl_type_attributes = attrs(s, decl.type_attributes); + let decl$1 = { type_params: decl_type_params, type_arity: decl_type_arity, type_kind: tmp, @@ -10851,8 +10851,8 @@ function class_type(s, param) { } function class_declaration(s, decl) { - var ty = decl.cty_new; - var decl$1 = { + let ty = decl.cty_new; + let decl$1 = { cty_params: Stdlib__List.map((function (param) { return typexp(s, param); }), decl.cty_params), @@ -10870,15 +10870,15 @@ function class_declaration(s, decl) { } function cltype_declaration(s, decl) { - var decl_clty_params = Stdlib__List.map((function (param) { + let decl_clty_params = Stdlib__List.map((function (param) { return typexp(s, param); }), decl.clty_params); - var decl_clty_type = class_type(s, decl.clty_type); - var decl_clty_path = type_path(s, decl.clty_path); - var decl_clty_variance = decl.clty_variance; - var decl_clty_loc = loc(s, decl.clty_loc); - var decl_clty_attributes = attrs(s, decl.clty_attributes); - var decl$1 = { + let decl_clty_type = class_type(s, decl.clty_type); + let decl_clty_path = type_path(s, decl.clty_path); + let decl_clty_variance = decl.clty_variance; + let decl_clty_loc = loc(s, decl.clty_loc); + let decl_clty_attributes = attrs(s, decl.clty_attributes); + let decl$1 = { clty_params: decl_clty_params, clty_type: decl_clty_type, clty_path: decl_clty_path, @@ -10891,7 +10891,7 @@ function cltype_declaration(s, decl) { } function class_type$1(s, cty) { - var cty$1 = class_type(s, cty); + let cty$1 = class_type(s, cty); cleanup_types(undefined); return cty$1; } @@ -10906,20 +10906,20 @@ function value_description(s, descr) { } function extension_constructor(s, ext) { - var ext_ext_type_path = type_path(s, ext.ext_type_path); - var ext_ext_type_params = Stdlib__List.map((function (param) { + let ext_ext_type_path = type_path(s, ext.ext_type_path); + let ext_ext_type_params = Stdlib__List.map((function (param) { return typexp(s, param); }), ext.ext_type_params); - var ext_ext_args = Stdlib__List.map((function (param) { + let ext_ext_args = Stdlib__List.map((function (param) { return typexp(s, param); }), ext.ext_args); - var ext_ext_ret_type = may_map((function (param) { + let ext_ext_ret_type = may_map((function (param) { return typexp(s, param); }), ext.ext_ret_type); - var ext_ext_private = ext.ext_private; - var ext_ext_loc = s.for_saving ? none : ext.ext_loc; - var ext_ext_attributes = attrs(s, ext.ext_attributes); - var ext$1 = { + let ext_ext_private = ext.ext_private; + let ext_ext_loc = s.for_saving ? none : ext.ext_loc; + let ext_ext_attributes = attrs(s, ext.ext_attributes); + let ext$1 = { ext_type_path: ext_ext_type_path, ext_type_params: ext_ext_type_params, ext_args: ext_ext_args, @@ -10934,20 +10934,20 @@ function extension_constructor(s, ext) { function rename_bound_idents(_s, _idents, _param) { while(true) { - var param = _param; - var idents = _idents; - var s = _s; + let param = _param; + let idents = _idents; + let s = _s; if (!param) { return [ Stdlib__List.rev(idents), s ]; } - var match = param.hd; + let match = param.hd; switch (match.TAG | 0) { case /* Sig_type */1 : - var id = match._0; - var id$p = rename(id); + let id = match._0; + let id$p = rename(id); _param = param.tl; _idents = { hd: id$p, @@ -10959,8 +10959,8 @@ function rename_bound_idents(_s, _idents, _param) { }, s); continue ; case /* Sig_module */3 : - var id$1 = match._0; - var id$p$1 = rename(id$1); + let id$1 = match._0; + let id$p$1 = rename(id$1); _param = param.tl; _idents = { hd: id$p$1, @@ -10972,8 +10972,8 @@ function rename_bound_idents(_s, _idents, _param) { }, s); continue ; case /* Sig_modtype */4 : - var id$2 = match._0; - var id$p$2 = rename(id$2); + let id$2 = match._0; + let id$p$2 = rename(id$2); _param = param.tl; _idents = { hd: id$p$2, @@ -10988,7 +10988,7 @@ function rename_bound_idents(_s, _idents, _param) { }, s); continue ; default: - var id$p$3 = rename(match._0); + let id$p$3 = rename(match._0); _param = param.tl; _idents = { hd: id$p$3, @@ -11002,14 +11002,14 @@ function rename_bound_idents(_s, _idents, _param) { function modtype(s, mty) { switch (mty.TAG | 0) { case /* Mty_ident */0 : - var p = mty._0; + let p = mty._0; switch (p.TAG | 0) { case /* Pident */0 : try { return find$2(p._0, s.modtypes); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return mty; } @@ -11035,8 +11035,8 @@ function modtype(s, mty) { _0: signature$2(s, mty._0) }; case /* Mty_functor */2 : - var id = mty._0; - var id$p = rename(id); + let id = mty._0; + let id$p = rename(id); return { TAG: /* Mty_functor */2, _0: id$p, @@ -11058,8 +11058,8 @@ function modtype(s, mty) { } function signature$2(s, sg) { - var match = rename_bound_idents(s, /* [] */0, sg); - var s$p = match[1]; + let match = rename_bound_idents(s, /* [] */0, sg); + let s$p = match[1]; return Stdlib__List.map2((function (param, param$1) { switch (param.TAG | 0) { case /* Sig_value */0 : @@ -11132,7 +11132,7 @@ function modtype_declaration(s, decl) { }; } -var add_delayed_check_forward = { +let add_delayed_check_forward = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11145,9 +11145,9 @@ var add_delayed_check_forward = { }) }; -var value_declarations = Stdlib__Hashtbl.create(undefined, 16); +let value_declarations = Stdlib__Hashtbl.create(undefined, 16); -var type_declarations = Stdlib__Hashtbl.create(undefined, 16); +let type_declarations = Stdlib__Hashtbl.create(undefined, 16); function add_constructor_usage(cu, param) { switch (param) { @@ -11164,14 +11164,14 @@ function add_constructor_usage(cu, param) { } } -var used_constructors = Stdlib__Hashtbl.create(undefined, 16); +let used_constructors = Stdlib__Hashtbl.create(undefined, 16); -var prefixed_sg = Stdlib__Hashtbl.create(undefined, 113); +let prefixed_sg = Stdlib__Hashtbl.create(undefined, 113); -var $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Env.Error"); +let $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Env.Error"); function force(f, x) { - var x$1 = x.contents; + let x$1 = x.contents; switch (x$1.TAG | 0) { case /* Done */0 : return x$1._0; @@ -11179,7 +11179,7 @@ function force(f, x) { throw new Caml_js_exceptions.MelangeError(x$1._0.MEL_EXN_ID, x$1._0); case /* Thunk */2 : try { - var y = Curry._1(f, x$1._0); + let y = Curry._1(f, x$1._0); x.contents = { TAG: /* Done */0, _0: y @@ -11187,7 +11187,7 @@ function force(f, x) { return y; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); x.contents = { TAG: /* Raise */1, _0: e @@ -11199,7 +11199,7 @@ function force(f, x) { } function get_arg(x) { - var a = x.contents; + let a = x.contents; switch (a.TAG | 0) { case /* Done */0 : case /* Raise */1 : @@ -11220,7 +11220,7 @@ function already_defined(s, tbl) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -11229,8 +11229,8 @@ function already_defined(s, tbl) { } function add$6(kind, slot, id, x, tbl, ref_tbl) { - var slot$1 = slot !== undefined ? (function (param) { - var s = id.name; + let slot$1 = slot !== undefined ? (function (param) { + let s = id.name; Curry._3(slot, kind, s, already_defined(s, ref_tbl)); }) : nothing; return add(id, [ @@ -11240,32 +11240,32 @@ function add$6(kind, slot, id, x, tbl, ref_tbl) { } function find_same$1(id, tbl) { - var match = find_same(id, tbl); + let match = find_same(id, tbl); Curry._1(match[1], undefined); return match[0]; } function find_name$1(s, tbl) { - var match = find_name(s, tbl); + let match = find_name(s, tbl); Curry._1(match[1], undefined); return match[0]; } function fold_name(f) { return function (param, param$1) { - var f$1 = function (k, param) { + let f$1 = function (k, param) { return Curry._2(f, k, param[0]); }; - var f$2 = function (k) { + let f$2 = function (k) { return Curry._2(f$1, k.ident, k.data); }; - var _stack = /* [] */0; - var _accu = param$1; - var _param = param; + let _stack = /* [] */0; + let _accu = param$1; + let _param = param; while(true) { - var param$2 = _param; - var accu = _accu; - var stack = _stack; + let param$2 = _param; + let accu = _accu; + let stack = _stack; if (param$2) { _param = param$2._2; _accu = Curry._2(f$2, param$2._1, accu); @@ -11289,7 +11289,7 @@ function subst_modtype_maker(param) { return modtype(param[0], param[1]); } -var empty = { +let empty = { values: /* Empty */0, constrs: /* Empty */0, labels: /* Empty */0, @@ -11352,7 +11352,7 @@ function is_implicit_coercion(env) { return (env.flags & 2) !== 0; } -var components_of_module$p = { +let components_of_module$p = { contents: (function (env, sub, path, mty) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11365,7 +11365,7 @@ var components_of_module$p = { }) }; -var components_of_module_maker$p = { +let components_of_module_maker$p = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11378,7 +11378,7 @@ var components_of_module_maker$p = { }) }; -var components_of_functor_appl$p = { +let components_of_functor_appl$p = { contents: (function (f, p1, p2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11391,7 +11391,7 @@ var components_of_functor_appl$p = { }) }; -var check_modtype_inclusion = { +let check_modtype_inclusion = { contents: (function (env, mty1, path1, mty2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11404,7 +11404,7 @@ var check_modtype_inclusion = { }) }; -var strengthen = { +let strengthen = { contents: (function (env, mty, path) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -11417,15 +11417,15 @@ var strengthen = { }) }; -var current_unit = { +let current_unit = { contents: "" }; -var persistent_structures = Stdlib__Hashtbl.create(undefined, 17); +let persistent_structures = Stdlib__Hashtbl.create(undefined, 17); -var crc_units = Stdlib__Hashtbl.create(undefined, 13); +let crc_units = Stdlib__Hashtbl.create(undefined, 13); -var funarg$2 = { +let funarg$2 = { compare: Stdlib__String.compare }; @@ -11438,8 +11438,8 @@ function height$5(param) { } function create$6(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -11449,13 +11449,13 @@ function create$6(l, v, r) { } function bal$5(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$5(ll) >= height$5(lr)) { return create$6(ll, lv, create$6(lr, v, r)); } @@ -11481,9 +11481,9 @@ function bal$5(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$5(rr) >= height$5(rl)) { return create$6(create$6(l, v, rl), rv, rr); } @@ -11510,22 +11510,22 @@ function add$7(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$7(x, l); + let ll = add$7(x, l); if (l === ll) { return t; } else { return bal$5(ll, v, r); } } - var rr = add$7(x, r); + let rr = add$7(x, r); if (r === rr) { return t; } else { @@ -11535,8 +11535,8 @@ function add$7(x, t) { function fold$5(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -11548,8 +11548,8 @@ function fold$5(f, _s, _accu) { function elements_aux$2(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -11566,7 +11566,7 @@ function elements$2(s) { return elements_aux$2(/* [] */0, s); } -var imported_units = { +let imported_units = { contents: /* Empty */0 }; @@ -11580,15 +11580,15 @@ function check_consistency(ps) { } try { Stdlib__List.iter((function (param) { - var crco = param[1]; + let crco = param[1]; if (crco === undefined) { return ; } - var name = param[0]; + let name = param[0]; add_import(name); - var source = ps.ps_filename; + let source = ps.ps_filename; try { - var match = Stdlib__Hashtbl.find(crc_units, name); + let match = Stdlib__Hashtbl.find(crc_units, name); if (!Caml_obj.caml_notequal(crco, match[0])) { return ; } @@ -11600,7 +11600,7 @@ function check_consistency(ps) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__Hashtbl.add(crc_units, name, [ crco, @@ -11614,7 +11614,7 @@ function check_consistency(ps) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Inconsistency) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -11631,19 +11631,19 @@ function check_consistency(ps) { } function save_pers_struct(crc, ps) { - var modname = ps.ps_name; + let modname = ps.ps_name; Stdlib__Hashtbl.add(persistent_structures, modname, ps); set$1(crc_units, modname, crc, ps.ps_filename); add_import(modname); } function read_pers_struct(modname, filename) { - var cmi = read_cmi(filename); - var name = cmi.cmi_name; - var sign = cmi.cmi_sign; - var crcs = cmi.cmi_crcs; - var flags = cmi.cmi_flags; - var comps = Curry._4(components_of_module$p.contents, empty, identity, { + let cmi = read_cmi(filename); + let name = cmi.cmi_name; + let sign = cmi.cmi_sign; + let crcs = cmi.cmi_crcs; + let flags = cmi.cmi_flags; + let comps = Curry._4(components_of_module$p.contents, empty, identity, { TAG: /* Pident */0, _0: { stamp: 0, @@ -11654,7 +11654,7 @@ function read_pers_struct(modname, filename) { TAG: /* Mty_signature */1, _0: sign }); - var ps = { + let ps = { ps_name: name, ps_sig: sign, ps_comps: comps, @@ -11693,27 +11693,27 @@ function read_pers_struct(modname, filename) { } function find_pers_struct(checkOpt, name) { - var check = checkOpt !== undefined ? checkOpt : true; + let check = checkOpt !== undefined ? checkOpt : true; if (name === "*predef*") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var r; + let r; try { r = Caml_option.some(Stdlib__Hashtbl.find(persistent_structures, name)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { r = undefined; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var ps; + let ps; if (r !== undefined) { - var sg = Caml_option.valFromOption(r); + let sg = Caml_option.valFromOption(r); if (sg !== undefined) { ps = sg; } else { @@ -11723,12 +11723,12 @@ function find_pers_struct(checkOpt, name) { } } else { add_import(name); - var filename; + let filename; try { filename = find_in_path_uncap(load_path.contents, name + ".cmi"); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { Stdlib__Hashtbl.add(persistent_structures, name, undefined); throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -11748,12 +11748,12 @@ function find_pers_struct(checkOpt, name) { function find_module_descr(path, env) { switch (path.TAG | 0) { case /* Pident */0 : - var id = path._0; + let id = path._0; try { return find_same$1(id, env.components)[1]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (id.stamp === 0 && id.name !== current_unit.contents) { return find_pers_struct(undefined, id.name).ps_comps; @@ -11765,7 +11765,7 @@ function find_module_descr(path, env) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } case /* Pdot */1 : - var c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); + let c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); if (c.TAG === /* Structure_comps */0) { return find$2(path._1, c._0.comp_components)[0]; } @@ -11773,8 +11773,8 @@ function find_module_descr(path, env) { MEL_EXN_ID: Stdlib.Not_found }); case /* Papply */2 : - var p1 = path._0; - var f = force(components_of_module_maker$p.contents, find_module_descr(p1, env)); + let p1 = path._0; + let f = force(components_of_module_maker$p.contents, find_module_descr(p1, env)); if (f.TAG !== /* Structure_comps */0) { return Curry._3(components_of_functor_appl$p.contents, f._0, p1, path._1); } @@ -11790,7 +11790,7 @@ function find$3(proj1, proj2, path, env) { case /* Pident */0 : return find_same$1(path._0, Curry._1(proj1, env))[1]; case /* Pdot */1 : - var c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); + let c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); if (c.TAG === /* Structure_comps */0) { return find$2(path._1, Curry._1(proj2, c._0))[0]; } @@ -11840,15 +11840,15 @@ function find_class(param, param$1) { function find_module(alias, path, env) { switch (path.TAG | 0) { case /* Pident */0 : - var id = path._0; + let id = path._0; try { return find_same$1(id, env.modules)[1]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (id.stamp === 0 && id.name !== current_unit.contents) { - var ps = find_pers_struct(undefined, id.name); + let ps = find_pers_struct(undefined, id.name); return { md_type: { TAG: /* Mty_signature */1, @@ -11865,10 +11865,10 @@ function find_module(alias, path, env) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } case /* Pdot */1 : - var c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); + let c = force(components_of_module_maker$p.contents, find_module_descr(path._0, env)); if (c.TAG === /* Structure_comps */0) { - var match = find$2(path._1, c._0.comp_modules); - var md_type = force(subst_modtype_maker, match[0]); + let match = find$2(path._1, c._0.comp_modules); + let md_type = force(subst_modtype_maker, match[0]); return { md_type: md_type, md_attributes: /* [] */0, @@ -11879,17 +11879,17 @@ function find_module(alias, path, env) { MEL_EXN_ID: Stdlib.Not_found }); case /* Papply */2 : - var p2 = path._1; - var desc1 = find_module_descr(path._0, env); - var f = force(components_of_module_maker$p.contents, desc1); + let p2 = path._1; + let desc1 = find_module_descr(path._0, env); + let f = force(components_of_module_maker$p.contents, desc1); if (f.TAG === /* Structure_comps */0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var f$1 = f._0; - var p = f$1.fcomp_res; - var md_type$1; + let f$1 = f._0; + let p = f$1.fcomp_res; + let md_type$1; if (p.TAG === /* Mty_alias */3) { md_type$1 = { TAG: /* Mty_alias */3, @@ -11902,9 +11902,9 @@ function find_module(alias, path, env) { md_type$1 = Stdlib__Hashtbl.find(f$1.fcomp_subst_cache, p2); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { - var mty = modtype(add_module(f$1.fcomp_param, p2, f$1.fcomp_subst), f$1.fcomp_res); + let mty = modtype(add_module(f$1.fcomp_param, p2, f$1.fcomp_subst), f$1.fcomp_res); Stdlib__Hashtbl.add(f$1.fcomp_subst_cache, p2, mty); md_type$1 = mty; } else { @@ -11921,7 +11921,7 @@ function find_module(alias, path, env) { } } -var required_globals = { +let required_globals = { contents: /* [] */0 }; @@ -11939,7 +11939,7 @@ function add_required_global(id) { } function normalize_path(lax, env, path) { - var path$1; + let path$1; switch (path.TAG | 0) { case /* Pident */0 : path$1 = path; @@ -11962,27 +11962,27 @@ function normalize_path(lax, env, path) { } try { - var match = find_module(true, path$1, env); - var path1 = match.md_type; + let match = find_module(true, path$1, env); + let path1 = match.md_type; if (path1.TAG !== /* Mty_alias */3) { return path$1; } - var path$p = normalize_path(lax, env, path1._0); + let path$p = normalize_path(lax, env, path1._0); if (lax || transparent_modules.contents) { return path$p; } - var id = head(path$1); + let id = head(path$1); if ($$global(id) && !Caml_obj.caml_equal(id, head(path$p))) { add_required_global(id); } return path$p; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var tmp = true; + let tmp = true; if (!lax) { - var tmp$1; + let tmp$1; switch (path$1.TAG | 0) { case /* Pident */0 : tmp$1 = path$1._0.stamp !== 0; @@ -12010,7 +12010,7 @@ function normalize_path$1(oloc, env, path) { return normalize_path(oloc === undefined, env, path); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (oloc !== undefined) { throw new Caml_js_exceptions.MelangeError($$Error$2, { @@ -12037,8 +12037,8 @@ function normalize_path$1(oloc, env, path) { } function find_type_expansion(path, env) { - var decl = find_type_full(path, env)[0]; - var body = decl.type_manifest; + let decl = find_type_full(path, env)[0]; + let body = decl.type_manifest; if (body !== undefined && (decl.type_private === /* Public */1 || Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0) || has_constr_row(body))) { return [ decl.type_params, @@ -12048,7 +12048,7 @@ function find_type_expansion(path, env) { }), decl.type_newtype_level) ]; } - var path$p = normalize_path$1(undefined, env, path); + let path$p = normalize_path$1(undefined, env, path); if (same(path, path$p)) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -12071,8 +12071,8 @@ function find_type_expansion(path, env) { } function find_type_expansion_opt(path, env) { - var decl = find_type_full(path, env)[0]; - var body = decl.type_manifest; + let decl = find_type_full(path, env)[0]; + let body = decl.type_manifest; if (body !== undefined) { return [ decl.type_params, @@ -12082,7 +12082,7 @@ function find_type_expansion_opt(path, env) { }), decl.type_newtype_level) ]; } - var path$p = normalize_path$1(undefined, env, path); + let path$p = normalize_path$1(undefined, env, path); if (same(path, path$p)) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -12105,7 +12105,7 @@ function find_type_expansion_opt(path, env) { } function find_modtype_expansion(path, env) { - var mty = find_modtype(path, env).mtd_type; + let mty = find_modtype(path, env).mtd_type; if (mty !== undefined) { return mty; } @@ -12116,7 +12116,7 @@ function find_modtype_expansion(path, env) { function is_functor_arg(_path, env) { while(true) { - var path = _path; + let path = _path; switch (path.TAG | 0) { case /* Pident */0 : try { @@ -12124,7 +12124,7 @@ function is_functor_arg(_path, env) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -12140,24 +12140,24 @@ function is_functor_arg(_path, env) { }; } -var Recmodule = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Env.Recmodule"); +let Recmodule = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Env.Recmodule"); function lookup_module_descr(lid, env) { switch (lid.TAG | 0) { case /* Lident */0 : - var s = lid._0; + let s = lid._0; try { return find_name$1(s, env.components); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (s === current_unit.contents) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var ps = find_pers_struct(undefined, s); + let ps = find_pers_struct(undefined, s); return [ { TAG: /* Pident */0, @@ -12173,11 +12173,11 @@ function lookup_module_descr(lid, env) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } case /* Ldot */1 : - var s$1 = lid._1; - var match = lookup_module_descr(lid._0, env); - var c = force(components_of_module_maker$p.contents, match[1]); + let s$1 = lid._1; + let match = lookup_module_descr(lid._0, env); + let c = force(components_of_module_maker$p.contents, match[1]); if (c.TAG === /* Structure_comps */0) { - var match$1 = find$2(s$1, c._0.comp_components); + let match$1 = find$2(s$1, c._0.comp_components); return [ { TAG: /* Pdot */1, @@ -12192,17 +12192,17 @@ function lookup_module_descr(lid, env) { MEL_EXN_ID: Stdlib.Not_found }); case /* Lapply */2 : - var match$2 = lookup_module_descr(lid._0, env); - var p1 = match$2[0]; - var p2 = lookup_module(true, lid._1, env); - var match$3 = find_module(false, p2, env); - var f = force(components_of_module_maker$p.contents, match$2[1]); + let match$2 = lookup_module_descr(lid._0, env); + let p1 = match$2[0]; + let p2 = lookup_module(true, lid._1, env); + let match$3 = find_module(false, p2, env); + let f = force(components_of_module_maker$p.contents, match$2[1]); if (f.TAG === /* Structure_comps */0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var f$1 = f._0; + let f$1 = f._0; may(Curry._3(check_modtype_inclusion.contents, env, match$3.md_type, p2), f$1.fcomp_arg); return [ { @@ -12219,12 +12219,12 @@ function lookup_module_descr(lid, env) { function lookup_module(load, lid, env) { switch (lid.TAG | 0) { case /* Lident */0 : - var s = lid._0; + let s = lid._0; try { - var r = find_name$1(s, env.modules); - var md_type = r[1].md_type; + let r = find_name$1(s, env.modules); + let md_type = r[1].md_type; if (md_type.TAG === /* Mty_ident */0) { - var id = md_type._0; + let id = md_type._0; switch (id.TAG | 0) { case /* Pident */0 : if (id._0.name === "#recmod#") { @@ -12242,7 +12242,7 @@ function lookup_module(load, lid, env) { return r[0]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (s === current_unit.contents) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -12254,7 +12254,7 @@ function lookup_module(load, lid, env) { find_pers_struct(false, s); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { prerr_warning(none, { TAG: /* No_cmi_file */32, @@ -12279,11 +12279,11 @@ function lookup_module(load, lid, env) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } case /* Ldot */1 : - var s$1 = lid._1; - var match = lookup_module_descr(lid._0, env); - var c = force(components_of_module_maker$p.contents, match[1]); + let s$1 = lid._1; + let match = lookup_module_descr(lid._0, env); + let c = force(components_of_module_maker$p.contents, match[1]); if (c.TAG === /* Structure_comps */0) { - var match$1 = find$2(s$1, c._0.comp_modules); + let match$1 = find$2(s$1, c._0.comp_modules); return { TAG: /* Pdot */1, _0: match[0], @@ -12295,16 +12295,16 @@ function lookup_module(load, lid, env) { MEL_EXN_ID: Stdlib.Not_found }); case /* Lapply */2 : - var match$2 = lookup_module_descr(lid._0, env); - var p2 = lookup_module(true, lid._1, env); - var match$3 = find_module(false, p2, env); - var p_0 = match$2[0]; - var p = { + let match$2 = lookup_module_descr(lid._0, env); + let p2 = lookup_module(true, lid._1, env); + let match$3 = find_module(false, p2, env); + let p_0 = match$2[0]; + let p = { TAG: /* Papply */2, _0: p_0, _1: p2 }; - var f = force(components_of_module_maker$p.contents, match$2[1]); + let f = force(components_of_module_maker$p.contents, match$2[1]); if (f.TAG === /* Structure_comps */0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -12321,11 +12321,11 @@ function lookup(proj1, proj2, lid, env) { case /* Lident */0 : return find_name$1(lid._0, Curry._1(proj1, env)); case /* Ldot */1 : - var s = lid._1; - var match = lookup_module_descr(lid._0, env); - var c = force(components_of_module_maker$p.contents, match[1]); + let s = lid._1; + let match = lookup_module_descr(lid._0, env); + let c = force(components_of_module_maker$p.contents, match[1]); if (c.TAG === /* Structure_comps */0) { - var match$1 = find$2(s, Curry._1(proj2, c._0)); + let match$1 = find$2(s, Curry._1(proj2, c._0)); return [ { TAG: /* Pdot */1, @@ -12350,13 +12350,13 @@ function lookup(proj1, proj2, lid, env) { function lookup_all_simple(proj1, proj2, shadow, lid, env) { switch (lid.TAG | 0) { case /* Lident */0 : - var xl = find_all(lid._0, Curry._1(proj1, env)); - var do_shadow = function (param) { + let xl = find_all(lid._0, Curry._1(proj1, env)); + let do_shadow = function (param) { if (!param) { return /* [] */0; } - var match = param.hd; - var x = match[0]; + let match = param.hd; + let x = match[0]; return { hd: [ x, @@ -12369,15 +12369,15 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { }; return do_shadow(xl); case /* Ldot */1 : - var match = lookup_module_descr(lid._0, env); - var c = force(components_of_module_maker$p.contents, match[1]); + let match = lookup_module_descr(lid._0, env); + let c = force(components_of_module_maker$p.contents, match[1]); if (c.TAG === /* Structure_comps */0) { - var comps; + let comps; try { comps = find$2(lid._1, Curry._1(proj2, c._0)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { comps = /* [] */0; } else { @@ -12405,8 +12405,8 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { } function cstr_shadow(cstr1, cstr2) { - var match = cstr1.cstr_tag; - var match$1 = cstr2.cstr_tag; + let match = cstr1.cstr_tag; + let match$1 = cstr2.cstr_tag; switch (match.TAG | 0) { case /* Cstr_constant */0 : case /* Cstr_block */1 : @@ -12495,7 +12495,7 @@ function mark_value_used(env, name, vd) { ]), undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12514,7 +12514,7 @@ function mark_type_used(env, name, vd) { ]), undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12534,7 +12534,7 @@ function mark_constructor_used(usage, env, name, vd, constr) { ]), usage); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12546,7 +12546,7 @@ function mark_extension_used(usage, env, ext, name) { if (is_implicit_coercion(env)) { return ; } - var ty_name = last(ext.ext_type_path); + let ty_name = last(ext.ext_type_path); try { return Curry._1(Stdlib__Hashtbl.find(used_constructors, [ ty_name, @@ -12555,7 +12555,7 @@ function mark_extension_used(usage, env, ext, name) { ]), usage); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12564,20 +12564,20 @@ function mark_extension_used(usage, env, ext, name) { } function set_type_used_callback(name, td, callback) { - var loc = td.type_loc; + let loc = td.type_loc; if (loc.loc_ghost) { return ; } - var key = [ + let key = [ name, loc ]; - var old; + let old; try { old = Stdlib__Hashtbl.find(type_declarations, key); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -12596,14 +12596,14 @@ function set_type_used_callback(name, td, callback) { } function lookup_value$1(lid, env) { - var r = lookup_value(lid, env); + let r = lookup_value(lid, env); mark_value_used(env, last$1(lid), r[1]); return r; } function lookup_type$1(lid, env) { - var match = lookup_type(lid, env); - var decl = match[1][0]; + let match = lookup_type(lid, env); + let decl = match[1][0]; mark_type_used(env, last$1(lid), decl); return [ match[0], @@ -12613,11 +12613,11 @@ function lookup_type$1(lid, env) { function mark_type_path(env, path) { try { - var decl = find_type_full(path, env)[0]; + let decl = find_type_full(path, env)[0]; return mark_type_used(env, last(path), decl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12626,8 +12626,8 @@ function mark_type_path(env, path) { } function ty_path(t) { - var match = repr(t); - var match$1 = match.desc; + let match = repr(t); + let match$1 = match.desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -12652,10 +12652,10 @@ function ty_path(t) { } function lookup_constructor(lid, env) { - var match = lookup_all_constructors(lid, env); + let match = lookup_all_constructors(lid, env); if (match) { - var match$1 = match.hd; - var desc = match$1[0]; + let match$1 = match.hd; + let desc = match$1[0]; mark_type_path(env, ty_path(desc.cstr_res)); Curry._1(match$1[1], undefined); return desc; @@ -12678,10 +12678,10 @@ function is_lident(param) { function lookup_all_constructors$1(lid, env) { try { - var cstrs = lookup_all_constructors(lid, env); + let cstrs = lookup_all_constructors(lid, env); return Stdlib__List.map((function (param) { - var use = param[1]; - var cstr = param[0]; + let use = param[1]; + let cstr = param[0]; return [ cstr, (function (param) { @@ -12692,7 +12692,7 @@ function lookup_all_constructors$1(lid, env) { }), cstrs); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (is_lident(lid)) { return /* [] */0; @@ -12707,14 +12707,14 @@ function mark_constructor(usage, env, name, desc) { if (is_implicit_coercion(env)) { return ; } - var match = desc.cstr_tag; + let match = desc.cstr_tag; switch (match.TAG | 0) { case /* Cstr_constant */0 : case /* Cstr_block */1 : break; case /* Cstr_extension */2 : - var ty_path$1 = ty_path(desc.cstr_res); - var ty_name = last(ty_path$1); + let ty_path$1 = ty_path(desc.cstr_res); + let ty_name = last(ty_path$1); try { return Curry._1(Stdlib__Hashtbl.find(used_constructors, [ ty_name, @@ -12723,7 +12723,7 @@ function mark_constructor(usage, env, name, desc) { ]), usage); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -12731,13 +12731,13 @@ function mark_constructor(usage, env, name, desc) { } } - var ty_path$2 = ty_path(desc.cstr_res); - var ty_decl; + let ty_path$2 = ty_path(desc.cstr_res); + let ty_decl; try { ty_decl = find_type_full(ty_path$2, env)[0]; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -12750,16 +12750,16 @@ function mark_constructor(usage, env, name, desc) { } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var ty_name$1 = last(ty_path$2); + let ty_name$1 = last(ty_path$2); mark_constructor_used(usage, env, ty_name$1, ty_decl, name); } function lookup_all_labels$1(lid, env) { try { - var lbls = lookup_all_labels(lid, env); + let lbls = lookup_all_labels(lid, env); return Stdlib__List.map((function (param) { - var use = param[1]; - var lbl = param[0]; + let use = param[1]; + let lbl = param[0]; return [ lbl, (function (param) { @@ -12770,7 +12770,7 @@ function lookup_all_labels$1(lid, env) { }), lbls); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (is_lident(lid)) { return /* [] */0; @@ -12782,8 +12782,8 @@ function lookup_all_labels$1(lid, env) { } function lookup_class$1(lid, env) { - var r = lookup_class(lid, env); - var desc = r[1]; + let r = lookup_class(lid, env); + let desc = r[1]; if (name(undefined, desc.cty_path) === "") { lookup_type$1(lid, env); } else { @@ -12793,8 +12793,8 @@ function lookup_class$1(lid, env) { } function lookup_cltype$1(lid, env) { - var r = lookup_cltype(lid, env); - var desc = r[1]; + let r = lookup_cltype(lid, env); + let desc = r[1]; if (name(undefined, desc.clty_path) === "") { lookup_type$1(lid, env); } else { @@ -12804,17 +12804,17 @@ function lookup_cltype$1(lid, env) { return r; } -var iter_env_cont = { +let iter_env_cont = { contents: /* [] */0 }; function scrape_alias_safe(env, _mty) { while(true) { - var mty = _mty; + let mty = _mty; if (mty.TAG !== /* Mty_alias */3) { return true; } - var id = mty._0; + let id = mty._0; switch (id.TAG | 0) { case /* Pident */0 : if (id._0.stamp === 0) { @@ -12836,17 +12836,17 @@ function run_iter_cont(l) { Stdlib__List.iter((function (c) { Curry._1(c, undefined); }), l); - var cont = Stdlib__List.rev(iter_env_cont.contents); + let cont = Stdlib__List.rev(iter_env_cont.contents); iter_env_cont.contents = /* [] */0; return cont; } function iter_types(f) { return function (param, param$1) { - var proj1 = function (env) { + let proj1 = function (env) { return env.types; }; - var proj2 = function (sc) { + let proj2 = function (sc) { return sc.comp_types; }; iter((function (id, param) { @@ -12855,16 +12855,16 @@ function iter_types(f) { _0: id }, param[0]); }), Curry._1(proj1, param)); - var iter_components = function (path, path$p, mcomps) { - var cont = function (param) { - var match = get_arg(mcomps); - var safe; + let iter_components = function (path, path$p, mcomps) { + let cont = function (param) { + let match = get_arg(mcomps); + let safe; if (match !== undefined) { try { safe = scrape_alias_safe(match[0], match[3]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { safe = false; } else { @@ -12877,13 +12877,13 @@ function iter_types(f) { if (!safe) { return ; } - var comps = force(components_of_module_maker$p.contents, mcomps); + let comps = force(components_of_module_maker$p.contents, mcomps); if (comps.TAG !== /* Structure_comps */0) { return ; } - var comps$1 = comps._0; + let comps$1 = comps._0; iter$2((function (s, param) { - var n = param[1]; + let n = param[1]; Curry._2(f, { TAG: /* Pdot */1, _0: path, @@ -12900,7 +12900,7 @@ function iter_types(f) { ]); }), Curry._1(proj2, comps$1)); iter$2((function (s, param) { - var n = param[1]; + let n = param[1]; iter_components({ TAG: /* Pdot */1, _0: path, @@ -12926,7 +12926,7 @@ function iter_types(f) { if (pso === undefined) { return ; } - var id = { + let id = { TAG: /* Pident */0, _0: { stamp: 0, @@ -12937,7 +12937,7 @@ function iter_types(f) { iter_components(id, id, pso.ps_comps); }), persistent_structures); return iter((function (id, param) { - var match = param[0]; + let match = param[0]; iter_components({ TAG: /* Pident */0, _0: id @@ -12955,7 +12955,7 @@ function same_types(env1, env2) { } function used_persistent(param) { - var r = { + let r = { contents: /* Empty */0 }; Stdlib__Hashtbl.iter((function (s, pso) { @@ -12969,12 +12969,12 @@ function used_persistent(param) { } function find_all_comps(proj, s, param) { - var comps = force(components_of_module_maker$p.contents, param[1]); + let comps = force(components_of_module_maker$p.contents, param[1]); if (comps.TAG !== /* Structure_comps */0) { return /* [] */0; } try { - var match = find$2(s, Curry._1(proj, comps._0)); + let match = find$2(s, Curry._1(proj, comps._0)); return { hd: [ { @@ -12989,7 +12989,7 @@ function find_all_comps(proj, s, param) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -13004,8 +13004,8 @@ function find_shadowed_comps(path, env) { return prim[0]; }), find_all(path._0.name, env.components)); case /* Pdot */1 : - var s = path._1; - var l = find_shadowed_comps(path._0, env); + let s = path._1; + let l = find_shadowed_comps(path._0, env); return Stdlib__List.flatten(Stdlib__List.map((function (param) { return find_all_comps((function (comps) { return comps.comp_components; @@ -13024,8 +13024,8 @@ function find_shadowed(proj1, proj2, path, env) { return prim[0]; }), find_all(path._0.name, Curry._1(proj1, env))); case /* Pdot */1 : - var s = path._1; - var l = find_shadowed_comps(path._0, env); + let s = path._1; + let l = find_shadowed_comps(path._0, env); return Stdlib__List.flatten(Stdlib__List.map((function (param) { return find_all_comps(proj2, s, param); }), l)); @@ -13036,7 +13036,7 @@ function find_shadowed(proj1, proj2, path, env) { } function find_shadowed_types(path, env) { - var l = find_shadowed((function (env) { + let l = find_shadowed((function (env) { return env.types; }), (function (comps) { return comps.comp_types; @@ -13074,7 +13074,7 @@ function add_gadt_instance_level(lv, env) { } function is_Tlink(param) { - var match = param.desc; + let match = param.desc; if (typeof match === "number" || match.TAG !== /* Tlink */6) { return false; } else { @@ -13083,14 +13083,14 @@ function is_Tlink(param) { } function gadt_instance_level(env, t) { - var _param = env.gadt_instances; + let _param = env.gadt_instances; while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var match = param.hd; - var r = match[1]; + let match = param.hd; + let r = match[1]; if (Curry._2(exists$1, is_Tlink, r.contents)) { r.contents = Curry._3(fold$2, (function (ty) { return Curry._1(add$3, repr(ty)); @@ -13105,12 +13105,12 @@ function gadt_instance_level(env, t) { } function add_gadt_instances(env, lv, tl) { - var r; + let r; try { r = Stdlib__List.assoc(lv, env.gadt_instances); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -13127,12 +13127,12 @@ function add_gadt_instances(env, lv, tl) { } function add_gadt_instance_chain(env, lv, t) { - var r; + let r; try { r = Stdlib__List.assoc(lv, env.gadt_instances); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -13145,13 +13145,13 @@ function add_gadt_instance_chain(env, lv, t) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var add_instance = function (t) { - var t$1 = repr(t); + let add_instance = function (t) { + let t$1 = repr(t); if (Curry._2(mem$3, t$1, r.contents)) { return ; } set_typeset(r, Curry._2(add$3, t$1, r.contents)); - var match = t$1.desc; + let match = t$1.desc; if (typeof match === "number" || match.TAG !== /* Tconstr */3) { return ; } else { @@ -13168,7 +13168,7 @@ function scrape_alias(env, path, mty) { return scrape_alias(env, path, find_modtype_expansion(mty._0, env)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return mty; } @@ -13178,12 +13178,12 @@ function scrape_alias(env, path, mty) { case /* Mty_functor */2 : break; case /* Mty_alias */3 : - var path$1 = mty._0; + let path$1 = mty._0; try { return scrape_alias(env, path$1, find_module(false, path$1, env).md_type); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return mty; } @@ -13199,12 +13199,12 @@ function scrape_alias(env, path, mty) { } function constructors_of_type(ty_path, decl) { - var cstrs = decl.type_kind; + let cstrs = decl.type_kind; if (typeof cstrs === "number" || cstrs.TAG !== /* Type_variant */1) { return /* [] */0; } else { - var cstrs$1 = cstrs._0; - var ty_res = newty2(100000000, { + let cstrs$1 = cstrs._0; + let ty_res = newty2(100000000, { TAG: /* Tconstr */3, _0: ty_path, _1: decl.type_params, @@ -13212,14 +13212,14 @@ function constructors_of_type(ty_path, decl) { contents: /* Mnil */0 } }); - var priv = decl.type_private; - var num_consts = { + let priv = decl.type_private; + let num_consts = { contents: 0 }; - var num_nonconsts = { + let num_nonconsts = { contents: 0 }; - var num_normal = { + let num_normal = { contents: 0 }; Stdlib__List.iter((function (param) { @@ -13234,17 +13234,17 @@ function constructors_of_type(ty_path, decl) { } }), cstrs$1); - var describe_constructors = function (idx_const, idx_nonconst, param) { + let describe_constructors = function (idx_const, idx_nonconst, param) { if (!param) { return /* [] */0; } - var rem = param.tl; - var match = param.hd; - var cd_res = match.cd_res; - var cd_args = match.cd_args; - var cd_id = match.cd_id; - var ty_res$1 = cd_res !== undefined ? cd_res : ty_res; - var match$1 = cd_args ? [ + let rem = param.tl; + let match = param.hd; + let cd_res = match.cd_res; + let cd_args = match.cd_args; + let cd_id = match.cd_id; + let ty_res$1 = cd_res !== undefined ? cd_res : ty_res; + let match$1 = cd_args ? [ { TAG: /* Cstr_block */1, _0: idx_nonconst @@ -13257,10 +13257,10 @@ function constructors_of_type(ty_path, decl) { }, describe_constructors(idx_const + 1 | 0, idx_nonconst, rem) ]; - var existentials; + let existentials; if (cd_res !== undefined) { - var res_vars = free_vars(cd_res); - var arg_vars = free_vars(newty2(100000000, { + let res_vars = free_vars(cd_res); + let arg_vars = free_vars(newty2(100000000, { TAG: /* Ttuple */2, _0: cd_args })); @@ -13268,16 +13268,16 @@ function constructors_of_type(ty_path, decl) { } else { existentials = /* [] */0; } - var cstr_cstr_name = cd_id.name; - var cstr_cstr_arity = Stdlib__List.length(cd_args); - var cstr_cstr_tag = match$1[0]; - var cstr_cstr_consts = num_consts.contents; - var cstr_cstr_nonconsts = num_nonconsts.contents; - var cstr_cstr_normal = num_normal.contents; - var cstr_cstr_generalized = cd_res !== undefined; - var cstr_cstr_loc = match.cd_loc; - var cstr_cstr_attributes = match.cd_attributes; - var cstr = { + let cstr_cstr_name = cd_id.name; + let cstr_cstr_arity = Stdlib__List.length(cd_args); + let cstr_cstr_tag = match$1[0]; + let cstr_cstr_consts = num_consts.contents; + let cstr_cstr_nonconsts = num_nonconsts.contents; + let cstr_cstr_normal = num_normal.contents; + let cstr_cstr_generalized = cd_res !== undefined; + let cstr_cstr_loc = match.cd_loc; + let cstr_cstr_attributes = match.cd_attributes; + let cstr = { cstr_name: cstr_cstr_name, cstr_res: ty_res$1, cstr_existentials: existentials, @@ -13300,33 +13300,33 @@ function constructors_of_type(ty_path, decl) { tl: match$1[1] }; }; - var result = describe_constructors(0, 0, cstrs$1); - var a_id; - var a_descr; - var b_id; - var b_descr; + let result = describe_constructors(0, 0, cstrs$1); + let a_id; + let a_descr; + let b_id; + let b_descr; if (!result) { return result; } - var match = result.hd; - var a_id$1 = match[0]; + let match = result.hd; + let a_id$1 = match[0]; switch (a_id$1.name) { case "None" : - var a_descr$1 = match[1]; + let a_descr$1 = match[1]; if (a_descr$1.cstr_args) { return result; } - var match$1 = result.tl; + let match$1 = result.tl; if (!match$1) { return result; } - var match$2 = match$1.hd; - var b_id$1 = match$2[0]; + let match$2 = match$1.hd; + let b_id$1 = match$2[0]; if (b_id$1.name !== "Some") { return result; } - var b_descr$1 = match$2[1]; - var match$3 = b_descr$1.cstr_args; + let b_descr$1 = match$2[1]; + let match$3 = b_descr$1.cstr_args; if (!match$3) { return result; } @@ -13342,24 +13342,24 @@ function constructors_of_type(ty_path, decl) { b_descr = b_descr$1; break; case "Some" : - var a_descr$2 = match[1]; - var match$4 = a_descr$2.cstr_args; + let a_descr$2 = match[1]; + let match$4 = a_descr$2.cstr_args; if (!match$4) { return result; } if (match$4.tl) { return result; } - var match$5 = result.tl; + let match$5 = result.tl; if (!match$5) { return result; } - var match$6 = match$5.hd; - var b_id$2 = match$6[0]; + let match$6 = match$5.hd; + let b_id$2 = match$6[0]; if (b_id$2.name !== "None") { return result; } - var b_descr$2 = match$6[1]; + let b_descr$2 = match$6[1]; if (b_descr$2.cstr_args) { return result; } @@ -13425,11 +13425,11 @@ function constructors_of_type(ty_path, decl) { } function labels_of_type(ty_path, decl) { - var match = decl.type_kind; + let match = decl.type_kind; if (typeof match === "number" || match.TAG !== /* Type_record */0) { return /* [] */0; } else { - var ty_res = newty2(100000000, { + let ty_res = newty2(100000000, { TAG: /* Tconstr */3, _0: ty_path, _1: decl.type_params, @@ -13437,21 +13437,21 @@ function labels_of_type(ty_path, decl) { contents: /* Mnil */0 } }); - var lbls = match._0; - var repres = match._1; - var priv = decl.type_private; - var all_labels = Caml_array.make(Stdlib__List.length(lbls), dummy_label); - var describe_labels = function (num, param) { + let lbls = match._0; + let repres = match._1; + let priv = decl.type_private; + let all_labels = Caml_array.make(Stdlib__List.length(lbls), dummy_label); + let describe_labels = function (num, param) { if (!param) { return /* [] */0; } - var l = param.hd; - var lbl_lbl_name = l.ld_id.name; - var lbl_lbl_arg = l.ld_type; - var lbl_lbl_mut = l.ld_mutable; - var lbl_lbl_loc = l.ld_loc; - var lbl_lbl_attributes = l.ld_attributes; - var lbl = { + let l = param.hd; + let lbl_lbl_name = l.ld_id.name; + let lbl_lbl_arg = l.ld_type; + let lbl_lbl_mut = l.ld_mutable; + let lbl_lbl_loc = l.ld_loc; + let lbl_lbl_attributes = l.ld_attributes; + let lbl = { lbl_name: lbl_lbl_name, lbl_res: ty_res, lbl_arg: lbl_lbl_arg, @@ -13483,20 +13483,20 @@ function prefix_idents(root, pos, sub, param) { sub ]; } - var match = param.hd; + let match = param.hd; switch (match.TAG | 0) { case /* Sig_value */0 : - var p_1 = match._0.name; - var p = { + let p_1 = match._0.name; + let p = { TAG: /* Pdot */1, _0: root, _1: p_1, _2: pos }; - var match$1 = match._1.val_kind; - var nextpos; + let match$1 = match._1.val_kind; + let nextpos; nextpos = typeof match$1 === "number" || match$1.TAG !== /* Val_prim */0 ? pos + 1 | 0 : pos; - var match$2 = prefix_idents(root, nextpos, sub, param.tl); + let match$2 = prefix_idents(root, nextpos, sub, param.tl); return [ { hd: p, @@ -13505,15 +13505,15 @@ function prefix_idents(root, pos, sub, param) { match$2[1] ]; case /* Sig_type */1 : - var id = match._0; - var p_1$1 = id.name; - var p$1 = { + let id = match._0; + let p_1$1 = id.name; + let p$1 = { TAG: /* Pdot */1, _0: root, _1: p_1$1, _2: -1 }; - var match$3 = prefix_idents(root, pos, add_type(id, p$1, sub), param.tl); + let match$3 = prefix_idents(root, pos, add_type(id, p$1, sub), param.tl); return [ { hd: p$1, @@ -13522,14 +13522,14 @@ function prefix_idents(root, pos, sub, param) { match$3[1] ]; case /* Sig_typext */2 : - var p_1$2 = match._0.name; - var p$2 = { + let p_1$2 = match._0.name; + let p$2 = { TAG: /* Pdot */1, _0: root, _1: p_1$2, _2: pos }; - var match$4 = prefix_idents(root, pos + 1 | 0, sub, param.tl); + let match$4 = prefix_idents(root, pos + 1 | 0, sub, param.tl); return [ { hd: p$2, @@ -13538,15 +13538,15 @@ function prefix_idents(root, pos, sub, param) { match$4[1] ]; case /* Sig_module */3 : - var id$1 = match._0; - var p_1$3 = id$1.name; - var p$3 = { + let id$1 = match._0; + let p_1$3 = id$1.name; + let p$3 = { TAG: /* Pdot */1, _0: root, _1: p_1$3, _2: pos }; - var match$5 = prefix_idents(root, pos + 1 | 0, add_module(id$1, p$3, sub), param.tl); + let match$5 = prefix_idents(root, pos + 1 | 0, add_module(id$1, p$3, sub), param.tl); return [ { hd: p$3, @@ -13555,15 +13555,15 @@ function prefix_idents(root, pos, sub, param) { match$5[1] ]; case /* Sig_modtype */4 : - var id$2 = match._0; - var p_1$4 = id$2.name; - var p$4 = { + let id$2 = match._0; + let p_1$4 = id$2.name; + let p$4 = { TAG: /* Pdot */1, _0: root, _1: p_1$4, _2: -1 }; - var match$6 = prefix_idents(root, pos, add_modtype(id$2, { + let match$6 = prefix_idents(root, pos, add_modtype(id$2, { TAG: /* Mty_ident */0, _0: p$4 }, sub), param.tl); @@ -13575,14 +13575,14 @@ function prefix_idents(root, pos, sub, param) { match$6[1] ]; case /* Sig_class */5 : - var p_1$5 = match._0.name; - var p$5 = { + let p_1$5 = match._0.name; + let p$5 = { TAG: /* Pdot */1, _0: root, _1: p_1$5, _2: pos }; - var match$7 = prefix_idents(root, pos + 1 | 0, sub, param.tl); + let match$7 = prefix_idents(root, pos + 1 | 0, sub, param.tl); return [ { hd: p$5, @@ -13591,14 +13591,14 @@ function prefix_idents(root, pos, sub, param) { match$7[1] ]; case /* Sig_class_type */6 : - var p_1$6 = match._0.name; - var p$6 = { + let p_1$6 = match._0.name; + let p$6 = { TAG: /* Pdot */1, _0: root, _1: p_1$6, _2: -1 }; - var match$8 = prefix_idents(root, pos, sub, param.tl); + let match$8 = prefix_idents(root, pos, sub, param.tl); return [ { hd: p$6, @@ -13611,8 +13611,8 @@ function prefix_idents(root, pos, sub, param) { } function prefix_idents_and_subst(root, sub, sg) { - var match = prefix_idents(root, 0, sub, sg); - var sub$1 = match[1]; + let match = prefix_idents(root, 0, sub, sg); + let sub$1 = match[1]; return [ match[0], sub$1, @@ -13680,14 +13680,14 @@ function prefix_idents_and_subst$1(root, sub, sg) { if (!Caml_obj.caml_equal(sub, identity)) { return prefix_idents_and_subst(root, sub, sg); } - var sgs; + let sgs; try { sgs = Stdlib__Hashtbl.find(prefixed_sg, root); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var sgs$1 = { + let sgs$1 = { contents: /* [] */0 }; Stdlib__Hashtbl.add(prefixed_sg, root, sgs$1); @@ -13700,9 +13700,9 @@ function prefix_idents_and_subst$1(root, sub, sg) { return Stdlib__List.assq(sg, sgs.contents); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { - var r = prefix_idents_and_subst(root, sub, sg); + let r = prefix_idents_and_subst(root, sub, sg); sgs.contents = { hd: [ sg, @@ -13717,12 +13717,12 @@ function prefix_idents_and_subst$1(root, sub, sg) { } function add_to_tbl(id, decl, tbl) { - var decls; + let decls; try { decls = find$2(id, tbl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { decls = /* [] */0; } else { @@ -13763,7 +13763,7 @@ function check_value_name(name, loc) { if (!(name.length !== 0 && Caml_string.get(name, 0) === /* '#' */35)) { return ; } - for(var i = 1 ,i_finish = name.length; i < i_finish; ++i){ + for(let i = 1 ,i_finish = name.length; i < i_finish; ++i){ if (Caml_string.get(name, i) === /* '#' */35) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -13782,15 +13782,15 @@ function check_usage(loc, id, warn, tbl) { if (!(!loc.loc_ghost && is_active(Curry._1(warn, "")))) { return ; } - var name = id.name; - var key = [ + let name = id.name; + let key = [ name, loc ]; if (Stdlib__Hashtbl.mem(tbl, key)) { return ; } - var used = { + let used = { contents: false }; Stdlib__Hashtbl.add(tbl, key, (function (param) { @@ -13898,13 +13898,13 @@ function store_modtype(slot, id, path, info, env, renv) { } function components_of_module_maker(param) { - var sub = param[1]; - var env = param[0]; - var sg = scrape_alias(env, undefined, param[3]); + let sub = param[1]; + let env = param[0]; + let sg = scrape_alias(env, undefined, param[3]); switch (sg.TAG | 0) { case /* Mty_signature */1 : - var sg$1 = sg._0; - var c = { + let sg$1 = sg._0; + let c = { comp_values: /* Empty */0, comp_constrs: /* Empty */0, comp_labels: /* Empty */0, @@ -13915,24 +13915,24 @@ function components_of_module_maker(param) { comp_classes: /* Empty */0, comp_cltypes: /* Empty */0 }; - var match = prefix_idents_and_subst$1(param[2], sub, sg$1); - var sub$1 = match[1]; - var env$1 = { + let match = prefix_idents_and_subst$1(param[2], sub, sg$1); + let sub$1 = match[1]; + let env$1 = { contents: env }; - var pos = { + let pos = { contents: 0 }; Stdlib__List.iter2((function (item, path) { switch (item.TAG | 0) { case /* Sig_value */0 : - var decl = item._1; - var decl$p = value_description(sub$1, decl); + let decl = item._1; + let decl$p = value_description(sub$1, decl); c.comp_values = add$5(item._0.name, [ decl$p, pos.contents ], c.comp_values); - var match = decl.val_kind; + let match = decl.val_kind; if (typeof match === "number" || match.TAG !== /* Val_prim */0) { pos.contents = pos.contents + 1 | 0; return ; @@ -13940,13 +13940,13 @@ function components_of_module_maker(param) { return ; } case /* Sig_type */1 : - var decl$1 = item._1; - var id = item._0; - var decl$p$1 = type_declaration(sub$1, decl$1); - var constructors = Stdlib__List.map((function (prim) { + let decl$1 = item._1; + let id = item._0; + let decl$p$1 = type_declaration(sub$1, decl$1); + let constructors = Stdlib__List.map((function (prim) { return prim[1]; }), constructors_of_type(path, decl$p$1)); - var labels = Stdlib__List.map((function (prim) { + let labels = Stdlib__List.map((function (prim) { return prim[1]; }), labels_of_type(path, decl$p$1)); c.comp_types = add$5(id.name, [ @@ -13977,8 +13977,8 @@ function components_of_module_maker(param) { }, decl$1, env$1.contents, env$1.contents); return ; case /* Sig_typext */2 : - var ext$p = extension_constructor(sub$1, item._1); - var descr = extension_descr(path, ext$p); + let ext$p = extension_constructor(sub$1, item._1); + let descr = extension_descr(path, ext$p); c.comp_constrs = add_to_tbl(item._0.name, [ descr, pos.contents @@ -13986,10 +13986,10 @@ function components_of_module_maker(param) { pos.contents = pos.contents + 1 | 0; return ; case /* Sig_module */3 : - var md = item._1; - var id$1 = item._0; - var mty = md.md_type; - var mty$p = { + let md = item._1; + let id$1 = item._0; + let mty = md.md_type; + let mty$p = { contents: { TAG: /* Thunk */2, _0: [ @@ -14002,7 +14002,7 @@ function components_of_module_maker(param) { mty$p, pos.contents ], c.comp_modules); - var comps = components_of_module(env$1.contents, sub$1, path, mty); + let comps = components_of_module(env$1.contents, sub$1, path, mty); c.comp_components = add$5(id$1.name, [ comps, pos.contents @@ -14014,9 +14014,9 @@ function components_of_module_maker(param) { pos.contents = pos.contents + 1 | 0; return ; case /* Sig_modtype */4 : - var decl$2 = item._1; - var id$2 = item._0; - var decl$p$2 = modtype_declaration(sub$1, decl$2); + let decl$2 = item._1; + let id$2 = item._0; + let decl$p$2 = modtype_declaration(sub$1, decl$2); c.comp_modtypes = add$5(id$2.name, [ decl$p$2, -1 @@ -14027,7 +14027,7 @@ function components_of_module_maker(param) { }, decl$2, env$1.contents, env$1.contents); return ; case /* Sig_class */5 : - var decl$p$3 = class_declaration(sub$1, item._1); + let decl$p$3 = class_declaration(sub$1, item._1); c.comp_classes = add$5(item._0.name, [ decl$p$3, pos.contents @@ -14035,7 +14035,7 @@ function components_of_module_maker(param) { pos.contents = pos.contents + 1 | 0; return ; case /* Sig_class_type */6 : - var decl$p$4 = cltype_declaration(sub$1, item._1); + let decl$p$4 = cltype_declaration(sub$1, item._1); c.comp_cltypes = add$5(item._0.name, [ decl$p$4, pos.contents @@ -14116,7 +14116,7 @@ function store_value(check, slot, id, path, decl, env, renv) { } function store_type(check, slot, id, path, info, env, renv) { - var loc = info.type_loc; + let loc = info.type_loc; if (check) { check_usage(loc, id, (function (s) { return { @@ -14125,15 +14125,15 @@ function store_type(check, slot, id, path, info, env, renv) { }; }), type_declarations); } - var constructors = constructors_of_type(path, info); - var labels = labels_of_type(path, info); - var descrs_0 = Stdlib__List.map((function (prim) { + let constructors = constructors_of_type(path, info); + let labels = labels_of_type(path, info); + let descrs_0 = Stdlib__List.map((function (prim) { return prim[1]; }), constructors); - var descrs_1 = Stdlib__List.map((function (prim) { + let descrs_1 = Stdlib__List.map((function (prim) { return prim[1]; }), labels); - var descrs = [ + let descrs = [ descrs_0, descrs_1 ]; @@ -14143,10 +14143,10 @@ function store_type(check, slot, id, path, info, env, renv) { _1: false, _2: false })) { - var ty = id.name; + let ty = id.name; Stdlib__List.iter((function (param) { - var c = param[1].cstr_name; - var k = [ + let c = param[1].cstr_name; + let k = [ ty, loc, c @@ -14154,7 +14154,7 @@ function store_type(check, slot, id, path, info, env, renv) { if (Stdlib__Hashtbl.mem(used_constructors, k)) { return ; } - var used = { + let used = { cu_positive: false, cu_pattern: false, cu_privatize: false @@ -14212,22 +14212,22 @@ function store_type(check, slot, id, path, info, env, renv) { } function store_extension(check, slot, id, path, ext, env, renv) { - var loc = ext.ext_loc; + let loc = ext.ext_loc; if (check && !loc.loc_ghost && is_active({ TAG: /* Unused_extension */22, _0: "", _1: false, _2: false })) { - var ty = last(ext.ext_type_path); - var n = id.name; - var k = [ + let ty = last(ext.ext_type_path); + let n = id.name; + let k = [ ty, loc, n ]; if (!Stdlib__Hashtbl.mem(used_constructors, k)) { - var used = { + let used = { cu_positive: false, cu_pattern: false, cu_privatize: false @@ -14331,15 +14331,15 @@ function components_of_functor_appl(f, p1, p2) { return Stdlib__Hashtbl.find(f.fcomp_cache, p2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var p = { + let p = { TAG: /* Papply */2, _0: p1, _1: p2 }; - var mty = modtype(add_module(f.fcomp_param, p2, identity), f.fcomp_res); - var comps = components_of_module(f.fcomp_env, f.fcomp_subst, p, mty); + let mty = modtype(add_module(f.fcomp_param, p2, identity), f.fcomp_res); + let comps = components_of_module(f.fcomp_env, f.fcomp_subst, p, mty); Stdlib__Hashtbl.add(f.fcomp_cache, p2, comps); return comps; } @@ -14375,12 +14375,12 @@ function add_extension(check, id, ext, env) { } function add_module_declaration(arg, id, md, env) { - var path = { + let path = { TAG: /* Pident */0, _0: id }; - var env$1 = store_module(undefined, id, path, md, env, env); - var arg$1 = arg !== undefined ? arg : false; + let env$1 = store_module(undefined, id, path, md, env, env); + let arg$1 = arg !== undefined ? arg : false; if (arg$1) { return { values: env$1.values, @@ -14438,9 +14438,9 @@ function add_module$1(arg, id, mty, env) { function add_local_constraint(id, info, elv, env) { if (info.type_manifest !== undefined) { - var match = info.type_newtype_level; + let match = info.type_newtype_level; if (match !== undefined) { - var env$1 = add_type$1(false, id, { + let env$1 = add_type$1(false, id, { type_params: info.type_params, type_arity: info.type_arity, type_kind: info.type_kind, @@ -14491,7 +14491,7 @@ function add_local_constraint(id, info, elv, env) { } function enter(store_fun, name, data, env) { - var id = create(name); + let id = create(name); return [ id, Curry._6(store_fun, undefined, id, { @@ -14516,7 +14516,7 @@ function enter_type(param, param$1, param$2) { } function enter_module_declaration(arg, name, md, env) { - var id = create(name); + let id = create(name); return [ id, add_module_declaration(arg, id, md, env) @@ -14557,8 +14557,8 @@ function add_item(comp, env) { function add_signature(_sg, _env) { while(true) { - var env = _env; - var sg = _sg; + let env = _env; + let sg = _sg; if (!sg) { return env; } @@ -14569,9 +14569,9 @@ function add_signature(_sg, _env) { } function open_signature(slot, root, sg, env0) { - var match = prefix_idents_and_subst$1(root, identity, sg); - var sg$1 = CamlinternalLazy.force(match[2]); - var newenv = Stdlib__List.fold_left2((function (env, item, p) { + let match = prefix_idents_and_subst$1(root, identity, sg); + let sg$1 = CamlinternalLazy.force(match[2]); + let newenv = Stdlib__List.fold_left2((function (env, item, p) { switch (item.TAG | 0) { case /* Sig_value */0 : return store_value(undefined, slot, hide(item._0), p, item._1, env, env0); @@ -14613,8 +14613,8 @@ function open_signature(slot, root, sg, env0) { } function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { - var loc = locOpt !== undefined ? locOpt : none; - var toplevel = toplevelOpt !== undefined ? toplevelOpt : false; + let loc = locOpt !== undefined ? locOpt : none; + let toplevel = toplevelOpt !== undefined ? toplevelOpt : false; if (!(!toplevel && ovf === /* Fresh */1 && !loc.loc_ghost && (is_active({ TAG: /* Unused_open */17, _0: "" @@ -14629,7 +14629,7 @@ function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { })))) { return open_signature(undefined, root, sg, env); } - var used = { + let used = { contents: false }; Curry._1(add_delayed_check_forward.contents, (function (param) { @@ -14641,10 +14641,10 @@ function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { } })); - var shadowed = { + let shadowed = { contents: /* [] */0 }; - var slot = function (kind, s, b) { + let slot = function (kind, s, b) { if (b && !Stdlib__List.mem([ kind, s @@ -14656,7 +14656,7 @@ function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { ], tl: shadowed.contents }; - var w; + let w; switch (kind) { case "constructor" : case "label" : @@ -14681,13 +14681,13 @@ function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { } function read_signature(modname, filename) { - var ps = read_pers_struct(modname, filename); + let ps = read_pers_struct(modname, filename); check_consistency(ps); return ps.ps_sig; } function imports(param) { - var dont_record_crc_unit$1 = dont_record_crc_unit.contents; + let dont_record_crc_unit$1 = dont_record_crc_unit.contents; if (dont_record_crc_unit$1 !== undefined) { return extract(Curry._3(fold$5, (function (m, acc) { if (m === dont_record_crc_unit$1) { @@ -14705,26 +14705,26 @@ function imports(param) { } function save_signature(sg, modname, filename) { - var imports$1 = imports(undefined); + let imports$1 = imports(undefined); cleanup_abbrev(undefined); new_id$1.contents = -1; - var sg$1 = signature$2(for_saving(identity), sg); - var oc = Stdlib.open_out_bin(filename); + let sg$1 = signature$2(for_saving(identity), sg); + let oc = Stdlib.open_out_bin(filename); try { - var cmi_cmi_flags = recursive_types.contents ? ({ + let cmi_cmi_flags = recursive_types.contents ? ({ hd: /* Rectypes */0, tl: /* [] */0 }) : /* [] */0; - var cmi = { + let cmi = { cmi_name: modname, cmi_sign: sg$1, cmi_crcs: imports$1, cmi_flags: cmi_cmi_flags }; - var crc = output_cmi(filename, oc, cmi); + let crc = output_cmi(filename, oc, cmi); Caml_io.caml_ml_flush(oc); Caml_external_polyfill.resolve("caml_ml_close_channel")(oc); - var comps = components_of_module(empty, identity, { + let comps = components_of_module(empty, identity, { TAG: /* Pident */0, _0: { stamp: 0, @@ -14735,7 +14735,7 @@ function save_signature(sg, modname, filename) { TAG: /* Mty_signature */1, _0: sg$1 }); - var ps = { + let ps = { ps_name: modname, ps_sig: sg$1, ps_comps: comps, @@ -14767,9 +14767,9 @@ function find_all$1(proj1, proj2, f, lid, env, acc) { return Curry._4(f, id.name, param[0], param[1], acc); })(Curry._1(proj1, env), acc); } - var match = lookup_module_descr(lid, env); - var p = match[0]; - var c = force(components_of_module_maker, match[1]); + let match = lookup_module_descr(lid, env); + let p = match[0]; + let c = force(components_of_module_maker, match[1]); if (c.TAG === /* Structure_comps */0) { return fold$4((function (s, param, acc) { return Curry._4(f, s, { @@ -14790,8 +14790,8 @@ function find_all_simple_list(proj1, proj2, f, lid, env, acc) { return Curry._2(f, data, acc); })(Curry._1(proj1, env), acc); } - var match = lookup_module_descr(lid, env); - var c = force(components_of_module_maker, match[1]); + let match = lookup_module_descr(lid, env); + let c = force(components_of_module_maker, match[1]); if (c.TAG === /* Structure_comps */0) { return fold$4((function (s, comps, acc) { if (comps) { @@ -14807,12 +14807,12 @@ function find_all_simple_list(proj1, proj2, f, lid, env, acc) { function fold_modules(f, lid, env, acc) { if (lid !== undefined) { - var match = lookup_module_descr(lid, env); - var p = match[0]; - var c = force(components_of_module_maker, match[1]); + let match = lookup_module_descr(lid, env); + let p = match[0]; + let c = force(components_of_module_maker, match[1]); if (c.TAG === /* Structure_comps */0) { return fold$4((function (s, param, acc) { - var md_type = force(subst_modtype_maker, param[0]); + let md_type = force(subst_modtype_maker, param[0]); return Curry._4(f, s, { TAG: /* Pdot */1, _0: p, @@ -14828,7 +14828,7 @@ function fold_modules(f, lid, env, acc) { return acc; } } - var acc$1 = fold_name(function (id, param, acc) { + let acc$1 = fold_name(function (id, param, acc) { return Curry._4(f, id.name, param[0], param[1], acc); })(env.modules, acc); return Stdlib__Hashtbl.fold((function (name, ps, acc) { @@ -14924,19 +14924,19 @@ function fold_cltypes(f) { }; } -var match = build_initial_env((function (param, param$1, param$2) { +let match = build_initial_env((function (param, param$1, param$2) { return add_type$1(false, param, param$1, param$2); }), (function (param, param$1, param$2) { return add_extension(false, param, param$1, param$2); }), empty); -var initial_safe_string = match[0]; +let initial_safe_string = match[0]; -var last_env = { +let last_env = { contents: empty }; -var last_reduced_env = { +let last_reduced_env = { contents: empty }; @@ -14944,10 +14944,10 @@ function keep_only_summary(env) { if (last_env.contents === env) { return last_reduced_env.contents; } - var new_env_summary = env.summary; - var new_env_local_constraints = env.local_constraints; - var new_env_flags = env.flags; - var new_env = { + let new_env_summary = env.summary; + let new_env_local_constraints = env.local_constraints; + let new_env_flags = env.flags; + let new_env = { values: /* Empty */0, constrs: /* Empty */0, labels: /* Empty */0, @@ -15153,8 +15153,8 @@ function report_error$1(ppf, param) { _1: "@[Unit %s imports from %s, which uses recursive types.@ %s@]" }), param._1, param._0, "The compilation flag -rectypes is required"); case /* Missing_module */3 : - var path2 = param._2; - var path1 = param._1; + let path2 = param._2; + let path1 = param._1; Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -15374,7 +15374,7 @@ register_error_of_exn(function (param) { if (param.MEL_EXN_ID !== $$Error$2) { return ; } - var err = param._1; + let err = param._1; switch (err.TAG | 0) { case /* Missing_module */3 : case /* Illegal_value_name */4 : @@ -15382,7 +15382,7 @@ register_error_of_exn(function (param) { default: return error_of_printer_file(report_error$1, err); } - var loc = err._0; + let loc = err._0; if (Caml_obj.caml_notequal(loc, none)) { return error_of_printer(loc, report_error$1, err); } else { @@ -15395,15 +15395,15 @@ function assert_fail(msg) { } function is_mocha(param) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (!match) { return false; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return false; } - var exec = Path.basename(match$1.hd); + let exec = Path.basename(match$1.hd); if (exec === "mocha") { return true; } else { @@ -15412,19 +15412,19 @@ function is_mocha(param) { } function close_enough(thresholdOpt, a, b) { - var threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; + let threshold = thresholdOpt !== undefined ? thresholdOpt : 0.0000001; return Math.abs(a - b) < threshold; } function from_pair_suites(name, suites) { - var match = Stdlib__Array.to_list(Process.argv); + let match = Stdlib__Array.to_list(Process.argv); if (match) { if (is_mocha(undefined)) { describe(name, (function () { return Stdlib__List.iter((function (param) { - var code = param[1]; + let code = param[1]; it(param[0], (function () { - var spec = Curry._1(code, undefined); + let spec = Curry._1(code, undefined); switch (spec.TAG | 0) { case /* Eq */0 : Assert.deepEqual(spec._0, spec._1); @@ -15442,8 +15442,8 @@ function from_pair_suites(name, suites) { Assert.ok(spec._0); return ; case /* Approx */5 : - var b = spec._1; - var a = spec._0; + let b = spec._1; + let a = spec._0; if (!close_enough(undefined, a, b)) { Assert.deepEqual(a, b); return ; @@ -15451,8 +15451,8 @@ function from_pair_suites(name, suites) { return ; } case /* ApproxThreshold */6 : - var b$1 = spec._2; - var a$1 = spec._1; + 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 ; @@ -15478,8 +15478,8 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - var name = param[0]; - var fn = Curry._1(param[1], undefined); + let name = param[0]; + let fn = Curry._1(param[1], undefined); switch (fn.TAG | 0) { case /* Eq */0 : console.log([ @@ -15557,15 +15557,15 @@ function from_pair_suites(name, suites) { Promise.resolve(undefined); -var $$Error$3 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Syntaxerr.Error"); +let $$Error$3 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Syntaxerr.Error"); -var Escape_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Syntaxerr.Escape_error"); +let Escape_error = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Syntaxerr.Escape_error"); function prepare_error(param) { switch (param.TAG | 0) { case /* Unclosed */0 : - var closing = param._3; - var opening = param._1; + let closing = param._3; + let opening = param._1; return Curry._1(errorf(param._2, { hd: Curry._1(errorf(param._0, undefined, undefined, /* Format */{ _0: { @@ -15667,7 +15667,7 @@ function prepare_error(param) { _1: "Syntax error: applicative paths of the form F(X).t are not supported when the option -no-app-func is set." }); case /* Variable_in_scope */4 : - var $$var = param._1; + let $$var = param._1; return Curry._2(errorf(param._0, undefined, undefined, /* Format */{ _0: { TAG: /* String_literal */11, @@ -15781,10 +15781,10 @@ function mkcf(attrs, docs, d) { } function mkoption(d) { - var init = d.ptyp_loc; - var loc_loc_start = init.loc_start; - var loc_loc_end = init.loc_end; - var loc = { + let init = d.ptyp_loc; + let loc_loc_start = init.loc_start; + let loc_loc_end = init.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true @@ -15826,7 +15826,7 @@ function reloc_exp(x) { } function mkoperator(name, pos) { - var loc = rhs_loc(pos); + let loc = rhs_loc(pos); return Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_ident */0, _0: { @@ -15919,16 +15919,16 @@ function mkpat_cons(consloc, args, loc) { function mktailexp(nilloc, param) { if (param) { - var e1 = param.hd; - var exp_el = mktailexp(nilloc, param.tl); - var loc_loc_start = e1.pexp_loc.loc_start; - var loc_loc_end = exp_el.pexp_loc.loc_end; - var loc = { + let e1 = param.hd; + let exp_el = mktailexp(nilloc, param.tl); + let loc_loc_start = e1.pexp_loc.loc_start; + let loc_loc_end = exp_el.pexp_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { + let arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_tuple */8, _0: { hd: e1, @@ -15944,18 +15944,18 @@ function mktailexp(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -15968,16 +15968,16 @@ function mktailexp(nilloc, param) { function mktailpat(nilloc, param) { if (param) { - var p1 = param.hd; - var pat_pl = mktailpat(nilloc, param.tl); - var loc_loc_start = p1.ppat_loc.loc_start; - var loc_loc_end = pat_pl.ppat_loc.loc_end; - var loc = { + let p1 = param.hd; + let pat_pl = mktailpat(nilloc, param.tl); + let loc_loc_start = p1.ppat_loc.loc_start; + let loc_loc_end = pat_pl.ppat_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = mk$1(loc, undefined, { + let arg = mk$1(loc, undefined, { TAG: /* Ppat_tuple */4, _0: { hd: p1, @@ -15993,18 +15993,18 @@ function mktailpat(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -16027,8 +16027,8 @@ function mkstrexp(e, attrs) { } function mkexp_constraint(e, param) { - var t2 = param[1]; - var t1 = param[0]; + let t2 = param[1]; + let t1 = param[0]; if (t1 !== undefined) { if (t2 !== undefined) { return ghexp({ @@ -16131,7 +16131,7 @@ function bigarray_function(str, name) { } function bigarray_untuplify(exp) { - var explist = exp.pexp_desc; + let explist = exp.pexp_desc; if (explist.TAG === /* Pexp_tuple */8) { return explist._0; } else { @@ -16143,7 +16143,7 @@ function bigarray_untuplify(exp) { } function exp_of_label(lbl, pos) { - var rhs = { + let rhs = { TAG: /* Lident */0, _0: last$1(lbl) }; @@ -16157,7 +16157,7 @@ function exp_of_label(lbl, pos) { } function pat_of_label(lbl, pos) { - var rhs = last$1(lbl); + let rhs = last$1(lbl); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -16182,15 +16182,15 @@ function check_variable(vl, loc, v) { } function varify_constructors(var_names, t) { - var loop = function (t) { - var x = t.ptyp_desc; - var desc; + let loop = function (t) { + let x = t.ptyp_desc; + let desc; if (typeof x === "number") { desc = /* Ptyp_any */0; } else { switch (x.TAG | 0) { case /* Ptyp_var */0 : - var x$1 = x._0; + let x$1 = x._0; check_variable(var_names, t.ptyp_loc, x$1); desc = { TAG: /* Ptyp_var */0, @@ -16212,15 +16212,15 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_constr */3 : - var longident = x._0; - var exit = 0; - var s = longident.txt; + let longident = x._0; + let exit = 0; + let s = longident.txt; switch (s.TAG | 0) { case /* Lident */0 : if (x._1) { exit = 1; } else { - var s$1 = s._0; + let s$1 = s._0; if (Stdlib__List.mem(s$1, var_names)) { desc = { TAG: /* Ptyp_var */0, @@ -16266,7 +16266,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_alias */6 : - var string = x._1; + let string = x._1; check_variable(var_names, t.ptyp_loc, string); desc = { TAG: /* Ptyp_alias */6, @@ -16283,8 +16283,8 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_poly */8 : - var string_lst = x._0; - var partial_arg = t.ptyp_loc; + let string_lst = x._0; + let partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { return check_variable(var_names, partial_arg, param); }), string_lst); @@ -16295,7 +16295,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_package */9 : - var match = x._0; + let match = x._0; desc = { TAG: /* Ptyp_package */9, _0: [ @@ -16310,7 +16310,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_extension */10 : - var match$1 = x._0; + let match$1 = x._0; desc = { TAG: /* Ptyp_extension */10, _0: [ @@ -16328,7 +16328,7 @@ function varify_constructors(var_names, t) { ptyp_attributes: t.ptyp_attributes }; }; - var loop_row_field = function (param) { + let loop_row_field = function (param) { if (param.TAG === /* Rtag */0) { return { TAG: /* Rtag */0, @@ -16348,12 +16348,12 @@ function varify_constructors(var_names, t) { } function wrap_type_annotation(newtypes, core_type, body) { - var exp = mkexp({ + let exp = mkexp({ TAG: /* Pexp_constraint */19, _0: body, _1: core_type }); - var exp$1 = Stdlib__List.fold_right((function (newtype, exp) { + let exp$1 = Stdlib__List.fold_right((function (newtype, exp) { return mkexp({ TAG: /* Pexp_newtype */30, _0: newtype, @@ -16371,11 +16371,11 @@ function wrap_type_annotation(newtypes, core_type, body) { } function wrap_exp_attrs(body, param) { - var ext = param[0]; - var body_pexp_desc = body.pexp_desc; - var body_pexp_loc = body.pexp_loc; - var body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); - var body$1 = { + let ext = param[0]; + let body_pexp_desc = body.pexp_desc; + let body_pexp_loc = body.pexp_loc; + let body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); + let body$1 = { pexp_desc: body_pexp_desc, pexp_loc: body_pexp_loc, pexp_attributes: body_pexp_attributes @@ -16410,8 +16410,8 @@ function text_def(pos) { } function extra_text(text, pos, items) { - var pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); - var post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); + let pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); + let post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); return Stdlib.$at(Curry._1(text, pre_extras), Stdlib.$at(items, Curry._1(text, post_extras))); } @@ -16427,8 +16427,8 @@ function add_nonrec(rf, attrs, pos) { if (rf) { return attrs; } - var name_loc = rhs_loc(pos); - var name = { + let name_loc = rhs_loc(pos); + let name = { txt: "nonrec", loc: name_loc }; @@ -16455,7 +16455,7 @@ function mklb(param, attrs) { }; } -var yytransl_const = [ +let yytransl_const = [ 257, 258, 259, @@ -16560,7 +16560,7 @@ var yytransl_const = [ 0 ]; -var yytransl_block = [ +let yytransl_block = [ 268, 287, 298, @@ -16584,7 +16584,7 @@ var yytransl_block = [ 0 ]; -var yyact = [ +let yyact = [ (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -16592,15 +16592,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text$1, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_def */0, _0: extra_text(text$1, 1, _1) @@ -16615,8 +16615,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), tl: /* [] */0 @@ -16629,16 +16629,16 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var pos = 1; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; return extra_text((function (txt) { return { hd: { @@ -16653,9 +16653,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -16674,9 +16674,9 @@ var yyact = [ return text_def(1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { @@ -16690,8 +16690,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { TAG: /* Ptop_def */0, @@ -16704,8 +16704,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: _2, @@ -16713,8 +16713,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -16727,8 +16727,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 1); return Stdlib.$at(text_def(1), { hd: _1, @@ -16754,8 +16754,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { txt: _2, @@ -16771,22 +16771,22 @@ var yyact = [ return "_"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_ident */0, _0: { @@ -16796,7 +16796,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_structure */1, _0: extra_text(text$1, 2, _2) @@ -16807,8 +16807,8 @@ var yyact = [ return unclosed("struct", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmod({ TAG: /* Pmod_functor */2, @@ -16819,8 +16819,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -16828,7 +16828,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -16844,8 +16844,8 @@ var yyact = [ return unclosed("(", 2, ")", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_constraint */4, _0: _2, @@ -16865,15 +16865,15 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -16887,9 +16887,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -16907,8 +16907,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -16935,21 +16935,21 @@ var yyact = [ return unclosed("(", 1, ")", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$4(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 2); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), @@ -16963,26 +16963,26 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = lbs.lbs_bindings; - var str; - var exit = 0; + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = lbs.lbs_bindings; + let str; + let exit = 0; if (bindings) { - var lb = bindings.hd; + let lb = bindings.hd; if (typeof lb.lb_pattern.ppat_desc === "number" && !bindings.tl) { - var exp = wrap_exp_attrs(lb.lb_expression, [ + let exp = wrap_exp_attrs(lb.lb_expression, [ undefined, lbs.lbs_attributes ]); @@ -17008,7 +17008,7 @@ var yyact = [ } }); } - var bindings$1 = Stdlib__List.map((function (lb) { + let bindings$1 = Stdlib__List.map((function (lb) { return mk$17(lb.lb_loc, lb.lb_attributes, CamlinternalLazy.force(lb.lb_docs), CamlinternalLazy.force(lb.lb_text), lb.lb_pattern, lb.lb_expression); }), bindings); str = mkstr({ @@ -17017,9 +17017,9 @@ var yyact = [ _1: Stdlib__List.rev(bindings$1) }); } - var id = lbs.lbs_extension; + let id = lbs.lbs_extension; if (id !== undefined) { - var d = { + let d = { TAG: /* Pstr_extension */14, _0: [ id, @@ -17039,85 +17039,85 @@ var yyact = [ } }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_primitive */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_type */3, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_typext */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_exception */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_module */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_recmodule */7, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_modtype */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_open */9, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class_type */11, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_include */12, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_extension */14, _0: _1, @@ -17125,7 +17125,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkstr({ TAG: /* Pstr_attribute */13, @@ -17133,16 +17133,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_constraint */4, _0: _4, @@ -17150,8 +17150,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_functor */2, _0: _1[0], @@ -17160,49 +17160,49 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_ident */0, _0: { @@ -17212,7 +17212,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmty({ TAG: /* Pmty_signature */1, _0: extra_text(text, 2, _2) @@ -17223,8 +17223,8 @@ var yyact = [ return unclosed("sig", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmty({ TAG: /* Pmty_functor */2, @@ -17235,8 +17235,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_with */3, _0: _1, @@ -17244,7 +17244,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_typeof */4, _0: _4 @@ -17258,126 +17258,126 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$3(_1, _2); }), (function (__caml_parser_env) { return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_type */1, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_typext */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_exception */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_recmodule */5, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_modtype */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_open */7, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_include */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class */9, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class_type */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_extension */12, _0: _1, @@ -17385,7 +17385,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mksig({ TAG: /* Psig_attribute */11, @@ -17393,26 +17393,26 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$15(symbol_rloc(undefined), _4, symbol_docs(undefined), _2, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -17424,7 +17424,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -17436,18 +17436,18 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -17457,33 +17457,33 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) @@ -17496,46 +17496,46 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$13(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, _4, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -17545,8 +17545,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constraint */5, _0: _4, @@ -17554,8 +17554,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -17571,8 +17571,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -17582,8 +17582,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -17599,8 +17599,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_apply */3, _0: _1, @@ -17608,9 +17608,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$3, { MEL_EXN_ID: $$Error$3, @@ -17651,20 +17651,20 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$5(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -17675,7 +17675,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -17686,7 +17686,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_structure */1, _0: _2 @@ -17697,8 +17697,8 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_constraint */5, _0: _2, @@ -17718,8 +17718,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcstr_self: _1, pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) @@ -17729,8 +17729,8 @@ var yyact = [ return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -17744,18 +17744,18 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Cf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_5, symbol_docs(undefined), { TAG: /* Pcf_inherit */0, _0: _2, @@ -17764,47 +17764,47 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_method */2, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_initializer */4, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_2, symbol_docs(undefined), { TAG: /* Pcf_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkcf(undefined, undefined, { TAG: /* Pcf_attribute */5, @@ -17818,9 +17818,9 @@ var yyact = [ }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -17839,9 +17839,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -17855,10 +17855,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -17873,12 +17873,12 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var e = mkexp_constraint(_6, _4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let e = mkexp_constraint(_6, _4); return [ { txt: _3, @@ -17893,9 +17893,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -17914,10 +17914,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -17936,10 +17936,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -17958,11 +17958,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -17981,13 +17981,13 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_6, _8, _10); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_6, _8, _10); return [ { txt: _3, @@ -18009,9 +18009,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _2, @@ -18020,9 +18020,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _1, @@ -18031,9 +18031,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: _1, @@ -18042,8 +18042,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "", @@ -18052,8 +18052,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -18064,7 +18064,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -18075,7 +18075,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkcty({ TAG: /* Pcty_signature */1, _0: _2 @@ -18086,20 +18086,20 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$6(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_extension */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcsig_self: _1, pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) @@ -18115,34 +18115,34 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Ctf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_inherit */0, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_6, symbol_docs(undefined), { TAG: /* Pctf_method */2, _0: [ @@ -18154,23 +18154,23 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_2, symbol_docs(undefined), { TAG: /* Pctf_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkctf(undefined, undefined, { TAG: /* Pctf_attribute */4, @@ -18178,9 +18178,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, _2, @@ -18189,9 +18189,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, /* Mutable */1, @@ -18200,8 +18200,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, /* Immutable */0, @@ -18210,8 +18210,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3, @@ -18219,82 +18219,82 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _8, symbol_docs(undefined), undefined, _3, _4, { txt: _5, loc: rhs_loc(5) }, _7); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -18307,8 +18307,8 @@ var yyact = [ return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_sequence */16, _0: _1, @@ -18316,8 +18316,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _3[0], _4, @@ -18325,7 +18325,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], undefined, @@ -18333,9 +18333,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _1, _4, @@ -18343,8 +18343,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, undefined, @@ -18352,7 +18352,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _3[0], undefined, @@ -18360,7 +18360,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2[0], undefined, @@ -18368,8 +18368,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, undefined, @@ -18377,7 +18377,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", undefined, @@ -18385,7 +18385,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -18407,8 +18407,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1[0], mkpat({ @@ -18419,7 +18419,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkpat({ @@ -18435,8 +18435,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constraint */10, _0: _1, @@ -18447,8 +18447,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: _1, @@ -18456,9 +18456,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$3, { MEL_EXN_ID: $$Error$3, @@ -18471,9 +18471,9 @@ var yyact = [ } return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); }), _1.lbs_bindings); - var d_0 = _1.lbs_rec; - var d_1 = Stdlib__List.rev(bindings); - var d = { + let d_0 = _1.lbs_rec; + let d_1 = Stdlib__List.rev(bindings); + let d = { TAG: /* Pexp_let */2, _0: d_0, _1: d_1, @@ -18485,15 +18485,15 @@ var yyact = [ ]); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_0 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_0 = { txt: _4, loc: rhs_loc(4) }; - var d = { + let d = { TAG: /* Pexp_letmodule */25, _0: d_0, _1: _5, @@ -18502,15 +18502,15 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = { txt: _5, loc: rhs_loc(5) }; - var d = { + let d = { TAG: /* Pexp_open */32, _0: _3, _1: d_1, @@ -18519,19 +18519,19 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_function */3, _0: Stdlib__List.rev(_4) }; return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_fun */4, _0: _3[0], @@ -18541,9 +18541,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_newtype */30, _0: _5, @@ -18551,12 +18551,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_match */6, _0: _3, _1: d_1 @@ -18564,12 +18564,12 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_try */7, _0: _3, _1: d_1 @@ -18584,15 +18584,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_tuple */8, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -18603,8 +18603,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -18612,10 +18612,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -18624,9 +18624,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -18635,9 +18635,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_while */17, _0: _3, @@ -18645,12 +18645,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_for */18, _0: _3, @@ -18661,8 +18661,8 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -18675,8 +18675,8 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -18689,119 +18689,119 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "*", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "%", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "<", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ">", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "or", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "||", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ":=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = _2.pexp_desc; + let exit = 0; switch (_1) { case "-" : if (match.TAG === /* Pexp_constant */1) { - var n = match._0; + let n = match._0; switch (n.TAG | 0) { case /* Const_int */0 : return mkexp({ @@ -18849,7 +18849,7 @@ var yyact = [ } if (exit === 2 && match.TAG === /* Pexp_constant */1) { - var f = match._0; + let f = match._0; if (f.TAG === /* Const_float */3) { return mkexp({ TAG: /* Pexp_constant */1, @@ -18874,10 +18874,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var desc = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let desc = _2.pexp_desc; + let exit = 0; switch (_1) { case "+" : if (desc.TAG === /* Pexp_constant */1) { @@ -18916,9 +18916,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setfield */13, _0: _1, @@ -18930,9 +18930,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -18961,9 +18961,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -18992,14 +18992,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var set = fast.contents ? "unsafe_set" : "set"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let set = fast.contents ? "unsafe_set" : "set"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -19028,8 +19028,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -19137,8 +19137,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setinstvar */23, _0: { @@ -19149,24 +19149,24 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_assert */26, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_lazy */27, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_object */29, _0: _3 @@ -19178,12 +19178,12 @@ var yyact = [ return unclosed("object", 1, "end", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._2(Ast_helper_Exp.attr, _1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_ident */0, _0: { @@ -19193,14 +19193,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_constant */1, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -19211,7 +19211,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -19226,20 +19226,20 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(reloc_exp(_3), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var d_0 = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let d_0 = { txt: { TAG: /* Lident */0, _0: "()" }, loc: symbol_rloc(undefined) }; - var d = { + let d = { TAG: /* Pexp_construct */9, _0: d_0, _1: undefined @@ -19252,13 +19252,13 @@ var yyact = [ return unclosed("begin", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_constraint(_2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_field */12, _0: _1, @@ -19269,8 +19269,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -19287,8 +19287,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -19316,8 +19316,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -19345,13 +19345,13 @@ var yyact = [ return unclosed("[", 3, "]", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var get = fast.contents ? "unsafe_get" : "get"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let get = fast.contents ? "unsafe_get" : "get"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -19374,8 +19374,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -19470,7 +19470,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_record */11, _0: _2[1], @@ -19482,9 +19482,9 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var rec_exp = mkexp({ + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let rec_exp = mkexp({ TAG: /* Pexp_record */11, _0: _4[1], _1: _4[0] @@ -19505,7 +19505,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_array */14, @@ -19524,8 +19524,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -19547,7 +19547,7 @@ var yyact = [ return unclosed("[|", 3, "|]", 6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_exp(mktailexp(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -19557,10 +19557,10 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + let list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -19578,8 +19578,8 @@ var yyact = [ return unclosed("[", 3, "]", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator(_1, 1), @@ -19593,7 +19593,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator("!", 1), @@ -19607,9 +19607,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_new */22, _0: { txt: _3, @@ -19619,7 +19619,7 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_override */24, @@ -19638,8 +19638,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -19661,8 +19661,8 @@ var yyact = [ return unclosed("{<", 3, ">}", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_send */21, _0: _1, @@ -19670,21 +19670,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_pack */31, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_constraint */19, _0: ghexp({ @@ -19702,9 +19702,9 @@ var yyact = [ return unclosed("(", 1, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -19731,29 +19731,29 @@ var yyact = [ return unclosed("(", 3, ")", 7); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_extension */33, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", _1 @@ -19763,8 +19763,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _2 @@ -19774,22 +19774,22 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], _2[1] ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkexp({ @@ -19805,33 +19805,33 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ mkpatvar(_1, 1), _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -19846,11 +19846,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_4, _6, _8); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_4, _6, _8); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -19861,17 +19861,17 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -19885,8 +19885,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { lbs_bindings: { hd: _2, @@ -19899,11 +19899,11 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var lb = mklb(_4, _5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); return { lbs_bindings: { hd: lb, @@ -19916,24 +19916,24 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mklb(_2, _3); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_constraint(_3, _1); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -19943,8 +19943,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -19952,37 +19952,37 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -19992,8 +19992,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -20001,16 +20001,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -20020,45 +20020,45 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -20068,7 +20068,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -20078,8 +20078,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -20092,9 +20092,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -20107,37 +20107,37 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _2 @@ -20157,8 +20157,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_alias */1, _0: _1, @@ -20173,15 +20173,15 @@ var yyact = [ return expecting(3, "identifier"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_tuple */4, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -20192,8 +20192,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -20201,8 +20201,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -20219,8 +20219,8 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -20238,8 +20238,8 @@ var yyact = [ return unclosed("(", 4, ")", 8); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_or */9, _0: _1, @@ -20251,26 +20251,26 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_lazy */12, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_exception */14, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$1(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -20286,15 +20286,15 @@ var yyact = [ return mkpat(/* Ppat_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constant */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_interval */3, _0: _1, @@ -20302,7 +20302,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -20313,7 +20313,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -20321,7 +20321,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_type */11, _0: { @@ -20331,7 +20331,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_record */7, _0: _2[0], @@ -20343,7 +20343,7 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_pat(mktailpat(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -20353,7 +20353,7 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_array */8, @@ -20379,8 +20379,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -20397,7 +20397,7 @@ var yyact = [ return expecting(4, "type"); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_unpack */13, _0: { @@ -20407,8 +20407,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: mkpat({ @@ -20430,23 +20430,23 @@ var yyact = [ return unclosed("(", 1, ")", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_extension */15, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -20460,22 +20460,22 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -20485,7 +20485,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { hd: _1, @@ -20495,7 +20495,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -20506,8 +20506,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -20517,8 +20517,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -20528,7 +20528,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -20538,80 +20538,80 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _7, symbol_docs(undefined), _6, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), add_nonrec(_2, _7, 2), symbol_docs(undefined), undefined, _3, Stdlib__List.rev(_6), _5[0], _5[1], _5[2], { txt: _4, loc: rhs_loc(4) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, Stdlib__List.rev(_5), _4[0], _4[1], _4[2], { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -20628,7 +20628,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Public */1, @@ -20636,7 +20636,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Private */0, @@ -20644,7 +20644,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -20655,7 +20655,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -20673,8 +20673,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -20685,9 +20685,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -20698,7 +20698,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return [ /* Ptype_open */1, /* Public */1, @@ -20706,9 +20706,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -20722,7 +20722,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -20732,30 +20732,30 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -20768,7 +20768,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -20778,8 +20778,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 @@ -20795,62 +20795,62 @@ var yyact = [ return /* Contravariant */1; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _3, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _4, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -20860,10 +20860,10 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), Stdlib.$at(_5, _6), symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -20873,10 +20873,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), Stdlib.$at(_4, _5), symbol_docs(undefined), undefined, _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -20889,79 +20889,79 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* [] */0, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return field$1(symbol_rloc(undefined), _5, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - var info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + let info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); return field$1(symbol_rloc(undefined), Stdlib.$at(_5, _7), Caml_option.some(info), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -20971,12 +20971,12 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -20986,93 +20986,93 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _3, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _1, loc: rhs_loc(1) @@ -21082,9 +21082,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _5, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _2, loc: rhs_loc(2) @@ -21094,27 +21094,27 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var rhs = last$1(_3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let rhs = last$1(_3); return { TAG: /* Pwith_type */0, _0: { @@ -21128,9 +21128,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_typesubst */2, _0: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, undefined, undefined, undefined, _5, { @@ -21140,8 +21140,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_module */1, _0: { @@ -21155,8 +21155,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_modsubst */3, _0: { @@ -21176,15 +21176,15 @@ var yyact = [ return /* Private */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -21194,8 +21194,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -21206,8 +21206,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -21218,16 +21218,16 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr(_1, _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_alias */6, _0: _1, @@ -21238,9 +21238,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _2, @@ -21249,9 +21249,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _1, @@ -21260,9 +21260,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: _1, @@ -21271,8 +21271,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "", @@ -21284,7 +21284,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -21301,7 +21301,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -21315,7 +21315,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -21325,7 +21325,7 @@ var yyact = [ return mktyp(/* Ptyp_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -21336,8 +21336,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -21351,8 +21351,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -21363,7 +21363,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_object */4, _0: _2[0], @@ -21378,7 +21378,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -21389,8 +21389,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -21404,8 +21404,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -21416,7 +21416,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -21428,7 +21428,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -21437,8 +21437,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -21451,7 +21451,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -21469,7 +21469,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -21479,8 +21479,8 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -21489,21 +21489,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_package */9, _0: _3 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_extension */10, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -21513,8 +21513,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -21524,8 +21524,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _2, @@ -21535,30 +21535,30 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -21568,17 +21568,17 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rinherit */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -21588,8 +21588,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -21605,30 +21605,30 @@ var yyact = [ return false; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 @@ -21638,8 +21638,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -21652,8 +21652,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -21663,53 +21663,53 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -21719,7 +21719,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -21736,9 +21736,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _4, @@ -21749,21 +21749,21 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_char */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_string */2, _0: _1[0], @@ -21771,28 +21771,28 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _1 @@ -21802,70 +21802,70 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: "-" + _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: Caml_int64.neg(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _2 @@ -21978,15 +21978,15 @@ var yyact = [ return "true"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22021,15 +22021,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22037,15 +22037,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22053,15 +22053,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22069,15 +22069,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22085,8 +22085,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (applicative_functors.contents) { return { TAG: /* Lapply */2, @@ -22103,15 +22103,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22119,15 +22119,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22135,15 +22135,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -22151,7 +22151,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22159,8 +22159,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22171,8 +22171,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22183,8 +22183,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22195,8 +22195,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22207,7 +22207,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22218,7 +22218,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -22478,39 +22478,39 @@ var yyact = [ return "with"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1, loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1 + ("." + _3.txt), loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 @@ -22520,8 +22520,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -22531,8 +22531,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -22545,8 +22545,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, { @@ -22556,45 +22556,45 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PStr */0, _0: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PTyp */1, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -22602,8 +22602,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -22654,7 +22654,7 @@ var yyact = [ }) ]; -var yytables = { +let yytables = { actions: yyact, transl_const: yytransl_const, transl_block: yytransl_block, @@ -22710,11 +22710,11 @@ function string_of_type_directive(x) { } } -var $$Error$4 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Lexer.Error"); +let $$Error$4 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Lexer.Error"); function assert_same_type(lexbuf, x, y) { - var lhs = type_of_directive(x); - var rhs = type_of_directive(y); + let lhs = type_of_directive(x); + let rhs = type_of_directive(y); if (lhs !== rhs) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -22729,25 +22729,25 @@ function assert_same_type(lexbuf, x, y) { return y; } -var directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); +let directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); Stdlib__Hashtbl.replace(directive_built_in_values, "OCAML_VERSION", { TAG: /* Dir_string */3, _0: Stdlib__Sys.ocaml_version }); -var tmp; +let tmp; -var exit = 0; +let exit = 0; -var i; +let i; try { i = Stdlib__String.rindex(Stdlib__Sys.ocaml_version, /* '+' */43); exit = 1; } catch (raw_exn$1){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { tmp = ""; } else { @@ -22780,24 +22780,24 @@ Stdlib__Hashtbl.replace(directive_built_in_values, "WORD_SIZE", { }); function semantic_version_parse(str, start, last_index) { - var aux = function (_start, _acc, last_index) { + let aux = function (_start, _acc, last_index) { while(true) { - var acc = _acc; - var start = _start; + let acc = _acc; + let start = _start; if (start > last_index) { return [ acc, start ]; } - var c = str.charCodeAt(start); + let c = str.charCodeAt(start); if (c === /* '.' */46) { return [ acc, start + 1 | 0 ]; } - var v = c - /* '0' */48 | 0; + let v = c - /* '0' */48 | 0; if (!(v >= 0 && v <= 9)) { return [ acc, @@ -22809,11 +22809,11 @@ function semantic_version_parse(str, start, last_index) { continue ; }; }; - var match = aux(start, 0, last_index); - var match$1 = aux(match[1], 0, last_index); - var match$2 = aux(match$1[1], 0, last_index); - var patch_end = match$2[1]; - var additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); + let match = aux(start, 0, last_index); + let match$1 = aux(match[1], 0, last_index); + let match$2 = aux(match$1[1], 0, last_index); + let patch_end = match$2[1]; + let additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); return [ [ match[0], @@ -22825,7 +22825,7 @@ function semantic_version_parse(str, start, last_index) { } function defined(str) { - var val; + let val; try { val = Stdlib__Hashtbl.find(directive_built_in_values, str); } @@ -22846,21 +22846,21 @@ function defined(str) { } function query(loc, str) { - var v; + let v; try { v = Stdlib__Hashtbl.find(directive_built_in_values, str); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var exit = 0; - var v$1; + let exit = 0; + let v$1; try { v$1 = Caml_sys.caml_sys_getenv(str); exit = 2; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* Dir_bool */0, @@ -22964,18 +22964,18 @@ function value_of_token(loc, t) { } function directive_parse(token_with_comments, lexbuf) { - var look_ahead = { + let look_ahead = { contents: undefined }; - var token = function (param) { - var v = look_ahead.contents; + let token = function (param) { + let v = look_ahead.contents; if (v !== undefined) { look_ahead.contents = undefined; return v; } - var _param; + let _param; while(true) { - var t = Curry._1(token_with_comments, lexbuf); + let t = Curry._1(token_with_comments, lexbuf); if (typeof t === "number") { switch (t) { case /* EOF */25 : @@ -23002,7 +23002,7 @@ function directive_parse(token_with_comments, lexbuf) { } }; }; - var push = function (e) { + let push = function (e) { if (look_ahead.contents !== undefined) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -23015,9 +23015,9 @@ function directive_parse(token_with_comments, lexbuf) { } look_ahead.contents = e; }; - var token_op = function (calc, no, lhs) { - var op = token(undefined); - var exit = 0; + let token_op = function (calc, no, lhs) { + let op = token(undefined); + let exit = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -23037,20 +23037,20 @@ function directive_parse(token_with_comments, lexbuf) { if (!calc) { return true; } - var exit$1 = 0; + let exit$1 = 0; if (typeof lhs === "number" || lhs.TAG !== /* Dir_string */3) { exit$1 = 2; } else { - var curr_loc = curr(lexbuf); - var rhs = value_of_token(curr_loc, token(undefined)); - var exit$2 = 0; + let curr_loc = curr(lexbuf); + let rhs = value_of_token(curr_loc, token(undefined)); + let exit$2 = 0; if (typeof rhs === "number") { exit$2 = 3; } else { if (rhs.TAG === /* Dir_string */3) { - var lhs$1 = lhs._0; - var str = rhs._0; - var last_index = str.length - 1 | 0; + let lhs$1 = lhs._0; + let str = rhs._0; + let last_index = str.length - 1 | 0; if (last_index < 0) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -23061,9 +23061,9 @@ function directive_parse(token_with_comments, lexbuf) { _2: curr_loc }); } - var v = str.charCodeAt(0); - var match; - var exit$3 = 0; + let v = str.charCodeAt(0); + let match; + let exit$3 = 0; if (v !== 94) { if (v >= 63) { if (v !== 126) { @@ -23134,11 +23134,11 @@ function directive_parse(token_with_comments, lexbuf) { semantic_version_parse(str, 0, last_index) ]; } - var version = match[1][0]; - var major = version[0]; - var pred = match[0]; - var match$1 = semantic_version_parse(lhs$1, 0, lhs$1.length - 1 | 0); - var lversion = match$1[0]; + let version = match[1][0]; + let major = version[0]; + let pred = match[0]; + let match$1 = semantic_version_parse(lhs$1, 0, lhs$1.length - 1 | 0); + let lversion = match$1[0]; if (pred === "Ge") { return Caml_obj.caml_greaterequal(lversion, version); } @@ -23154,7 +23154,7 @@ function directive_parse(token_with_comments, lexbuf) { if (pred === "Exact") { return Caml_obj.caml_equal(lversion, version); } - var l_major = lversion[0]; + let l_major = lversion[0]; if (pred === "Compatible") { return major === l_major; } else if (major === l_major) { @@ -23200,8 +23200,8 @@ function directive_parse(token_with_comments, lexbuf) { } } if (exit === 1) { - var f; - var exit$4 = 0; + let f; + let exit$4 = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -23240,8 +23240,8 @@ function directive_parse(token_with_comments, lexbuf) { ] }); } - var curr_loc$1 = curr(lexbuf); - var rhs$1 = value_of_token(curr_loc$1, token(undefined)); + let curr_loc$1 = curr(lexbuf); + let rhs$1 = value_of_token(curr_loc$1, token(undefined)); if (calc) { return Curry._2(f, lhs, assert_same_type(lexbuf, lhs, rhs$1)); } else { @@ -23250,15 +23250,15 @@ function directive_parse(token_with_comments, lexbuf) { } }; - var parse_and_aux = function (calc, v) { - var e = token(undefined); + let parse_and_aux = function (calc, v) { + let e = token(undefined); if (typeof e === "number") { if (e) { push(e); return v; } - var calc$1 = calc && v; - var b = parse_and_aux(calc$1, parse_relation(calc$1)); + let calc$1 = calc && v; + let b = parse_and_aux(calc$1, parse_relation(calc$1)); if (v) { return b; } else { @@ -23268,11 +23268,11 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var parse_or_aux = function (calc, v) { - var e = token(undefined); + let parse_or_aux = function (calc, v) { + let e = token(undefined); if (e === 8) { - var calc$1 = calc && !v; - var b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); + let calc$1 = calc && !v; + let b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); if (v) { return true; } else { @@ -23282,16 +23282,16 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var parse_relation = function (calc) { - var curr_token = token(undefined); - var curr_loc = curr(lexbuf); + let parse_relation = function (calc) { + let curr_token = token(undefined); + let curr_loc = curr(lexbuf); if (typeof curr_token === "number") { switch (curr_token) { case /* FALSE */29 : return false; case /* LPAREN */54 : - var v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); - var match = token(undefined); + let v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); + let match = token(undefined); if (match === 81) { return v; } @@ -23342,7 +23342,7 @@ function directive_parse(token_with_comments, lexbuf) { _0: curr_token._0 }); case /* LIDENT */11 : - var r = curr_token._0; + let r = curr_token._0; switch (r) { case "defined" : case "undefined" : @@ -23354,8 +23354,8 @@ function directive_parse(token_with_comments, lexbuf) { _2: curr_loc }); } - var t = token(undefined); - var loc = curr(lexbuf); + let t = token(undefined); + let loc = curr(lexbuf); if (typeof t === "number") { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -23364,7 +23364,7 @@ function directive_parse(token_with_comments, lexbuf) { }); } if (t.TAG === /* UIDENT */17) { - var s = t._0; + let s = t._0; if (calc) { if (Caml_string.get(r, 0) === /* 'u' */117) { return !defined(s); @@ -23397,13 +23397,13 @@ function directive_parse(token_with_comments, lexbuf) { _0: curr_token._0[0] }); case /* UIDENT */17 : - var value_v = query(curr_loc, curr_token._0); + let value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { push(e); if (typeof value_v !== "number" && value_v.TAG === /* Dir_bool */0) { return value_v._0; } - var ty = type_of_directive(value_v); + let ty = type_of_directive(value_v); throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -23423,8 +23423,8 @@ function directive_parse(token_with_comments, lexbuf) { } } }; - var v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); - var match = token(undefined); + let v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); + let match = token(undefined); if (match === 88) { return v; } @@ -23443,7 +23443,7 @@ function is_elif(i) { } } -var keyword_table = create_hashtable(149, { +let keyword_table = create_hashtable(149, { hd: [ "and", /* AND */2 @@ -23802,13 +23802,13 @@ var keyword_table = create_hashtable(149, { } }); -var initial_string_buffer = Caml_bytes.caml_create_bytes(256); +let initial_string_buffer = Caml_bytes.caml_create_bytes(256); -var string_buff = { +let string_buff = { contents: initial_string_buffer }; -var string_index = { +let string_index = { contents: 0 }; @@ -23819,7 +23819,7 @@ function reset_string_buffer(param) { function store_string_char(c) { if (string_index.contents >= string_buff.contents.length) { - var new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); + let new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); Stdlib__Bytes.blit(string_buff.contents, 0, new_buff, 0, string_buff.contents.length); string_buff.contents = new_buff; } @@ -23828,55 +23828,55 @@ function store_string_char(c) { } function store_string(s) { - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ store_string_char(Caml_string.get(s, i)); } } function get_stored_string(param) { - var s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); + let s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); string_buff.contents = initial_string_buffer; return s; } -var string_start_loc = { +let string_start_loc = { contents: none }; -var comment_start_loc = { +let comment_start_loc = { contents: /* [] */0 }; -var is_in_string = { +let is_in_string = { contents: false }; -var print_warnings = { +let print_warnings = { contents: true }; -var if_then_else = { +let if_then_else = { contents: /* Dir_out */2 }; -var sharp_look_ahead = { +let sharp_look_ahead = { contents: undefined }; function with_comment_buffer(comment, lexbuf) { - var start_loc = curr(lexbuf); + let start_loc = curr(lexbuf); comment_start_loc.contents = { hd: start_loc, tl: /* [] */0 }; reset_string_buffer(undefined); - var end_loc = Curry._1(comment, lexbuf); - var s = get_stored_string(undefined); + let end_loc = Curry._1(comment, lexbuf); + let s = get_stored_string(undefined); reset_string_buffer(undefined); - var loc_loc_start = start_loc.loc_start; - var loc_loc_end = end_loc.loc_end; - var loc_loc_ghost = start_loc.loc_ghost; - var loc = { + let loc_loc_start = start_loc.loc_start; + let loc_loc_end = end_loc.loc_end; + let loc_loc_ghost = start_loc.loc_ghost; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: loc_loc_ghost @@ -23915,7 +23915,7 @@ function char_for_backslash(c) { } function char_for_decimal_code(lexbuf, i) { - var c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; + let c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; if (!(c < 0 || c > 255)) { return Stdlib__Char.chr(c); } @@ -23933,12 +23933,12 @@ function char_for_decimal_code(lexbuf, i) { } function char_for_hexadecimal_code(lexbuf, i) { - var d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); - var val1 = d1 >= 97 ? d1 - 87 | 0 : ( + let d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); + let val1 = d1 >= 97 ? d1 - 87 | 0 : ( d1 >= 65 ? d1 - 55 | 0 : d1 - 48 | 0 ); - var d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); - var val2 = d2 >= 97 ? d2 - 87 | 0 : ( + let d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); + let val2 = d2 >= 97 ? d2 - 87 | 0 : ( d2 >= 65 ? d2 - 55 | 0 : d2 - 48 | 0 ); return Stdlib__Char.chr((val1 << 4) + val2 | 0); @@ -23968,13 +23968,13 @@ function cvt_nativeint_literal(s) { } function remove_underscores(s) { - var l = s.length; - var b = Caml_bytes.caml_create_bytes(l); - var _src = 0; - var _dst = 0; + let l = s.length; + let b = Caml_bytes.caml_create_bytes(l); + let _src = 0; + let _dst = 0; while(true) { - var dst = _dst; - var src = _src; + let dst = _dst; + let src = _src; if (src >= l) { if (dst >= l) { return s; @@ -23982,7 +23982,7 @@ function remove_underscores(s) { return Stdlib__Bytes.sub_string(b, 0, dst); } } - var c = Caml_string.get(s, src); + let c = Caml_string.get(s, src); if (c !== 95) { Caml_bytes.set(b, dst, c); _dst = dst + 1 | 0; @@ -23995,8 +23995,8 @@ function remove_underscores(s) { } function get_label_name(lexbuf) { - var s = Stdlib__Lexing.lexeme(lexbuf); - var name = Stdlib__String.sub(s, 1, s.length - 2 | 0); + let s = Stdlib__Lexing.lexeme(lexbuf); + let name = Stdlib__String.sub(s, 1, s.length - 2 | 0); if (Stdlib__Hashtbl.mem(keyword_table, name)) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24011,8 +24011,8 @@ function get_label_name(lexbuf) { } function update_loc(lexbuf, file, line, absolute, chars) { - var pos = lexbuf.lex_curr_p; - var new_file = file !== undefined ? file : pos.pos_fname; + let pos = lexbuf.lex_curr_p; + let new_file = file !== undefined ? file : pos.pos_fname; lexbuf.lex_curr_p = { pos_fname: new_file, pos_lnum: absolute ? line : pos.pos_lnum + line | 0, @@ -24021,15 +24021,15 @@ function update_loc(lexbuf, file, line, absolute, chars) { }; } -var preprocessor = { +let preprocessor = { contents: undefined }; -var escaped_newlines = { +let escaped_newlines = { contents: false }; -var comment_list = { +let comment_list = { contents: /* [] */0 }; @@ -24260,7 +24260,7 @@ register_error_of_exn(function (param) { }); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xa4\xff\xa5\xff\xe0\0\x03\x01&\x01I\x01l\x01\x8f\x01\xbc\xff\xb2\x01\xd7\x01\xc4\xff[\0\xfc\x01\x1f\x02D\0G\0T\0B\x02\xd5\xff\xd7\xff\xda\xffe\x02\xc4\x02\xe7\x02Y\0\xff\0\x05\x03\xec\xffR\x03s\x03\xbc\x03\x8c\x04\\\x05,\x06\x0b\x07g\x077\b}\0\xfe\xff\x01\0\x05\0\xff\xff\x06\0\x07\0\x16\t4\t\x04\n\xfa\xff\xf9\xff\xd4\n\xa4\x0b\xf7\xff\xf6\xff\xed\xff\xee\xff\xef\xff]\0v\x02[\0n\0\xe7\x02\x07\x04\xd7\x04e\x02\xfe\x02v\0\xc2\xff\xeb\xffx\x05\x84\f`\0q\0\x0b\0\xea\xff\xe9\xff\xe5\xff\xe5\x04\x80\0s\0\xe8\xff\xe0\0u\0\xe7\xffw\x06\x93\0\xe6\xff\x92\0\xe1\xff\x94\0\xe0\xff\xd9\0\x84\f\xdf\xff\xab\f\xaf\b\xae\x06\xde\xff\f\0\x18\x01,\x01P\x01-\x01\xde\xff\r\0\xd9\f\0\r#\rI\r\xd2\xff\xce\xff\xcf\xff\xd0\xff\xcc\xffl\r\x9a\0\xb7\0\xc5\xff\xc6\xff\xc7\xff\xc7\0\xb6\xff\xb8\xff\xbf\xff\x8f\r\xbb\xff\xbd\xff\xb2\r\xd5\r\xf8\r\x1b\x0e\xeb\x05\xf3\xff\xf4\xff\x11\0\xf5\xff>\x02\xac\x07\xfd\xff\xdf\0\xf1\0\xff\xff\xfe\xff\xfc\xff\xc8\x07-\x0e\xfa\0\xfc\0\x12\0\xfb\xff\xfa\xff\xf9\xff\x80\t\x1e\x03\x03\x01\xf8\xff\\\x03\x04\x01\xf7\xffO\n\x05\x01\xf6\xff+\x01\xc7\x01\xf7\xff\xf8\xff\xf9\xff;\x01v\x0e\xff\xff\xfa\xff\x1f\x0b$\x04\xfd\xff&\x01E\x01^\x01\xfc\x04\xfc\xff\xef\x0b\xfb\xff_\x01\xb5\x01\xfc\xff\xee\x06\xfe\xff\xff\xffo\x01p\x01\xfd\xffJ\x07\x10\x01\x13\x012\x01?\x01\x1a\x01k\x01!\x01\x13\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xffX\0W\0T\0S\0L\0J\0\xff\xffA\0>\0\xff\xff7\x006\x004\x002\0.\0,\0O\0\xff\xff\xff\xff\xff\xff#\0\"\0)\0'\0&\0<\0\xff\xff\x0e\0\x0e\0\r\0\f\0\x0b\0\n\0\x07\0\x04\0\x03\0\x02\0\xff\xff[\0[\0\xff\xff\xff\xff\xff\xffR\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\x0e\0\x0e\0\x0e\0\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\0\x1a\0\x1a\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\0\xff\xff\x1c\0\xff\xff\x1d\0V\0\xff\xffY\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff$\0U\0P\0+\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\0F\0E\0\xff\xff\xff\xff\xff\xffH\0\xff\xff\xff\xff\xff\xff?\0\xff\xff\xff\xffQ\0K\0N\0M\0\xff\xff\xff\xff\xff\xff\f\0\xff\xff\f\0\f\0\xff\xff\f\0\f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\b\0\b\0\xff\xff\xff\xff\x05\0\x05\0\xff\xff\x01\0\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", lex_default: "\x01\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffH\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xffM\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xffd\0\xff\xff\0\0\xff\xffd\0e\0d\0g\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\x85\0\0\0\0\0\xff\xff\0\0\x93\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xa5\0\0\0\0\0\0\0\xff\xff\xab\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xb8\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xc2\0\xc5\0\xff\xff\xc5\0\xff\xff\xff\xff\0\0", @@ -24276,10 +24276,10 @@ var __ocaml_lex_tables = { function token(lexbuf) { lexbuf.lex_mem = Caml_array.make(8, -1); - var ___ocaml_lex_state = 0; + let ___ocaml_lex_state = 0; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : if (!escaped_newlines.contents) { @@ -24334,12 +24334,12 @@ function token(lexbuf) { _0: get_label_name(lexbuf) }; case 10 : - var s = Stdlib__Lexing.lexeme(lexbuf); + let s = Stdlib__Lexing.lexeme(lexbuf); try { return Stdlib__Hashtbl.find(keyword_table, s); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* LIDENT */11, @@ -24379,7 +24379,7 @@ function token(lexbuf) { }; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24405,7 +24405,7 @@ function token(lexbuf) { }; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24426,7 +24426,7 @@ function token(lexbuf) { }; } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24447,7 +24447,7 @@ function token(lexbuf) { }; } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24463,7 +24463,7 @@ function token(lexbuf) { case 19 : reset_string_buffer(undefined); is_in_string.contents = true; - var string_start = lexbuf.lex_start_p; + let string_start = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); string(lexbuf); is_in_string.contents = false; @@ -24477,10 +24477,10 @@ function token(lexbuf) { }; case 20 : reset_string_buffer(undefined); - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); is_in_string.contents = true; - var string_start$1 = lexbuf.lex_start_p; + let string_start$1 = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); is_in_string.contents = false; @@ -24519,8 +24519,8 @@ function token(lexbuf) { _0: char_for_hexadecimal_code(lexbuf, 3) }; case 26 : - var l = Stdlib__Lexing.lexeme(lexbuf); - var esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); + let l = Stdlib__Lexing.lexeme(lexbuf); + let esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -24530,7 +24530,7 @@ function token(lexbuf) { _2: curr(lexbuf) }); case 27 : - var match = with_comment_buffer(comment, lexbuf); + let match = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -24539,14 +24539,14 @@ function token(lexbuf) { ] }; case 28 : - var match$1 = with_comment_buffer(comment, lexbuf); + let match$1 = with_comment_buffer(comment, lexbuf); return { TAG: /* DOCSTRING */19, _0: docstring(match$1[0], match$1[1]) }; case 29 : - var stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); - var match$2 = with_comment_buffer((function(stars){ + let stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let match$2 = with_comment_buffer((function(stars){ return function (lexbuf) { store_string("*" + stars); return __ocaml_lex_comment_rec(lexbuf, 132); @@ -24563,7 +24563,7 @@ function token(lexbuf) { if (print_warnings.contents) { prerr_warning(curr(lexbuf), /* Comment_start */0); } - var match$3 = with_comment_buffer(comment, lexbuf); + let match$3 = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -24572,7 +24572,7 @@ function token(lexbuf) { ] }; case 31 : - var stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); + let stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); return { TAG: /* COMMENT */18, _0: [ @@ -24581,10 +24581,10 @@ function token(lexbuf) { ] }; case 32 : - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Comment_not_end */1); lexbuf.lex_curr_pos = lexbuf.lex_curr_pos - 1 | 0; - var curpos = lexbuf.lex_curr_p; + let curpos = lexbuf.lex_curr_p; lexbuf.lex_curr_p = { pos_fname: curpos.pos_fname, pos_lnum: curpos.pos_lnum, @@ -24593,8 +24593,8 @@ function token(lexbuf) { }; return /* STAR */86; case 33 : - var num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); + let num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); update_loc(lexbuf, name, Caml_format.caml_int_of_string(num), true, 0); return token(lexbuf); case 34 : @@ -24767,8 +24767,8 @@ function token(lexbuf) { function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : update_loc(lexbuf, undefined, 1, false, 0); @@ -24783,8 +24783,8 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { _2: string_start_loc.contents }); case 2 : - var edelim = Stdlib__Lexing.lexeme(lexbuf); - var edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); + let edelim = Stdlib__Lexing.lexeme(lexbuf); + let edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); if (delim === edelim$1) { return ; } @@ -24805,15 +24805,15 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { function string(lexbuf) { lexbuf.lex_mem = Caml_array.make(2, -1); - var ___ocaml_lex_state = 164; + let ___ocaml_lex_state = 164; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return ; case 1 : - var space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); update_loc(lexbuf, undefined, 1, false, space.length); return string(lexbuf); case 2 : @@ -24829,7 +24829,7 @@ function string(lexbuf) { if (Caml_obj.caml_notequal(comment_start_loc.contents, /* [] */0)) { return string(lexbuf); } - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Illegal_backslash */7); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 0)); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 1)); @@ -24865,8 +24865,8 @@ function comment(lexbuf) { function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : comment_start_loc.contents = { @@ -24877,7 +24877,7 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 1 : - var match = comment_start_loc.contents; + let match = comment_start_loc.contents; if (match) { if (match.tl) { comment_start_loc.contents = match.tl; @@ -24904,16 +24904,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { string(lexbuf); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$4) { - var match$1 = exn._1; + let match$1 = exn._1; if (typeof match$1 === "number") { if (match$1) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var match$2 = comment_start_loc.contents; + let match$2 = comment_start_loc.contents; if (match$2) { - var start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24943,8 +24943,8 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 3 : - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); string_start_loc.contents = curr(lexbuf); store_string(Stdlib__Lexing.lexeme(lexbuf)); is_in_string.contents = true; @@ -24952,16 +24952,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === $$Error$4) { - var match$3 = exn$1._1; + let match$3 = exn$1._1; if (typeof match$3 === "number") { if (match$3) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var match$4 = comment_start_loc.contents; + let match$4 = comment_start_loc.contents; if (match$4) { - var start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24998,9 +24998,9 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 10 : - var match$5 = comment_start_loc.contents; + let match$5 = comment_start_loc.contents; if (match$5) { - var start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -25042,12 +25042,12 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { } function at_bol(lexbuf) { - var pos = lexbuf.lex_start_p; + let pos = lexbuf.lex_start_p; return pos.pos_cnum === pos.pos_bol; } function token_with_comments(lexbuf) { - var match = preprocessor.contents; + let match = preprocessor.contents; if (match !== undefined) { return Curry._2(match[1], token, lexbuf); } else { @@ -25056,13 +25056,13 @@ function token_with_comments(lexbuf) { } function token$1(lexbuf) { - var post_pos = lexbuf.lex_curr_p; - var attach = function (lines, docs, pre_pos) { + let post_pos = lexbuf.lex_curr_p; + let attach = function (lines, docs, pre_pos) { if (typeof docs === "number") { return ; } if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a)); return set_pre_extra_docstrings(pre_pos, Stdlib__List.rev(a)); @@ -25071,9 +25071,9 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, a); } } - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a$1)); set_post_extra_docstrings(post_pos, Stdlib__List.rev_append(f, Stdlib__List.rev(b))); @@ -25087,26 +25087,26 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, b); } }; - var loop = function (_lines, _docs, lexbuf) { + let loop = function (_lines, _docs, lexbuf) { while(true) { - var docs = _docs; - var lines = _lines; - var doc = token_with_comments(lexbuf); + let docs = _docs; + let lines = _lines; + let doc = token_with_comments(lexbuf); if (typeof doc === "number") { switch (doc) { case /* SHARP */84 : if (at_bol(lexbuf)) { - var cont = (function(lines,docs){ + let cont = (function(lines,docs){ return function cont(lexbuf) { return loop(lines, docs, lexbuf); } }(lines,docs)); - var look_ahead = function (token) { + let look_ahead = function (token) { sharp_look_ahead.contents = token; return /* SHARP */84; }; - var if_then_else$1 = if_then_else.contents; - var match = token_with_comments(lexbuf); + let if_then_else$1 = if_then_else.contents; + let match = token_with_comments(lexbuf); if (typeof match === "number") { switch (match) { case /* ELSE */23 : @@ -25134,9 +25134,9 @@ function token$1(lexbuf) { if_then_else.contents = /* Dir_if_true */0; return Curry._1(cont, lexbuf); } else { - var _param; + let _param; while(true) { - var token = token_with_comments(lexbuf); + let token = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -25145,7 +25145,7 @@ function token$1(lexbuf) { }); } if (Caml_obj.caml_equal(token, /* SHARP */84) && at_bol(lexbuf)) { - var token$1 = token_with_comments(lexbuf); + let token$1 = token_with_comments(lexbuf); if (typeof token$1 === "number") { if (token$1 === 24 || token$1 === 23) { if (token$1 >= 24) { @@ -25204,10 +25204,10 @@ function token$1(lexbuf) { if (if_then_else$1) { return Curry._1(look_ahead, match); } - var _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); + let _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); while(true) { - var else_seen = _else_seen; - var token$2 = token_with_comments(lexbuf); + let else_seen = _else_seen; + let token$2 = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token$2, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -25216,7 +25216,7 @@ function token$1(lexbuf) { }); } if (Caml_obj.caml_equal(token$2, /* SHARP */84) && at_bol(lexbuf)) { - var token$3 = token_with_comments(lexbuf); + let token$3 = token_with_comments(lexbuf); if (typeof token$3 === "number") { if (token$3 === 24 || token$3 === 23) { if (token$3 >= 24) { @@ -25256,7 +25256,7 @@ function token$1(lexbuf) { } break; case /* EOL */100 : - var lines$p = lines ? /* BlankLine */2 : /* NewLine */1; + let lines$p = lines ? /* BlankLine */2 : /* NewLine */1; _lines = lines$p; continue ; default: @@ -25265,18 +25265,18 @@ function token$1(lexbuf) { } else { switch (doc.TAG | 0) { case /* COMMENT */18 : - var match$1 = doc._0; + let match$1 = doc._0; add_comment([ match$1[0], match$1[1] ]); - var lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; + let lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; _lines = lines$p$1; continue ; case /* DOCSTRING */19 : - var doc$1 = doc._0; + let doc$1 = doc._0; add_docstring_comment(doc$1); - var docs$p; + let docs$p; if (typeof docs === "number") { docs$p = lines >= 2 ? ({ TAG: /* Before */1, @@ -25294,7 +25294,7 @@ function token$1(lexbuf) { } }); } else if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a, @@ -25311,9 +25311,9 @@ function token$1(lexbuf) { } }); } else { - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a$1, @@ -25343,7 +25343,7 @@ function token$1(lexbuf) { return doc; }; }; - var token$2 = sharp_look_ahead.contents; + let token$2 = sharp_look_ahead.contents; if (token$2 !== undefined) { sharp_look_ahead.contents = undefined; return token$2; @@ -25358,7 +25358,7 @@ function init$1(param) { is_in_string.contents = false; comment_start_loc.contents = /* [] */0; comment_list.contents = /* [] */0; - var match = preprocessor.contents; + let match = preprocessor.contents; if (match !== undefined) { return Curry._1(match[0], undefined); } @@ -25368,7 +25368,7 @@ function init$1(param) { function skip_phrase(lexbuf) { while(true) { try { - var match = token$1(lexbuf); + let match = token$1(lexbuf); if (typeof match === "number" && !(match !== 25 && match !== 83)) { return ; } else { @@ -25376,9 +25376,9 @@ function skip_phrase(lexbuf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$4) { - var tmp = exn._1; + let tmp = exn._1; if (typeof tmp === "number") { if (tmp === /* Unterminated_string */0) { continue ; @@ -25413,15 +25413,15 @@ function wrap$1(parsing_fun, lexbuf) { try { init(undefined); init$1(undefined); - var ast = Curry._2(parsing_fun, token$1, lexbuf); + let ast = Curry._2(parsing_fun, token$1, lexbuf); Stdlib__Parsing.clear_parser(undefined); warn_bad_docstrings(undefined); return ast; } catch (raw_err){ - var err = Caml_js_exceptions.internalToOCamlException(raw_err); + let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.MEL_EXN_ID === $$Error$4) { - var tmp = err._1; + let tmp = err._1; if (typeof tmp === "number") { throw new Caml_js_exceptions.MelangeError(err.MEL_EXN_ID, err); } @@ -25446,7 +25446,7 @@ function wrap$1(parsing_fun, lexbuf) { } } - var loc = curr(lexbuf); + let loc = curr(lexbuf); if (input_name.contents === "//toplevel//") { maybe_skip_phrase(lexbuf); } @@ -25512,7 +25512,7 @@ function map_pattern_desc(f, d) { _2: Stdlib__List.map(f, d._2) }; case /* Tpat_variant */5 : - var p1 = d._1; + let p1 = d._1; if (p1 !== undefined) { return { TAG: /* Tpat_variant */5, @@ -25557,14 +25557,14 @@ function map_pattern_desc(f, d) { } } -var idents = { +let idents = { contents: /* [] */0 }; function bound_idents(_pat) { while(true) { - var pat = _pat; - var d = pat.pat_desc; + let pat = _pat; + let d = pat.pat_desc; if (typeof d === "number") { return iter_pattern_desc(bound_idents, d); } @@ -25600,7 +25600,7 @@ function bound_idents(_pat) { function pat_bound_idents(pat) { idents.contents = /* [] */0; bound_idents(pat); - var res = idents.contents; + let res = idents.contents; idents.contents = /* [] */0; return res; } @@ -25610,7 +25610,7 @@ function rev_let_bound_idents_with_loc(bindings) { Stdlib__List.iter((function (vb) { bound_idents(vb.vb_pat); }), bindings); - var res = idents.contents; + let res = idents.contents; idents.contents = /* [] */0; return res; } @@ -25622,11 +25622,11 @@ function let_bound_idents(pat) { } function alpha_pat(env, p) { - var d = p.pat_desc; + let d = p.pat_desc; if (typeof d !== "number") { switch (d.TAG | 0) { case /* Tpat_var */0 : - var tmp; + let tmp; try { tmp = { TAG: /* Tpat_var */0, @@ -25635,7 +25635,7 @@ function alpha_pat(env, p) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { tmp = /* Tpat_any */0; } else { @@ -25651,7 +25651,7 @@ function alpha_pat(env, p) { pat_attributes: p.pat_attributes }; case /* Tpat_alias */1 : - var new_p = alpha_pat(env, d._0); + let new_p = alpha_pat(env, d._0); try { return { pat_desc: { @@ -25668,7 +25668,7 @@ function alpha_pat(env, p) { }; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return new_p; } @@ -25847,16 +25847,16 @@ function leave_class_field(t) { } function TypedtreeMap_MakeMap(funarg) { - var map_structure = function (str) { - var str$1 = Curry._1(funarg.enter_structure, str); - var str_items = Stdlib__List.map(map_structure_item, str$1.str_items); + let map_structure = function (str) { + let str$1 = Curry._1(funarg.enter_structure, str); + let str_items = Stdlib__List.map(map_structure_item, str$1.str_items); return Curry._1(funarg.leave_structure, { str_items: str_items, str_type: str$1.str_type, str_final_env: str$1.str_final_env }); }; - var map_binding = function (vb) { + let map_binding = function (vb) { return { vb_pat: map_pattern(vb.vb_pat), vb_expr: map_expression(vb.vb_expr), @@ -25864,16 +25864,16 @@ function TypedtreeMap_MakeMap(funarg) { vb_loc: vb.vb_loc }; }; - var map_type_parameter = function (param) { + let map_type_parameter = function (param) { return [ map_core_type(param[0]), param[1] ]; }; - var map_class_type = function (ct) { - var ct$1 = Curry._1(funarg.enter_class_type, ct); - var csg = ct$1.cltyp_desc; - var cltyp_desc; + let map_class_type = function (ct) { + let ct$1 = Curry._1(funarg.enter_class_type, ct); + let csg = ct$1.cltyp_desc; + let cltyp_desc; switch (csg.TAG | 0) { case /* Tcty_constr */0 : cltyp_desc = { @@ -25907,7 +25907,7 @@ function TypedtreeMap_MakeMap(funarg) { cltyp_attributes: ct$1.cltyp_attributes }); }; - var map_constructor_declaration = function (cd) { + let map_constructor_declaration = function (cd) { return { cd_id: cd.cd_id, cd_name: cd.cd_name, @@ -25917,10 +25917,10 @@ function TypedtreeMap_MakeMap(funarg) { cd_attributes: cd.cd_attributes }; }; - var map_core_type = function (ct) { - var ct$1 = Curry._1(funarg.enter_core_type, ct); - var list = ct$1.ctyp_desc; - var ctyp_desc; + let map_core_type = function (ct) { + let ct$1 = Curry._1(funarg.enter_core_type, ct); + let list = ct$1.ctyp_desc; + let ctyp_desc; if (typeof list === "number") { ctyp_desc = ct$1.ctyp_desc; } else { @@ -26010,7 +26010,7 @@ function TypedtreeMap_MakeMap(funarg) { ctyp_attributes: ct$1.ctyp_attributes }); }; - var map_row_field = function (rf) { + let map_row_field = function (rf) { if (rf.TAG === /* Ttag */0) { return { TAG: /* Ttag */0, @@ -26026,9 +26026,9 @@ function TypedtreeMap_MakeMap(funarg) { }; } }; - var map_package_type = function (pack) { - var pack$1 = Curry._1(funarg.enter_package_type, pack); - var pack_fields = Stdlib__List.map((function (param) { + let map_package_type = function (pack) { + let pack$1 = Curry._1(funarg.enter_package_type, pack); + let pack_fields = Stdlib__List.map((function (param) { return [ param[0], map_core_type(param[1]) @@ -26041,10 +26041,10 @@ function TypedtreeMap_MakeMap(funarg) { pack_txt: pack$1.pack_txt }); }; - var map_class_expr = function (cexpr) { - var cexpr$1 = Curry._1(funarg.enter_class_expr, cexpr); - var clstr = cexpr$1.cl_desc; - var cl_desc; + let map_class_expr = function (cexpr) { + let cexpr$1 = Curry._1(funarg.enter_class_expr, cexpr); + let clstr = cexpr$1.cl_desc; + let cl_desc; switch (clstr.TAG | 0) { case /* Tcl_ident */0 : cl_desc = { @@ -26090,7 +26090,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tcl_let */4 : - var rec_flat = clstr._0; + let rec_flat = clstr._0; cl_desc = { TAG: /* Tcl_let */4, _0: rec_flat, @@ -26106,8 +26106,8 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tcl_constraint */5 : - var clty = clstr._1; - var cl = clstr._0; + let clty = clstr._1; + let cl = clstr._0; cl_desc = clty !== undefined ? ({ TAG: /* Tcl_constraint */5, _0: map_class_expr(cl), @@ -26134,13 +26134,13 @@ function TypedtreeMap_MakeMap(funarg) { cl_attributes: cexpr$1.cl_attributes }); }; - var map_expression = function (exp) { - var exp$1 = Curry._1(funarg.enter_expression, exp); - var list = exp$1.exp_desc; - var exp_desc; + let map_expression = function (exp) { + let exp$1 = Curry._1(funarg.enter_expression, exp); + let list = exp$1.exp_desc; + let exp_desc; switch (list.TAG | 0) { case /* Texp_let */2 : - var rec_flag = list._0; + let rec_flag = list._0; exp_desc = { TAG: /* Texp_let */2, _0: rec_flag, @@ -26161,8 +26161,8 @@ function TypedtreeMap_MakeMap(funarg) { TAG: /* Texp_apply */4, _0: map_expression(list._0), _1: Stdlib__List.map((function (param) { - var expo = param[1]; - var expo$1 = expo !== undefined ? map_expression(expo) : expo; + let expo = param[1]; + let expo$1 = expo !== undefined ? map_expression(expo) : expo; return [ param[0], expo$1, @@ -26202,8 +26202,8 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Texp_variant */9 : - var expo = list._1; - var expo$1 = expo !== undefined ? map_expression(expo) : expo; + let expo = list._1; + let expo$1 = expo !== undefined ? map_expression(expo) : expo; exp_desc = { TAG: /* Texp_variant */9, _0: list._0, @@ -26211,15 +26211,15 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Texp_record */10 : - var expo$2 = list._1; - var list$1 = Stdlib__List.map((function (param) { + let expo$2 = list._1; + let list$1 = Stdlib__List.map((function (param) { return [ param[0], param[1], map_expression(param[2]) ]; }), list._0); - var expo$3 = expo$2 !== undefined ? map_expression(expo$2) : expo$2; + let expo$3 = expo$2 !== undefined ? map_expression(expo$2) : expo$2; exp_desc = { TAG: /* Texp_record */10, _0: list$1, @@ -26250,7 +26250,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Texp_ifthenelse */14 : - var expo$4 = list._2; + let expo$4 = list._2; exp_desc = { TAG: /* Texp_ifthenelse */14, _0: map_expression(list._0), @@ -26355,7 +26355,7 @@ function TypedtreeMap_MakeMap(funarg) { break; } - var exp_extra = Stdlib__List.map(map_exp_extra, exp$1.exp_extra); + let exp_extra = Stdlib__List.map(map_exp_extra, exp$1.exp_extra); return Curry._1(funarg.leave_expression, { exp_desc: exp_desc, exp_loc: exp$1.exp_loc, @@ -26365,10 +26365,10 @@ function TypedtreeMap_MakeMap(funarg) { exp_attributes: exp$1.exp_attributes }); }; - var map_structure_item = function (item) { - var item$1 = Curry._1(funarg.enter_structure_item, item); - var vd = item$1.str_desc; - var str_desc; + let map_structure_item = function (item) { + let item$1 = Curry._1(funarg.enter_structure_item, item); + let vd = item$1.str_desc; + let str_desc; switch (vd.TAG | 0) { case /* Tstr_eval */0 : str_desc = { @@ -26378,7 +26378,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tstr_value */1 : - var rec_flag = vd._0; + let rec_flag = vd._0; str_desc = { TAG: /* Tstr_value */1, _0: rec_flag, @@ -26416,7 +26416,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tstr_recmodule */7 : - var list = Stdlib__List.map(map_module_binding, vd._0); + let list = Stdlib__List.map(map_module_binding, vd._0); str_desc = { TAG: /* Tstr_recmodule */7, _0: list @@ -26435,7 +26435,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tstr_class */10 : - var list$1 = Stdlib__List.map((function (param) { + let list$1 = Stdlib__List.map((function (param) { return [ map_class_declaration(param[0]), param[1], @@ -26448,7 +26448,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tstr_class_type */11 : - var list$2 = Stdlib__List.map((function (param) { + let list$2 = Stdlib__List.map((function (param) { return [ param[0], param[1], @@ -26461,7 +26461,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tstr_include */12 : - var incl = vd._0; + let incl = vd._0; str_desc = { TAG: /* Tstr_include */12, _0: { @@ -26486,10 +26486,10 @@ function TypedtreeMap_MakeMap(funarg) { str_env: item$1.str_env }); }; - var map_module_type = function (mty) { - var mty$1 = Curry._1(funarg.enter_module_type, mty); - var sg = mty$1.mty_desc; - var mty_desc; + let map_module_type = function (mty) { + let mty$1 = Curry._1(funarg.enter_module_type, mty); + let sg = mty$1.mty_desc; + let mty_desc; switch (sg.TAG | 0) { case /* Tmty_signature */1 : mty_desc = { @@ -26539,10 +26539,10 @@ function TypedtreeMap_MakeMap(funarg) { mty_attributes: mty$1.mty_attributes }); }; - var map_module_expr = function (mexpr) { - var mexpr$1 = Curry._1(funarg.enter_module_expr, mexpr); - var st = mexpr$1.mod_desc; - var mod_desc; + let map_module_expr = function (mexpr) { + let mexpr$1 = Curry._1(funarg.enter_module_expr, mexpr); + let st = mexpr$1.mod_desc; + let mod_desc; switch (st.TAG | 0) { case /* Tmod_ident */0 : mod_desc = mexpr$1.mod_desc; @@ -26571,9 +26571,9 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tmod_constraint */4 : - var mtype = st._2; - var mod_type = st._1; - var mexpr$2 = st._0; + let mtype = st._2; + let mod_type = st._1; + let mexpr$2 = st._0; mod_desc = mtype ? ({ TAG: /* Tmod_constraint */4, _0: map_module_expr(mexpr$2), @@ -26607,10 +26607,10 @@ function TypedtreeMap_MakeMap(funarg) { mod_attributes: mexpr$1.mod_attributes }); }; - var map_class_field = function (cf) { - var cf$1 = Curry._1(funarg.enter_class_field, cf); - var exp = cf$1.cf_desc; - var cf_desc; + let map_class_field = function (cf) { + let cf$1 = Curry._1(funarg.enter_class_field, cf); + let exp = cf$1.cf_desc; + let cf_desc; switch (exp.TAG | 0) { case /* Tcf_inherit */0 : cf_desc = { @@ -26623,10 +26623,10 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tcf_val */1 : - var cty = exp._3; - var ident = exp._2; - var mut = exp._1; - var lab = exp._0; + let cty = exp._3; + let ident = exp._2; + let mut = exp._1; + let lab = exp._0; cf_desc = cty.TAG === /* Tcfk_virtual */0 ? ({ TAG: /* Tcf_val */1, _0: lab, @@ -26651,9 +26651,9 @@ function TypedtreeMap_MakeMap(funarg) { }); break; case /* Tcf_method */2 : - var cty$1 = exp._2; - var priv = exp._1; - var lab$1 = exp._0; + let cty$1 = exp._2; + let priv = exp._1; + let lab$1 = exp._0; cf_desc = cty$1.TAG === /* Tcfk_virtual */0 ? ({ TAG: /* Tcf_method */2, _0: lab$1, @@ -26697,16 +26697,16 @@ function TypedtreeMap_MakeMap(funarg) { cf_attributes: cf$1.cf_attributes }); }; - var map_pattern = function (pat) { - var pat$1 = Curry._1(funarg.enter_pattern, pat); - var list = pat$1.pat_desc; - var pat_desc; + let map_pattern = function (pat) { + let pat$1 = Curry._1(funarg.enter_pattern, pat); + let list = pat$1.pat_desc; + let pat_desc; if (typeof list === "number") { pat_desc = pat$1.pat_desc; } else { switch (list.TAG | 0) { case /* Tpat_alias */1 : - var pat1 = map_pattern(list._0); + let pat1 = map_pattern(list._0); pat_desc = { TAG: /* Tpat_alias */1, _0: pat1, @@ -26729,8 +26729,8 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tpat_variant */5 : - var pato = list._1; - var pato$1 = pato !== undefined ? map_pattern(pato) : pato; + let pato = list._1; + let pato$1 = pato !== undefined ? map_pattern(pato) : pato; pat_desc = { TAG: /* Tpat_variant */5, _0: list._0, @@ -26775,7 +26775,7 @@ function TypedtreeMap_MakeMap(funarg) { pat_desc = pat$1.pat_desc; } } - var pat_extra = Stdlib__List.map(map_pat_extra, pat$1.pat_extra); + let pat_extra = Stdlib__List.map(map_pat_extra, pat$1.pat_extra); return Curry._1(funarg.leave_pattern, { pat_desc: pat_desc, pat_loc: pat$1.pat_loc, @@ -26785,20 +26785,20 @@ function TypedtreeMap_MakeMap(funarg) { pat_attributes: pat$1.pat_attributes }); }; - var map_class_signature = function (cs) { - var cs$1 = Curry._1(funarg.enter_class_signature, cs); - var csig_self = map_core_type(cs$1.csig_self); - var csig_fields = Stdlib__List.map(map_class_type_field, cs$1.csig_fields); + let map_class_signature = function (cs) { + let cs$1 = Curry._1(funarg.enter_class_signature, cs); + let csig_self = map_core_type(cs$1.csig_self); + let csig_fields = Stdlib__List.map(map_class_type_field, cs$1.csig_fields); return Curry._1(funarg.leave_class_signature, { csig_self: csig_self, csig_fields: csig_fields, csig_type: cs$1.csig_type }); }; - var map_class_structure = function (cs) { - var cs$1 = Curry._1(funarg.enter_class_structure, cs); - var cstr_self = map_pattern(cs$1.cstr_self); - var cstr_fields = Stdlib__List.map(map_class_field, cs$1.cstr_fields); + let map_class_structure = function (cs) { + let cs$1 = Curry._1(funarg.enter_class_structure, cs); + let cstr_self = map_pattern(cs$1.cstr_self); + let cstr_fields = Stdlib__List.map(map_class_field, cs$1.cstr_fields); return Curry._1(funarg.leave_class_structure, { cstr_self: cstr_self, cstr_fields: cstr_fields, @@ -26806,10 +26806,10 @@ function TypedtreeMap_MakeMap(funarg) { cstr_meths: cs$1.cstr_meths }); }; - var map_exp_extra = function (exp_extra) { - var attrs = exp_extra[2]; - var loc = exp_extra[1]; - var desc = exp_extra[0]; + let map_exp_extra = function (exp_extra) { + let attrs = exp_extra[2]; + let loc = exp_extra[1]; + let desc = exp_extra[0]; switch (desc.TAG | 0) { case /* Texp_constraint */0 : return [ @@ -26821,7 +26821,7 @@ function TypedtreeMap_MakeMap(funarg) { attrs ]; case /* Texp_coerce */1 : - var ct1 = desc._0; + let ct1 = desc._0; if (ct1 !== undefined) { return [ { @@ -26844,7 +26844,7 @@ function TypedtreeMap_MakeMap(funarg) { ]; } case /* Texp_poly */3 : - var ct = desc._0; + let ct = desc._0; if (ct !== undefined) { return [ { @@ -26863,17 +26863,17 @@ function TypedtreeMap_MakeMap(funarg) { } }; - var map_case = function (param) { + let map_case = function (param) { return { c_lhs: map_pattern(param.c_lhs), c_guard: may_map(map_expression, param.c_guard), c_rhs: map_expression(param.c_rhs) }; }; - var map_signature_item = function (item) { - var item$1 = Curry._1(funarg.enter_signature_item, item); - var vd = item$1.sig_desc; - var sig_desc; + let map_signature_item = function (item) { + let item$1 = Curry._1(funarg.enter_signature_item, item); + let vd = item$1.sig_desc; + let sig_desc; switch (vd.TAG | 0) { case /* Tsig_value */0 : sig_desc = { @@ -26900,7 +26900,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tsig_module */4 : - var md = vd._0; + let md = vd._0; sig_desc = { TAG: /* Tsig_module */4, _0: { @@ -26936,7 +26936,7 @@ function TypedtreeMap_MakeMap(funarg) { sig_desc = item$1.sig_desc; break; case /* Tsig_include */8 : - var incl = vd._0; + let incl = vd._0; sig_desc = { TAG: /* Tsig_include */8, _0: { @@ -26970,13 +26970,13 @@ function TypedtreeMap_MakeMap(funarg) { sig_loc: item$1.sig_loc }); }; - var map_extension_constructor = function (ext) { - var ext$1 = Curry._1(funarg.enter_extension_constructor, ext); - var match = ext$1.ext_kind; - var ext_kind; + let map_extension_constructor = function (ext) { + let ext$1 = Curry._1(funarg.enter_extension_constructor, ext); + let match = ext$1.ext_kind; + let ext_kind; if (match.TAG === /* Text_decl */0) { - var args = Stdlib__List.map(map_core_type, match._0); - var ret = may_map(map_core_type, match._1); + let args = Stdlib__List.map(map_core_type, match._0); + let ret = may_map(map_core_type, match._1); ext_kind = { TAG: /* Text_decl */0, _0: args, @@ -26998,28 +26998,28 @@ function TypedtreeMap_MakeMap(funarg) { ext_attributes: ext$1.ext_attributes }); }; - var map_type_declaration = function (decl) { - var decl$1 = Curry._1(funarg.enter_type_declaration, decl); - var typ_params = Stdlib__List.map(map_type_parameter, decl$1.typ_params); - var typ_cstrs = Stdlib__List.map((function (param) { + let map_type_declaration = function (decl) { + let decl$1 = Curry._1(funarg.enter_type_declaration, decl); + let typ_params = Stdlib__List.map(map_type_parameter, decl$1.typ_params); + let typ_cstrs = Stdlib__List.map((function (param) { return [ map_core_type(param[0]), map_core_type(param[1]), param[2] ]; }), decl$1.typ_cstrs); - var list = decl$1.typ_kind; - var typ_kind; + let list = decl$1.typ_kind; + let typ_kind; if (typeof list === "number") { typ_kind = list === /* Ttype_abstract */0 ? /* Ttype_abstract */0 : /* Ttype_open */1; } else if (list.TAG === /* Ttype_variant */0) { - var list$1 = Stdlib__List.map(map_constructor_declaration, list._0); + let list$1 = Stdlib__List.map(map_constructor_declaration, list._0); typ_kind = { TAG: /* Ttype_variant */0, _0: list$1 }; } else { - var list$2 = Stdlib__List.map((function (ld) { + let list$2 = Stdlib__List.map((function (ld) { return { ld_id: ld.ld_id, ld_name: ld.ld_name, @@ -27034,7 +27034,7 @@ function TypedtreeMap_MakeMap(funarg) { _0: list$2 }; } - var typ_manifest = may_map(map_core_type, decl$1.typ_manifest); + let typ_manifest = may_map(map_core_type, decl$1.typ_manifest); return Curry._1(funarg.leave_type_declaration, { typ_id: decl$1.typ_id, typ_name: decl$1.typ_name, @@ -27048,10 +27048,10 @@ function TypedtreeMap_MakeMap(funarg) { typ_attributes: decl$1.typ_attributes }); }; - var map_class_description = function (cd) { - var cd$1 = Curry._1(funarg.enter_class_description, cd); - var ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); - var ci_expr = map_class_type(cd$1.ci_expr); + let map_class_description = function (cd) { + let cd$1 = Curry._1(funarg.enter_class_description, cd); + let ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); + let ci_expr = map_class_type(cd$1.ci_expr); return Curry._1(funarg.leave_class_description, { ci_virt: cd$1.ci_virt, ci_params: ci_params, @@ -27067,10 +27067,10 @@ function TypedtreeMap_MakeMap(funarg) { ci_attributes: cd$1.ci_attributes }); }; - var map_class_type_declaration = function (cd) { - var cd$1 = Curry._1(funarg.enter_class_type_declaration, cd); - var ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); - var ci_expr = map_class_type(cd$1.ci_expr); + let map_class_type_declaration = function (cd) { + let cd$1 = Curry._1(funarg.enter_class_type_declaration, cd); + let ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); + let ci_expr = map_class_type(cd$1.ci_expr); return Curry._1(funarg.leave_class_type_declaration, { ci_virt: cd$1.ci_virt, ci_params: ci_params, @@ -27086,8 +27086,8 @@ function TypedtreeMap_MakeMap(funarg) { ci_attributes: cd$1.ci_attributes }); }; - var map_module_type_declaration = function (mtd) { - var mtd$1 = Curry._1(funarg.enter_module_type_declaration, mtd); + let map_module_type_declaration = function (mtd) { + let mtd$1 = Curry._1(funarg.enter_module_type_declaration, mtd); return Curry._1(funarg.leave_module_type_declaration, { mtd_id: mtd$1.mtd_id, mtd_name: mtd$1.mtd_name, @@ -27096,10 +27096,10 @@ function TypedtreeMap_MakeMap(funarg) { mtd_loc: mtd$1.mtd_loc }); }; - var map_type_extension = function (tyext) { - var tyext$1 = Curry._1(funarg.enter_type_extension, tyext); - var tyext_params = Stdlib__List.map(map_type_parameter, tyext$1.tyext_params); - var tyext_constructors = Stdlib__List.map(map_extension_constructor, tyext$1.tyext_constructors); + let map_type_extension = function (tyext) { + let tyext$1 = Curry._1(funarg.enter_type_extension, tyext); + let tyext_params = Stdlib__List.map(map_type_parameter, tyext$1.tyext_params); + let tyext_constructors = Stdlib__List.map(map_extension_constructor, tyext$1.tyext_constructors); return Curry._1(funarg.leave_type_extension, { tyext_path: tyext$1.tyext_path, tyext_txt: tyext$1.tyext_txt, @@ -27109,9 +27109,9 @@ function TypedtreeMap_MakeMap(funarg) { tyext_attributes: tyext$1.tyext_attributes }); }; - var map_value_description = function (v) { - var v$1 = Curry._1(funarg.enter_value_description, v); - var val_desc = map_core_type(v$1.val_desc); + let map_value_description = function (v) { + let v$1 = Curry._1(funarg.enter_value_description, v); + let val_desc = map_core_type(v$1.val_desc); return Curry._1(funarg.leave_value_description, { val_id: v$1.val_id, val_name: v$1.val_name, @@ -27122,9 +27122,9 @@ function TypedtreeMap_MakeMap(funarg) { val_attributes: v$1.val_attributes }); }; - var map_with_constraint = function (cstr) { - var cstr$1 = Curry._1(funarg.enter_with_constraint, cstr); - var tmp; + let map_with_constraint = function (cstr) { + let cstr$1 = Curry._1(funarg.enter_with_constraint, cstr); + let tmp; switch (cstr$1.TAG | 0) { case /* Twith_type */0 : tmp = { @@ -27146,19 +27146,19 @@ function TypedtreeMap_MakeMap(funarg) { } return Curry._1(funarg.leave_with_constraint, tmp); }; - var map_signature = function (sg) { - var sg$1 = Curry._1(funarg.enter_signature, sg); - var sig_items = Stdlib__List.map(map_signature_item, sg$1.sig_items); + let map_signature = function (sg) { + let sg$1 = Curry._1(funarg.enter_signature, sg); + let sig_items = Stdlib__List.map(map_signature_item, sg$1.sig_items); return Curry._1(funarg.leave_signature, { sig_items: sig_items, sig_type: sg$1.sig_type, sig_final_env: sg$1.sig_final_env }); }; - var map_class_type_field = function (ctf) { - var ctf$1 = Curry._1(funarg.enter_class_type_field, ctf); - var ct = ctf$1.ctf_desc; - var ctf_desc; + let map_class_type_field = function (ctf) { + let ctf$1 = Curry._1(funarg.enter_class_type_field, ctf); + let ct = ctf$1.ctf_desc; + let ctf_desc; switch (ct.TAG | 0) { case /* Tctf_inherit */0 : ctf_desc = { @@ -27167,7 +27167,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tctf_val */1 : - var match = ct._0; + let match = ct._0; ctf_desc = { TAG: /* Tctf_val */1, _0: [ @@ -27179,7 +27179,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tctf_method */2 : - var match$1 = ct._0; + let match$1 = ct._0; ctf_desc = { TAG: /* Tctf_method */2, _0: [ @@ -27191,7 +27191,7 @@ function TypedtreeMap_MakeMap(funarg) { }; break; case /* Tctf_constraint */3 : - var match$2 = ct._0; + let match$2 = ct._0; ctf_desc = { TAG: /* Tctf_constraint */3, _0: [ @@ -27211,8 +27211,8 @@ function TypedtreeMap_MakeMap(funarg) { ctf_attributes: ctf$1.ctf_attributes }); }; - var map_pat_extra = function (pat_extra) { - var ct = pat_extra[0]; + let map_pat_extra = function (pat_extra) { + let ct = pat_extra[0]; if (typeof ct === "number" || ct.TAG !== /* Tpat_constraint */0) { return pat_extra; } else { @@ -27226,7 +27226,7 @@ function TypedtreeMap_MakeMap(funarg) { ]; } }; - var map_module_binding = function (x) { + let map_module_binding = function (x) { return { mb_id: x.mb_id, mb_name: x.mb_name, @@ -27235,10 +27235,10 @@ function TypedtreeMap_MakeMap(funarg) { mb_loc: x.mb_loc }; }; - var map_class_declaration = function (cd) { - var cd$1 = Curry._1(funarg.enter_class_declaration, cd); - var ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); - var ci_expr = map_class_expr(cd$1.ci_expr); + let map_class_declaration = function (cd) { + let cd$1 = Curry._1(funarg.enter_class_declaration, cd); + let ci_params = Stdlib__List.map(map_type_parameter, cd$1.ci_params); + let ci_expr = map_class_expr(cd$1.ci_expr); return Curry._1(funarg.leave_class_declaration, { ci_virt: cd$1.ci_virt, ci_params: ci_params, @@ -27266,14 +27266,14 @@ function TypedtreeMap_MakeMap(funarg) { }; } -var need_to_clear_env; +let need_to_clear_env; try { Caml_sys.caml_sys_getenv("OCAML_BINANNOT_WITHENV"); need_to_clear_env = false; } catch (raw_exn$2){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { need_to_clear_env = true; } else { @@ -27293,8 +27293,8 @@ function leave_pattern(p) { } function leave_expression(e) { - var exp_extra = Stdlib__List.map((function (exp_extra) { - var match = exp_extra[0]; + let exp_extra = Stdlib__List.map((function (exp_extra) { + let match = exp_extra[0]; if (match.TAG === /* Texp_open */2) { return [ { @@ -27403,7 +27403,7 @@ function leave_class_type(c) { }; } -var ClearEnv = Curry._1(TypedtreeMap_MakeMap, { +let ClearEnv = Curry._1(TypedtreeMap_MakeMap, { enter_structure: enter_structure, enter_value_description: enter_value_description, enter_type_declaration: enter_type_declaration, @@ -27538,11 +27538,11 @@ function output_cmt(oc, cmt) { Caml_external_polyfill.resolve("caml_output_value")(oc, cmt, /* [] */0); } -var saved_types = { +let saved_types = { contents: /* [] */0 }; -var value_deps = { +let value_deps = { contents: /* [] */0 }; @@ -27574,15 +27574,15 @@ function record_value_dependency(vd1, vd2) { function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) { if (binary_annotations.contents && !print_types.contents) { - var imports$1 = imports(undefined); - var oc = Stdlib.open_out_bin(filename); - var this_crc; + let imports$1 = imports(undefined); + let oc = Stdlib.open_out_bin(filename); + let this_crc; if (sg !== undefined) { - var cmi_cmi_flags = recursive_types.contents ? ({ + let cmi_cmi_flags = recursive_types.contents ? ({ hd: /* Rectypes */0, tl: /* [] */0 }) : /* [] */0; - var cmi = { + let cmi = { cmi_name: modname, cmi_sign: sg, cmi_crcs: imports$1, @@ -27592,16 +27592,16 @@ function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) } else { this_crc = undefined; } - var source_digest = may_map(Stdlib__Digest.file, sourcefile); - var cmt_cmt_annots = clear_env(binary_annots); - var cmt_cmt_value_dependencies = value_deps.contents; - var cmt_cmt_comments = Stdlib__List.rev(comment_list.contents); - var cmt_cmt_args = Caml_sys.caml_sys_argv(0); - var cmt_cmt_builddir = Caml_sys.caml_sys_getcwd(undefined); - var cmt_cmt_loadpath = load_path.contents; - var cmt_cmt_initial_env = need_to_clear_env ? keep_only_summary(initial_env) : initial_env; - var cmt_cmt_imports = Stdlib__List.sort(Caml_obj.caml_compare, imports$1); - var cmt = { + let source_digest = may_map(Stdlib__Digest.file, sourcefile); + let cmt_cmt_annots = clear_env(binary_annots); + let cmt_cmt_value_dependencies = value_deps.contents; + let cmt_cmt_comments = Stdlib__List.rev(comment_list.contents); + let cmt_cmt_args = Caml_sys.caml_sys_argv(0); + let cmt_cmt_builddir = Caml_sys.caml_sys_getcwd(undefined); + let cmt_cmt_loadpath = load_path.contents; + let cmt_cmt_initial_env = need_to_clear_env ? keep_only_summary(initial_env) : initial_env; + let cmt_cmt_imports = Stdlib__List.sort(Caml_obj.caml_compare, imports$1); + let cmt = { cmt_modname: modname, cmt_annots: cmt_cmt_annots, cmt_value_dependencies: cmt_cmt_value_dependencies, @@ -27619,8 +27619,8 @@ function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) output_cmt(oc, cmt); Caml_io.caml_ml_flush(oc); Caml_external_polyfill.resolve("caml_ml_close_channel")(oc); - var exit = 0; - var cmd; + let exit = 0; + let cmd; try { cmd = Caml_sys.caml_sys_getenv("BS_CMT_POST_PROCESS_CMD"); exit = 1; @@ -27638,9 +27638,9 @@ function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) clear(undefined); } -var Unify = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Unify"); +let Unify = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Unify"); -var Tags = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Tags"); +let Tags = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Tags"); register_error_of_exn(function (param) { if (param.MEL_EXN_ID === Tags) { @@ -27720,27 +27720,27 @@ register_error_of_exn(function (param) { }); -var Subtype = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Subtype"); +let Subtype = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Subtype"); -var Cannot_expand = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Cannot_expand"); +let Cannot_expand = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Cannot_expand"); -var Recursive_abbrev = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Recursive_abbrev"); +let Recursive_abbrev = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Recursive_abbrev"); -var Unification_recursive_abbrev = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Unification_recursive_abbrev"); +let Unification_recursive_abbrev = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Unification_recursive_abbrev"); -var current_level = { +let current_level = { contents: 0 }; -var nongen_level = { +let nongen_level = { contents: 0 }; -var global_level = { +let global_level = { contents: 1 }; -var saved_level = { +let saved_level = { contents: /* [] */0 }; @@ -27784,7 +27784,7 @@ function raise_nongen_level(param) { } function end_def(param) { - var match = Stdlib__List.hd(saved_level.contents); + let match = Stdlib__List.hd(saved_level.contents); saved_level.contents = Stdlib__List.tl(saved_level.contents); current_level.contents = match[0]; nongen_level.contents = match[1]; @@ -27795,13 +27795,13 @@ function reset_global_level(param) { } function increase_global_level(param) { - var gl = global_level.contents; + let gl = global_level.contents; global_level.contents = current_level.contents; return gl; } function is_object_type(path) { - var name; + let name; switch (path.TAG | 0) { case /* Pident */0 : name = path._0.name; @@ -27823,7 +27823,7 @@ function is_object_type(path) { return Caml_string.get(name, 0) === /* '#' */35; } -var trace_gadt_instances = { +let trace_gadt_instances = { contents: false }; @@ -27846,13 +27846,13 @@ function reset_trace_gadt_instances(b) { } function wrap_trace_gadt_instances(env, f, x) { - var b = check_trace_gadt_instances(env); - var y = Curry._1(f, x); + let b = check_trace_gadt_instances(env); + let y = Curry._1(f, x); reset_trace_gadt_instances(b); return y; } -var simple_abbrevs = { +let simple_abbrevs = { contents: /* Mnil */0 }; @@ -27899,7 +27899,7 @@ function newconstr(path, tyl) { }); } -var none$2 = newty2(current_level.contents, { +let none$2 = newty2(current_level.contents, { TAG: /* Ttuple */2, _0: /* [] */0 }); @@ -27916,32 +27916,32 @@ function hash$1(param) { return param[0].id + Math.imul(93, param[1].id) | 0; } -var TypePairs = Stdlib__Hashtbl.Make({ +let TypePairs = Stdlib__Hashtbl.Make({ equal: equal$4, hash: hash$1 }); -var umode = { +let umode = { contents: /* Expression */0 }; -var generate_equations = { +let generate_equations = { contents: false }; -var assume_injective = { +let assume_injective = { contents: false }; function set_mode_pattern(generate, injective, f) { - var old_unification_mode = umode.contents; - var old_gen = generate_equations.contents; - var old_inj = assume_injective.contents; + let old_unification_mode = umode.contents; + let old_gen = generate_equations.contents; + let old_inj = assume_injective.contents; try { umode.contents = /* Pattern */1; generate_equations.contents = generate; assume_injective.contents = injective; - var ret = Curry._1(f, undefined); + let ret = Curry._1(f, undefined); umode.contents = old_unification_mode; generate_equations.contents = old_gen; assume_injective.contents = old_inj; @@ -27975,7 +27975,7 @@ function in_pervasives(p) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -27984,7 +27984,7 @@ function in_pervasives(p) { } function is_datatype(decl) { - var match = decl.type_kind; + let match = decl.type_kind; if (typeof match === "number" && !match) { return false; } else { @@ -27993,7 +27993,7 @@ function is_datatype(decl) { } function object_fields(ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28018,12 +28018,12 @@ function object_fields(ty) { } function flatten_fields(ty) { - var flatten = function (_l, _ty) { + let flatten = function (_l, _ty) { while(true) { - var ty = _ty; - var l = _l; - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty = _ty; + let l = _l; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { return [ l, @@ -28048,7 +28048,7 @@ function flatten_fields(ty) { continue ; }; }; - var match = flatten(/* [] */0, ty); + let match = flatten(/* [] */0, ty); return [ Stdlib__List.sort((function (param, param$1) { return Caml.caml_string_compare(param[0], param$1[0]); @@ -28072,19 +28072,19 @@ function build_fields(level) { } function associate_fields(fields1, fields2) { - var _p = /* [] */0; - var _s = /* [] */0; - var _s$p = /* [] */0; - var _param = [ + let _p = /* [] */0; + let _s = /* [] */0; + let _s$p = /* [] */0; + let _param = [ fields1, fields2 ]; while(true) { - var param = _param; - var s$p = _s$p; - var s = _s; - var p = _p; - var l = param[0]; + let param = _param; + let s$p = _s$p; + let s = _s; + let p = _p; + let l = param[0]; if (!param[1]) { return [ Stdlib__List.rev(p), @@ -28099,14 +28099,14 @@ function associate_fields(fields1, fields2) { Stdlib.$at(Stdlib__List.rev(s$p), param[1]) ]; } - var l$p = param[1]; - var match = l$p.hd; - var n$p = match[0]; - var r = l.tl; - var match$1 = l.hd; - var t = match$1[2]; - var k = match$1[1]; - var n = match$1[0]; + let l$p = param[1]; + let match = l$p.hd; + let n$p = match[0]; + let r = l.tl; + let match$1 = l.hd; + let t = match$1[2]; + let k = match$1[1]; + let n = match$1[0]; if (Caml_obj.caml_equal(n, n$p)) { _param = [ r, @@ -28157,9 +28157,9 @@ function associate_fields(fields1, fields2) { function object_row(_ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty = _ty; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { return ty$1; } @@ -28177,7 +28177,7 @@ function object_row(_ty) { } function opened_object(ty) { - var match = object_row(ty).desc; + let match = object_row(ty).desc; if (typeof match === "number") { return false; } @@ -28192,7 +28192,7 @@ function opened_object(ty) { } function concrete_object(ty) { - var match = object_row(ty).desc; + let match = object_row(ty).desc; if (typeof match === "number" || match.TAG !== /* Tvar */0) { return true; } else { @@ -28201,7 +28201,7 @@ function concrete_object(ty) { } function close_object(ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28213,11 +28213,11 @@ function close_object(ty) { }); } if (match.TAG === /* Tobject */4) { - var _ty = match._0; + let _ty = match._0; while(true) { - var ty$1 = _ty; - var ty$2 = repr(ty$1); - var match$1 = ty$2.desc; + let ty$1 = _ty; + let ty$2 = repr(ty$1); + let match$1 = ty$2.desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28257,7 +28257,7 @@ function close_object(ty) { } function row_variable(ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28269,11 +28269,11 @@ function row_variable(ty) { }); } if (match.TAG === /* Tobject */4) { - var _ty = match._0; + let _ty = match._0; while(true) { - var ty$1 = _ty; - var ty$2 = repr(ty$1); - var match$1 = ty$2.desc; + let ty$1 = _ty; + let ty$2 = repr(ty$1); + let match$1 = ty$2.desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28313,7 +28313,7 @@ function row_variable(ty) { } function set_object_name(id, rv, params, ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28347,7 +28347,7 @@ function set_object_name(id, rv, params, ty) { } function hide_private_methods(ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28360,9 +28360,9 @@ function hide_private_methods(ty) { } if (match.TAG === /* Tobject */4) { match._1.contents = undefined; - var match$1 = flatten_fields(match._0); + let match$1 = flatten_fields(match._0); return Stdlib__List.iter((function (param) { - var r = field_kind_repr(param[1]); + let r = field_kind_repr(param[1]); if (typeof r === "number") { return ; } else { @@ -28382,7 +28382,7 @@ function hide_private_methods(ty) { function signature_of_class_type(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_signature */1 : return param._0; @@ -28397,7 +28397,7 @@ function signature_of_class_type(_param) { function class_type_arity(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : _param = param._2; @@ -28418,7 +28418,7 @@ function sort_row_fields(param) { } function merge_row_fields(fi1, fi2) { - var exit = 0; + let exit = 0; if (!fi1) { return [ fi1, @@ -28452,17 +28452,17 @@ function merge_row_fields(fi1, fi2) { /* [] */0 ]; } - var _r1 = /* [] */0; - var _r2 = /* [] */0; - var _pairs = /* [] */0; - var _fi1 = sort_row_fields(fi1); - var _fi2 = sort_row_fields(fi2); + let _r1 = /* [] */0; + let _r2 = /* [] */0; + let _pairs = /* [] */0; + let _fi1 = sort_row_fields(fi1); + let _fi2 = sort_row_fields(fi2); while(true) { - var fi2$1 = _fi2; - var fi1$1 = _fi1; - var pairs = _pairs; - var r2 = _r2; - var r1 = _r1; + let fi2$1 = _fi2; + let fi1$1 = _fi1; + let pairs = _pairs; + let r2 = _r2; + let r1 = _r1; if (!fi1$1) { return [ Stdlib__List.rev(r1), @@ -28477,12 +28477,12 @@ function merge_row_fields(fi1, fi2) { pairs ]; } - var fi2$p = fi2$1.tl; - var p2 = fi2$1.hd; - var l2 = p2[0]; - var fi1$p = fi1$1.tl; - var p1 = fi1$1.hd; - var l1 = p1[0]; + let fi2$p = fi2$1.tl; + let p2 = fi2$1.hd; + let l2 = p2[0]; + let fi1$p = fi1$1.tl; + let p1 = fi1$1.hd; + let l1 = p1[0]; if (Caml_obj.caml_equal(l1, l2)) { _fi2 = fi2$p; _fi1 = fi1$p; @@ -28517,9 +28517,9 @@ function filter_row_fields(erase, param) { if (!param) { return /* [] */0; } - var p = param.hd; - var fi = filter_row_fields(erase, param.tl); - var match = row_field_repr_aux(/* [] */0, p[1]); + let p = param.hd; + let fi = filter_row_fields(erase, param.tl); + let match = row_field_repr_aux(/* [] */0, p[1]); if (typeof match === "number") { return fi; } else if (match.TAG === /* Rpresent */0 || match._2 || !erase) { @@ -28533,18 +28533,18 @@ function filter_row_fields(erase, param) { } } -var Non_closed0 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Non_closed0"); +let Non_closed0 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Non_closed0"); function closed_schema_rec(_ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } - var level = ty$1.level; + let level = ty$1.level; ty$1.level = pivot_level - level | 0; - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr(closed_schema_rec, ty$1); } @@ -28563,7 +28563,7 @@ function closed_schema_rec(_ty) { _ty = row._3; continue ; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); iter_row(closed_schema_rec, row$1); if (static_row(row$1)) { return ; @@ -28583,7 +28583,7 @@ function closed_schema(ty) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Non_closed0) { unmark_type(ty); return false; @@ -28592,27 +28592,27 @@ function closed_schema(ty) { } } -var Non_closed = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Non_closed"); +let Non_closed = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Non_closed"); -var free_variables = { +let free_variables = { contents: /* [] */0 }; -var really_closed = { +let really_closed = { contents: undefined }; function free_vars_rec(_real, _ty) { while(true) { - var ty = _ty; - var real = _real; - var ty$1 = repr(ty); + let ty = _ty; + let real = _real; + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } ty$1.level = pivot_level - ty$1.level | 0; - var match = ty$1.desc; - var match$1 = really_closed.contents; + let match = ty$1.desc; + let match$1 = really_closed.contents; if (typeof match === "number") { return iter_type_expr((function (param) { return free_vars_rec(true, param); @@ -28635,7 +28635,7 @@ function free_vars_rec(_real, _ty) { }), ty$1); } try { - var match$2 = find_type_expansion(match._0, Caml_option.valFromOption(match$1)); + let match$2 = find_type_expansion(match._0, Caml_option.valFromOption(match$1)); if (repr(match$2[1]).level !== 100000000) { free_variables.contents = { hd: [ @@ -28648,7 +28648,7 @@ function free_vars_rec(_real, _ty) { } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -28667,7 +28667,7 @@ function free_vars_rec(_real, _ty) { _real = false; continue ; case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, match._0); + let row = row_repr_aux(/* [] */0, match._0); iter_row((function (param) { return free_vars_rec(true, param); }), row); @@ -28689,14 +28689,14 @@ function free_vars$1(env, ty) { free_variables.contents = /* [] */0; really_closed.contents = env; free_vars_rec(true, ty); - var res = free_variables.contents; + let res = free_variables.contents; free_variables.contents = /* [] */0; really_closed.contents = undefined; return res; } function free_variables$1(env, ty) { - var tl = Stdlib__List.map((function (prim) { + let tl = Stdlib__List.map((function (prim) { return prim[0]; }), free_vars$1(env, ty)); unmark_type(ty); @@ -28704,11 +28704,11 @@ function free_variables$1(env, ty) { } function closed_type(ty) { - var match = free_vars$1(undefined, ty); + let match = free_vars$1(undefined, ty); if (!match) { return ; } - var match$1 = match.hd; + let match$1 = match.hd; throw new Caml_js_exceptions.MelangeError(Non_closed, { MEL_EXN_ID: Non_closed, _1: match$1[0], @@ -28718,13 +28718,13 @@ function closed_type(ty) { function closed_parameterized_type(params, ty) { Stdlib__List.iter(mark_type, params); - var ok; + let ok; try { closed_type(ty); ok = true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Non_closed) { ok = false; } else { @@ -28739,7 +28739,7 @@ function closed_parameterized_type(params, ty) { function closed_type_decl(decl) { try { Stdlib__List.iter(mark_type, decl.type_params); - var v = decl.type_kind; + let v = decl.type_kind; if (typeof v === "number") { v === /* Type_abstract */0; } else if (v.TAG === /* Type_record */0) { @@ -28755,7 +28755,7 @@ function closed_type_decl(decl) { } }), v._0); } - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty !== undefined) { closed_type(ty); } @@ -28763,7 +28763,7 @@ function closed_type_decl(decl) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Non_closed) { it_type_declaration(unmark_iterators, decl); return exn._1; @@ -28775,7 +28775,7 @@ function closed_type_decl(decl) { function closed_extension_constructor(ext) { try { Stdlib__List.iter(mark_type, ext.ext_type_params); - var match = ext.ext_ret_type; + let match = ext.ext_ret_type; if (match !== undefined) { } else { @@ -28785,7 +28785,7 @@ function closed_extension_constructor(ext) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Non_closed) { unmark_extension_constructor(ext); return exn._1; @@ -28794,12 +28794,12 @@ function closed_extension_constructor(ext) { } } -var CCFailure = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.CCFailure"); +let CCFailure = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.CCFailure"); function closed_class(params, sign) { - var ty = object_fields(repr(sign.csig_self)); - var match = flatten_fields(ty); - var fields = match[0]; + let ty = object_fields(repr(sign.csig_self)); + let match = flatten_fields(ty); + let fields = match[0]; Stdlib__List.iter(mark_type, params); mark_type(match[1]); Stdlib__List.iter((function (param) { @@ -28811,7 +28811,7 @@ function closed_class(params, sign) { try { mark_type_node(repr(sign.csig_self)); Stdlib__List.iter((function (param) { - var ty = param[2]; + let ty = param[2]; if (!Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { return ; } @@ -28819,7 +28819,7 @@ function closed_class(params, sign) { return closed_type(ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Non_closed) { throw new Caml_js_exceptions.MelangeError(CCFailure, { MEL_EXN_ID: CCFailure, @@ -28841,7 +28841,7 @@ function closed_class(params, sign) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === CCFailure) { iter_type_expr(mark_type, repr(sign.csig_self)); Stdlib__List.iter(unmark_type, params); @@ -28853,7 +28853,7 @@ function closed_class(params, sign) { } function iter_generalize(tyl, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (!(ty$1.level > current_level.contents && ty$1.level !== 100000000)) { tyl.contents = { hd: ty$1, @@ -28862,7 +28862,7 @@ function iter_generalize(tyl, ty) { return ; } set_level(ty$1, 100000000); - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match !== "number" && match.TAG === /* Tconstr */3) { iter_abbrev((function (param) { return iter_generalize(tyl, param); @@ -28885,17 +28885,17 @@ function generalize(ty) { } function generalize_structure(var_level, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level === 100000000) { return ; } if (is_Tvar(ty$1) && ty$1.level > var_level) { return set_level(ty$1, var_level); } - var tmp = false; + let tmp = false; if (ty$1.level > current_level.contents) { - var match = ty$1.desc; - var tmp$1; + let match = ty$1.desc; + let tmp$1; tmp$1 = typeof match === "number" || match.TAG !== /* Tconstr */3 ? true : !is_object_type(match._0) && (match._2.contents = /* Mnil */0, true); tmp = tmp$1; } @@ -28915,12 +28915,12 @@ function generalize_structure$1(var_level, ty) { function generalize_spine(_ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level < current_level.contents || ty$1.level === 100000000) { return ; } - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match === "number") { return ; } @@ -28954,7 +28954,7 @@ function generalize_spine(_ty) { }; } -var forward_try_expand_once = { +let forward_try_expand_once = { contents: (function (env, ty) { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand @@ -28964,7 +28964,7 @@ var forward_try_expand_once = { function get_level(env, p) { try { - var match = find_type_full(p, env)[0].type_newtype_level; + let match = find_type_full(p, env)[0].type_newtype_level; if (match !== undefined) { return match[0]; } else { @@ -28972,7 +28972,7 @@ function get_level(env, p) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return binding_time(p); } @@ -28982,13 +28982,13 @@ function get_level(env, p) { function normalize_package_path(env, _p) { while(true) { - var p = _p; - var t; + let p = _p; + let t; try { t = find_modtype(p, env).mtd_type; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { t = undefined; } else { @@ -29008,12 +29008,12 @@ function normalize_package_path(env, _p) { function update_level(env, level, _ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level <= level) { return ; } - var lv = gadt_instance_level(env, ty$1); + let lv = gadt_instance_level(env, ty$1); if (lv !== undefined && level < lv) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -29029,18 +29029,18 @@ function update_level(env, level, _ty) { } }); } - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row !== "number") { switch (row.TAG | 0) { case /* Tconstr */3 : - var p = row._0; + let p = row._0; if (level < get_level(env, p)) { try { link_type(ty$1, Curry._2(forward_try_expand_once.contents, env, ty$1)); return update_level(env, level, ty$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { if (level < get_level(env, p)) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -29066,8 +29066,8 @@ function update_level(env, level, _ty) { } break; case /* Tobject */4 : - var nm = row._1; - var match = nm.contents; + let nm = row._1; + let match = nm.contents; if (match !== undefined && level < get_level(env, match[0])) { set_name(nm, undefined); _ty = ty$1; @@ -29075,7 +29075,7 @@ function update_level(env, level, _ty) { } break; case /* Tfield */5 : - var ty1 = row._2; + let ty1 = row._2; if (row._0 === dummy_method && repr(ty1).level > level) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -29093,8 +29093,8 @@ function update_level(env, level, _ty) { } break; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var match$1 = row$1.row_name; + let row$1 = row_repr_aux(/* [] */0, row._0); + let match$1 = row$1.row_name; if (match$1 !== undefined && level < get_level(env, match$1[0])) { log_type(ty$1); ty$1.desc = { @@ -29114,9 +29114,9 @@ function update_level(env, level, _ty) { return update_level(env, level, param); }), ty$1); case /* Tpackage */11 : - var p$1 = row._0; + let p$1 = row._0; if (level < get_level(env, p$1)) { - var p$p = normalize_package_path(env, p$1); + let p$p = normalize_package_path(env, p$1); if (same(p$1, p$p)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -29166,8 +29166,8 @@ function generalize_contravariant(env) { function generalize_expansive(env, var_level, _ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level === 100000000) { return ; } @@ -29175,7 +29175,7 @@ function generalize_expansive(env, var_level, _ty) { return ; } set_level(ty$1, 100000000); - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match === "number") { return iter_type_expr((function (param) { return generalize_expansive(env, var_level, param); @@ -29187,13 +29187,13 @@ function generalize_expansive(env, var_level, _ty) { _ty = match._2; continue ; case /* Tconstr */3 : - var tyl = match._1; - var variance; + let tyl = match._1; + let variance; try { variance = find_type_full(match._0, env)[0].type_variance; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { variance = Stdlib__List.map((function (param) { return Types_Variance.may_inv; @@ -29211,7 +29211,7 @@ function generalize_expansive(env, var_level, _ty) { } }), variance, tyl); case /* Tpackage */11 : - var partial_arg = generalize_contravariant(env); + let partial_arg = generalize_contravariant(env); return Stdlib__List.iter((function(partial_arg){ return function (param) { return partial_arg(var_level, param); @@ -29231,9 +29231,9 @@ function generalize_expansive$1(env, ty) { return generalize_expansive(env, nongen_level.contents, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var tr = exn._1; + let tr = exn._1; if (tr) { if (tr.tl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); @@ -29260,16 +29260,16 @@ function generalize_structure$2(ty) { } function limited_generalize(ty0, ty) { - var ty0$1 = repr(ty0); - var graph = Stdlib__Hashtbl.create(undefined, 17); - var idx = { + let ty0$1 = repr(ty0); + let graph = Stdlib__Hashtbl.create(undefined, 17); + let idx = { contents: 0 }; - var roots = { + let roots = { contents: /* [] */0 }; - var inverse = function (pty, ty) { - var ty$1 = repr(ty); + let inverse = function (pty, ty) { + let ty$1 = repr(ty); if (ty$1.level > current_level.contents || ty$1.level === 100000000) { idx.contents = idx.contents - 1 | 0; Stdlib__Hashtbl.add(graph, idx.contents, [ @@ -29285,7 +29285,7 @@ function limited_generalize(ty0, ty) { }; } set_level(ty$1, idx.contents); - var partial_arg = { + let partial_arg = { hd: ty$1, tl: /* [] */0 }; @@ -29296,26 +29296,26 @@ function limited_generalize(ty0, ty) { if (ty$1.level >= 0) { return ; } - var match = Stdlib__Hashtbl.find(graph, ty$1.level); - var parents = match[1]; + let match = Stdlib__Hashtbl.find(graph, ty$1.level); + let parents = match[1]; parents.contents = Stdlib.$at(pty, parents.contents); }; - var generalize_parents = function (ty) { - var idx = ty.level; + let generalize_parents = function (ty) { + let idx = ty.level; if (idx === 100000000) { return ; } set_level(ty, 100000000); Stdlib__List.iter(generalize_parents, Stdlib__Hashtbl.find(graph, idx)[1].contents); - var row = ty.desc; + let row = ty.desc; if (typeof row === "number") { return ; } if (row.TAG !== /* Tvariant */8) { return ; } - var more = row_more(row._0); - var lv = more.level; + let more = row_more(row._0); + let lv = more.level; if ((lv < 0 || lv > current_level.contents) && lv !== 100000000) { return set_level(more, 100000000); } @@ -29329,7 +29329,7 @@ function limited_generalize(ty0, ty) { } Stdlib__List.iter(generalize_parents, roots.contents); Stdlib__Hashtbl.iter((function (param, param$1) { - var ty = param$1[0]; + let ty = param$1[0]; if (ty.level !== 100000000) { return set_level(ty, current_level.contents); } @@ -29338,21 +29338,21 @@ function limited_generalize(ty0, ty) { } function inv_type(hash, pty, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); try { - var inv = Curry._2(TypeHash.find, hash, ty$1); + let inv = Curry._2(TypeHash.find, hash, ty$1); inv.inv_parents = Stdlib.$at(pty, inv.inv_parents); return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var inv$1 = { + let inv$1 = { inv_type: ty$1, inv_parents: pty }; Curry._3(TypeHash.add, hash, ty$1, inv$1); - var partial_arg = { + let partial_arg = { hd: inv$1, tl: /* [] */0 }; @@ -29365,16 +29365,16 @@ function inv_type(hash, pty, ty) { } function compute_univars(ty) { - var inverted = Curry._1(TypeHash.create, 17); + let inverted = Curry._1(TypeHash.create, 17); inv_type(inverted, /* [] */0, ty); - var node_univars = Curry._1(TypeHash.create, 17); - var add_univar = function (univ, inv) { - var match = inv.inv_type.desc; + let node_univars = Curry._1(TypeHash.create, 17); + let add_univar = function (univ, inv) { + let match = inv.inv_type.desc; if (typeof match !== "number" && match.TAG === /* Tpoly */10 && Stdlib__List.memq(univ, Stdlib__List.map(repr, match._1))) { return ; } try { - var univs = Curry._2(TypeHash.find, node_univars, inv.inv_type); + let univs = Curry._2(TypeHash.find, node_univars, inv.inv_type); if (!Curry._2(mem$3, univ, univs.contents)) { univs.contents = Curry._2(add$3, univ, univs.contents); return Stdlib__List.iter((function (param) { @@ -29385,7 +29385,7 @@ function compute_univars(ty) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypeHash.add, node_univars, inv.inv_type, { contents: Curry._1(singleton$2, univ) @@ -29408,7 +29408,7 @@ function compute_univars(ty) { return Curry._2(TypeHash.find, node_univars, ty).contents; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* Empty */0; } @@ -29419,7 +29419,7 @@ function compute_univars(ty) { function find_repr(p1, _param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { return ; } @@ -29434,25 +29434,25 @@ function find_repr(p1, _param) { _param = param._4; continue ; } - var rem = param._0.contents; + let rem = param._0.contents; _param = rem; continue ; }; } -var abbreviations = { +let abbreviations = { contents: { contents: /* Mnil */0 } }; function copy(env, partial, keep_names, ty) { - var copy$1 = function (param) { + let copy$1 = function (param) { return copy(env, partial, keep_names, param); }; - var ty$1 = repr(ty); - var ty$2 = ty$1.desc; - var exit = 0; + let ty$1 = repr(ty); + let ty$2 = ty$1.desc; + let exit = 0; if (typeof ty$2 === "number") { exit = 1; } else { @@ -29465,7 +29465,7 @@ function copy(env, partial, keep_names, ty) { if (ty$1.level !== 100000000 && partial === undefined) { return ty$1; } - var forget; + let forget; if (ty$1.level === 100000000) { forget = 100000000; } else if (partial !== undefined) { @@ -29488,13 +29488,13 @@ function copy(env, partial, keep_names, ty) { _0: undefined }); } - var desc = ty$1.desc; + let desc = ty$1.desc; save_desc(ty$1, desc); - var t = newvar(undefined, undefined); + let t = newvar(undefined, undefined); if (env !== undefined) { - var env$1 = Caml_option.valFromOption(env); + let env$1 = Caml_option.valFromOption(env); if (env$1.local_constraints) { - var lv = gadt_instance_level(env$1, ty$1); + let lv = gadt_instance_level(env$1, ty$1); if (lv !== undefined) { add_gadt_instances(env$1, lv, { hd: t, @@ -29509,17 +29509,17 @@ function copy(env, partial, keep_names, ty) { TAG: /* Tsubst */7, _0: t }; - var tmp; + let tmp; if (typeof desc === "number") { tmp = copy_type_desc(keep_names, copy$1, desc); } else { switch (desc.TAG | 0) { case /* Tconstr */3 : - var tl = desc._1; - var p = desc._0; - var abbrevs = proper_abbrevs(p, tl, abbreviations.contents); - var ty$3 = find_repr(p, abbrevs.contents); - var exit$1 = 0; + let tl = desc._1; + let p = desc._0; + let abbrevs = proper_abbrevs(p, tl, abbreviations.contents); + let ty$3 = find_repr(p, abbrevs.contents); + let exit$1 = 0; if (ty$3 !== undefined && repr(ty$3) !== t) { tmp = { TAG: /* Tlink */6, @@ -29529,8 +29529,8 @@ function copy(env, partial, keep_names, ty) { exit$1 = 2; } if (exit$1 === 2) { - var abbrev = abbreviations.contents.contents; - var tmp$1; + let abbrev = abbreviations.contents.contents; + let tmp$1; tmp$1 = typeof abbrev === "number" || abbrev.TAG !== /* Mcons */0 ? abbrev : ({ TAG: /* Mlink */1, _0: abbreviations.contents @@ -29555,7 +29555,7 @@ function copy(env, partial, keep_names, ty) { }) : copy_type_desc(keep_names, copy$1, desc); break; case /* Tfield */5 : - var r = field_kind_repr(desc._1); + let r = field_kind_repr(desc._1); if (typeof r === "number") { tmp = r ? ({ TAG: /* Tlink */6, @@ -29567,22 +29567,22 @@ function copy(env, partial, keep_names, ty) { } break; case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, desc._0); - var more = repr(row.row_more); - var match = more.desc; - var exit$2 = 0; + let row = row_repr_aux(/* [] */0, desc._0); + let more = repr(row.row_more); + let match = more.desc; + let exit$2 = 0; if (typeof match === "number" || match.TAG !== /* Tsubst */7) { exit$2 = 2; } else { - var match$1 = match._0.desc; + let match$1 = match._0.desc; if (typeof match$1 === "number" || match$1.TAG !== /* Ttuple */2) { exit$2 = 2; } else { - var match$2 = match$1._0; + let match$2 = match$1._0; if (match$2) { - var match$3 = match$2.tl; + let match$3 = match$2.tl; if (match$3 && !match$3.tl) { - var ty2 = match$3.hd; + let ty2 = match$3.hd; ty$1.desc = { TAG: /* Tsubst */7, _0: ty2 @@ -29600,10 +29600,10 @@ function copy(env, partial, keep_names, ty) { } } if (exit$2 === 2) { - var keep = more.level !== 100000000; - var ty$4 = more.desc; - var more$p; - var exit$3 = 0; + let keep = more.level !== 100000000; + let ty$4 = more.desc; + let more$p; + let exit$3 = 0; if (typeof ty$4 === "number") { exit$3 = 3; } else { @@ -29642,9 +29642,9 @@ function copy(env, partial, keep_names, ty) { break; } - var match$4 = repr(more$p); - var match$5 = match$4.desc; - var row$1; + let match$4 = repr(more$p); + let match$5 = match$4.desc; + let row$1; row$1 = typeof match$5 === "number" || !(match$5.TAG === /* Tconstr */3 && !row.row_fixed) ? row : ({ row_fields: row.row_fields, row_more: row.row_more, @@ -29653,20 +29653,20 @@ function copy(env, partial, keep_names, ty) { row_fixed: true, row_name: row.row_name }); - var match$6; + let match$6; if (partial !== undefined && !partial[1]) { - var more$p$1; + let more$p$1; if (more.id !== more$p.id) { more$p$1 = more$p; } else { - var lv$1 = keep ? more.level : current_level.contents; + let lv$1 = keep ? more.level : current_level.contents; more$p$1 = newty2(lv$1, { TAG: /* Tvar */0, _0: undefined }); } - var not_reither = function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let not_reither = function (param) { + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG === /* Rpresent */0) { return true; } else { @@ -29693,7 +29693,7 @@ function copy(env, partial, keep_names, ty) { row$1 ]; } - var more$p$2 = match$6[0]; + let more$p$2 = match$6[0]; more.desc = { TAG: /* Tsubst */7, _0: newty2(100000000, { @@ -29735,42 +29735,42 @@ function gadt_env(env) { } function instance(partial, env, sch) { - var env$1 = gadt_env(env); - var partial$1 = partial !== undefined ? [ + let env$1 = gadt_env(env); + let partial$1 = partial !== undefined ? [ compute_univars(sch), partial ] : undefined; - var ty = copy(env$1, partial$1, undefined, sch); + let ty = copy(env$1, partial$1, undefined, sch); cleanup_types(undefined); return ty; } function instance_def(sch) { - var ty = copy(undefined, undefined, undefined, sch); + let ty = copy(undefined, undefined, undefined, sch); cleanup_types(undefined); return ty; } function instance_list(env, schl) { - var env$1 = gadt_env(env); - var tyl = Stdlib__List.map((function (t) { + let env$1 = gadt_env(env); + let tyl = Stdlib__List.map((function (t) { return copy(env$1, undefined, undefined, t); }), schl); cleanup_types(undefined); return tyl; } -var reified_var_counter = { +let reified_var_counter = { contents: Meths.empty }; function get_new_abstract_name(s) { - var index; + let index; try { index = Curry._2(Meths.find, s, reified_var_counter.contents) + 1 | 0; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { index = 0; } else { @@ -29814,25 +29814,25 @@ function new_declaration(newtype, manifest) { function instance_constructor(in_pattern, cstr) { if (in_pattern !== undefined) { - var newtype_lev = in_pattern[1]; - var env = in_pattern[0]; - var $$process = function (existential) { - var decl = new_declaration([ + let newtype_lev = in_pattern[1]; + let env = in_pattern[0]; + let $$process = function (existential) { + let decl = new_declaration([ newtype_lev, newtype_lev ], undefined); - var match = repr(existential); - var match$1 = match.desc; - var name; + let match = repr(existential); + let match$1 = match.desc; + let name; if (typeof match$1 === "number" || match$1.TAG !== /* Tvar */0) { name = "ex"; } else { - var name$1 = match$1._0; + let name$1 = match$1._0; name = name$1 !== undefined ? name$1 : "ex"; } - var match$2 = enter_type(get_new_abstract_name(name), decl, env.contents); + let match$2 = enter_type(get_new_abstract_name(name), decl, env.contents); env.contents = match$2[1]; - var to_unify = newty2(current_level.contents, { + let to_unify = newty2(current_level.contents, { TAG: /* Tconstr */3, _0: { TAG: /* Pident */0, @@ -29843,7 +29843,7 @@ function instance_constructor(in_pattern, cstr) { contents: /* Mnil */0 } }); - var tv = copy(undefined, undefined, undefined, existential); + let tv = copy(undefined, undefined, undefined, existential); if (!is_Tvar(tv)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -29858,8 +29858,8 @@ function instance_constructor(in_pattern, cstr) { }; Stdlib__List.iter($$process, cstr.cstr_existentials); } - var ty_res = copy(undefined, undefined, undefined, cstr.cstr_res); - var ty_args = Stdlib__List.map(simple_copy, cstr.cstr_args); + let ty_res = copy(undefined, undefined, undefined, cstr.cstr_res); + let ty_args = Stdlib__List.map(simple_copy, cstr.cstr_args); cleanup_types(undefined); return [ ty_args, @@ -29868,10 +29868,10 @@ function instance_constructor(in_pattern, cstr) { } function instance_parameterized_type(keep_names, sch_args, sch) { - var ty_args = Stdlib__List.map((function (t) { + let ty_args = Stdlib__List.map((function (t) { return copy(undefined, undefined, keep_names, t); }), sch_args); - var ty = copy(undefined, undefined, undefined, sch); + let ty = copy(undefined, undefined, undefined, sch); cleanup_types(undefined); return [ ty_args, @@ -29880,8 +29880,8 @@ function instance_parameterized_type(keep_names, sch_args, sch) { } function instance_declaration(decl) { - var cl = decl.type_kind; - var tmp; + let cl = decl.type_kind; + let tmp; tmp = typeof cl === "number" ? ( cl === /* Type_abstract */0 ? /* Type_abstract */0 : /* Type_open */1 ) : ( @@ -29910,15 +29910,15 @@ function instance_declaration(decl) { }), cl._0) }) ); - var decl_type_params = Stdlib__List.map(simple_copy, decl.type_params); - var decl_type_arity = decl.type_arity; - var decl_type_private = decl.type_private; - var decl_type_manifest = may_map(simple_copy, decl.type_manifest); - var decl_type_variance = decl.type_variance; - var decl_type_newtype_level = decl.type_newtype_level; - var decl_type_loc = decl.type_loc; - var decl_type_attributes = decl.type_attributes; - var decl$1 = { + let decl_type_params = Stdlib__List.map(simple_copy, decl.type_params); + let decl_type_arity = decl.type_arity; + let decl_type_private = decl.type_private; + let decl_type_manifest = may_map(simple_copy, decl.type_manifest); + let decl_type_variance = decl.type_variance; + let decl_type_newtype_level = decl.type_newtype_level; + let decl_type_loc = decl.type_loc; + let decl_type_attributes = decl.type_attributes; + let decl$1 = { type_params: decl_type_params, type_arity: decl_type_arity, type_kind: tmp, @@ -29934,7 +29934,7 @@ function instance_declaration(decl) { } function instance_class(params, cty) { - var copy_class_type = function (param) { + let copy_class_type = function (param) { switch (param.TAG | 0) { case /* Cty_constr */0 : return { @@ -29944,7 +29944,7 @@ function instance_class(params, cty) { _2: copy_class_type(param._2) }; case /* Cty_signature */1 : - var sign = param._0; + let sign = param._0; return { TAG: /* Cty_signature */1, _0: { @@ -29975,8 +29975,8 @@ function instance_class(params, cty) { } }; - var params$p = Stdlib__List.map(simple_copy, params); - var cty$p = copy_class_type(cty); + let params$p = Stdlib__List.map(simple_copy, params); + let cty$p = copy_class_type(cty); cleanup_types(undefined); return [ params$p, @@ -30001,24 +30001,24 @@ function diff_list(l1, l2) { } function conflicts(free, bound) { - var bound$1 = Stdlib__List.map(repr, bound); + let bound$1 = Stdlib__List.map(repr, bound); return Curry._2(exists$1, (function (t) { return Stdlib__List.memq(repr(t), bound$1); }), free); } -var delayed_copy = { +let delayed_copy = { contents: /* [] */0 }; function copy_sep(fixed, free, bound, visited, ty) { - var ty$1 = repr(ty); - var univars = Curry._1(free, ty$1); + let ty$1 = repr(ty); + let univars = Curry._1(free, ty$1); if (Curry._1(is_empty$2, univars)) { if (ty$1.level !== 100000000) { return ty$1; } - var t = newvar(undefined, undefined); + let t = newvar(undefined, undefined); delayed_copy.contents = { hd: { LAZY_DONE: false, @@ -30034,8 +30034,8 @@ function copy_sep(fixed, free, bound, visited, ty) { return t; } try { - var match = Stdlib__List.assq(ty$1, visited); - var dl = is_Tunivar(ty$1) ? /* [] */0 : diff_list(bound, match[1]); + let match = Stdlib__List.assq(ty$1, visited); + let dl = is_Tunivar(ty$1) ? /* [] */0 : diff_list(bound, match[1]); if (Caml_obj.caml_notequal(dl, /* [] */0) && conflicts(univars, dl)) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -30044,12 +30044,12 @@ function copy_sep(fixed, free, bound, visited, ty) { return match[0]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var t$1 = newvar(undefined, undefined); - var match$1 = ty$1.desc; - var visited$1; - var exit = 0; + let t$1 = newvar(undefined, undefined); + let match$1 = ty$1.desc; + let visited$1; + let exit = 0; if (typeof match$1 === "number") { visited$1 = visited; } else { @@ -30078,34 +30078,34 @@ function copy_sep(fixed, free, bound, visited, ty) { tl: visited }; } - var copy_rec = function (param) { + let copy_rec = function (param) { return copy_sep(fixed, free, bound, visited$1, param); }; - var row0 = ty$1.desc; - var tmp; + let row0 = ty$1.desc; + let tmp; if (typeof row0 === "number") { tmp = copy_type_desc(undefined, copy_rec, ty$1.desc); } else { switch (row0.TAG | 0) { case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, row0._0); - var more = repr(row.row_more); - var keep = is_Tvar(more) && more.level !== 100000000; - var more$p = copy_rec(more); - var fixed$p = fixed && is_Tvar(repr(more$p)); - var row$1 = copy_row(copy_rec, fixed$p, row, keep, more$p); + let row = row_repr_aux(/* [] */0, row0._0); + let more = repr(row.row_more); + let keep = is_Tvar(more) && more.level !== 100000000; + let more$p = copy_rec(more); + let fixed$p = fixed && is_Tvar(repr(more$p)); + let row$1 = copy_row(copy_rec, fixed$p, row, keep, more$p); tmp = { TAG: /* Tvariant */8, _0: row$1 }; break; case /* Tpoly */10 : - var tl = Stdlib__List.map(repr, row0._1); - var tl$p = Stdlib__List.map((function (t) { + let tl = Stdlib__List.map(repr, row0._1); + let tl$p = Stdlib__List.map((function (t) { return newty2(current_level.contents, t.desc); }), tl); - var bound$1 = Stdlib.$at(tl, bound); - var visited$2 = Stdlib.$at(Stdlib__List.map2((function (ty, t) { + let bound$1 = Stdlib.$at(tl, bound); + let visited$2 = Stdlib.$at(Stdlib__List.map2((function (ty, t) { return [ ty, [ @@ -30132,10 +30132,10 @@ function copy_sep(fixed, free, bound, visited, ty) { } function instance_poly(keep_namesOpt, fixed, univars, sch) { - var keep_names = keep_namesOpt !== undefined ? keep_namesOpt : false; - var univars$1 = Stdlib__List.map(repr, univars); - var copy_var = function (ty) { - var name = ty.desc; + let keep_names = keep_namesOpt !== undefined ? keep_namesOpt : false; + let univars$1 = Stdlib__List.map(repr, univars); + let copy_var = function (ty) { + let name = ty.desc; if (typeof name === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -30165,8 +30165,8 @@ function instance_poly(keep_namesOpt, fixed, univars, sch) { ] }); }; - var vars = Stdlib__List.map(copy_var, univars$1); - var pairs = Stdlib__List.map2((function (u, v) { + let vars = Stdlib__List.map(copy_var, univars$1); + let pairs = Stdlib__List.map2((function (u, v) { return [ u, [ @@ -30176,7 +30176,7 @@ function instance_poly(keep_namesOpt, fixed, univars, sch) { ]; }), univars$1, vars); delayed_copy.contents = /* [] */0; - var ty = copy_sep(fixed, compute_univars(sch), /* [] */0, pairs, sch); + let ty = copy_sep(fixed, compute_univars(sch), /* [] */0, pairs, sch); Stdlib__List.iter(CamlinternalLazy.force, delayed_copy.contents); delayed_copy.contents = /* [] */0; cleanup_types(undefined); @@ -30187,11 +30187,11 @@ function instance_poly(keep_namesOpt, fixed, univars, sch) { } function instance_label(fixed, lbl) { - var ty_res = copy(undefined, undefined, undefined, lbl.lbl_res); - var ty = repr(lbl.lbl_arg); - var match; - var exit = 0; - var match$1 = ty.desc; + let ty_res = copy(undefined, undefined, undefined, lbl.lbl_res); + let ty = repr(lbl.lbl_arg); + let match; + let exit = 0; + let match$1 = ty.desc; if (typeof match$1 === "number" || match$1.TAG !== /* Tpoly */10) { exit = 1; } else { @@ -30211,7 +30211,7 @@ function instance_label(fixed, lbl) { ]; } -var unify$p = { +let unify$p = { contents: (function (env, ty1, ty2) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -30227,12 +30227,12 @@ function subst(env, level, priv, abbrev, ty, params, args, body) { _1: /* [] */0 }); } - var old_level = current_level.contents; + let old_level = current_level.contents; current_level.contents = level; try { - var body0 = newvar(undefined, undefined); + let body0 = newvar(undefined, undefined); if (ty !== undefined) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -30244,8 +30244,8 @@ function subst(env, level, priv, abbrev, ty, params, args, body) { }); } if (match.TAG === /* Tconstr */3) { - var path = match._0; - var abbrev$1 = proper_abbrevs(path, match._1, abbrev); + let path = match._0; + let abbrev$1 = proper_abbrevs(path, match._1, abbrev); memorize_abbrev(abbrev$1, priv, path, ty, body0); } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -30259,8 +30259,8 @@ function subst(env, level, priv, abbrev, ty, params, args, body) { } } abbreviations.contents = abbrev; - var match$1 = instance_parameterized_type(undefined, params, body); - var body$p = match$1[1]; + let match$1 = instance_parameterized_type(undefined, params, body); + let body$p = match$1[1]; abbreviations.contents = { contents: /* Mnil */0 }; @@ -30270,7 +30270,7 @@ function subst(env, level, priv, abbrev, ty, params, args, body) { return body$p; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { current_level.contents = old_level; throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); @@ -30279,7 +30279,7 @@ function subst(env, level, priv, abbrev, ty, params, args, body) { } } -var previous_env = { +let previous_env = { contents: empty }; @@ -30294,7 +30294,7 @@ function check_abbrev_env(env) { function expand_abbrev_gen(kind, find_type_expansion, env, ty) { check_abbrev_env(env); - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -30306,19 +30306,19 @@ function expand_abbrev_gen(kind, find_type_expansion, env, ty) { }); } if (match.TAG === /* Tconstr */3) { - var abbrev = match._2; - var args = match._1; - var path = match._0; - var level = ty.level; - var lookup_abbrev = proper_abbrevs(path, args, abbrev); - var ty$1 = find_expans(kind, path, lookup_abbrev.contents); + let abbrev = match._2; + let args = match._1; + let path = match._0; + let level = ty.level; + let lookup_abbrev = proper_abbrevs(path, args, abbrev); + let ty$1 = find_expans(kind, path, lookup_abbrev.contents); if (ty$1 !== undefined) { if (level !== 100000000) { try { update_level(env, level, ty$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Unify) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -30327,12 +30327,12 @@ function expand_abbrev_gen(kind, find_type_expansion, env, ty) { } return ty$1; } - var match$1; + let match$1; try { match$1 = Curry._2(find_type_expansion, path, env); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand @@ -30340,11 +30340,11 @@ function expand_abbrev_gen(kind, find_type_expansion, env, ty) { } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var ty$p = subst(env, level, kind, abbrev, ty, match$1[0], args, match$1[1]); - var ty$2 = repr(ty$p); - var row = ty$2.desc; + let ty$p = subst(env, level, kind, abbrev, ty, match$1[0], args, match$1[1]); + let ty$2 = repr(ty$p); + let row = ty$2.desc; if (typeof row !== "number" && row.TAG === /* Tvariant */8) { - var row$1 = row._0; + let row$1 = row._0; if (static_row(row$1)) { ty$2.desc = { TAG: /* Tvariant */8, @@ -30364,7 +30364,7 @@ function expand_abbrev_gen(kind, find_type_expansion, env, ty) { } if (trace_gadt_instances.contents) { - var lv = Caml_obj.caml_max(match$1[2], gadt_instance_level(env, ty)); + let lv = Caml_obj.caml_max(match$1[2], gadt_instance_level(env, ty)); if (lv !== undefined) { if (level < lv) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -30414,7 +30414,7 @@ function expand_head_once(env, ty) { return expand_abbrev(env)(repr(ty)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -30430,13 +30430,13 @@ function expand_head_once(env, ty) { } function safe_abbrev(env, ty) { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { expand_abbrev(env)(ty); return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { backtrack(snap); return false; @@ -30450,8 +30450,8 @@ function safe_abbrev(env, ty) { } function try_expand_once(env, ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand @@ -30466,12 +30466,12 @@ function try_expand_once(env, ty) { } function try_expand_safe(env, ty) { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { return try_expand_once(env, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { backtrack(snap); throw new Caml_js_exceptions.MelangeError(Cannot_expand, { @@ -30483,12 +30483,12 @@ function try_expand_safe(env, ty) { } function try_expand_head(try_once, env, ty) { - var ty$p = Curry._2(try_once, env, ty); + let ty$p = Curry._2(try_once, env, ty); try { return try_expand_head(try_once, env, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return ty$p; } @@ -30497,8 +30497,8 @@ function try_expand_head(try_once, env, ty) { } function try_expand_head$1(try_once, env, ty) { - var ty$p = try_expand_head(try_once, env, ty); - var lv = gadt_instance_level(env, ty$p); + let ty$p = try_expand_head(try_once, env, ty); + let lv = gadt_instance_level(env, ty$p); if (lv !== undefined) { add_gadt_instance_chain(env, lv, ty); } @@ -30510,7 +30510,7 @@ function expand_head_unif(env, ty) { return try_expand_head$1(try_expand_once, env, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return repr(ty); } @@ -30523,7 +30523,7 @@ function expand_head(env, ty) { return try_expand_head$1(try_expand_safe, env, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return repr(ty); } @@ -30534,16 +30534,16 @@ function expand_head(env, ty) { forward_try_expand_once.contents = try_expand_safe; function extract_concrete_typedecl(env, ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (match.TAG === /* Tconstr */3) { - var p = match._0; - var decl = find_type_full(p, env)[0]; + let p = match._0; + let decl = find_type_full(p, env)[0]; if (Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0)) { return [ p, @@ -30551,12 +30551,12 @@ function extract_concrete_typedecl(env, ty) { decl ]; } - var ty$2; + let ty$2; try { ty$2 = try_expand_once(env, ty$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -30564,7 +30564,7 @@ function extract_concrete_typedecl(env, ty) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var match$1 = extract_concrete_typedecl(env, ty$2); + let match$1 = extract_concrete_typedecl(env, ty$2); return [ p, match$1[1], @@ -30581,8 +30581,8 @@ function expand_abbrev_opt(param, param$1) { } function try_expand_once_opt(env, ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand @@ -30597,12 +30597,12 @@ function try_expand_once_opt(env, ty) { } function try_expand_head_opt(env, ty) { - var ty$p = try_expand_once_opt(env, ty); + let ty$p = try_expand_once_opt(env, ty); try { return try_expand_head_opt(env, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return ty$p; } @@ -30611,12 +30611,12 @@ function try_expand_head_opt(env, ty) { } function expand_head_opt(env, ty) { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { return try_expand_head_opt(env, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { backtrack(snap); return repr(ty); @@ -30630,7 +30630,7 @@ function expand_head_opt(env, ty) { } function enforce_constraints(env, ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -30642,9 +30642,9 @@ function enforce_constraints(env, ty) { }); } if (match.TAG === /* Tconstr */3) { - var level = ty.level; + let level = ty.level; try { - var decl = find_type_full(match._0, env)[0]; + let decl = find_type_full(match._0, env)[0]; subst(env, level, /* Public */1, { contents: /* Mnil */0 }, undefined, decl.type_params, match._1, newty2(level, { @@ -30654,7 +30654,7 @@ function enforce_constraints(env, ty) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -30673,19 +30673,19 @@ function enforce_constraints(env, ty) { } function full_expand(env, ty) { - var ty$1 = repr(expand_head(env, ty)); - var match = ty$1.desc; + let ty$1 = repr(expand_head(env, ty)); + let match = ty$1.desc; if (typeof match === "number") { return ty$1; } if (match.TAG !== /* Tobject */4) { return ty$1; } - var match$1 = match._1.contents; + let match$1 = match._1.contents; if (match$1 === undefined) { return ty$1; } - var match$2 = match$1[1]; + let match$2 = match$1[1]; if (match$2 && is_Tvar(repr(match$2.hd))) { return newty2(ty$1.level, { TAG: /* Tobject */4, @@ -30701,11 +30701,11 @@ function full_expand(env, ty) { function generic_abbrev(env, path) { try { - var match = find_type_expansion(path, env); + let match = find_type_expansion(path, env); return repr(match[1]).level === 100000000; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -30715,8 +30715,8 @@ function generic_abbrev(env, path) { function generic_private_abbrev(env, path) { try { - var match = find_type_full(path, env)[0]; - var match$1 = match.type_kind; + let match = find_type_full(path, env)[0]; + let match$1 = match.type_kind; if (typeof match$1 !== "number") { return false; } @@ -30726,7 +30726,7 @@ function generic_private_abbrev(env, path) { if (match.type_private) { return false; } - var body = match.type_manifest; + let body = match.type_manifest; if (body !== undefined) { return repr(body).level === 100000000; } else { @@ -30734,7 +30734,7 @@ function generic_private_abbrev(env, path) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -30743,14 +30743,14 @@ function generic_private_abbrev(env, path) { } function is_contractive(env, ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number") { return true; } if (match.TAG !== /* Tconstr */3) { return true; } - var p = match._0; + let p = match._0; if (in_pervasives(p)) { return true; } @@ -30758,7 +30758,7 @@ function is_contractive(env, ty) { return is_datatype(find_type_full(p, env)[0]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -30766,7 +30766,7 @@ function is_contractive(env, ty) { } } -var Occur = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Occur"); +let Occur = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Occur"); function occur_rec(env, visited, ty0, ty) { if (ty === ty0) { @@ -30774,8 +30774,8 @@ function occur_rec(env, visited, ty0, ty) { MEL_EXN_ID: Occur }); } - var occur_ok = recursive_types.contents && is_contractive(env, ty); - var match = ty.desc; + let occur_ok = recursive_types.contents && is_contractive(env, ty); + let match = ty.desc; if (typeof match !== "number") { switch (match.TAG | 0) { case /* Tconstr */3 : @@ -30785,7 +30785,7 @@ function occur_rec(env, visited, ty0, ty) { MEL_EXN_ID: Occur }); } - var partial_arg = { + let partial_arg = { hd: ty, tl: visited }; @@ -30794,17 +30794,17 @@ function occur_rec(env, visited, ty0, ty) { }), ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Occur) { try { - var ty$p = try_expand_head$1(try_expand_once, env, ty); + let ty$p = try_expand_head$1(try_expand_once, env, ty); if (ty$p === ty0 || Stdlib__List.memq(ty$p, visited)) { throw new Caml_js_exceptions.MelangeError(Occur, { MEL_EXN_ID: Occur }); } - var match$1 = ty$p.desc; - var exit = 0; + let match$1 = ty$p.desc; + let exit = 0; if (typeof match$1 === "number") { exit = 2; } else { @@ -30820,7 +30820,7 @@ function occur_rec(env, visited, ty0, ty) { if (recursive_types.contents && is_contractive(env, ty$p)) { return ; } - var partial_arg$1 = { + let partial_arg$1 = { hd: ty$p, tl: visited }; @@ -30831,7 +30831,7 @@ function occur_rec(env, visited, ty0, ty) { } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Cannot_expand) { if (occur_ok) { return ; @@ -30862,7 +30862,7 @@ function occur_rec(env, visited, ty0, ty) { } -var type_changed = { +let type_changed = { contents: false }; @@ -30875,7 +30875,7 @@ function merge$2(r, b) { } function occur(env, ty0, ty) { - var old = type_changed.contents; + let old = type_changed.contents; try { while(type_changed.contents = false, occur_rec(env, /* [] */0, ty0, ty), type_changed.contents) { @@ -30883,7 +30883,7 @@ function occur(env, ty0, ty) { return merge$2(type_changed, old); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); merge$2(type_changed, old); throw new Caml_js_exceptions.MelangeError(( exn.MEL_EXN_ID === Occur ? ({ @@ -30903,7 +30903,7 @@ function occur_in(env, ty0, t) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { return true; } @@ -30913,28 +30913,28 @@ function occur_in(env, ty0, t) { function unify_univar(t1, t2, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var match = param.hd; - var find_univ = function (t, cl) { + let match = param.hd; + let find_univ = function (t, cl) { try { - var match = Stdlib__List.find((function (param) { + let match = Stdlib__List.find((function (param) { return t === repr(param[0]); }), cl); return Caml_option.some(match[1]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var match$1 = find_univ(t1, match[0]); - var match$2 = find_univ(t2, match[1]); + let match$1 = find_univ(t1, match[0]); + let match$2 = find_univ(t2, match[1]); if (match$1 !== undefined) { - var t$p2 = match$1.contents; + let t$p2 = match$1.contents; if (t$p2 !== undefined) { if (match$2 !== undefined) { if (t2 === repr(t$p2)) { @@ -30951,7 +30951,7 @@ function unify_univar(t1, t2, _param) { }); } if (match$2 !== undefined) { - var match$3 = match$2.contents; + let match$3 = match$2.contents; if (match$3 !== undefined) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -30983,23 +30983,23 @@ function unify_univar(t1, t2, _param) { } function occur_univar(env, ty) { - var visited = { + let visited = { contents: /* Empty */0 }; - var occur_rec = function (_bound, _ty) { + let occur_rec = function (_bound, _ty) { while(true) { - var ty = _ty; - var bound = _bound; - var ty$1 = repr(ty); - var tmp = false; + let ty = _ty; + let bound = _bound; + let ty$1 = repr(ty); + let tmp = false; if (ty$1.level >= 0) { - var tmp$1; + let tmp$1; if (Curry._1(is_empty$2, bound)) { ty$1.level = pivot_level - ty$1.level | 0; tmp$1 = true; } else { try { - var bound$p = Curry._2(find$1, ty$1, visited.contents); + let bound$p = Curry._2(find$1, ty$1, visited.contents); if (Curry._2(exists$1, (function(bound){ return function (x) { return !Curry._2(mem$3, x, bound); @@ -31012,7 +31012,7 @@ function occur_univar(env, ty) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { visited.contents = Curry._3(add$4, ty$1, bound, visited.contents); tmp$1 = true; @@ -31026,7 +31026,7 @@ function occur_univar(env, ty) { if (!tmp) { return ; } - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match === "number") { return iter_type_expr((function(bound){ return function (param) { @@ -31039,9 +31039,9 @@ function occur_univar(env, ty) { if (!match._1) { return ; } - var tl = match._1; + let tl = match._1; try { - var td = find_type_full(match._0, env)[0]; + let td = find_type_full(match._0, env)[0]; return Stdlib__List.iter2((function(bound){ return function (t, v) { if (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) { @@ -31052,7 +31052,7 @@ function occur_univar(env, ty) { }(bound)), tl, td.type_variance); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__List.iter((function(bound){ return function (param) { @@ -31080,7 +31080,7 @@ function occur_univar(env, ty) { } }); case /* Tpoly */10 : - var bound$1 = Stdlib__List.fold_right(add$3, Stdlib__List.map(repr, match._1), bound); + let bound$1 = Stdlib__List.fold_right(add$3, Stdlib__List.map(repr, match._1), bound); _ty = match._0; _bound = bound$1; continue ; @@ -31113,8 +31113,8 @@ function get_univar_family(univar_pairs, univars) { if (Caml_obj.caml_equal(univars, /* [] */0)) { return /* Empty */0; } - var insert = function (s, param) { - var cl2 = param[1]; + let insert = function (s, param) { + let cl2 = param[1]; if (cl2 && Stdlib__List.exists((function (param) { return Curry._2(mem$3, repr(param[0]), s); }), param[0])) { @@ -31123,24 +31123,24 @@ function get_univar_family(univar_pairs, univars) { return s; } }; - var s = Stdlib__List.fold_right(add$3, univars, /* Empty */0); + let s = Stdlib__List.fold_right(add$3, univars, /* Empty */0); return Stdlib__List.fold_left(insert, s, univar_pairs); } function univars_escape(env, univar_pairs, vl, ty) { - var family = get_univar_family(univar_pairs, vl); - var visited = { + let family = get_univar_family(univar_pairs, vl); + let visited = { contents: /* Empty */0 }; - var occur = function (_t) { + let occur = function (_t) { while(true) { - var t = _t; - var t$1 = repr(t); + let t = _t; + let t$1 = repr(t); if (Curry._2(mem$3, t$1, visited.contents)) { return ; } visited.contents = Curry._2(add$3, t$1, visited.contents); - var match = t$1.desc; + let match = t$1.desc; if (typeof match === "number") { return iter_type_expr(occur, t$1); } @@ -31149,9 +31149,9 @@ function univars_escape(env, univar_pairs, vl, ty) { if (!match._1) { return ; } - var tl = match._1; + let tl = match._1; try { - var td = find_type_full(match._0, env)[0]; + let td = find_type_full(match._0, env)[0]; return Stdlib__List.iter2((function (t, v) { if (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) { return occur(t); @@ -31160,7 +31160,7 @@ function univars_escape(env, univar_pairs, vl, ty) { }), tl, td.type_variance); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__List.iter(occur, tl); } @@ -31191,7 +31191,7 @@ function univars_escape(env, univar_pairs, vl, ty) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Occur) { return true; } @@ -31200,12 +31200,12 @@ function univars_escape(env, univar_pairs, vl, ty) { } function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { - var old_univars = univar_pairs.contents; - var known_univars = Stdlib__List.fold_left((function (s, param) { + let old_univars = univar_pairs.contents; + let known_univars = Stdlib__List.fold_left((function (s, param) { return add_univars(s, param[0]); }), /* Empty */0, old_univars); - var tl1$1 = Stdlib__List.map(repr, tl1); - var tl2$1 = Stdlib__List.map(repr, tl2); + let tl1$1 = Stdlib__List.map(repr, tl1); + let tl2$1 = Stdlib__List.map(repr, tl2); if (Stdlib__List.exists((function (t) { return Curry._2(mem$3, t, known_univars); }), tl1$1) && univars_escape(env, old_univars, tl1$1, newty2(current_level.contents, { @@ -31224,7 +31224,7 @@ function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { _1: /* [] */0 }); } - var cl1 = Stdlib__List.map((function (t) { + let cl1 = Stdlib__List.map((function (t) { return [ t, { @@ -31232,7 +31232,7 @@ function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { } ]; }), tl1$1); - var cl2 = Stdlib__List.map((function (t) { + let cl2 = Stdlib__List.map((function (t) { return [ t, { @@ -31254,7 +31254,7 @@ function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { } }; try { - var res = Curry._2(f, t1, t2); + let res = Curry._2(f, t1, t2); univar_pairs.contents = old_univars; return res; } @@ -31264,13 +31264,13 @@ function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { } } -var univar_pairs = { +let univar_pairs = { contents: /* [] */0 }; function has_cached_expansion(p, _abbrev) { while(true) { - var abbrev = _abbrev; + let abbrev = _abbrev; if (typeof abbrev === "number") { return false; } @@ -31288,8 +31288,8 @@ function has_cached_expansion(p, _abbrev) { function expand_trace(env, trace) { return Stdlib__List.fold_right((function (param, rem) { - var t2 = param[1]; - var t1 = param[0]; + let t2 = param[1]; + let t1 = param[0]; return { hd: [ repr(t1), @@ -31320,13 +31320,13 @@ function mkvariant(fields, closed) { }); } -var rigid_variants = { +let rigid_variants = { contents: false }; function deep_occur(t0, ty) { - var occur_rec = function (ty) { - var ty$1 = repr(ty); + let occur_rec = function (ty) { + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } @@ -31344,7 +31344,7 @@ function deep_occur(t0, ty) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Occur) { unmark_type(ty); return true; @@ -31353,12 +31353,12 @@ function deep_occur(t0, ty) { } } -var newtype_level = { +let newtype_level = { contents: undefined }; function get_newtype_level(param) { - var x = newtype_level.contents; + let x = newtype_level.contents; if (x !== undefined) { return x; } @@ -31373,15 +31373,15 @@ function get_newtype_level(param) { } function reify(env, t) { - var newtype_level = get_newtype_level(undefined); - var create_fresh_constr = function (lev, name) { - var decl = new_declaration([ + let newtype_level = get_newtype_level(undefined); + let create_fresh_constr = function (lev, name) { + let decl = new_declaration([ newtype_level, newtype_level ], undefined); - var name$1 = get_new_abstract_name(name); - var match = enter_type(name$1, decl, env.contents); - var t = newty2(lev, { + let name$1 = get_new_abstract_name(name); + let match = enter_type(name$1, decl, env.contents); + let t = newty2(lev, { TAG: /* Tconstr */3, _0: { TAG: /* Pident */0, @@ -31395,24 +31395,24 @@ function reify(env, t) { env.contents = match[1]; return t; }; - var visited = { + let visited = { contents: /* Empty */0 }; - var iterator = function (ty) { - var ty$1 = repr(ty); + let iterator = function (ty) { + let ty$1 = repr(ty); if (Curry._2(mem$3, ty$1, visited.contents)) { return ; } visited.contents = Curry._2(add$3, ty$1, visited.contents); - var o = ty$1.desc; + let o = ty$1.desc; if (typeof o === "number") { return iter_type_expr(iterator, ty$1); } switch (o.TAG | 0) { case /* Tvar */0 : - var o$1 = o._0; - var name = o$1 !== undefined ? o$1 : "ex"; - var t = create_fresh_constr(ty$1.level, name); + let o$1 = o._0; + let name = o$1 !== undefined ? o$1 : "ex"; + let t = create_fresh_constr(ty$1.level, name); return link_type(ty$1, t); case /* Tconstr */3 : if (is_object_type(o._0)) { @@ -31421,13 +31421,13 @@ function reify(env, t) { return iter_type_expr(iterator, ty$1); } case /* Tvariant */8 : - var r = row_repr_aux(/* [] */0, o._0); + let r = row_repr_aux(/* [] */0, o._0); if (!static_row(r)) { if (r.row_fixed) { iterator(row_more(r)); } else { - var m = r.row_more; - var o$2 = m.desc; + let m = r.row_more; + let o$2 = m.desc; if (typeof o$2 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -31439,13 +31439,13 @@ function reify(env, t) { }); } if (o$2.TAG === /* Tvar */0) { - var o$3 = o$2._0; - var name$1 = o$3 !== undefined ? o$3 : "ex"; - var t$1 = create_fresh_constr(m.level, name$1); - var row_row_bound = r.row_bound; - var row_row_closed = r.row_closed; - var row_row_name = r.row_name; - var row = { + let o$3 = o$2._0; + let name$1 = o$3 !== undefined ? o$3 : "ex"; + let t$1 = create_fresh_constr(m.level, name$1); + let row_row_bound = r.row_bound; + let row_row_closed = r.row_closed; + let row_row_name = r.row_name; + let row = { row_fields: /* [] */0, row_more: t$1, row_bound: row_row_bound, @@ -31479,7 +31479,7 @@ function reify(env, t) { function is_newtype(env, p) { try { - var decl = find_type_full(p, env)[0]; + let decl = find_type_full(p, env)[0]; if (decl.type_newtype_level !== undefined && Caml_obj.caml_equal(decl.type_kind, /* Type_abstract */0)) { return decl.type_private === /* Public */1; } else { @@ -31487,7 +31487,7 @@ function is_newtype(env, p) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -31504,8 +31504,8 @@ function non_aliasable(p, decl) { } function expands_to_datatype(env, ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { return false; } @@ -31520,7 +31520,7 @@ function expands_to_datatype(env, ty) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -31533,20 +31533,20 @@ function expands_to_datatype(env, ty) { function mcomp(type_pairs, env, _t1, _t2) { while(true) { - var t2 = _t2; - var t1 = _t1; + let t2 = _t2; + let t1 = _t1; if (t1 === t2) { return ; } - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (t1$1 === t2$1) { return ; } - var match = t1$1.desc; - var match$1 = t2$1.desc; - var exit = 0; - var exit$1 = 0; + let match = t1$1.desc; + let match$1 = t2$1.desc; + let exit = 0; + let exit$1 = 0; if (typeof match === "number") { exit$1 = 2; } else { @@ -31593,10 +31593,10 @@ function mcomp(type_pairs, env, _t1, _t2) { } } if (exit === 1) { - var t1$p = expand_head_opt(env, t1$1); - var t2$p = expand_head_opt(env, t2$1); - var t1$p$1 = repr(t1$p); - var t2$p$1 = repr(t2$p); + let t1$p = expand_head_opt(env, t1$1); + let t2$p = expand_head_opt(env, t2$1); + let t1$p$1 = repr(t1$p); + let t2$p$1 = repr(t2$p); if (t1$p$1 === t2$p$1) { return ; } @@ -31607,17 +31607,17 @@ function mcomp(type_pairs, env, _t1, _t2) { ]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 ], undefined); - var match$2 = t1$p$1.desc; - var match$3 = t2$p$1.desc; - var exit$2 = 0; - var p; - var exit$3 = 0; + let match$2 = t1$p$1.desc; + let match$3 = t2$p$1.desc; + let exit$2 = 0; + let p; + let exit$3 = 0; if (typeof match$2 === "number") { if (typeof match$3 === "number") { return ; @@ -31660,7 +31660,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } break; case /* Tarrow */1 : - var l1 = match$2._0; + let l1 = match$2._0; if (typeof match$3 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -31669,7 +31669,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } switch (match$3.TAG | 0) { case /* Tarrow */1 : - var l2 = match$3._0; + let l2 = match$3._0; if (l1 === l2 || !(is_optional(l1) || is_optional(l2))) { mcomp(type_pairs, env, match$2._1, match$3._1); _t2 = match$3._2; @@ -31711,25 +31711,25 @@ function mcomp(type_pairs, env, _t1, _t2) { } break; case /* Tconstr */3 : - var p1 = match$2._0; + let p1 = match$2._0; if (typeof match$3 === "number") { p = p1; exit$2 = 2; } else { if (match$3.TAG === /* Tconstr */3) { - var p2 = match$3._0; - var tl1 = match$2._1; - var tl2 = match$3._1; + let p2 = match$3._0; + let tl1 = match$2._1; + let tl2 = match$3._1; try { - var decl = find_type_full(p1, env)[0]; - var decl$p = find_type_full(p2, env)[0]; + let decl = find_type_full(p1, env)[0]; + let decl$p = find_type_full(p2, env)[0]; if (same(p1, p2)) { - var inj; + let inj; try { inj = Stdlib__List.map(Curry._1(Types_Variance.mem, /* Inj */3), find_type_full(p1, env)[0].type_variance); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { inj = Stdlib__List.map((function (param) { return false; @@ -31751,12 +31751,12 @@ function mcomp(type_pairs, env, _t1, _t2) { _1: /* [] */0 }); } - var match$4 = decl.type_kind; - var match$5 = decl$p.type_kind; - var exit$4 = 0; + let match$4 = decl.type_kind; + let match$5 = decl$p.type_kind; + let exit$4 = 0; if (typeof match$4 === "number") { if (match$4 === /* Type_abstract */0) { - var exit$5 = 0; + let exit$5 = 0; if (typeof match$5 === "number") { if (!match$5) { return ; @@ -31826,17 +31826,17 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } mcomp_list(type_pairs, env, tl1, tl2); - var xs = match$4._0; - var ys = match$5._0; - var _x = xs; - var _y = ys; + let xs = match$4._0; + let ys = match$5._0; + let _x = xs; + let _y = ys; while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; if (x) { if (y) { - var c2 = y.hd; - var c1 = x.hd; + let c2 = y.hd; + let c1 = x.hd; mcomp_type_option(type_pairs, env, c1.cd_res, c2.cd_res); mcomp_list(type_pairs, env, c1.cd_args, c2.cd_args); if (c1.cd_id.name === c2.cd_id.name) { @@ -31887,7 +31887,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -31954,13 +31954,13 @@ function mcomp(type_pairs, env, _t1, _t2) { exit$3 = 3; break; case /* Tvariant */8 : - var row1 = match$2._0; - var row2 = match$3._0; - var row1$1 = row_repr_aux(/* [] */0, row1); - var row2$1 = row_repr_aux(/* [] */0, row2); - var match$6 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); - var cannot_erase = function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let row1 = match$2._0; + let row2 = match$3._0; + let row1$1 = row_repr_aux(/* [] */0, row1); + let row2$1 = row_repr_aux(/* [] */0, row2); + let match$6 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); + let cannot_erase = function (param) { + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG !== /* Rpresent */0) { return false; } else { @@ -31974,14 +31974,14 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } return Stdlib__List.iter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); - var match$1 = row_field_repr_aux(/* [] */0, param[2]); - var exit = 0; - var exit$1 = 0; + let match = row_field_repr_aux(/* [] */0, param[1]); + let match$1 = row_field_repr_aux(/* [] */0, param[2]); + let exit = 0; + let exit$1 = 0; if (typeof match === "number") { exit$1 = 2; } else if (match.TAG === /* Rpresent */0) { - var t1 = match._0; + let t1 = match._0; if (t1 !== undefined) { if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -31990,7 +31990,7 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } if (match$1.TAG === /* Rpresent */0) { - var t2 = match$1._0; + let t2 = match$1._0; if (t2 !== undefined) { return mcomp(type_pairs, env, t1, t2); } @@ -32033,11 +32033,11 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } } else { - var exit$2 = 0; + let exit$2 = 0; if (match._0 || typeof match$1 === "number" || match$1.TAG !== /* Rpresent */0) { exit$2 = 3; } else { - var t2$1 = match$1._0; + let t2$1 = match$1._0; if (t2$1 !== undefined) { return Stdlib__List.iter((function (param) { return mcomp(type_pairs, env, t2$1, param); @@ -32071,7 +32071,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } } if (exit === 1) { - var exit$3 = 0; + let exit$3 = 0; if (typeof match === "number") { exit$3 = 2; } else { @@ -32127,9 +32127,9 @@ function mcomp(type_pairs, env, _t1, _t2) { } break; case /* Tpoly */10 : - var tl1$1 = match$2._1; - var t1$2 = match$2._0; - var exit$6 = 0; + let tl1$1 = match$2._1; + let t1$2 = match$2._0; + let exit$6 = 0; if (tl1$1) { exit$6 = 4; } else { @@ -32224,7 +32224,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } if (exit$2 === 2) { try { - var decl$1 = find_type_full(p, env)[0]; + let decl$1 = find_type_full(p, env)[0]; if (!(non_aliasable(p, decl$1) || is_datatype(decl$1))) { return ; } @@ -32234,7 +32234,7 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -32274,9 +32274,9 @@ function mcomp_fields(type_pairs, env, ty1, ty2) { ] }); } - var match = flatten_fields(ty2); - var match$1 = flatten_fields(ty1); - var match$2 = associate_fields(match$1[0], match[0]); + let match = flatten_fields(ty2); + let match$1 = flatten_fields(ty1); + let match$2 = associate_fields(match$1[0], match[0]); mcomp(type_pairs, env, match$1[1], match[1]); if (Caml_obj.caml_notequal(match$2[1], /* [] */0) && Caml_obj.caml_equal(object_row(ty1).desc, /* Tnil */0) || Caml_obj.caml_notequal(match$2[2], /* [] */0) && Caml_obj.caml_equal(object_row(ty2).desc, /* Tnil */0)) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -32291,8 +32291,8 @@ function mcomp_fields(type_pairs, env, ty1, ty2) { } function mcomp_kind(k1, k2) { - var k1$1 = field_kind_repr(k1); - var k2$1 = field_kind_repr(k2); + let k1$1 = field_kind_repr(k1); + let k2$1 = field_kind_repr(k2); if (typeof k1$1 === "number") { if (k1$1) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -32343,14 +32343,14 @@ function mcomp_type_option(type_pairs, env, t, t$p) { } function mcomp_record_description(type_pairs, env) { - var iter = function (_x, _y) { + let iter = function (_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; if (x) { if (y) { - var l2 = y.hd; - var l1 = x.hd; + let l2 = y.hd; + let l1 = x.hd; mcomp(type_pairs, env, l1.ld_type, l2.ld_type); if (l1.ld_id.name === l2.ld_id.name && l1.ld_mutable === l2.ld_mutable) { _y = y.tl; @@ -32384,11 +32384,11 @@ function mcomp$1(env, t1, t2) { } function find_lowest_level(ty) { - var lowest = { + let lowest = { contents: 100000000 }; - var find = function (ty) { - var ty$1 = repr(ty); + let find = function (ty) { + let ty$1 = repr(ty); if (ty$1.level >= 0) { if (ty$1.level < lowest.contents) { lowest.contents = ty$1.level; @@ -32405,7 +32405,7 @@ function find_lowest_level(ty) { function find_newtype_level(env, path) { try { - var x = find_type_full(path, env)[0].type_newtype_level; + let x = find_type_full(path, env)[0].type_newtype_level; if (x !== undefined) { return x; } @@ -32419,7 +32419,7 @@ function find_newtype_level(env, path) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -32435,18 +32435,18 @@ function find_newtype_level(env, path) { } function add_gadt_equation(env, source, destination) { - var destination$1 = type_expr(identity, destination); - var source_lev = find_newtype_level(env.contents, { + let destination$1 = type_expr(identity, destination); + let source_lev = find_newtype_level(env.contents, { TAG: /* Pident */0, _0: source }); - var decl = new_declaration(source_lev, destination$1); - var newtype_level = get_newtype_level(undefined); + let decl = new_declaration(source_lev, destination$1); + let newtype_level = get_newtype_level(undefined); env.contents = add_local_constraint(source, decl, newtype_level, env.contents); cleanup_abbrev(undefined); } -var unify_eq_set = Curry._1(TypePairs.create, 11); +let unify_eq_set = Curry._1(TypePairs.create, 11); function order_type_pair(t1, t2) { if (t1.id <= t2.id) { @@ -32474,7 +32474,7 @@ function eq_package_path(env, p1, p2) { } } -var nondep_type$p = { +let nondep_type$p = { contents: (function (param, param$1, param$2) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -32487,7 +32487,7 @@ var nondep_type$p = { }) }; -var package_subtype = { +let package_subtype = { contents: (function (param, param$1, param$2, param$3, param$4, param$5, param$6) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -32527,32 +32527,32 @@ function concat_longident(lid1) { } function nondep_instance(env, level, id, ty) { - var ty$1 = Curry._3(nondep_type$p.contents, env, id, ty); + let ty$1 = Curry._3(nondep_type$p.contents, env, id, ty); if (level === 100000000) { return type_expr(identity, ty$1); } - var old = current_level.contents; + let old = current_level.contents; current_level.contents = level; - var ty$2 = instance(undefined, env, ty$1); + let ty$2 = instance(undefined, env, ty$1); current_level.contents = old; return ty$2; } function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { - var allow_absent = allow_absentOpt !== undefined ? allow_absentOpt : false; - var id2 = create("Pkg"); - var env$p = add_module$1(undefined, id2, mty2, env); - var complete = function (_nl1, ntl2) { + let allow_absent = allow_absentOpt !== undefined ? allow_absentOpt : false; + let id2 = create("Pkg"); + let env$p = add_module$1(undefined, id2, mty2, env); + let complete = function (_nl1, ntl2) { while(true) { - var nl1 = _nl1; + let nl1 = _nl1; if (!nl1) { return ntl2; } - var n = nl1.hd; - var exit = 0; + let n = nl1.hd; + let exit = 0; if (ntl2) { - var nt2 = ntl2.hd; - var n2 = nt2[0]; + let nt2 = ntl2.hd; + let n2 = nt2[0]; if (Caml_obj.caml_greaterequal(n, n2)) { return { hd: nt2, @@ -32564,19 +32564,19 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { exit = 1; } if (exit === 1) { - var nl = nl1.tl; + let nl = nl1.tl; try { - var match = lookup_type$1(concat_longident({ + let match = lookup_type$1(concat_longident({ TAG: /* Lident */0, _0: "Pkg" })(n), env$p); - var decl = match[1]; + let decl = match[1]; if (decl.type_arity !== 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var match$1 = decl.type_kind; + let match$1 = decl.type_kind; if (typeof match$1 === "number") { if (match$1) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -32584,7 +32584,7 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { }); } if (decl.type_private) { - var t2 = decl.type_manifest; + let t2 = decl.type_manifest; if (t2 !== undefined) { return { hd: [ @@ -32610,8 +32610,8 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - var exit$1 = 0; + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exit$1 = 0; if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (allow_absent) { _nl1 = nl; @@ -32639,11 +32639,11 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { } function unify_package(env, unify_list, lv1, p1, n1, tl1, lv2, p2, n2, tl2) { - var ntl2 = complete_type_list(undefined, env, n1, lv2, { + let ntl2 = complete_type_list(undefined, env, n1, lv2, { TAG: /* Mty_ident */0, _0: p2 }, n2, tl2); - var ntl1 = complete_type_list(undefined, env, n2, lv2, { + let ntl1 = complete_type_list(undefined, env, n2, lv2, { TAG: /* Mty_ident */0, _0: p1 }, n1, tl1); @@ -32664,7 +32664,7 @@ function unify_eq(env, t1, t2) { if (t1 === t2) { return true; } - var match = umode.contents; + let match = umode.contents; if (!match) { return false; } @@ -32673,7 +32673,7 @@ function unify_eq(env, t1, t2) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -32685,23 +32685,23 @@ function unify(env, t1, t2) { if (t1 === t2) { return ; } - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (unify_eq(env.contents, t1$1, t2$1)) { return ; } - var reset_tracing = check_trace_gadt_instances(env.contents); + let reset_tracing = check_trace_gadt_instances(env.contents); try { type_changed.contents = true; - var match = t1$1.desc; - var match$1 = t2$1.desc; - var exit = 0; + let match = t1$1.desc; + let match$1 = t2$1.desc; + let exit = 0; if (typeof match === "number") { exit = 1; } else { switch (match.TAG | 0) { case /* Tvar */0 : - var exit$1 = 0; + let exit$1 = 0; if (typeof match$1 === "number" || !(match$1.TAG === /* Tconstr */3 && deep_occur(t1$1, t2$1))) { exit$1 = 2; } else { @@ -32715,7 +32715,7 @@ function unify(env, t1, t2) { } break; case /* Tconstr */3 : - var p1 = match._0; + let p1 = match._0; if (typeof match$1 === "number") { unify2(env, t1$1, t2$1); } else { @@ -32731,7 +32731,7 @@ function unify(env, t1, t2) { if (match._1 || match$1._1) { unify2(env, t1$1, t2$1); } else { - var p2 = match$1._0; + let p2 = match$1._0; if (same(p1, p2) && !(has_cached_expansion(p1, match._2.contents) || has_cached_expansion(p2, match$1._2.contents))) { update_level(env.contents, t1$1.level, t2$1); link_type(t1$1, t2$1); @@ -32744,7 +32744,7 @@ function unify(env, t1, t2) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { unify2(env, t1$1, t2$1); } else { @@ -32796,7 +32796,7 @@ function unify(env, t1, t2) { return reset_trace_gadt_instances(reset_tracing); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { reset_trace_gadt_instances(reset_tracing); throw new Caml_js_exceptions.MelangeError(Unify, { @@ -32815,8 +32815,8 @@ function unify(env, t1, t2) { } function make_rowvar(level, use1, rest1, use2, rest2) { - var set_name = function (ty, name) { - var match = ty.desc; + let set_name = function (ty, name) { + let match = ty.desc; if (typeof match === "number" || !(match.TAG === /* Tvar */0 && match._0 === undefined)) { return ; } else { @@ -32828,20 +32828,20 @@ function make_rowvar(level, use1, rest1, use2, rest2) { return ; } }; - var match = rest1.desc; - var match$1 = rest2.desc; - var name; - var exit = 0; + let match = rest1.desc; + let match$1 = rest2.desc; + let name; + let exit = 0; if (typeof match === "number" || match.TAG !== /* Tvar */0) { exit = 1; } else { - var name1 = match._0; + let name1 = match._0; if (name1 !== undefined) { - var exit$1 = 0; + let exit$1 = 0; if (typeof match$1 === "number" || match$1.TAG !== /* Tvar */0) { exit$1 = 2; } else { - var name2 = match$1._0; + let name2 = match$1._0; if (name2 !== undefined) { name = rest1.level <= rest2.level ? name1 : name2; } else { @@ -32863,7 +32863,7 @@ function make_rowvar(level, use1, rest1, use2, rest2) { if (typeof match$1 === "number" || match$1.TAG !== /* Tvar */0) { name = undefined; } else { - var name$1 = match$1._0; + let name$1 = match$1._0; if (name$1 !== undefined) { if (use1) { set_name(rest2, name$1); @@ -32887,8 +32887,8 @@ function make_rowvar(level, use1, rest1, use2, rest2) { } function unify_kind(k1, k2) { - var k1$1 = field_kind_repr(k1); - var k2$1 = field_kind_repr(k2); + let k1$1 = field_kind_repr(k1); + let k2$1 = field_kind_repr(k2); if (k1$1 === k2$1) { return ; } @@ -32904,7 +32904,7 @@ function unify_kind(k1, k2) { } } else { - var r = k1$1._0; + let r = k1$1._0; if (typeof k2$1 !== "number") { return set_kind(r, k2$1); } @@ -32924,11 +32924,11 @@ function unify_kind(k1, k2) { } function unify3(env, t1, t1$p, t2, t2$p) { - var d1 = t1$p.desc; - var d2 = t2$p.desc; - var create_recursion = t2 !== t2$p && deep_occur(t1$p, t2); - var exit = 0; - var exit$1 = 0; + let d1 = t1$p.desc; + let d2 = t2$p.desc; + let create_recursion = t2 !== t2$p && deep_occur(t1$p, t2); + let exit = 0; + let exit$1 = 0; if (typeof d1 === "number") { exit$1 = 2; } else { @@ -32985,7 +32985,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } } if (exit === 1) { - var match = umode.contents; + let match = umode.contents; if (match) { add_type_equality(t1$p, t2$p); } else { @@ -32993,12 +32993,12 @@ function unify3(env, t1, t1$p, t2, t2$p) { link_type(t1$p, t2); } try { - var exit$2 = 0; - var f; - var kind; - var rem; - var exit$3 = 0; - var exit$4 = 0; + let exit$2 = 0; + let f; + let kind; + let rem; + let exit$3 = 0; + let exit$4 = 0; if (typeof d1 === "number") { if (typeof d2 !== "number") { switch (d2.TAG | 0) { @@ -33022,7 +33022,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } else { switch (d1.TAG | 0) { case /* Tarrow */1 : - var l1 = d1._0; + let l1 = d1._0; if (typeof d2 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -33031,12 +33031,12 @@ function unify3(env, t1, t1$p, t2, t2$p) { } switch (d2.TAG | 0) { case /* Tarrow */1 : - var l2 = d2._0; + let l2 = d2._0; if (l1 === l2 || classic.contents && !(is_optional(l1) || is_optional(l2))) { unify(env, d1._1, d2._1); unify(env, d1._2, d2._2); - var match$1 = commu_repr(d1._3); - var match$2 = commu_repr(d2._3); + let match$1 = commu_repr(d1._3); + let match$2 = commu_repr(d2._3); if (typeof match$1 === "number") { if (typeof match$2 === "number") { @@ -33085,13 +33085,13 @@ function unify3(env, t1, t1$p, t2, t2$p) { } break; case /* Tconstr */3 : - var p1 = d1._0; - var exit$5 = 0; + let p1 = d1._0; + let exit$5 = 0; if (typeof d2 === "number" || d2.TAG !== /* Tconstr */3) { exit$5 = 6; } else { - var tl2 = d2._1; - var tl1 = d1._1; + let tl2 = d2._1; + let tl1 = d1._1; if (same(p1, d2._0)) { if (umode.contents === /* Expression */0 || !generate_equations.contents) { unify_list(env, tl1, tl2); @@ -33100,9 +33100,9 @@ function unify3(env, t1, t1$p, t2, t2$p) { unify_list(env, tl1, tl2); })); } else { - var tmp = true; + let tmp = true; if (!in_current_module(p1)) { - var partial_arg = env.contents; + let partial_arg = env.contents; tmp = Stdlib__List.exists((function (param) { return expands_to_datatype(partial_arg, param); }), { @@ -33119,12 +33119,12 @@ function unify3(env, t1, t1$p, t2, t2$p) { if (tmp) { unify_list(env, tl1, tl2); } else { - var inj; + let inj; try { inj = Stdlib__List.map(Curry._1(Types_Variance.mem, /* Inj */3), find_type_full(p1, env.contents)[0].type_variance); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { inj = Stdlib__List.map((function (param) { return false; @@ -33134,18 +33134,18 @@ function unify3(env, t1, t1$p, t2, t2$p) { } } Stdlib__List.iter2((function (i, param) { - var t2 = param[1]; - var t1 = param[0]; + let t2 = param[1]; + let t1 = param[0]; if (i) { return unify(env, t1, t2); } else { return set_mode_pattern(false, false, (function (param) { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { return unify(env, t1, t2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { backtrack(snap); reify(env, t1); @@ -33168,18 +33168,18 @@ function unify3(env, t1, t1$p, t2, t2$p) { if (d1._1) { exit$4 = 5; } else { - var p = p1._0; - var exit$6 = 0; + let p = p1._0; + let exit$6 = 0; if (typeof d2 === "number" || d2.TAG !== /* Tconstr */3) { exit$6 = 7; } else { - var path$p = d2._0; + let path$p = d2._0; switch (path$p.TAG | 0) { case /* Pident */0 : if (d2._1 || !(is_newtype(env.contents, p1) && is_newtype(env.contents, path$p) && generate_equations.contents)) { exit$6 = 7; } else { - var match$3 = Caml_obj.caml_greaterthan(find_newtype_level(env.contents, p1), find_newtype_level(env.contents, path$p)) ? [ + let match$3 = Caml_obj.caml_greaterthan(find_newtype_level(env.contents, p1), find_newtype_level(env.contents, path$p)) ? [ p, t2$p ] : [ @@ -33228,15 +33228,15 @@ function unify3(env, t1, t1$p, t2, t2$p) { break; case /* Tobject */4 : unify_fields(env, d1._0, d2._0); - var match$4 = repr(t2$p).desc; + let match$4 = repr(t2$p).desc; if (typeof match$4 !== "number" && match$4.TAG === /* Tobject */4) { - var exit$7 = 0; - var match$5 = match$4._1.contents; + let exit$7 = 0; + let match$5 = match$4._1.contents; if (match$5 !== undefined) { - var match$6 = match$5[1]; + let match$6 = match$5[1]; if (match$6) { - var match$7 = repr(match$6.hd).desc; - var tmp$1; + let match$7 = repr(match$6.hd).desc; + let tmp$1; if (typeof match$7 === "number") { tmp$1 = true; } else { @@ -33288,7 +33288,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } break; case /* Tvariant */8 : - var row1 = d1._0; + let row1 = d1._0; if (typeof d2 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -33300,16 +33300,16 @@ function unify3(env, t1, t1$p, t2, t2$p) { exit$4 = 5; break; case /* Tvariant */8 : - var row2 = d2._0; + let row2 = d2._0; if (umode.contents === /* Expression */0) { unify_row(env, row1, row2); } else { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { unify_row(env, row1, row2); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { backtrack(snap); reify(env, t1$p); @@ -33332,9 +33332,9 @@ function unify3(env, t1, t1$p, t2, t2$p) { } break; case /* Tpoly */10 : - var tl1$1 = d1._1; - var t1$1 = d1._0; - var exit$8 = 0; + let tl1$1 = d1._1; + let t1$1 = d1._0; + let exit$8 = 0; if (tl1$1) { exit$8 = 6; } else { @@ -33387,7 +33387,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } break; case /* Tpackage */11 : - var tl1$2 = d1._2; + let tl1$2 = d1._2; if (typeof d2 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -33399,14 +33399,14 @@ function unify3(env, t1, t1$p, t2, t2$p) { exit$4 = 5; break; case /* Tpackage */11 : - var tl2$1 = d2._2; + let tl2$1 = d2._2; try { unify_package(env.contents, (function (param, param$1) { return unify_list(env, param, param$1); }), t1.level, d1._0, d1._1, tl1$2, t2.level, d2._0, d2._1, tl2$1); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { if (umode.contents === /* Expression */0) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -33437,7 +33437,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { if (typeof d2 === "number" || d2.TAG !== /* Tconstr */3) { exit$3 = 4; } else { - var path = d2._0; + let path = d2._0; switch (path.TAG | 0) { case /* Pident */0 : if (d2._1 || !(is_newtype(env.contents, path) && generate_equations.contents)) { @@ -33488,7 +33488,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } break; case 3 : - var r = field_kind_repr(kind); + let r = field_kind_repr(kind); if (typeof r === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -33514,7 +33514,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { if (!create_recursion) { return ; } - var match$8 = t2.desc; + let match$8 = t2.desc; if (typeof match$8 === "number") { return ; } @@ -33522,7 +33522,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { return ; } forget_abbrev(match$8._2, match$8._0); - var t2$p$p = expand_head_unif(env.contents, t2); + let t2$p$p = expand_head_unif(env.contents, t2); if (!closed_parameterized_type(match$8._1, t2$p$p)) { return link_type(repr(t2), repr(t2$p)); } else { @@ -33530,7 +33530,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Unify) { t1$p.desc = d1; throw new Caml_js_exceptions.MelangeError(Unify, { @@ -33545,27 +33545,27 @@ function unify3(env, t1, t1$p, t2, t2$p) { } function unify_fields(env, ty1, ty2) { - var match = flatten_fields(ty1); - var rest1 = match[1]; - var match$1 = flatten_fields(ty2); - var rest2 = match$1[1]; - var match$2 = associate_fields(match[0], match$1[0]); - var miss2 = match$2[2]; - var miss1 = match$2[1]; - var l1 = repr(ty1).level; - var l2 = repr(ty2).level; - var va = make_rowvar(l1 < l2 ? l1 : l2, Caml_obj.caml_equal(miss2, /* [] */0), rest1, Caml_obj.caml_equal(miss1, /* [] */0), rest2); - var d1 = rest1.desc; - var d2 = rest2.desc; + let match = flatten_fields(ty1); + let rest1 = match[1]; + let match$1 = flatten_fields(ty2); + let rest2 = match$1[1]; + let match$2 = associate_fields(match[0], match$1[0]); + let miss2 = match$2[2]; + let miss1 = match$2[1]; + let l1 = repr(ty1).level; + let l2 = repr(ty2).level; + let va = make_rowvar(l1 < l2 ? l1 : l2, Caml_obj.caml_equal(miss2, /* [] */0), rest1, Caml_obj.caml_equal(miss1, /* [] */0), rest2); + let d1 = rest1.desc; + let d2 = rest2.desc; try { unify(env, build_fields(l1)(miss1, va), rest2); unify(env, rest1, build_fields(l2)(miss2, va)); return Stdlib__List.iter((function (param) { - var t2 = param[4]; - var k2 = param[3]; - var t1 = param[2]; - var k1 = param[1]; - var n = param[0]; + let t2 = param[4]; + let k2 = param[3]; + let t1 = param[2]; + let k1 = param[1]; + let n = param[0]; unify_kind(k1, k2); try { if (trace_gadt_instances.contents) { @@ -33574,18 +33574,18 @@ function unify_fields(env, ty1, ty2) { return unify(env, t1, t2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var desc_3 = newty2(current_level.contents, /* Tnil */0); - var desc = { + let desc_3 = newty2(current_level.contents, /* Tnil */0); + let desc = { TAG: /* Tfield */5, _0: n, _1: k1, _2: t1, _3: desc_3 }; - var desc_3$1 = newty2(current_level.contents, /* Tnil */0); - var desc$1 = { + let desc_3$1 = newty2(current_level.contents, /* Tnil */0); + let desc$1 = { TAG: /* Tfield */5, _0: n, _1: k2, @@ -33629,25 +33629,25 @@ function unify_list(env, tl1, tl2) { } function unify_row(env, row1, row2) { - var row1$1 = row_repr_aux(/* [] */0, row1); - var row2$1 = row_repr_aux(/* [] */0, row2); - var rm1 = row_more(row1$1); - var rm2 = row_more(row2$1); + let row1$1 = row_repr_aux(/* [] */0, row1); + let row2$1 = row_repr_aux(/* [] */0, row2); + let rm1 = row_more(row1$1); + let rm2 = row_more(row2$1); if (unify_eq(env.contents, rm1, rm2)) { return ; } - var match = merge_row_fields(row1$1.row_fields, row2$1.row_fields); - var pairs = match[2]; - var r2 = match[1]; - var r1 = match[0]; + let match = merge_row_fields(row1$1.row_fields, row2$1.row_fields); + let pairs = match[2]; + let r2 = match[1]; + let r1 = match[0]; if (Caml_obj.caml_notequal(r1, /* [] */0) && Caml_obj.caml_notequal(r2, /* [] */0)) { - var ht = Stdlib__Hashtbl.create(undefined, Stdlib__List.length(r1)); + let ht = Stdlib__Hashtbl.create(undefined, Stdlib__List.length(r1)); Stdlib__List.iter((function (param) { - var l = param[0]; + let l = param[0]; Stdlib__Hashtbl.add(ht, hash_variant(l), l); }), r1); Stdlib__List.iter((function (param) { - var l = param[0]; + let l = param[0]; try { throw new Caml_js_exceptions.MelangeError(Tags, { MEL_EXN_ID: Tags, @@ -33656,7 +33656,7 @@ function unify_row(env, row1, row2) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -33664,19 +33664,19 @@ function unify_row(env, row1, row2) { } }), r2); } - var fixed1 = row_fixed(row1$1); - var fixed2 = row_fixed(row2$1); - var more = fixed1 ? rm1 : ( + let fixed1 = row_fixed(row1$1); + let fixed2 = row_fixed(row2$1); + let more = fixed1 ? rm1 : ( fixed2 ? rm2 : newty2(rm1.level < rm2.level ? rm1.level : rm2.level, { TAG: /* Tvar */0, _0: undefined }) ); - var fixed = fixed1 || fixed2; - var closed = row1$1.row_closed || row2$1.row_closed; - var keep = function ($$switch) { + let fixed = fixed1 || fixed2; + let closed = row1$1.row_closed || row2$1.row_closed; + let keep = function ($$switch) { return Stdlib__List.for_all((function (param) { - var match = Curry._2($$switch, param[1], param[2]); + let match = Curry._2($$switch, param[1], param[2]); if (Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, match[0]), /* Rabsent */0)) { return true; } else { @@ -33684,7 +33684,7 @@ function unify_row(env, row1, row2) { } }), pairs); }; - var empty = function (fields) { + let empty = function (fields) { return Stdlib__List.for_all((function (param) { return Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0); }), fields); @@ -33707,7 +33707,7 @@ function unify_row(env, row1, row2) { } }); } - var name = row1$1.row_name !== undefined && (row1$1.row_closed || empty(r2)) && (!row2$1.row_closed || keep(function (f1, f2) { + let name = row1$1.row_name !== undefined && (row1$1.row_closed || empty(r2)) && (!row2$1.row_closed || keep(function (f1, f2) { return [ f1, f2 @@ -33720,11 +33720,11 @@ function unify_row(env, row1, row2) { ]; }) && empty(r2)) ? row2$1.row_name : undefined ); - var set_more = function (row, rest) { - var rest$1 = closed ? filter_row_fields(row.row_closed, rest) : rest; + let set_more = function (row, rest) { + let rest$1 = closed ? filter_row_fields(row.row_closed, rest) : rest; if (Caml_obj.caml_notequal(rest$1, /* [] */0) && (row.row_closed || row_fixed(row)) || closed && row_fixed(row) && !row.row_closed) { - var t1 = mkvariant(/* [] */0, true); - var t2 = mkvariant(rest$1, false); + let t1 = mkvariant(/* [] */0, true); + let t2 = mkvariant(rest$1, false); throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: { @@ -33739,7 +33739,7 @@ function unify_row(env, row1, row2) { } }); } - var rm = row_more(row); + let rm = row_more(row); if (trace_gadt_instances.contents && Caml_obj.caml_equal(rm.desc, /* Tnil */0) || !trace_gadt_instances.contents) { } else { @@ -33757,7 +33757,7 @@ function unify_row(env, row1, row2) { return unify(env, rm, more); } } - var ty = newty2(100000000, { + let ty = newty2(100000000, { TAG: /* Tvariant */8, _0: { row_fields: rest$1, @@ -33771,23 +33771,23 @@ function unify_row(env, row1, row2) { update_level(env.contents, rm.level, ty); link_type(rm, ty); }; - var md1 = rm1.desc; - var md2 = rm2.desc; + let md1 = rm1.desc; + let md2 = rm2.desc; try { set_more(row2$1, r1); set_more(row1$1, r2); return Stdlib__List.iter((function (param) { - var f2 = param[2]; - var f1 = param[1]; - var l = param[0]; + let f2 = param[2]; + let f1 = param[1]; + let l = param[0]; try { - var _f1 = f1; - var _f2 = f2; + let _f1 = f1; + let _f2 = f2; while(true) { - var f2$1 = _f2; - var f1$1 = _f1; - var f1$2 = row_field_repr_aux(/* [] */0, f1$1); - var f2$2 = row_field_repr_aux(/* [] */0, f2$1); + let f2$1 = _f2; + let f1$1 = _f1; + let f1$2 = row_field_repr_aux(/* [] */0, f1$1); + let f2$2 = row_field_repr_aux(/* [] */0, f2$1); if (f1$2 === f2$2) { return ; } @@ -33815,7 +33815,7 @@ function unify_row(env, row1, row2) { _1: /* [] */0 }); } else if (f1$2.TAG === /* Rpresent */0) { - var t1 = f1$2._0; + let t1 = f1$2._0; if (t1 !== undefined) { if (typeof f2$2 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -33824,7 +33824,7 @@ function unify_row(env, row1, row2) { }); } if (f2$2.TAG === /* Rpresent */0) { - var t2 = f2$2._0; + let t2 = f2$2._0; if (t2 !== undefined) { return unify(env, t1, t2); } @@ -33845,7 +33845,7 @@ function unify_row(env, row1, row2) { _1: /* [] */0 }); } - var e2 = f2$2._3; + let e2 = f2$2._3; set_row_field(e2, f1$2); update_level(env.contents, repr(more).level, t1); try { @@ -33896,10 +33896,10 @@ function unify_row(env, row1, row2) { }); } } else { - var c1 = f1$2._0; - var m1 = f1$2._2; - var tl1 = f1$2._1; - var e1 = f1$2._3; + let c1 = f1$2._0; + let m1 = f1$2._2; + let tl1 = f1$2._1; + let e1 = f1$2._3; if (typeof f2$2 === "number") { if (m1) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -33937,7 +33937,7 @@ function unify_row(env, row1, row2) { _1: /* [] */0 }); } - var t2$1 = f2$2._0; + let t2$1 = f2$2._0; if (t2$1 !== undefined) { if (fixed1) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -33945,7 +33945,7 @@ function unify_row(env, row1, row2) { _1: /* [] */0 }); } - var e1$1 = f1$2._3; + let e1$1 = f1$2._3; set_row_field(e1$1, f2$2); update_level(env.contents, repr(more).level, t2$1); try { @@ -33966,19 +33966,19 @@ function unify_row(env, row1, row2) { }); } } else { - var e2$1 = f2$2._3; + let e2$1 = f2$2._3; if (e1 === e2$1) { return ; } - var m2 = f2$2._2; - var tl2 = f2$2._1; - var c2 = f2$2._0; - var redo = false; + let m2 = f2$2._2; + let tl2 = f2$2._1; + let c2 = f2$2._0; + let redo = false; if (m1 || m2 || fixed1 || fixed2 || rigid_variants.contents && (Stdlib__List.length(tl1) === 1 || Stdlib__List.length(tl2) === 1)) { - var match = Stdlib.$at(tl1, tl2); - var tmp; + let match = Stdlib.$at(tl1, tl2); + let tmp; if (match) { - var t1$1 = match.hd; + let t1$1 = match.hd; if (c1 || c2) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34001,16 +34001,16 @@ function unify_row(env, row1, row2) { _f1 = f1$2; continue ; } - var tl1$1 = Stdlib__List.map(repr, tl1); - var tl2$1 = Stdlib__List.map(repr, tl2); - var remq = function (tl, _param) { + let tl1$1 = Stdlib__List.map(repr, tl1); + let tl2$1 = Stdlib__List.map(repr, tl2); + let remq = function (tl, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var tl$p = param.tl; - var ty = param.hd; + let tl$p = param.tl; + let ty = param.hd; if (!Stdlib__List.memq(ty, tl)) { return { hd: ty, @@ -34021,30 +34021,30 @@ function unify_row(env, row1, row2) { continue ; }; }; - var tl2$p = remq(tl2$1, tl1$1); - var tl1$p = remq(tl1$1, tl2$1); - var partial_arg = repr(more).level; - var partial_arg$1 = env.contents; + let tl2$p = remq(tl2$1, tl1$1); + let tl1$p = remq(tl1$1, tl2$1); + let partial_arg = repr(more).level; + let partial_arg$1 = env.contents; Stdlib__List.iter((function(partial_arg,partial_arg$1){ return function (param) { return update_level(partial_arg$1, partial_arg, param); } }(partial_arg,partial_arg$1)), Stdlib.$at(tl1$p, tl2$p)); - var e = { + let e = { contents: undefined }; - var f1$p_0 = c1 || c2; - var f1$p_2 = m1 || m2; - var f1$p = { + let f1$p_0 = c1 || c2; + let f1$p_2 = m1 || m2; + let f1$p = { TAG: /* Reither */1, _0: f1$p_0, _1: tl1$p, _2: f1$p_2, _3: e }; - var f2$p_0 = c1 || c2; - var f2$p_2 = m1 || m2; - var f2$p = { + let f2$p_0 = c1 || c2; + let f2$p_2 = m1 || m2; + let f2$p = { TAG: /* Reither */1, _0: f2$p_0, _1: tl2$p, @@ -34058,7 +34058,7 @@ function unify_row(env, row1, row2) { }; } catch (raw_exn){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$2.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34097,12 +34097,12 @@ function unify_row(env, row1, row2) { } function unify2(env, t1, t2) { - var expand_both = function (_t1$p$p, _t2$p$p) { + let expand_both = function (_t1$p$p, _t2$p$p) { while(true) { - var t2$p$p = _t2$p$p; - var t1$p$p = _t1$p$p; - var t1$p = expand_head_unif(env.contents, t1); - var t2$p = expand_head_unif(env.contents, t2); + let t2$p$p = _t2$p$p; + let t1$p$p = _t1$p$p; + let t1$p = expand_head_unif(env.contents, t1); + let t2$p = expand_head_unif(env.contents, t2); if (unify_eq(env.contents, t1$p, t1$p$p) && unify_eq(env.contents, t2$p, t2$p$p)) { return [ t1$p, @@ -34114,28 +34114,28 @@ function unify2(env, t1, t2) { continue ; }; }; - var match = expand_both(t1, t2); - var t2$p = match[1]; - var t1$p = match[0]; - var lv = t1$p.level < t2$p.level ? t1$p.level : t2$p.level; + let match = expand_both(t1, t2); + let t2$p = match[1]; + let t1$p = match[0]; + let lv = t1$p.level < t2$p.level ? t1$p.level : t2$p.level; update_level(env.contents, lv, t2); update_level(env.contents, lv, t1); if (unify_eq(env.contents, t1$p, t2$p)) { return ; } - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (trace_gadt_instances.contents) { - var ilevel = function (t) { - var lv = gadt_instance_level(env.contents, t); + let ilevel = function (t) { + let lv = gadt_instance_level(env.contents, t); if (lv !== undefined) { return lv; } else { return 0; } }; - var lv1 = ilevel(t1$1); - var lv2 = ilevel(t2$1); + let lv1 = ilevel(t1$1); + let lv2 = ilevel(t2$1); if (lv1 > lv2) { add_gadt_instance_chain(env.contents, lv1, t2$1); } else if (lv2 > lv1) { @@ -34143,13 +34143,13 @@ function unify2(env, t1, t2) { } } - var match$1; + let match$1; if (principal.contents && (find_lowest_level(t1$p) < lv || find_lowest_level(t2$p) < lv)) { - var match$2 = t1$1.desc; - var tmp; + let match$2 = t1$1.desc; + let tmp; tmp = typeof match$2 === "number" || !(match$2.TAG === /* Tconstr */3 && !match$2._1) ? t1$1 : t1$p; - var match$3 = t2$1.desc; - var tmp$1; + let match$3 = t2$1.desc; + let tmp$1; tmp$1 = typeof match$3 === "number" || !(match$3.TAG === /* Tconstr */3 && !match$3._1) ? t2$1 : t2$p; match$1 = [ tmp, @@ -34161,8 +34161,8 @@ function unify2(env, t1, t2) { t2$1 ]; } - var t2$2 = match$1[1]; - var t1$2 = match$1[0]; + let t2$2 = match$1[1]; + let t1$2 = match$1[0]; if (unify_eq(env.contents, t1$2, t1$p) || !unify_eq(env.contents, t2$2, t2$p)) { return unify3(env, t1$2, t1$p, t2$2, t2$p); } @@ -34170,7 +34170,7 @@ function unify2(env, t1, t2) { return unify3(env, t2$2, t2$p, t1$2, t1$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34191,7 +34191,7 @@ function unify$1(env, ty1, ty2) { return unify(env, ty1, ty2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34215,12 +34215,12 @@ function unify$1(env, ty1, ty2) { } function unify_var(env, t1, t2) { - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (t1$1 === t2$1) { return ; } - var match = t1$1.desc; + let match = t1$1.desc; if (typeof match === "number") { return unify$1({ contents: env @@ -34231,7 +34231,7 @@ function unify_var(env, t1, t2) { contents: env }, t1$1, t2$1); } - var reset_tracing = check_trace_gadt_instances(env); + let reset_tracing = check_trace_gadt_instances(env); try { occur(env, t1$1, t2$1); update_level(env, t1$1.level, t2$1); @@ -34239,10 +34239,10 @@ function unify_var(env, t1, t2) { return reset_trace_gadt_instances(reset_tracing); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { reset_trace_gadt_instances(reset_tracing); - var expanded_trace = expand_trace(env, { + let expanded_trace = expand_trace(env, { hd: [ t1$1, t2$1 @@ -34272,15 +34272,15 @@ function unify$2(env, ty1, ty2) { } function expand_head_trace(env, t) { - var reset_tracing = check_trace_gadt_instances(env); - var t$1 = expand_head_unif(env, t); + let reset_tracing = check_trace_gadt_instances(env); + let t$1 = expand_head_unif(env, t); reset_trace_gadt_instances(reset_tracing); return t$1; } function filter_arrow(env, t, l) { - var t$1 = expand_head_trace(env, t); - var match = t$1.desc; + let t$1 = expand_head_trace(env, t); + let match = t$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34289,16 +34289,16 @@ function filter_arrow(env, t, l) { } switch (match.TAG | 0) { case /* Tvar */0 : - var lv = t$1.level; - var t1 = newty2(lv, { + let lv = t$1.level; + let t1 = newty2(lv, { TAG: /* Tvar */0, _0: undefined }); - var t2 = newty2(lv, { + let t2 = newty2(lv, { TAG: /* Tvar */0, _0: undefined }); - var t$p = newty2(lv, { + let t$p = newty2(lv, { TAG: /* Tarrow */1, _0: l, _1: t1, @@ -34311,7 +34311,7 @@ function filter_arrow(env, t, l) { t2 ]; case /* Tarrow */1 : - var l$p = match._0; + let l$p = match._0; if (l === l$p || classic.contents && l === "" && !is_optional(l$p)) { return [ match._1, @@ -34332,9 +34332,9 @@ function filter_arrow(env, t, l) { function filter_method_field(env, name, priv, _ty) { while(true) { - var ty = _ty; - var ty$1 = expand_head_trace(env, ty); - var match = ty$1.desc; + let ty = _ty; + let ty$1 = expand_head_trace(env, ty); + let match = ty$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34343,16 +34343,16 @@ function filter_method_field(env, name, priv, _ty) { } switch (match.TAG | 0) { case /* Tvar */0 : - var level = ty$1.level; - var ty1 = newty2(level, { + let level = ty$1.level; + let ty1 = newty2(level, { TAG: /* Tvar */0, _0: undefined }); - var ty2 = newty2(level, { + let ty2 = newty2(level, { TAG: /* Tvar */0, _0: undefined }); - var ty$p = newty2(level, { + let ty$p = newty2(level, { TAG: /* Tfield */5, _0: name, _1: priv ? /* Fpresent */0 : /* Fvar */({ @@ -34366,7 +34366,7 @@ function filter_method_field(env, name, priv, _ty) { link_type(ty$1, ty$p); return ty1; case /* Tfield */5 : - var kind = field_kind_repr(match._1); + let kind = field_kind_repr(match._1); if (match._0 === name && Caml_obj.caml_notequal(kind, /* Fabsent */1)) { if (priv === /* Public */1) { unify_kind(kind, /* Fpresent */0); @@ -34385,8 +34385,8 @@ function filter_method_field(env, name, priv, _ty) { } function filter_method(env, name, priv, ty) { - var ty$1 = expand_head_trace(env, ty); - var match = ty$1.desc; + let ty$1 = expand_head_trace(env, ty); + let match = ty$1.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34395,8 +34395,8 @@ function filter_method(env, name, priv, ty) { } switch (match.TAG | 0) { case /* Tvar */0 : - var ty1 = newvar(undefined, undefined); - var ty$p = newobj(ty1); + let ty1 = newvar(undefined, undefined); + let ty$p = newobj(ty1); update_level(env, ty$1.level, ty$p); link_type(ty$1, ty$p); return filter_method_field(env, name, priv, ty1); @@ -34411,15 +34411,15 @@ function filter_method(env, name, priv, ty) { } function filter_self_method(env, lab, priv, meths, ty) { - var ty$p = filter_method(env, lab, priv, ty); + let ty$p = filter_method(env, lab, priv, ty); try { return Curry._2(find, lab, meths.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var pair_0 = create(lab); - var pair = [ + let pair_0 = create(lab); + let pair = [ pair_0, ty$p ]; @@ -34431,8 +34431,8 @@ function filter_self_method(env, lab, priv, meths, ty) { } function moregen_occur(env, level, ty) { - var occur = function (ty) { - var ty$1 = repr(ty); + let occur = function (ty) { + let ty$1 = repr(ty); if (ty$1.level <= level) { return ; } @@ -34442,14 +34442,14 @@ function moregen_occur(env, level, ty) { }); } ty$1.level = pivot_level - ty$1.level | 0; - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr(occur, ty$1); } if (row.TAG !== /* Tvariant */8) { return iter_type_expr(occur, ty$1); } - var row$1 = row._0; + let row$1 = row._0; if (static_row(row$1)) { return iter_row(occur, row$1); } else { @@ -34461,7 +34461,7 @@ function moregen_occur(env, level, ty) { unmark_type(ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Occur) { unmark_type(ty); throw new Caml_js_exceptions.MelangeError(Unify, { @@ -34487,15 +34487,15 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { if (t1 === t2) { return ; } - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (t1$1 === t2$1) { return ; } try { - var match = t1$1.desc; - var match$1 = t2$1.desc; - var exit = 0; + let match = t1$1.desc; + let match$1 = t2$1.desc; + let exit = 0; if (typeof match === "number") { exit = 1; } else { @@ -34523,10 +34523,10 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } } if (exit === 1) { - var t1$p = expand_head(env, t1$1); - var t2$p = expand_head(env, t2$1); - var t1$p$1 = repr(t1$p); - var t2$p$1 = repr(t2$p); + let t1$p = expand_head(env, t1$1); + let t2$p = expand_head(env, t2$1); + let t1$p$1 = repr(t1$p); + let t2$p$1 = repr(t2$p); if (t1$p$1 === t2$p$1) { return ; } @@ -34537,14 +34537,14 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { ]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 ], undefined); - var match$2 = t1$p$1.desc; - var match$3 = t2$p$1.desc; + let match$2 = t1$p$1.desc; + let match$3 = t2$p$1.desc; if (typeof match$2 === "number") { if (typeof match$3 === "number") { return ; @@ -34572,8 +34572,8 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }); } if (match$3.TAG === /* Tarrow */1) { - var l2 = match$3._0; - var l1 = match$2._0; + let l2 = match$3._0; + let l1 = match$2._0; if (l1 === l2 || classic.contents && !(is_optional(l1) || is_optional(l2))) { moregen(inst_nongen, type_pairs, env, match$2._1, match$3._1); return moregen(inst_nongen, type_pairs, env, match$2._2, match$3._2); @@ -34663,37 +34663,37 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }); } if (match$3.TAG === /* Tvariant */8) { - var row1 = match$2._0; - var row2 = match$3._0; - var row1$1 = row_repr_aux(/* [] */0, row1); - var row2$1 = row_repr_aux(/* [] */0, row2); - var rm1 = repr(row1$1.row_more); - var rm2 = repr(row2$1.row_more); + let row1 = match$2._0; + let row2 = match$3._0; + let row1$1 = row_repr_aux(/* [] */0, row1); + let row2$1 = row_repr_aux(/* [] */0, row2); + let rm1 = repr(row1$1.row_more); + let rm2 = repr(row2$1.row_more); if (rm1 === rm2) { return ; } - var may_inst = is_Tvar(rm1) && may_instantiate(inst_nongen, rm1) || Caml_obj.caml_equal(rm1.desc, /* Tnil */0); - var match$4 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); - var r2 = match$4[1]; - var r1 = match$4[0]; - var match$5 = row2$1.row_closed ? [ + let may_inst = is_Tvar(rm1) && may_instantiate(inst_nongen, rm1) || Caml_obj.caml_equal(rm1.desc, /* Tnil */0); + let match$4 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); + let r2 = match$4[1]; + let r1 = match$4[0]; + let match$5 = row2$1.row_closed ? [ filter_row_fields(may_inst, r1), filter_row_fields(false, r2) ] : [ r1, r2 ]; - var r2$1 = match$5[1]; + let r2$1 = match$5[1]; if (Caml_obj.caml_notequal(match$5[0], /* [] */0) || row1$1.row_closed && (!row2$1.row_closed || Caml_obj.caml_notequal(r2$1, /* [] */0))) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - var match$6 = rm1.desc; - var match$7 = rm2.desc; - var exit$1 = 0; - var exit$2 = 0; + let match$6 = rm1.desc; + let match$7 = rm2.desc; + let exit$1 = 0; + let exit$2 = 0; if (typeof match$6 === "number" || match$6.TAG !== /* Tunivar */9) { exit$2 = 2; } else { @@ -34727,7 +34727,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } if (exit$1 === 1 && !static_row(row1$1)) { if (may_inst) { - var ext = newty2(100000000, { + let ext = newty2(100000000, { TAG: /* Tvariant */8, _0: { row_fields: r2$1, @@ -34771,8 +34771,8 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } } return Stdlib__List.iter((function (param) { - var f1 = row_field_repr_aux(/* [] */0, param[1]); - var f2 = row_field_repr_aux(/* [] */0, param[2]); + let f1 = row_field_repr_aux(/* [] */0, param[1]); + let f2 = row_field_repr_aux(/* [] */0, param[2]); if (f1 === f2) { return ; } @@ -34786,7 +34786,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }); } if (f1.TAG === /* Rpresent */0) { - var t1 = f1._0; + let t1 = f1._0; if (t1 !== undefined) { if (typeof f2 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -34795,7 +34795,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }); } if (f2.TAG === /* Rpresent */0) { - var t2 = f2._0; + let t2 = f2._0; if (t2 !== undefined) { return moregen(inst_nongen, type_pairs, env, t1, t2); } @@ -34830,7 +34830,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }); } } else { - var c1 = f1._0; + let c1 = f1._0; if (c1) { if (!f1._1 && typeof f2 !== "number" && f2.TAG === /* Rpresent */0) { if (f2._0 !== undefined) { @@ -34849,7 +34849,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } } else if (typeof f2 !== "number" && f2.TAG === /* Rpresent */0) { - var t2$1 = f2._0; + let t2$1 = f2._0; if (t2$1 !== undefined) { if (may_inst) { set_row_field(f1._3, f2); @@ -34867,8 +34867,8 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { _1: /* [] */0 }); } - var e1 = f1._3; - var tl1 = f1._1; + let e1 = f1._3; + let tl1 = f1._1; if (typeof f2 === "number") { if (may_inst) { return set_row_field(e1, f2); @@ -34884,12 +34884,12 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { _1: /* [] */0 }); } - var e2 = f2._3; + let e2 = f2._3; if (e1 === e2) { return ; } - var tl2 = f2._1; - var c2 = f2._0; + let tl2 = f2._1; + let c2 = f2._0; if (c1 && !c2) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34909,7 +34909,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }), tl1, tl2); } if (tl2) { - var t2$2 = tl2.hd; + let t2$2 = tl2.hd; return Stdlib__List.iter((function (t1) { moregen(inst_nongen, type_pairs, env, t1, t2$2); }), tl1); @@ -34943,9 +34943,9 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { _1: /* [] */0 }); case /* Tpoly */10 : - var tl1 = match$2._1; - var t1$2 = match$2._0; - var exit$3 = 0; + let tl1 = match$2._1; + let t1$2 = match$2._0; + let exit$3 = 0; if (tl1) { exit$3 = 2; } else { @@ -34999,7 +34999,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { }), t1$p$1.level, match$2._0, match$2._1, match$2._2, t2$p$1.level, match$3._0, match$3._1, match$3._2); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35024,7 +35024,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35054,10 +35054,10 @@ function moregen_list(inst_nongen, type_pairs, env, tl1, tl2) { } function moregen_fields(inst_nongen, type_pairs, env, ty1, ty2) { - var match = flatten_fields(ty1); - var match$1 = flatten_fields(ty2); - var rest2 = match$1[1]; - var match$2 = associate_fields(match[0], match$1[0]); + let match = flatten_fields(ty1); + let match$1 = flatten_fields(ty2); + let rest2 = match$1[1]; + let match$2 = associate_fields(match[0], match$1[0]); if (Caml_obj.caml_notequal(match$2[1], /* [] */0)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35066,17 +35066,17 @@ function moregen_fields(inst_nongen, type_pairs, env, ty1, ty2) { } moregen(inst_nongen, type_pairs, env, match[1], build_fields(repr(ty2).level)(match$2[2], rest2)); Stdlib__List.iter((function (param) { - var t2 = param[4]; - var k2 = param[3]; - var t1 = param[2]; - var k1 = param[1]; - var n = param[0]; + let t2 = param[4]; + let k2 = param[3]; + let t1 = param[2]; + let k1 = param[1]; + let n = param[0]; moregen_kind(k1, k2); try { return moregen(inst_nongen, type_pairs, env, t1, t2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35107,8 +35107,8 @@ function moregen_fields(inst_nongen, type_pairs, env, ty1, ty2) { } function moregen_kind(k1, k2) { - var k1$1 = field_kind_repr(k1); - var k2$1 = field_kind_repr(k2); + let k1$1 = field_kind_repr(k1); + let k2$1 = field_kind_repr(k2); if (k1$1 === k2$1) { return ; } @@ -35133,7 +35133,7 @@ function moregen_kind(k1, k2) { _1: /* [] */0 }); } - var r = k1$1._0; + let r = k1$1._0; if (typeof k2$1 !== "number") { return set_kind(r, k2$1); } @@ -35152,19 +35152,19 @@ function moregen$1(inst_nongen, type_pairs, env, patt, subj) { } function moregeneral(env, inst_nongen, pat_sch, subj_sch) { - var old_level = current_level.contents; + let old_level = current_level.contents; current_level.contents = 99999999; - var ty = instance(undefined, env, subj_sch); - var subj = type_expr(identity, ty); + let ty = instance(undefined, env, subj_sch); + let subj = type_expr(identity, ty); current_level.contents = 100000000; - var patt = instance(undefined, env, pat_sch); - var res; + let patt = instance(undefined, env, pat_sch); + let res; try { moregen$1(inst_nongen, Curry._1(TypePairs.create, 13), env, patt, subj); res = true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { res = false; } else { @@ -35177,13 +35177,13 @@ function moregeneral(env, inst_nongen, pat_sch, subj_sch) { function rigidify_rec(vars, _ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } ty$1.level = pivot_level - ty$1.level | 0; - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr((function (param) { return rigidify_rec(vars, param); @@ -35201,14 +35201,14 @@ function rigidify_rec(vars, _ty) { return ; } case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var more = repr(row$1.row_more); + let row$1 = row_repr_aux(/* [] */0, row._0); + let more = repr(row$1.row_more); if (is_Tvar(more) && !row_fixed(row$1)) { - var more$p = newty2(more.level, more.desc); - var row$p_row_bound = row$1.row_bound; - var row$p_row_closed = row$1.row_closed; - var row$p_row_name = row$1.row_name; - var row$p = { + let more$p = newty2(more.level, more.desc); + let row$p_row_bound = row$1.row_bound; + let row$p_row_closed = row$1.row_closed; + let row$p_row_name = row$1.row_name; + let row$p = { row_fields: /* [] */0, row_more: more$p, row_bound: row$p_row_bound, @@ -35238,7 +35238,7 @@ function rigidify_rec(vars, _ty) { } function rigidify(ty) { - var vars = { + let vars = { contents: /* [] */0 }; rigidify_rec(vars, ty); @@ -35247,11 +35247,11 @@ function rigidify(ty) { } function all_distinct_vars(env, vars) { - var tyl = { + let tyl = { contents: /* [] */0 }; return Stdlib__List.for_all((function (ty) { - var ty$1 = expand_head(env, ty); + let ty$1 = expand_head(env, ty); if (Stdlib__List.memq(ty$1, tyl.contents)) { return false; } else { @@ -35265,16 +35265,16 @@ function all_distinct_vars(env, vars) { } function matches(env, ty, ty$p) { - var snap = snapshot(undefined); - var vars = rigidify(ty); + let snap = snapshot(undefined); + let vars = rigidify(ty); cleanup_abbrev(undefined); - var ok; + let ok; try { unify$2(env, ty, ty$p); ok = all_distinct_vars(env, vars); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { ok = false; } else { @@ -35286,20 +35286,20 @@ function matches(env, ty, ty$p) { } function expand_head_rigid(env, ty) { - var old = rigid_variants.contents; + let old = rigid_variants.contents; rigid_variants.contents = true; - var ty$p = expand_head(env, ty); + let ty$p = expand_head(env, ty); rigid_variants.contents = old; return ty$p; } function normalize_subst(subst) { if (Stdlib__List.exists((function (param) { - var match = param[0].desc; + let match = param[0].desc; if (typeof match !== "number" && match.TAG === /* Tlink */6) { return true; } - var match$1 = param[1].desc; + let match$1 = param[1].desc; return typeof match$1 === "number" || match$1.TAG !== /* Tlink */6 ? false : true; }), subst.contents)) { subst.contents = Stdlib__List.map((function (param) { @@ -35317,15 +35317,15 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { if (t1 === t2) { return ; } - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (t1$1 === t2$1) { return ; } try { - var match = t1$1.desc; - var match$1 = t2$1.desc; - var exit = 0; + let match = t1$1.desc; + let match$1 = t2$1.desc; + let exit = 0; if (typeof match === "number") { exit = 1; } else { @@ -35345,7 +35345,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (Stdlib__List.exists((function (param) { return param[1] === t2$1; @@ -35383,10 +35383,10 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } } if (exit === 1) { - var t1$p = expand_head_rigid(env, t1$1); - var t2$p = expand_head_rigid(env, t2$1); - var t1$p$1 = repr(t1$p); - var t2$p$1 = repr(t2$p); + let t1$p = expand_head_rigid(env, t1$1); + let t2$p = expand_head_rigid(env, t2$1); + let t1$p$1 = repr(t1$p); + let t2$p$1 = repr(t2$p); if (t1$p$1 === t2$p$1) { return ; } @@ -35397,14 +35397,14 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { ]); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 ], undefined); - var match$2 = t1$p$1.desc; - var match$3 = t2$p$1.desc; + let match$2 = t1$p$1.desc; + let match$3 = t2$p$1.desc; if (typeof match$2 === "number") { if (typeof match$3 === "number") { return ; @@ -35435,7 +35435,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { if (Stdlib__List.exists((function (param) { return param[1] === t2$p$1; @@ -35476,8 +35476,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } if (match$3.TAG === /* Tarrow */1) { - var l2 = match$3._0; - var l1 = match$2._0; + let l2 = match$3._0; + let l1 = match$2._0; if (l1 === l2 || classic.contents && !(is_optional(l1) || is_optional(l2))) { eqtype(rename, type_pairs, subst, env, match$2._1, match$3._1); return eqtype(rename, type_pairs, subst, env, match$2._2, match$3._2); @@ -35567,21 +35567,21 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } if (match$3.TAG === /* Tvariant */8) { - var row1 = match$2._0; - var _row2 = match$3._0; + let row1 = match$2._0; + let _row2 = match$3._0; while(true) { - var row2 = _row2; - var match$4 = expand_head_rigid(env, row_more(row2)); - var row2$1 = match$4.desc; + let row2 = _row2; + let match$4 = expand_head_rigid(env, row_more(row2)); + let row2$1 = match$4.desc; if (typeof row2$1 !== "number" && row2$1.TAG === /* Tvariant */8) { _row2 = row2$1._0; continue ; } - var row1$1 = row_repr_aux(/* [] */0, row1); - var row2$2 = row_repr_aux(/* [] */0, row2); - var match$5 = merge_row_fields(row1$1.row_fields, row2$2.row_fields); - var r2 = match$5[1]; - var r1 = match$5[0]; + let row1$1 = row_repr_aux(/* [] */0, row1); + let row2$2 = row_repr_aux(/* [] */0, row2); + let match$5 = merge_row_fields(row1$1.row_fields, row2$2.row_fields); + let r2 = match$5[1]; + let r1 = match$5[0]; if (row1$1.row_closed !== row2$2.row_closed || !row1$1.row_closed && (Caml_obj.caml_notequal(r1, /* [] */0) || Caml_obj.caml_notequal(r2, /* [] */0)) || Caml_obj.caml_notequal(filter_row_fields(false, Stdlib.$at(r1, r2)), /* [] */0)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35592,8 +35592,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { eqtype(rename, type_pairs, subst, env, row1$1.row_more, row2$2.row_more); } return Stdlib__List.iter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); - var match$1 = row_field_repr_aux(/* [] */0, param[2]); + let match = row_field_repr_aux(/* [] */0, param[1]); + let match$1 = row_field_repr_aux(/* [] */0, param[2]); if (typeof match === "number") { if (typeof match$1 === "number") { return ; @@ -35604,7 +35604,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } if (match.TAG === /* Rpresent */0) { - var t1 = match._0; + let t1 = match._0; if (t1 !== undefined) { if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -35613,7 +35613,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } if (match$1.TAG === /* Rpresent */0) { - var t2 = match$1._0; + let t2 = match$1._0; if (t2 !== undefined) { return eqtype(rename, type_pairs, subst, env, t1, t2); } @@ -35680,10 +35680,10 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { _1: /* [] */0 }); } else { - var match$2 = match._1; + let match$2 = match._1; if (match$2) { - var tl1 = match$2.tl; - var t1$1 = match$2.hd; + let tl1 = match$2.tl; + let t1$1 = match$2.hd; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35702,10 +35702,10 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { _1: /* [] */0 }); } - var match$3 = match$1._1; + let match$3 = match$1._1; if (match$3) { - var tl2 = match$3.tl; - var t2$1 = match$3.hd; + let tl2 = match$3.tl; + let t2$1 = match$3.hd; eqtype(rename, type_pairs, subst, env, t1$1, t2$1); if (Stdlib__List.length(tl1) === Stdlib__List.length(tl2)) { return Stdlib__List.iter2((function (param, param$1) { @@ -35753,9 +35753,9 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { _1: /* [] */0 }); case /* Tpoly */10 : - var tl1 = match$2._1; - var t1$2 = match$2._0; - var exit$1 = 0; + let tl1 = match$2._1; + let t1$2 = match$2._0; + let exit$1 = 0; if (tl1) { exit$1 = 2; } else { @@ -35809,7 +35809,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }), t1$p$1.level, match$2._0, match$2._1, match$2._2, t2$p$1.level, match$3._0, match$3._1, match$3._2); } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35834,7 +35834,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35865,12 +35865,12 @@ function eqtype_list(rename, type_pairs, subst, env, tl1, tl2) { function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { while(true) { - var ty2 = _ty2; - var match = flatten_fields(ty1); - var rest1 = match[1]; - var match$1 = flatten_fields(ty2); - var rest2 = match$1[1]; - var same_row = rest1 === rest2 || Curry._2(TypePairs.mem, type_pairs, [ + let ty2 = _ty2; + let match = flatten_fields(ty1); + let rest1 = match[1]; + let match$1 = flatten_fields(ty2); + let rest2 = match$1[1]; + let same_row = rest1 === rest2 || Curry._2(TypePairs.mem, type_pairs, [ rest1, rest2 ]) || rename && Stdlib__List.mem([ @@ -35880,13 +35880,13 @@ function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { if (same_row) { return ; } - var match$2 = expand_head_rigid(env, rest2); - var match$3 = match$2.desc; + let match$2 = expand_head_rigid(env, rest2); + let match$3 = match$2.desc; if (typeof match$3 !== "number" && match$3.TAG === /* Tobject */4) { _ty2 = match$3._0; continue ; } - var match$4 = associate_fields(match[0], match$1[0]); + let match$4 = associate_fields(match[0], match$1[0]); eqtype(rename, type_pairs, subst, env, rest1, rest2); if (Caml_obj.caml_notequal(match$4[1], /* [] */0) || Caml_obj.caml_notequal(match$4[2], /* [] */0)) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -35896,17 +35896,17 @@ function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { } return Stdlib__List.iter((function(rest2){ return function (param) { - var t2 = param[4]; - var k2 = param[3]; - var t1 = param[2]; - var k1 = param[1]; - var n = param[0]; + let t2 = param[4]; + let k2 = param[3]; + let t1 = param[2]; + let k1 = param[1]; + let n = param[0]; eqtype_kind(k1, k2); try { return eqtype(rename, type_pairs, subst, env, t1, t2); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35939,8 +35939,8 @@ function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { } function eqtype_kind(k1, k2) { - var k1$1 = field_kind_repr(k1); - var k2$1 = field_kind_repr(k2); + let k1$1 = field_kind_repr(k1); + let k2$1 = field_kind_repr(k2); if (typeof k1$1 === "number") { if (k1$1) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -35980,7 +35980,7 @@ function equal$5(env, rename, tyl1, tyl2) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { return false; } @@ -35993,33 +35993,33 @@ function eqtype$1(rename, type_pairs, subst, env, t1, t2) { eqtype(rename, type_pairs, subst, env, t1, t2); } -var Failure = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Failure"); +let Failure = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ctype.Failure"); function moregen_clty(trace, type_pairs, env, cty1, cty2) { try { - var exit = 0; + let exit = 0; switch (cty1.TAG | 0) { case /* Cty_constr */0 : return moregen_clty(true, type_pairs, env, cty1._2, cty2); case /* Cty_signature */1 : - var sign1 = cty1._0; + let sign1 = cty1._0; switch (cty2.TAG | 0) { case /* Cty_constr */0 : exit = 1; break; case /* Cty_signature */1 : - var sign2 = cty2._0; - var ty1 = object_fields(repr(sign1.csig_self)); - var ty2 = object_fields(repr(sign2.csig_self)); - var match = flatten_fields(ty1); - var match$1 = flatten_fields(ty2); - var match$2 = associate_fields(match[0], match$1[0]); + let sign2 = cty2._0; + let ty1 = object_fields(repr(sign1.csig_self)); + let ty2 = object_fields(repr(sign2.csig_self)); + let match = flatten_fields(ty1); + let match$1 = flatten_fields(ty2); + let match$2 = associate_fields(match[0], match$1[0]); Stdlib__List.iter((function (param) { try { return moregen$1(true, type_pairs, env, param[2], param[4]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36038,12 +36038,12 @@ function moregen_clty(trace, type_pairs, env, cty1, cty2) { } }), match$2[0]); return Curry._2(Meths.iter, (function (lab, param) { - var match = Curry._2(Meths.find, lab, sign1.csig_vars); + let match = Curry._2(Meths.find, lab, sign1.csig_vars); try { return moregen$1(true, type_pairs, env, match[2], param[2]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36085,7 +36085,7 @@ function moregen_clty(trace, type_pairs, env, cty1, cty2) { moregen$1(true, type_pairs, env, cty1._1, cty2._1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36118,9 +36118,9 @@ function moregen_clty(trace, type_pairs, env, cty1, cty2) { } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Failure) { - var error = exn$1._1; + let error = exn$1._1; if (trace || Caml_obj.caml_equal(error, /* [] */0)) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36142,30 +36142,30 @@ function moregen_clty(trace, type_pairs, env, cty1, cty2) { } function match_class_types(traceOpt, env, pat_sch, subj_sch) { - var trace = traceOpt !== undefined ? traceOpt : true; - var type_pairs = Curry._1(TypePairs.create, 53); - var old_level = current_level.contents; + let trace = traceOpt !== undefined ? traceOpt : true; + let type_pairs = Curry._1(TypePairs.create, 53); + let old_level = current_level.contents; current_level.contents = 99999999; - var match = instance_class(/* [] */0, subj_sch); - var subj = class_type$1(identity, match[1]); + let match = instance_class(/* [] */0, subj_sch); + let subj = class_type$1(identity, match[1]); current_level.contents = 100000000; - var match$1 = instance_class(/* [] */0, pat_sch); - var patt = match$1[1]; - var sign1 = signature_of_class_type(patt); - var sign2 = signature_of_class_type(subj); - var t1 = repr(sign1.csig_self); - var t2 = repr(sign2.csig_self); + let match$1 = instance_class(/* [] */0, pat_sch); + let patt = match$1[1]; + let sign1 = signature_of_class_type(patt); + let sign2 = signature_of_class_type(subj); + let t1 = repr(sign1.csig_self); + let t2 = repr(sign2.csig_self); Curry._3(TypePairs.add, type_pairs, [ t1, t2 ], undefined); - var match$2 = flatten_fields(object_fields(t1)); - var match$3 = flatten_fields(object_fields(t2)); - var match$4 = associate_fields(match$2[0], match$3[0]); - var error = Stdlib__List.fold_right((function (param, err) { - var lab = param[0]; - var k = field_kind_repr(param[1]); - var err$1 = typeof k === "number" ? ({ + let match$2 = flatten_fields(object_fields(t1)); + let match$3 = flatten_fields(object_fields(t2)); + let match$4 = associate_fields(match$2[0], match$3[0]); + let error = Stdlib__List.fold_right((function (param, err) { + let lab = param[0]; + let k = field_kind_repr(param[1]); + let err$1 = typeof k === "number" ? ({ hd: { TAG: /* CM_Hide_public */10, _0: lab @@ -36185,23 +36185,23 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { }; } }), match$4[1], /* [] */0); - var missing_method = Stdlib__List.map((function (param) { + let missing_method = Stdlib__List.map((function (param) { return param[0]; }), match$4[2]); - var error$1 = Stdlib.$at(Stdlib__List.map((function (m) { + let error$1 = Stdlib.$at(Stdlib__List.map((function (m) { return { TAG: /* CM_Missing_method */9, _0: m }; }), missing_method), error); moregen$1(true, type_pairs, env, match$2[1], match$3[1]); - var error$2 = Stdlib__List.fold_right((function (param, err) { + let error$2 = Stdlib__List.fold_right((function (param, err) { try { moregen_kind(param[1], param[3]); return err; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { return { hd: { @@ -36214,9 +36214,9 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), match$4[0], error$1); - var error$3 = Curry._3(Meths.fold, (function (lab, param, err) { + let error$3 = Curry._3(Meths.fold, (function (lab, param, err) { try { - var match = Curry._2(Meths.find, lab, sign1.csig_vars); + let match = Curry._2(Meths.find, lab, sign1.csig_vars); if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { return { hd: { @@ -36238,7 +36238,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: { @@ -36251,7 +36251,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), sign2.csig_vars, error$2); - var error$4 = Curry._3(Meths.fold, (function (lab, param, err) { + let error$4 = Curry._3(Meths.fold, (function (lab, param, err) { if (param[1] === /* Virtual */0 && !Curry._2(Meths.mem, lab, sign2.csig_vars)) { return { hd: { @@ -36265,7 +36265,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { return err; } }), sign1.csig_vars, error$3); - var error$5 = Stdlib__List.fold_right((function (e, l) { + let error$5 = Stdlib__List.fold_right((function (e, l) { if (Stdlib__List.mem(e, missing_method)) { return l; } else { @@ -36278,7 +36278,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { }; } }), Curry._1(elements, Curry._2(diff, sign2.csig_concr, sign1.csig_concr)), error$4); - var res; + let res; if (error$5) { res = { hd: { @@ -36295,7 +36295,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { res = /* [] */0; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Failure) { res = exn._1; } else { @@ -36309,10 +36309,10 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { try { - var exit = 0; + let exit = 0; switch (cty1.TAG | 0) { case /* Cty_constr */0 : - var exit$1 = 0; + let exit$1 = 0; switch (cty2.TAG | 0) { case /* Cty_constr */0 : return equal_clty(true, type_pairs, subst, env, cty1._2, cty2._2); @@ -36327,24 +36327,24 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { } break; case /* Cty_signature */1 : - var sign1 = cty1._0; + let sign1 = cty1._0; switch (cty2.TAG | 0) { case /* Cty_constr */0 : exit = 1; break; case /* Cty_signature */1 : - var sign2 = cty2._0; - var ty1 = object_fields(repr(sign1.csig_self)); - var ty2 = object_fields(repr(sign2.csig_self)); - var match = flatten_fields(ty1); - var match$1 = flatten_fields(ty2); - var match$2 = associate_fields(match[0], match$1[0]); + let sign2 = cty2._0; + let ty1 = object_fields(repr(sign1.csig_self)); + let ty2 = object_fields(repr(sign2.csig_self)); + let match = flatten_fields(ty1); + let match$1 = flatten_fields(ty2); + let match$2 = associate_fields(match[0], match$1[0]); Stdlib__List.iter((function (param) { try { return eqtype$1(true, type_pairs, subst, env, param[2], param[4]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36363,12 +36363,12 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { } }), match$2[0]); return Curry._2(Meths.iter, (function (lab, param) { - var match = Curry._2(Meths.find, lab, sign1.csig_vars); + let match = Curry._2(Meths.find, lab, sign1.csig_vars); try { return eqtype$1(true, type_pairs, subst, env, match[2], param[2]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36406,7 +36406,7 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { eqtype$1(true, type_pairs, subst, env, cty1._1, cty2._1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36451,7 +36451,7 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { } } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Failure) { if (trace) { throw new Caml_js_exceptions.MelangeError(Failure, { @@ -36474,25 +36474,25 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { } function match_class_declarations(env, patt_params, patt_type, subj_params, subj_type) { - var type_pairs = Curry._1(TypePairs.create, 53); - var subst = { + let type_pairs = Curry._1(TypePairs.create, 53); + let subst = { contents: /* [] */0 }; - var sign1 = signature_of_class_type(patt_type); - var sign2 = signature_of_class_type(subj_type); - var t1 = repr(sign1.csig_self); - var t2 = repr(sign2.csig_self); + let sign1 = signature_of_class_type(patt_type); + let sign2 = signature_of_class_type(subj_type); + let t1 = repr(sign1.csig_self); + let t2 = repr(sign2.csig_self); Curry._3(TypePairs.add, type_pairs, [ t1, t2 ], undefined); - var match = flatten_fields(object_fields(t1)); - var match$1 = flatten_fields(object_fields(t2)); - var match$2 = associate_fields(match[0], match$1[0]); - var error = Stdlib__List.fold_right((function (param, err) { - var lab = param[0]; - var k = field_kind_repr(param[1]); - var err$1 = typeof k === "number" ? ({ + let match = flatten_fields(object_fields(t1)); + let match$1 = flatten_fields(object_fields(t2)); + let match$2 = associate_fields(match[0], match$1[0]); + let error = Stdlib__List.fold_right((function (param, err) { + let lab = param[0]; + let k = field_kind_repr(param[1]); + let err$1 = typeof k === "number" ? ({ hd: { TAG: /* CM_Hide_public */10, _0: lab @@ -36512,20 +36512,20 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj }; } }), match$2[1], /* [] */0); - var missing_method = Stdlib__List.map((function (param) { + let missing_method = Stdlib__List.map((function (param) { return param[0]; }), match$2[2]); - var error$1 = Stdlib.$at(Stdlib__List.map((function (m) { + let error$1 = Stdlib.$at(Stdlib__List.map((function (m) { return { TAG: /* CM_Missing_method */9, _0: m }; }), missing_method), error); eqtype$1(true, type_pairs, subst, env, match[1], match$1[1]); - var error$2 = Stdlib__List.fold_right((function (param, err) { - var lab = param[0]; - var k1 = field_kind_repr(param[1]); - var k2 = field_kind_repr(param[3]); + let error$2 = Stdlib__List.fold_right((function (param, err) { + let lab = param[0]; + let k1 = field_kind_repr(param[1]); + let k2 = field_kind_repr(param[3]); if (typeof k1 === "number") { if (!k1) { if (typeof k2 !== "number") { @@ -36567,9 +36567,9 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj ] }); }), match$2[0], error$1); - var error$3 = Curry._3(Meths.fold, (function (lab, param, err) { + let error$3 = Curry._3(Meths.fold, (function (lab, param, err) { try { - var match = Curry._2(Meths.find, lab, sign1.csig_vars); + let match = Curry._2(Meths.find, lab, sign1.csig_vars); if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { return { hd: { @@ -36591,7 +36591,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: { @@ -36604,7 +36604,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), sign2.csig_vars, error$2); - var error$4 = Curry._3(Meths.fold, (function (lab, param, err) { + let error$4 = Curry._3(Meths.fold, (function (lab, param, err) { if (param[1] === /* Virtual */0 && !Curry._2(Meths.mem, lab, sign2.csig_vars)) { return { hd: { @@ -36618,7 +36618,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj return err; } }), sign1.csig_vars, error$3); - var error$5 = Stdlib__List.fold_right((function (e, l) { + let error$5 = Stdlib__List.fold_right((function (e, l) { if (Stdlib__List.mem(e, missing_method)) { return l; } else { @@ -36635,8 +36635,8 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj return error$5; } try { - var lp = Stdlib__List.length(patt_params); - var ls = Stdlib__List.length(subj_params); + let lp = Stdlib__List.length(patt_params); + let ls = Stdlib__List.length(subj_params); if (lp !== ls) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36655,7 +36655,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj return eqtype$1(true, type_pairs, subst, env, p, s); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36679,7 +36679,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj TAG: /* Cty_signature */1, _0: sign2 }); - var clty_params = function (param, param$1) { + let clty_params = function (param, param$1) { return Stdlib__List.fold_right((function (ty, cty) { return { TAG: /* Cty_arrow */2, @@ -36692,7 +36692,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj return match_class_types(false, env, clty_params(patt_params, patt_type), clty_params(subj_params, subj_type)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Failure) { return exn._1; } @@ -36700,7 +36700,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj } } -var warn = { +let warn = { contents: false }; @@ -36728,11 +36728,11 @@ function collect(l) { function filter_visited(_l) { while(true) { - var l = _l; + let l = _l; if (!l) { return /* [] */0; } - var match = l.hd.desc; + let match = l.hd.desc; if (typeof match === "number") { _l = l.tl; continue ; @@ -36758,7 +36758,7 @@ function memq_warn(t, visited) { } function lid_of_path(sharpOpt, param) { - var sharp = sharpOpt !== undefined ? sharpOpt : ""; + let sharp = sharpOpt !== undefined ? sharpOpt : ""; switch (param.TAG | 0) { case /* Pident */0 : return { @@ -36782,18 +36782,18 @@ function lid_of_path(sharpOpt, param) { } function find_cltype_for_path(env, p) { - var match = lookup_type$1(lid_of_path("#", p), env); - var cl_abbr = match[1]; - var ty = cl_abbr.type_manifest; + let match = lookup_type$1(lid_of_path("#", p), env); + let cl_abbr = match[1]; + let ty = cl_abbr.type_manifest; if (ty !== undefined) { - var match$1 = repr(ty).desc; + let match$1 = repr(ty).desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (match$1.TAG === /* Tobject */4) { - var match$2 = match$1._1.contents; + let match$2 = match$1._1.contents; if (match$2 !== undefined) { if (same(p, match$2[0])) { return [ @@ -36825,11 +36825,11 @@ function find_cltype_for_path(env, p) { } function build_subtype(env, visited, loops, posi, level, t) { - var t$1 = repr(t); - var tlist = t$1.desc; + let t$1 = repr(t); + let tlist = t$1.desc; if (typeof tlist === "number") { if (posi) { - var v = newvar(undefined, undefined); + let v = newvar(undefined, undefined); return [ v, /* Changed */2 @@ -36850,7 +36850,7 @@ function build_subtype(env, visited, loops, posi, level, t) { ]; } try { - var t$p = Stdlib__List.assq(t$1, loops); + let t$p = Stdlib__List.assq(t$1, loops); warn.contents = true; return [ t$p, @@ -36858,7 +36858,7 @@ function build_subtype(env, visited, loops, posi, level, t) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return [ t$1, @@ -36874,13 +36874,13 @@ function build_subtype(env, visited, loops, posi, level, t) { /* Unchanged */0 ]; } - var visited$1 = { + let visited$1 = { hd: t$1, tl: visited }; - var match = build_subtype(env, visited$1, loops, !posi, level, tlist._1); - var match$1 = build_subtype(env, visited$1, loops, posi, level, tlist._2); - var c = Caml.caml_int_max(match[1], match$1[1]); + let match = build_subtype(env, visited$1, loops, !posi, level, tlist._1); + let match$1 = build_subtype(env, visited$1, loops, posi, level, tlist._2); + let c = Caml.caml_int_max(match[1], match$1[1]); if (c > /* Unchanged */0) { return [ newty2(current_level.contents, { @@ -36905,21 +36905,21 @@ function build_subtype(env, visited, loops, posi, level, t) { /* Unchanged */0 ]; } - var visited$2 = { + let visited$2 = { hd: t$1, tl: visited }; - var tlist$p = Stdlib__List.map((function (param) { + let tlist$p = Stdlib__List.map((function (param) { return build_subtype(env, visited$2, loops, posi, level, param); }), tlist._0); - var c$1 = collect(tlist$p); + let c$1 = collect(tlist$p); if (c$1 <= /* Unchanged */0) { return [ t$1, /* Unchanged */0 ]; } - var desc = { + let desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (prim) { return prim[0]; @@ -36930,12 +36930,12 @@ function build_subtype(env, visited, loops, posi, level, t) { c$1 ]; case /* Tconstr */3 : - var p = tlist._0; + let p = tlist._0; if (level > 0 && generic_abbrev(env, p) && safe_abbrev(env, t$1) && !has_constr_row(expand_abbrev(env)(t$1))) { - var t$p$1 = repr(expand_abbrev(env)(t$1)); - var level$p = pred_expand(level); + let t$p$1 = repr(expand_abbrev(env)(t$1)); + let level$p = pred_expand(level); try { - var match$2 = t$p$1.desc; + let match$2 = t$p$1.desc; if (typeof match$2 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -36943,18 +36943,18 @@ function build_subtype(env, visited, loops, posi, level, t) { } if (match$2.TAG === /* Tobject */4) { if (posi && !opened_object(t$p$1)) { - var match$3 = find_cltype_for_path(env, p); - var ty = subst(env, current_level.contents, /* Public */1, tlist._2, undefined, match$3[0].type_params, tlist._1, match$3[1]); - var ty$1 = repr(ty); - var match$4 = ty$1.desc; - var match$5; + let match$3 = find_cltype_for_path(env, p); + let ty = subst(env, current_level.contents, /* Public */1, tlist._2, undefined, match$3[0].type_params, tlist._1, match$3[1]); + let ty$1 = repr(ty); + let match$4 = ty$1.desc; + let match$5; if (typeof match$4 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (match$4.TAG === /* Tobject */4) { - var match$6 = match$4._1.contents; + let match$6 = match$4._1.contents; if (match$6 !== undefined) { if (same(p, match$6[0])) { match$5 = [ @@ -36976,7 +36976,7 @@ function build_subtype(env, visited, loops, posi, level, t) { MEL_EXN_ID: Stdlib.Not_found }); } - var tl1 = match$5[1]; + let tl1 = match$5[1]; if (Stdlib__List.exists((function (param) { return deep_occur(ty$1, param); }), tl1)) { @@ -36988,20 +36988,20 @@ function build_subtype(env, visited, loops, posi, level, t) { TAG: /* Tvar */0, _0: undefined }; - var t$p$p = newvar(undefined, undefined); - var loops_0 = [ + let t$p$p = newvar(undefined, undefined); + let loops_0 = [ ty$1, t$p$p ]; - var loops$1 = { + let loops$1 = { hd: loops_0, tl: loops }; - var match$7 = build_subtype(env, { + let match$7 = build_subtype(env, { hd: t$p$1, tl: /* [] */0 }, loops$1, posi, pred_enlarge(level$p), match$5[0]); - var ty1$p = match$7[0]; + let ty1$p = match$7[0]; if (!is_Tvar(t$p$p)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -37012,7 +37012,7 @@ function build_subtype(env, visited, loops, posi, level, t) { ] }); } - var nm = match$7[1] > /* Equiv */1 || deep_occur(ty$1, ty1$p) ? undefined : [ + let nm = match$7[1] > /* Equiv */1 || deep_occur(ty$1, ty1$p) ? undefined : [ p, tl1 ]; @@ -37027,7 +37027,7 @@ function build_subtype(env, visited, loops, posi, level, t) { unify_var(env, ty$1, t$1); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -37054,10 +37054,10 @@ function build_subtype(env, visited, loops, posi, level, t) { }); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { - var match$8 = build_subtype(env, visited, loops, posi, level$p, t$p$1); - var c$2 = match$8[1]; + let match$8 = build_subtype(env, visited, loops, posi, level$p, t$p$1); + let c$2 = match$8[1]; if (c$2 > /* Unchanged */0) { return [ match$8[0], @@ -37079,18 +37079,18 @@ function build_subtype(env, visited, loops, posi, level, t) { /* Unchanged */0 ]; } - var visited$3 = { + let visited$3 = { hd: t$1, tl: visited }; try { - var decl = find_type_full(p, env)[0]; + let decl = find_type_full(p, env)[0]; if (level === 0 && generic_abbrev(env, p) && safe_abbrev(env, t$1) && !has_constr_row(expand_abbrev(env)(t$1))) { warn.contents = true; } - var tl$p = Stdlib__List.map2((function (v, t) { - var match = Curry._1(Types_Variance.get_upper, v); - var co = match[0]; + let tl$p = Stdlib__List.map2((function (v, t) { + let match = Curry._1(Types_Variance.get_upper, v); + let co = match[0]; if (match[1]) { if (co) { return [ @@ -37109,7 +37109,7 @@ function build_subtype(env, visited, loops, posi, level, t) { ]; } }), decl.type_variance, tlist._1); - var c$3 = collect(tl$p); + let c$3 = collect(tl$p); if (c$3 > /* Unchanged */0) { return [ newconstr(p, Stdlib__List.map((function (prim) { @@ -37125,7 +37125,7 @@ function build_subtype(env, visited, loops, posi, level, t) { } } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { return [ t$1, @@ -37136,21 +37136,21 @@ function build_subtype(env, visited, loops, posi, level, t) { } } case /* Tobject */4 : - var t1 = tlist._0; + let t1 = tlist._0; if (memq_warn(t$1, visited) || opened_object(t1)) { return [ t$1, /* Unchanged */0 ]; } - var level$p$1 = pred_enlarge(level); - var visited_1 = level$p$1 < level ? /* [] */0 : filter_visited(visited); - var visited$4 = { + let level$p$1 = pred_enlarge(level); + let visited_1 = level$p$1 < level ? /* [] */0 : filter_visited(visited); + let visited$4 = { hd: t$1, tl: visited_1 }; - var match$9 = build_subtype(env, visited$4, loops, posi, level$p$1, t1); - var c$4 = match$9[1]; + let match$9 = build_subtype(env, visited$4, loops, posi, level$p$1, t1); + let c$4 = match$9[1]; if (c$4 > /* Unchanged */0) { return [ newty2(current_level.contents, { @@ -37169,9 +37169,9 @@ function build_subtype(env, visited, loops, posi, level, t) { ]; } case /* Tfield */5 : - var match$10 = build_subtype(env, visited, loops, posi, level, tlist._2); - var match$11 = build_subtype(env, visited, loops, posi, level, tlist._3); - var c$5 = Caml.caml_int_max(match$10[1], match$11[1]); + let match$10 = build_subtype(env, visited, loops, posi, level, tlist._2); + let match$11 = build_subtype(env, visited, loops, posi, level, tlist._3); + let c$5 = Caml.caml_int_max(match$10[1], match$11[1]); if (c$5 > /* Unchanged */0) { return [ newty2(current_level.contents, { @@ -37200,23 +37200,23 @@ function build_subtype(env, visited, loops, posi, level, t) { ] }); case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, tlist._0); + let row = row_repr_aux(/* [] */0, tlist._0); if (memq_warn(t$1, visited) || !static_row(row)) { return [ t$1, /* Unchanged */0 ]; } - var level$p$2 = pred_enlarge(level); - var visited_1$1 = level$p$2 < level ? /* [] */0 : filter_visited(visited); - var visited$5 = { + let level$p$2 = pred_enlarge(level); + let visited_1$1 = level$p$2 < level ? /* [] */0 : filter_visited(visited); + let visited$5 = { hd: t$1, tl: visited_1$1 }; - var fields = filter_row_fields(false, row.row_fields); - var fields$1 = Stdlib__List.map((function (orig) { - var l = orig[0]; - var match = row_field_repr_aux(/* [] */0, orig[1]); + let fields = filter_row_fields(false, row.row_fields); + let fields$1 = Stdlib__List.map((function (orig) { + let l = orig[0]; + let match = row_field_repr_aux(/* [] */0, orig[1]); if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -37228,7 +37228,7 @@ function build_subtype(env, visited, loops, posi, level, t) { }); } if (match.TAG === /* Rpresent */0) { - var t = match._0; + let t = match._0; if (t === undefined) { if (posi) { return [ @@ -37253,9 +37253,9 @@ function build_subtype(env, visited, loops, posi, level, t) { ]; } } - var match$1 = build_subtype(env, visited$5, loops, posi, level$p$2, t); - var t$p = match$1[0]; - var f = posi && level > 0 ? ({ + let match$1 = build_subtype(env, visited$5, loops, posi, level$p$2, t); + let t$p = match$1[0]; + let f = posi && level > 0 ? ({ TAG: /* Reither */1, _0: false, _1: { @@ -37287,13 +37287,13 @@ function build_subtype(env, visited, loops, posi, level, t) { ] }); }), fields); - var c$6 = collect(fields$1); - var row_row_fields = Stdlib__List.map((function (prim) { + let c$6 = collect(fields$1); + let row_row_fields = Stdlib__List.map((function (prim) { return prim[0]; }), fields$1); - var row_row_more = newvar(undefined, undefined); - var row_row_name = c$6 > /* Unchanged */0 ? undefined : row.row_name; - var row$1 = { + let row_row_more = newvar(undefined, undefined); + let row_row_name = c$6 > /* Unchanged */0 ? undefined : row.row_name; + let row$1 = { row_fields: row_row_fields, row_more: row_row_more, row_bound: undefined, @@ -37309,8 +37309,8 @@ function build_subtype(env, visited, loops, posi, level, t) { /* Changed */2 ]; case /* Tpoly */10 : - var match$12 = build_subtype(env, visited, loops, posi, level, tlist._0); - var c$7 = match$12[1]; + let match$12 = build_subtype(env, visited, loops, posi, level, tlist._0); + let c$7 = match$12[1]; if (c$7 > /* Unchanged */0) { return [ newty2(current_level.contents, { @@ -37338,14 +37338,14 @@ function build_subtype(env, visited, loops, posi, level, t) { function enlarge_type(env, ty) { warn.contents = false; - var match = build_subtype(env, /* [] */0, /* [] */0, true, 4, ty); + let match = build_subtype(env, /* [] */0, /* [] */0, true, 4, ty); return [ match[0], warn.contents ]; } -var subtypes = Curry._1(TypePairs.create, 17); +let subtypes = Curry._1(TypePairs.create, 17); function subtype_error(env, trace) { throw new Caml_js_exceptions.MelangeError(Subtype, { @@ -37357,12 +37357,12 @@ function subtype_error(env, trace) { function subtype_rec(env, _trace, _t1, _t2, _cstrs) { while(true) { - var cstrs = _cstrs; - var t2 = _t2; - var t1 = _t1; - var trace = _trace; - var t1$1 = repr(t1); - var t2$1 = repr(t2); + let cstrs = _cstrs; + let t2 = _t2; + let t1 = _t1; + let trace = _trace; + let t1$1 = repr(t1); + let t2$1 = repr(t2); if (t1$1 === t2$1) { return cstrs; } @@ -37374,19 +37374,19 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { return cstrs; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypePairs.add, subtypes, [ t1$1, t2$1 ], undefined); - var match = t1$1.desc; - var match$1 = t2$1.desc; - var exit = 0; - var exit$1 = 0; - var exit$2 = 0; - var exit$3 = 0; - var exit$4 = 0; + let match = t1$1.desc; + let match$1 = t2$1.desc; + let exit = 0; + let exit$1 = 0; + let exit$2 = 0; + let exit$3 = 0; + let exit$4 = 0; if (typeof match === "number") { exit$4 = 6; } else { @@ -37395,9 +37395,9 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit = 2; break; case /* Tarrow */1 : - var u1 = match._2; - var t1$2 = match._1; - var l1 = match._0; + let u1 = match._2; + let t1$2 = match._1; + let l1 = match._0; if (typeof match$1 === "number") { exit = 1; } else { @@ -37406,11 +37406,11 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$4 = 6; break; case /* Tarrow */1 : - var u2 = match$1._2; - var t2$2 = match$1._1; - var l2 = match$1._0; + let u2 = match$1._2; + let t2$2 = match$1._1; + let l2 = match$1._0; if (l1 === l2 || classic.contents && !(is_optional(l1) || is_optional(l2))) { - var cstrs$1 = subtype_rec(env, { + let cstrs$1 = subtype_rec(env, { hd: [ t2$2, t1$2 @@ -37448,8 +37448,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$4 = 6; break; case /* Ttuple */2 : - var tl1 = match._0; - var tl2 = match$1._0; + let tl1 = match._0; + let tl2 = match$1._0; if (Stdlib__List.length(tl1) !== Stdlib__List.length(tl2)) { subtype_error(env, trace); } @@ -37498,7 +37498,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } break; case /* Tobject */4 : - var f1 = match._0; + let f1 = match._0; if (typeof match$1 === "number") { exit = 1; } else { @@ -37510,7 +37510,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$2 = 4; break; case /* Tobject */4 : - var f2 = match$1._0; + let f2 = match$1._0; if (is_Tvar(object_row(f1)) && is_Tvar(object_row(f2))) { return { hd: [ @@ -37522,14 +37522,14 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: cstrs }; } else { - var match$2 = flatten_fields(f1); - var rest1 = match$2[1]; - var match$3 = flatten_fields(f2); - var rest2 = match$3[1]; - var match$4 = associate_fields(match$2[0], match$3[0]); - var miss2 = match$4[2]; - var miss1 = match$4[1]; - var cstrs$2 = Caml_obj.caml_equal(rest2.desc, /* Tnil */0) ? cstrs : ( + let match$2 = flatten_fields(f1); + let rest1 = match$2[1]; + let match$3 = flatten_fields(f2); + let rest2 = match$3[1]; + let match$4 = associate_fields(match$2[0], match$3[0]); + let miss2 = match$4[2]; + let miss1 = match$4[1]; + let cstrs$2 = Caml_obj.caml_equal(rest2.desc, /* Tnil */0) ? cstrs : ( Caml_obj.caml_equal(miss1, /* [] */0) ? subtype_rec(env, { hd: [ rest1, @@ -37546,7 +37546,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: cstrs }) ); - var cstrs$3 = Caml_obj.caml_equal(miss2, /* [] */0) ? cstrs$2 : ({ + let cstrs$3 = Caml_obj.caml_equal(miss2, /* [] */0) ? cstrs$2 : ({ hd: [ trace, rest1, @@ -37557,8 +37557,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); return Stdlib__List.fold_left((function(trace){ return function (cstrs, param) { - var t2 = param[4]; - var t1 = param[2]; + let t2 = param[4]; + let t1 = param[2]; return subtype_rec(env, { hd: [ t1, @@ -37587,18 +37587,18 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { break; case /* Tvariant */8 : try { - var row1 = match._0; - var row2 = match$1._0; - var row1$1 = row_repr_aux(/* [] */0, row1); - var row2$1 = row_repr_aux(/* [] */0, row2); - var match$5 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); - var pairs = match$5[2]; - var r1 = match$5[0]; - var more1 = repr(row1$1.row_more); - var more2 = repr(row2$1.row_more); - var match$6 = more1.desc; - var match$7 = more2.desc; - var exit$5 = 0; + let row1 = match._0; + let row2 = match$1._0; + let row1$1 = row_repr_aux(/* [] */0, row1); + let row2$1 = row_repr_aux(/* [] */0, row2); + let match$5 = merge_row_fields(row1$1.row_fields, row2$1.row_fields); + let pairs = match$5[2]; + let r1 = match$5[0]; + let more1 = repr(row1$1.row_more); + let more2 = repr(row2$1.row_more); + let match$6 = more1.desc; + let match$7 = more2.desc; + let exit$5 = 0; if (typeof match$6 === "number") { exit$5 = 1; } else { @@ -37630,7 +37630,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } if (match$7.TAG === /* Tunivar */9) { if (row1$1.row_closed === row2$1.row_closed && Caml_obj.caml_equal(r1, /* [] */0) && Caml_obj.caml_equal(match$5[1], /* [] */0)) { - var cstrs$4 = subtype_rec(env, { + let cstrs$4 = subtype_rec(env, { hd: [ more1, more2 @@ -37639,10 +37639,10 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }, more1, more2, cstrs); return Stdlib__List.fold_left((function(trace){ return function (cstrs, param) { - var match = row_field_repr_aux(/* [] */0, param[1]); - var match$1 = row_field_repr_aux(/* [] */0, param[2]); - var t1; - var t2; + let match = row_field_repr_aux(/* [] */0, param[1]); + let match$1 = row_field_repr_aux(/* [] */0, param[2]); + let t1; + let t2; if (typeof match === "number") { if (typeof match$1 === "number") { return cstrs; @@ -37652,7 +37652,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); } if (match.TAG === /* Rpresent */0) { - var t1$1 = match._0; + let t1$1 = match._0; if (t1$1 !== undefined) { if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -37660,7 +37660,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); } if (match$1.TAG === /* Rpresent */0) { - var t2$1 = match$1._0; + let t2$1 = match$1._0; if (t2$1 !== undefined) { t1 = t1$1; t2 = t2$1; @@ -37720,7 +37720,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { MEL_EXN_ID: Stdlib.Exit }); } else { - var match$2 = match._1; + let match$2 = match._1; if (match$2) { if (match$2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -37742,7 +37742,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { MEL_EXN_ID: Stdlib.Exit }); } - var match$3 = match$1._1; + let match$3 = match$1._1; if (match$3) { if (match$3.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -37786,7 +37786,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } } if (exit$5 === 1) { - var exit$6 = 0; + let exit$6 = 0; if (typeof match$7 === "number") { exit$6 = 2; } else { @@ -37805,13 +37805,13 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (row1$1.row_closed && Caml_obj.caml_equal(r1, /* [] */0)) { return Stdlib__List.fold_left((function(trace){ return function (cstrs, param) { - var match = row_field_repr_aux(/* [] */0, param[1]); - var match$1 = row_field_repr_aux(/* [] */0, param[2]); + let match = row_field_repr_aux(/* [] */0, param[1]); + let match$1 = row_field_repr_aux(/* [] */0, param[2]); if (typeof match === "number") { return cstrs; } if (match.TAG === /* Rpresent */0) { - var t1 = match._0; + let t1 = match._0; if (t1 !== undefined) { if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -37819,7 +37819,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); } if (match$1.TAG === /* Rpresent */0) { - var t2 = match$1._0; + let t2 = match$1._0; if (t2 !== undefined) { return subtype_rec(env, { hd: [ @@ -37839,16 +37839,16 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } } else if (!match._0) { - var match$2 = match._1; + let match$2 = match._1; if (match$2) { - var t1$1 = match$2.hd; + let t1$1 = match$2.hd; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } if (match$1.TAG === /* Rpresent */0) { - var t2$1 = match$1._0; + let t2$1 = match$1._0; if (t2$1 !== undefined) { return subtype_rec(env, { hd: [ @@ -37899,7 +37899,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Exit) { return { hd: [ @@ -37919,9 +37919,9 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } break; case /* Tpoly */10 : - var tl1$1 = match._1; - var u1$1 = match._0; - var exit$7 = 0; + let tl1$1 = match._1; + let u1$1 = match._0; + let exit$7 = 0; if (tl1$1) { exit$7 = 7; } else if (typeof match$1 === "number") { @@ -37959,7 +37959,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$2 = 4; break; case /* Tpoly */10 : - var u2$1 = match$1._0; + let u2$1 = match$1._0; if (match$1._1) { try { return enter_poly(env, univar_pairs, u1$1, tl1$1, u2$1, match$1._1, (function(trace,cstrs){ @@ -37969,7 +37969,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }(trace,cstrs))); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Unify) { return { hd: [ @@ -37984,7 +37984,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); } } else { - var match$8 = instance_poly(undefined, false, tl1$1, u1$1); + let match$8 = instance_poly(undefined, false, tl1$1, u1$1); _t2 = u2$1; _t1 = match$8[1]; continue ; @@ -37996,9 +37996,9 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } break; case /* Tpackage */11 : - var tl1$2 = match._2; - var nl1 = match._1; - var p1 = match._0; + let tl1$2 = match._2; + let nl1 = match._1; + let p1 = match._0; if (typeof match$1 === "number") { exit = 1; } else { @@ -38010,19 +38010,19 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$2 = 4; break; case /* Tpackage */11 : - var tl2$1 = match$1._2; - var nl2 = match$1._1; - var p2 = match$1._0; + let tl2$1 = match$1._2; + let nl2 = match$1._1; + let p2 = match$1._0; try { - var ntl1 = complete_type_list(undefined, env, nl2, t1$1.level, { + let ntl1 = complete_type_list(undefined, env, nl2, t1$1.level, { TAG: /* Mty_ident */0, _0: p1 }, nl1, tl1$2); - var ntl2 = complete_type_list(true, env, nl1, t2$1.level, { + let ntl2 = complete_type_list(true, env, nl1, t2$1.level, { TAG: /* Mty_ident */0, _0: p2 }, nl2, tl2$1); - var cstrs$p = Stdlib__List.map((function(trace,ntl1){ + let cstrs$p = Stdlib__List.map((function(trace,ntl1){ return function (param) { return [ trace, @@ -38035,7 +38035,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (eq_package_path(env, p1, p2)) { return Stdlib.$at(cstrs$p, cstrs); } - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { Stdlib__List.iter((function (param) { unify$2(env, param[1], param[2]); @@ -38050,7 +38050,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Unify) { backtrack(snap); throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -38061,7 +38061,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Stdlib.Not_found) { return { hd: [ @@ -38119,19 +38119,19 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (typeof match === "number" || match.TAG !== /* Tconstr */3) { exit = 1; } else { - var p1$1 = match._0; - var exit$8 = 0; + let p1$1 = match._0; + let exit$8 = 0; if (typeof match$1 === "number" || !(match$1.TAG === /* Tconstr */3 && same(p1$1, match$1._0))) { exit$8 = 4; } else { try { - var decl = find_type_full(p1$1, env)[0]; + let decl = find_type_full(p1$1, env)[0]; return Stdlib__List.fold_left2((function(trace){ return function (cstrs, v, param) { - var t2 = param[1]; - var t1 = param[0]; - var match = Curry._1(Types_Variance.get_upper, v); - var cn = match[1]; + let t2 = param[1]; + let t1 = param[0]; + let match = Curry._1(Types_Variance.get_upper, v); + let cn = match[1]; if (match[0]) { if (cn) { return { @@ -38179,7 +38179,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }(trace)), cstrs, decl.type_variance, Stdlib__List.combine(match._1, match$1._1)); } catch (raw_exn$5){ - var exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); + let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.MEL_EXN_ID === Stdlib.Not_found) { return { hd: [ @@ -38229,7 +38229,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { function subtype(env, ty1, ty2) { Curry._1(TypePairs.clear, subtypes); univar_pairs.contents = /* [] */0; - var cstrs = subtype_rec(env, { + let cstrs = subtype_rec(env, { hd: [ ty1, ty2 @@ -38245,7 +38245,7 @@ function subtype(env, ty1, ty2) { }, param[1], param[2], param[3]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Subtype, { MEL_EXN_ID: Subtype, @@ -38260,8 +38260,8 @@ function subtype(env, ty1, ty2) { } function unalias_object(ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { return newty2(ty$1.level, ty$1.desc); } @@ -38296,22 +38296,22 @@ function unalias_object(ty) { } function unalias(ty) { - var ty$1 = repr(ty); - var row = ty$1.desc; + let ty$1 = repr(ty); + let row = ty$1.desc; if (typeof row === "number") { return newty2(ty$1.level, ty$1.desc); } switch (row.TAG | 0) { case /* Tobject */4 : - var ty$2 = row._0; + let ty$2 = row._0; return newty2(ty$2.level, { TAG: /* Tobject */4, _0: unalias_object(ty$2), _1: row._1 }); case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var more = row$1.row_more; + let row$1 = row_repr_aux(/* [] */0, row._0); + let more = row$1.row_more; return newty2(ty$1.level, { TAG: /* Tvariant */8, _0: { @@ -38332,7 +38332,7 @@ function unalias(ty) { } function arity(ty) { - var match = repr(ty).desc; + let match = repr(ty).desc; if (typeof match === "number" || match.TAG !== /* Tarrow */1) { return 0; } else { @@ -38341,9 +38341,9 @@ function arity(ty) { } function cyclic_abbrev(env, id, ty) { - var check_cycle = function (seen, ty) { - var ty$1 = repr(ty); - var match = ty$1.desc; + let check_cycle = function (seen, ty) { + let ty$1 = repr(ty); + let match = ty$1.desc; if (typeof match === "number") { return false; } @@ -38366,7 +38366,7 @@ function cyclic_abbrev(env, id, ty) { }, expand_abbrev_opt(env, ty$1)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return false; } @@ -38380,32 +38380,32 @@ function cyclic_abbrev(env, id, ty) { } function normalize_type_rec(env, visited, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (Curry._2(mem$3, ty$1, visited.contents)) { return ; } visited.contents = Curry._2(add$3, ty$1, visited.contents); - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row !== "number") { switch (row.TAG | 0) { case /* Tobject */4 : - var nm = row._1; - var match = nm.contents; + let nm = row._1; + let match = nm.contents; if (match !== undefined) { - var match$1 = match[1]; + let match$1 = match[1]; if (match$1) { - var l = match$1.tl; - var v = match$1.hd; - var n = match[0]; + let l = match$1.tl; + let v = match$1.hd; + let n = match[0]; if (deep_occur(ty$1, newty2(100000000, { TAG: /* Ttuple */2, _0: l }))) { set_name(nm, undefined); } else { - var v$p = repr(v); - var match$2 = v$p.desc; - var exit = 0; + let v$p = repr(v); + let match$2 = v$p.desc; + let exit = 0; if (typeof match$2 === "number") { log_type(ty$1); ty$1.desc = { @@ -38444,28 +38444,28 @@ function normalize_type_rec(env, visited, ty) { fatal_error("Ctype.normalize_type_rec"); } } - var fi = repr(row._0); + let fi = repr(row._0); if (fi.level >= 0) { - var match$3 = flatten_fields(fi); - var fi$p = build_fields(fi.level)(match$3[0], match$3[1]); + let match$3 = flatten_fields(fi); + let fi$p = build_fields(fi.level)(match$3[0], match$3[1]); log_type(ty$1); fi.desc = fi$p.desc; } break; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var fields = Stdlib__List.map((function (param) { - var f0 = param[1]; - var f = row_field_repr_aux(/* [] */0, f0); - var tmp; + let row$1 = row_repr_aux(/* [] */0, row._0); + let fields = Stdlib__List.map((function (param) { + let f0 = param[1]; + let f = row_field_repr_aux(/* [] */0, f0); + let tmp; if (typeof f === "number" || f.TAG === /* Rpresent */0) { tmp = f; } else { - var match = f._1; + let match = f._1; if (match) { - var tyl = match.tl; + let tyl = match.tl; if (tyl) { - var tyl$p = Stdlib__List.fold_left((function (tyl, ty) { + let tyl$p = Stdlib__List.fold_left((function (tyl, ty) { if (Stdlib__List.exists((function (ty$p) { return equal$5(env, false, { hd: ty, @@ -38505,7 +38505,7 @@ function normalize_type_rec(env, visited, ty) { tmp ]; }), row$1.row_fields); - var fields$1 = Stdlib__List.sort((function (param, param$1) { + let fields$1 = Stdlib__List.sort((function (param, param$1) { return Caml.caml_string_compare(param[0], param$1[0]); }), Stdlib__List.filter((function (param) { return Caml_obj.caml_notequal(param[1], /* Rabsent */0); @@ -38538,15 +38538,15 @@ function normalize_type(env, ty) { }, ty); } -var nondep_hash = Curry._1(TypeHash.create, 47); +let nondep_hash = Curry._1(TypeHash.create, 47); -var nondep_variants = Curry._1(TypeHash.create, 17); +let nondep_variants = Curry._1(TypeHash.create, 17); function nondep_type_rec(env, id, _ty) { while(true) { - var ty = _ty; - var ty$1 = ty.desc; - var exit = 0; + let ty = _ty; + let ty$1 = ty.desc; + let exit = 0; if (typeof ty$1 === "number") { exit = 1; } else { @@ -38566,22 +38566,22 @@ function nondep_type_rec(env, id, _ty) { return Curry._2(TypeHash.find, nondep_hash, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var ty$p = newty2(100000000, { + let ty$p = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); Curry._3(TypeHash.add, nondep_hash, ty, ty$p); - var row = ty.desc; - var tmp; - var exit$1 = 0; + let row = ty.desc; + let tmp; + let exit$1 = 0; if (typeof row === "number") { exit$1 = 2; } else { switch (row.TAG | 0) { case /* Tconstr */3 : - var p = row._0; + let p = row._0; if (isfree(id, p)) { try { tmp = { @@ -38590,7 +38590,7 @@ function nondep_type_rec(env, id, _ty) { }; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Cannot_expand) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -38617,10 +38617,10 @@ function nondep_type_rec(env, id, _ty) { } break; case /* Tobject */4 : - var match = row._1.contents; - var tmp$1; + let match = row._1.contents; + let tmp$1; if (match !== undefined) { - var p$1 = match[0]; + let p$1 = match[0]; tmp$1 = isfree(id, p$1) ? undefined : [ p$1, Stdlib__List.map((function (param) { @@ -38639,10 +38639,10 @@ function nondep_type_rec(env, id, _ty) { }; break; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var more = repr(row$1.row_more); + let row$1 = row_repr_aux(/* [] */0, row._0); + let more = repr(row$1.row_more); try { - var ty2 = Curry._2(TypeHash.find, nondep_variants, more); + let ty2 = Curry._2(TypeHash.find, nondep_variants, more); Curry._3(TypeHash.add, nondep_hash, ty, ty2); tmp = { TAG: /* Tlink */6, @@ -38650,15 +38650,15 @@ function nondep_type_rec(env, id, _ty) { }; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { Curry._3(TypeHash.add, nondep_variants, more, ty$p); - var $$static = static_row(row$1); - var more$p = $$static ? newty2(100000000, /* Tnil */0) : more; - var row$2 = copy_row((function (param) { + let $$static = static_row(row$1); + let more$p = $$static ? newty2(100000000, /* Tnil */0) : more; + let row$2 = copy_row((function (param) { return nondep_type_rec(env, id, param); }), true, row$1, true, more$p); - var match$1 = row$2.row_name; + let match$1 = row$2.row_name; tmp = match$1 !== undefined && isfree(id, match$1[0]) ? ({ TAG: /* Tvariant */8, _0: { @@ -38679,9 +38679,9 @@ function nondep_type_rec(env, id, _ty) { } break; case /* Tpackage */11 : - var p$2 = row._0; + let p$2 = row._0; if (isfree(id, p$2)) { - var p$p = normalize_package_path(env, p$2); + let p$p = normalize_package_path(env, p$2); if (isfree(id, p$p)) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -38720,13 +38720,13 @@ function nondep_type_rec(env, id, _ty) { function nondep_type(env, id, ty) { try { - var ty$p = nondep_type_rec(env, id, ty); + let ty$p = nondep_type_rec(env, id, ty); Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); return ty$p; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); @@ -38741,8 +38741,8 @@ function nondep_type(env, id, ty) { nondep_type$p.contents = nondep_type; function unroll_abbrev(id, tl, ty) { - var ty$1 = repr(ty); - var path = { + let ty$1 = repr(ty); + let path = { TAG: /* Pident */0, _0: id }; @@ -38751,7 +38751,7 @@ function unroll_abbrev(id, tl, ty) { }), tl) || is_object_type(path)) { return ty$1; } - var ty$p = newty2(ty$1.level, ty$1.desc); + let ty$p = newty2(ty$1.level, ty$1.desc); link_type(ty$1, newty2(ty$1.level, { TAG: /* Tconstr */3, _0: path, @@ -38765,12 +38765,12 @@ function unroll_abbrev(id, tl, ty) { function nondep_type_decl(env, mid, id, is_covariant, decl) { try { - var params = Stdlib__List.map((function (param) { + let params = Stdlib__List.map((function (param) { return nondep_type_rec(env, mid, param); }), decl.type_params); - var tk; + let tk; try { - var cstrs = decl.type_kind; + let cstrs = decl.type_kind; tk = typeof cstrs === "number" ? ( cstrs === /* Type_abstract */0 ? /* Type_abstract */0 : /* Type_open */1 ) : ( @@ -38805,7 +38805,7 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { ); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (is_covariant) { tk = /* Type_abstract */0; @@ -38816,13 +38816,13 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var tm; + let tm; try { - var ty = decl.type_manifest; + let ty = decl.type_manifest; tm = ty !== undefined ? unroll_abbrev(id, params, nondep_type_rec(env, mid, ty)) : undefined; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { if (is_covariant) { tm = undefined; @@ -38835,7 +38835,7 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { } Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); - var priv = tm !== undefined && has_constr_row(tm) ? /* Private */0 : decl.type_private; + let priv = tm !== undefined && has_constr_row(tm) ? /* Private */0 : decl.type_private; return { type_params: params, type_arity: decl.type_arity, @@ -38849,7 +38849,7 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { }; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); @@ -38863,9 +38863,9 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { function nondep_extension_constructor(env, mid, ext) { try { - var match; + let match; if (isfree(mid, ext.ext_type_path)) { - var ty = newty2(100000000, { + let ty = newty2(100000000, { TAG: /* Tconstr */3, _0: ext.ext_type_path, _1: ext.ext_type_params, @@ -38873,8 +38873,8 @@ function nondep_extension_constructor(env, mid, ext) { contents: /* Mnil */0 } }); - var ty$p = nondep_type_rec(env, mid, ty); - var match$1 = repr(ty$p).desc; + let ty$p = nondep_type_rec(env, mid, ty); + let match$1 = repr(ty$p).desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -38891,7 +38891,7 @@ function nondep_extension_constructor(env, mid, ext) { }); } } else { - var type_params = Stdlib__List.map((function (param) { + let type_params = Stdlib__List.map((function (param) { return nondep_type_rec(env, mid, param); }), ext.ext_type_params); match = [ @@ -38899,10 +38899,10 @@ function nondep_extension_constructor(env, mid, ext) { type_params ]; } - var args = Stdlib__List.map((function (param) { + let args = Stdlib__List.map((function (param) { return nondep_type_rec(env, mid, param); }), ext.ext_args); - var ret_type = may_map((function (param) { + let ret_type = may_map((function (param) { return nondep_type_rec(env, mid, param); }), ext.ext_ret_type); Curry._1(TypeHash.clear, nondep_hash); @@ -38918,7 +38918,7 @@ function nondep_extension_constructor(env, mid, ext) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); @@ -38954,10 +38954,10 @@ function nondep_class_signature(env, id, sign) { function nondep_class_type(env, id, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : - var p = param._0; + let p = param._0; if (!isfree(id, p)) { return { TAG: /* Cty_constr */0, @@ -38998,8 +38998,8 @@ function nondep_class_declaration(env, id, decl) { ] }); } - var ty = decl.cty_new; - var decl$1 = { + let ty = decl.cty_new; + let decl$1 = { cty_params: Stdlib__List.map((function (param) { return nondep_type_rec(env, id, param); }), decl.cty_params), @@ -39026,15 +39026,15 @@ function nondep_cltype_declaration(env, id, decl) { ] }); } - var decl_clty_params = Stdlib__List.map((function (param) { + let decl_clty_params = Stdlib__List.map((function (param) { return nondep_type_rec(env, id, param); }), decl.clty_params); - var decl_clty_type = nondep_class_type(env, id, decl.clty_type); - var decl_clty_path = decl.clty_path; - var decl_clty_variance = decl.clty_variance; - var decl_clty_loc = decl.clty_loc; - var decl_clty_attributes = decl.clty_attributes; - var decl$1 = { + let decl_clty_type = nondep_class_type(env, id, decl.clty_type); + let decl_clty_path = decl.clty_path; + let decl_clty_variance = decl.clty_variance; + let decl_clty_loc = decl.clty_loc; + let decl_clty_attributes = decl.clty_attributes; + let decl$1 = { clty_params: decl_clty_params, clty_type: decl_clty_type, clty_path: decl_clty_path, @@ -39048,15 +39048,15 @@ function nondep_cltype_declaration(env, id, decl) { } function collapse_conj(env, visited, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (Stdlib__List.memq(ty$1, visited)) { return ; } - var visited$1 = { + let visited$1 = { hd: ty$1, tl: visited }; - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr((function (param) { return collapse_conj(env, visited$1, param); @@ -39067,24 +39067,24 @@ function collapse_conj(env, visited, ty) { return collapse_conj(env, visited$1, param); }), ty$1); } - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); Stdlib__List.iter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return ; } if (match.TAG === /* Rpresent */0) { return ; } - var match$1 = match._1; + let match$1 = match._1; if (!match$1) { return ; } - var tl = match$1.tl; + let tl = match$1.tl; if (!tl) { return ; } - var t1 = match$1.hd; + let t1 = match$1.hd; Stdlib__List.iter((function (param) { return unify$2(env, t1, param); }), tl); @@ -39112,7 +39112,7 @@ function collapse_conj_params(env, params) { }), params); } -var out_ident = { +let out_ident = { contents: Stdlib__Format.pp_print_string }; @@ -39175,7 +39175,7 @@ function parenthesized_ident(name) { })) { return true; } - var match = Caml_string.get(name, 0); + let match = Caml_string.get(name, 0); if (match >= 97) { if (match >= 223) { return match === 247; @@ -39214,11 +39214,11 @@ function value_ident(ppf, name) { function print_list(pr, sep, ppf, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var a = param.hd; + let a = param.hd; if (!param.tl) { return Curry._2(pr, ppf, a); } @@ -39389,7 +39389,7 @@ function print_out_type_1(ppf, ty) { if (ty.TAG !== /* Otyp_arrow */1) { return print_out_type_2(ppf, ty); } - var lab = ty._0; + let lab = ty._0; Stdlib__Format.pp_open_box(ppf, 0); if (lab !== "") { Stdlib__Format.pp_print_string(ppf, lab); @@ -39475,18 +39475,18 @@ function print_simple_out_type(ppf, ty) { _1: "@[%a%s#%a@]" }), print_typargs, ty._2, ty._0 ? "_" : "", print_ident, ty._1); case /* Otyp_constr */3 : - var id = ty._0; - var exit = 0; + let id = ty._0; + let exit = 0; switch (id.TAG | 0) { case /* Oide_dot */1 : - var match = id._0; - var exit$1 = 0; + let match = id._0; + let exit$1 = 0; switch (match.TAG | 0) { case /* Oide_apply */0 : exit = 2; break; case /* Oide_dot */1 : - var match$1 = match._0; + let match$1 = match._0; switch (match$1.TAG | 0) { case /* Oide_apply */0 : case /* Oide_dot */1 : @@ -39512,31 +39512,31 @@ function print_simple_out_type(ppf, ty) { } if (exit$1 === 3) { - var name = id._1; - var exit$2 = 0; + let name = id._1; + let exit$2 = 0; switch (name) { case "fn" : case "meth" : exit$2 = 4; break; case "meth_callback" : - var tyl = ty._1; + let tyl = ty._1; if (tyl) { - var match$2 = tyl.hd; + let match$2 = tyl.hd; if (typeof match$2 === "number" || match$2.TAG !== /* Otyp_variant */11) { exit = 2; } else { - var match$3 = match$2._1; + let match$3 = match$2._1; if (match$3.TAG === /* Ovar_fields */0) { - var match$4 = match$3._0; + let match$4 = match$3._0; if (match$4 && !match$4.tl) { - var match$5 = tyl.tl; + let match$5 = tyl.tl; if (match$5 && !match$5.tl) { - var match$6 = match$4.hd; - var variant = match$6[0]; - var make = function (tys, result) { + let match$6 = match$4.hd; + let variant = match$6[0]; + let make = function (tys, result) { if (tys) { - var single = tys.hd; + let single = tys.hd; if (typeof single !== "number" && single.TAG === /* Otyp_tuple */9) { if (tys.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -39577,8 +39577,8 @@ function print_simple_out_type(ppf, ty) { MEL_EXN_ID: Stdlib.Not_found }); }; - var exit$3 = 0; - var res; + let exit$3 = 0; + let res; try { res = make(match$6[2], match$5.hd); exit$3 = 5; @@ -39663,21 +39663,21 @@ function print_simple_out_type(ppf, ty) { exit = 2; } if (exit$2 === 4) { - var tyl$1 = ty._1; + let tyl$1 = ty._1; if (tyl$1) { - var match$7 = tyl$1.hd; + let match$7 = tyl$1.hd; if (typeof match$7 === "number" || match$7.TAG !== /* Otyp_variant */11) { exit = 2; } else { - var match$8 = match$7._1; + let match$8 = match$7._1; if (match$8.TAG === /* Ovar_fields */0) { - var match$9 = match$8._0; + let match$9 = match$8._0; if (match$9 && !match$9.tl) { - var match$10 = tyl$1.tl; + let match$10 = tyl$1.tl; if (match$10 && !match$10.tl) { - var match$11 = match$9.hd; - var variant$1 = match$11[0]; - var make$1 = function (tys, result) { + let match$11 = match$9.hd; + let variant$1 = match$11[0]; + let make$1 = function (tys, result) { if (Caml_obj.caml_equal(tys, /* [] */0)) { return { TAG: /* Otyp_arrow */1, @@ -39694,7 +39694,7 @@ function print_simple_out_type(ppf, ty) { }; } if (tys) { - var single = tys.hd; + let single = tys.hd; if (typeof single !== "number" && single.TAG === /* Otyp_tuple */9) { if (tys.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -39735,8 +39735,8 @@ function print_simple_out_type(ppf, ty) { MEL_EXN_ID: Stdlib.Not_found }); }; - var exit$4 = 0; - var res$1; + let exit$4 = 0; + let res$1; try { res$1 = make$1(match$11[2], match$10.hd); exit$4 = 5; @@ -39900,7 +39900,7 @@ function print_simple_out_type(ppf, ty) { } break; case /* Otyp_object */5 : - var rest = ty._1; + let rest = ty._1; return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -39956,8 +39956,8 @@ function print_simple_out_type(ppf, ty) { _1: "'%s%s" }), ty._0 ? "_" : "", ty._1); case /* Otyp_variant */11 : - var tags = ty._3; - var print_present = function (ppf, param) { + let tags = ty._3; + let print_present = function (ppf, param) { if (param !== undefined && param) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -40000,7 +40000,7 @@ function print_simple_out_type(ppf, ty) { } }; - var print_fields$1 = function (ppf, param) { + let print_fields$1 = function (ppf, param) { if (param.TAG === /* Ovar_fields */0) { return print_list(print_row_field, (function (ppf) { Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -40146,11 +40146,11 @@ function print_simple_out_type(ppf, ty) { }, _1: "@[<1>(module %s" }), ty._0); - var first = { + let first = { contents: true }; Stdlib__List.iter2((function (s, t) { - var sep = first.contents ? (first.contents = false, "with") : "and"; + let sep = first.contents ? (first.contents = false, "with") : "and"; Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Char_literal */12, @@ -40203,7 +40203,7 @@ function print_simple_out_type(ppf, ty) { function print_fields(rest, ppf, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { if (rest !== undefined) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -40222,8 +40222,8 @@ function print_fields(rest, ppf, _param) { return ; } } - var match = param.hd; - var s = match[0]; + let match = param.hd; + let s = match[0]; if (param.tl) { return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -40299,9 +40299,9 @@ function print_fields(rest, ppf, _param) { } function print_row_field(ppf, param) { - var tyl = param[2]; - var opt_amp = param[1]; - var pr_of = function (ppf) { + let tyl = param[2]; + let opt_amp = param[1]; + let pr_of = function (ppf) { if (opt_amp) { return Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -40400,11 +40400,11 @@ function print_row_field(ppf, param) { function print_typlist(print_elem, sep, ppf, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var ty = param.hd; + let ty = param.hd; if (!param.tl) { return Curry._2(print_elem, ppf, ty); } @@ -40433,13 +40433,13 @@ function print_typargs(ppf, tyl) { } -var out_type = { +let out_type = { contents: print_out_type }; function type_parameter(ppf, param) { - var match = param[1]; - var ty = param[0]; + let match = param[1]; + let ty = param[0]; Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String */2, @@ -40518,11 +40518,11 @@ function print_out_class_params(ppf, tyl) { function print_out_class_type(ppf, param) { switch (param.TAG | 0) { case /* Octy_constr */0 : - var pr_tyl = function (ppf, tyl) { + let pr_tyl = function (ppf, tyl) { if (!tyl) { return ; } - var partial_arg = out_type.contents; + let partial_arg = out_type.contents; Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -40593,7 +40593,7 @@ function print_out_class_type(ppf, param) { _1: "@[%a%a@]" }), pr_tyl, param._1, print_ident, param._0); case /* Octy_arrow */1 : - var lab = param._0; + let lab = param._0; return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -40636,7 +40636,7 @@ function print_out_class_type(ppf, param) { _1: "@[%s%a ->@ %a@]" }), lab !== "" ? lab + ":" : "", print_out_type_2, param._1, print_out_class_type, param._2); case /* Octy_signature */2 : - var pr_param = function (ppf, param) { + let pr_param = function (ppf, param) { if (param !== undefined) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -40933,11 +40933,11 @@ function print_out_class_sig_item(ppf, param) { } } -var out_class_type = { +let out_class_type = { contents: print_out_class_type }; -var out_module_type = { +let out_module_type = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -40946,7 +40946,7 @@ var out_module_type = { }) }; -var out_sig_item = { +let out_sig_item = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -40955,7 +40955,7 @@ var out_sig_item = { }) }; -var out_signature = { +let out_signature = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -40964,7 +40964,7 @@ var out_signature = { }) }; -var out_type_extension = { +let out_type_extension = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -40975,7 +40975,7 @@ var out_type_extension = { function print_out_functor(ppf, m) { if (typeof m !== "number" && m.TAG === /* Omty_functor */0) { - var mty_arg = m._1; + let mty_arg = m._1; if (mty_arg !== undefined) { return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -41217,9 +41217,9 @@ function print_out_label(ppf, param) { } function print_out_constr(ppf, param) { - var ret_type_opt = param[2]; - var tyl = param[1]; - var name = param[0]; + let ret_type_opt = param[2]; + let tyl = param[1]; + let name = param[0]; if (ret_type_opt !== undefined) { if (tyl) { return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -41371,23 +41371,23 @@ function print_out_signature(ppf, param) { if (!param) { return ; } - var item = param.hd; + let item = param.hd; if (!param.tl) { return Curry._2(out_sig_item.contents, ppf, item); } if (item.TAG === /* Osig_typext */2 && !item._1) { - var ext = item._0; - var gather_extensions = function (_acc, _items) { + let ext = item._0; + let gather_extensions = function (_acc, _items) { while(true) { - var items = _items; - var acc = _acc; + let items = _items; + let acc = _acc; if (!items) { return [ Stdlib__List.rev(acc), items ]; } - var match = items.hd; + let match = items.hd; if (match.TAG !== /* Osig_typext */2) { return [ Stdlib__List.rev(acc), @@ -41400,7 +41400,7 @@ function print_out_signature(ppf, param) { items ]; } - var ext = match._0; + let ext = match._0; _items = items.tl; _acc = { hd: [ @@ -41413,7 +41413,7 @@ function print_out_signature(ppf, param) { continue ; }; }; - var match = gather_extensions({ + let match = gather_extensions({ hd: [ ext.oext_name, ext.oext_args, @@ -41421,11 +41421,11 @@ function print_out_signature(ppf, param) { ], tl: /* [] */0 }, param.tl); - var te_otyext_name = ext.oext_type_name; - var te_otyext_params = ext.oext_type_params; - var te_otyext_constructors = match[0]; - var te_otyext_private = ext.oext_private; - var te = { + let te_otyext_name = ext.oext_type_name; + let te_otyext_params = ext.oext_type_params; + let te_otyext_constructors = match[0]; + let te_otyext_private = ext.oext_private; + let te = { otyext_name: te_otyext_name, otyext_params: te_otyext_params, otyext_constructors: te_otyext_constructors, @@ -41619,7 +41619,7 @@ function print_out_sig_item(ppf, param) { _1: "@[<2>%s%s@ %a%s@ =@ %a@]" }), param._4 === /* Orec_next */2 ? "and" : "class type", param._0 ? " virtual" : "", print_out_class_params, param._2, param._1, out_class_type.contents, param._3); case /* Osig_typext */2 : - var ext = param._0; + let ext = param._0; if (param._1 >= 2) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -41655,8 +41655,8 @@ function print_out_sig_item(ppf, param) { ext.oext_ret_type ]); } else { - var print_extended_type = function (ppf) { - var print_type_parameter = function (ppf, ty) { + let print_extended_type = function (ppf) { + let print_type_parameter = function (ppf, ty) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String */2, @@ -41666,7 +41666,7 @@ function print_out_sig_item(ppf, param) { _1: "%s" }), ty === "_" ? ty : "'" + ty); }; - var match = ext.oext_type_params; + let match = ext.oext_type_params; if (match) { if (match.tl) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -41847,7 +41847,7 @@ function print_out_sig_item(ppf, param) { ]); } case /* Osig_modtype */3 : - var name = param._0; + let name = param._0; if (typeof param._1 === "number") { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -41928,8 +41928,8 @@ function print_out_sig_item(ppf, param) { }), name, out_module_type.contents, param._1); } case /* Osig_module */4 : - var name$1 = param._0; - var id = param._1; + let name$1 = param._0; + let id = param._1; if (typeof id !== "number" && id.TAG === /* Omty_alias */3) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -41978,7 +41978,7 @@ function print_out_sig_item(ppf, param) { _1: "@[<2>module %s =@ %a@]" }), name$1, print_ident, id._0); } - var tmp; + let tmp; switch (param._2) { case /* Orec_not */0 : tmp = "module"; @@ -42042,7 +42042,7 @@ function print_out_sig_item(ppf, param) { _1: "@[<2>%s %s :@ %a@]" }), tmp, name$1, out_module_type.contents, param._1); case /* Osig_type */5 : - var tmp$1; + let tmp$1; switch (param._1) { case /* Orec_not */0 : tmp$1 = "type nonrec"; @@ -42055,8 +42055,8 @@ function print_out_sig_item(ppf, param) { break; } - var td = param._0; - var print_constraints = function (ppf) { + let td = param._0; + let print_constraints = function (ppf) { Stdlib__List.iter((function (param) { Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -42114,8 +42114,8 @@ function print_out_sig_item(ppf, param) { }), out_type.contents, param[0], out_type.contents, param[1]); }), td.otype_cstrs); }; - var type_defined = function (ppf) { - var match = td.otype_params; + let type_defined = function (ppf) { + let match = td.otype_params; if (match) { if (match.tl) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -42234,7 +42234,7 @@ function print_out_sig_item(ppf, param) { return Stdlib__Format.pp_print_string(ppf, td.otype_name); } }; - var print_manifest = function (ppf, param) { + let print_manifest = function (ppf, param) { if (typeof param === "number" || param.TAG !== /* Otyp_manifest */4) { return ; } else { @@ -42260,7 +42260,7 @@ function print_out_sig_item(ppf, param) { }), out_type.contents, param._0); } }; - var print_name_params = function (ppf) { + let print_name_params = function (ppf) { Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String */2, @@ -42280,10 +42280,10 @@ function print_out_sig_item(ppf, param) { _1: "%s %t%a" }), tmp$1, type_defined, print_manifest, td.otype_type); }; - var match = td.otype_type; - var ty; + let match = td.otype_type; + let ty; ty = typeof match === "number" || match.TAG !== /* Otyp_manifest */4 ? td.otype_type : match._1; - var print_private = function (ppf, param) { + let print_private = function (ppf, param) { if (param) { return ; } else { @@ -42297,7 +42297,7 @@ function print_out_sig_item(ppf, param) { }); } }; - var print_out_tkind = function (ppf, ty) { + let print_out_tkind = function (ppf, ty) { if (typeof ty === "number") { if (ty === /* Otyp_abstract */0) { return ; @@ -42345,7 +42345,7 @@ function print_out_sig_item(ppf, param) { }, _1: " =%a {%a@;<1 -2>}" }), print_private, td.otype_private, (function (param, param$1) { - var sep = function (ppf) { + let sep = function (ppf) { Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_lit */17, @@ -42360,9 +42360,9 @@ function print_out_sig_item(ppf, param) { _1: "@ " }); }; - var _param = param$1; + let _param = param$1; while(true) { - var param$2 = _param; + let param$2 = _param; if (!param$2) { return ; } @@ -42492,9 +42492,9 @@ function print_out_sig_item(ppf, param) { _1: "@[<2>@[%t%a@]%t@]" }), print_name_params, print_out_tkind, ty, print_constraints); case /* Osig_value */6 : - var prims = param._2; - var kwd = Caml_obj.caml_equal(prims, /* [] */0) ? "val" : "external"; - var pr_prims = function (ppf, param) { + let prims = param._2; + let kwd = Caml_obj.caml_equal(prims, /* [] */0) ? "val" : "external"; + let pr_prims = function (ppf, param) { if (param) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -42522,7 +42522,7 @@ function print_out_sig_item(ppf, param) { _1: "@ = \"%s\"" }), param.hd); return Stdlib__List.iter((function (s) { - var len = s.length; + let len = s.length; if (len >= 3 && Caml_string.get(s, 0) === /* 'B' */66 && Caml_string.get(s, 1) === /* 'S' */83 && Caml_string.get(s, 2) === /* ':' */58) { return Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -42629,8 +42629,8 @@ function print_out_sig_item(ppf, param) { } function print_out_type_extension(ppf, te) { - var print_extended_type = function (ppf) { - var print_type_parameter = function (ppf, ty) { + let print_extended_type = function (ppf) { + let print_type_parameter = function (ppf, ty) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String */2, @@ -42640,7 +42640,7 @@ function print_out_type_extension(ppf, te) { _1: "%s" }), ty === "_" ? ty : "'" + ty); }; - var match = te.otyext_params; + let match = te.otyext_params; if (match) { if (match.tl) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -42888,7 +42888,7 @@ function longident(ppf, param) { } } -var unique_names = { +let unique_names = { contents: /* Empty */0 }; @@ -42897,7 +42897,7 @@ function ident_name(id) { return find_same(id, unique_names.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return id.name; } @@ -42911,7 +42911,7 @@ function add_unique(id) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { unique_names.contents = add(id, unique_toplevel_name(id), unique_names.contents); return ; @@ -42924,7 +42924,7 @@ function ident$3(ppf, id) { Stdlib__Format.pp_print_string(ppf, ident_name(id)); } -var ident_pervasive = { +let ident_pervasive = { stamp: 0, name: "Stdlib", flags: 1 @@ -42938,7 +42938,7 @@ function tree_of_path(param) { _0: ident_name(param._0) }; case /* Pdot */1 : - var id = param._0; + let id = param._0; switch (id.TAG | 0) { case /* Pident */0 : if (Caml_obj.caml_equal(id._0, ident_pervasive)) { @@ -42973,7 +42973,7 @@ function path(ppf, param) { case /* Pident */0 : return Stdlib__Format.pp_print_string(ppf, ident_name(param._0)); case /* Pdot */1 : - var id = param._0; + let id = param._0; switch (id.TAG | 0) { case /* Pident */0 : if (Caml_obj.caml_equal(id._0, ident_pervasive)) { @@ -43056,7 +43056,7 @@ function raw_list(pr, ppf, param) { _1: "[]" }); } - var l = param.tl; + let l = param.tl; Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -43120,8 +43120,8 @@ function raw_list(pr, ppf, param) { function safe_kind_repr(_v, _param) { while(true) { - var param = _param; - var v = _v; + let param = _param; + let v = _v; if (typeof param === "number") { if (param) { return "Fabsent"; @@ -43129,7 +43129,7 @@ function safe_kind_repr(_v, _param) { return "Fpresent"; } } - var k = param._0.contents; + let k = param._0.contents; if (k === undefined) { return "Fvar None"; } @@ -43147,8 +43147,8 @@ function safe_kind_repr(_v, _param) { function safe_commu_repr(_v, _param) { while(true) { - var param = _param; - var v = _v; + let param = _param; + let v = _v; if (typeof param === "number") { if (param) { return "Cunknown"; @@ -43156,7 +43156,7 @@ function safe_commu_repr(_v, _param) { return "Cok"; } } - var r = param._0; + let r = param._0; if (Stdlib__List.memq(r, v)) { return "Clink loop"; } @@ -43171,16 +43171,16 @@ function safe_commu_repr(_v, _param) { function safe_repr(_v, _t) { while(true) { - var t = _t; - var v = _v; - var t$1 = t.desc; + let t = _t; + let v = _v; + let t$1 = t.desc; if (typeof t$1 === "number") { return t; } if (t$1.TAG !== /* Tlink */6) { return t; } - var t$2 = t$1._0; + let t$2 = t$1._0; if (Stdlib__List.memq(t$2, v)) { return t; } @@ -43195,7 +43195,7 @@ function safe_repr(_v, _t) { function list_of_memo(_param) { while(true) { - var param = _param; + let param = _param; if (typeof param === "number") { return /* [] */0; } @@ -43240,12 +43240,12 @@ function print_name(ppf, param) { } } -var visited = { +let visited = { contents: /* [] */0 }; function raw_type(ppf, ty) { - var ty$1 = safe_repr(/* [] */0, ty); + let ty$1 = safe_repr(/* [] */0, ty); if (Stdlib__List.memq(ty$1, visited.contents)) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -43566,7 +43566,7 @@ function raw_type_desc(ppf, param) { return raw_list(path, param, param$1); }), list_of_memo(param._2.contents)); case /* Tobject */4 : - var nm = param._1; + let nm = param._1; return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -43647,7 +43647,7 @@ function raw_type_desc(ppf, param) { }, _1: "@[Tobject(@,%a,@,@[<1>ref%t@])@]" }), raw_type, param._0, (function (ppf) { - var match = nm.contents; + let match = nm.contents; if (match !== undefined) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -43872,7 +43872,7 @@ function raw_type_desc(ppf, param) { _1: "@[<1>Tsubst@,%a@]" }), raw_type, param._0); case /* Tvariant */8 : - var row = param._0; + let row = param._0; return Curry.app(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -44109,7 +44109,7 @@ function raw_type_desc(ppf, param) { row.row_fixed, "row_name=", (function (ppf) { - var match = row.row_name; + let match = row.row_name; if (match !== undefined) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -44305,7 +44305,7 @@ function raw_field(ppf, param) { }); } if (param.TAG === /* Rpresent */0) { - var t = param._0; + let t = param._0; if (t !== undefined) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -44360,7 +44360,7 @@ function raw_field(ppf, param) { }); } } - var e = param._3; + let e = param._3; Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -44466,7 +44466,7 @@ function raw_field(ppf, param) { }, _1: "@[Reither(%b,@,%a,@,%b,@,@[<1>ref%t@])@]" }), param._0, raw_type_list, param._1, param._2, (function (ppf) { - var f = e.contents; + let f = e.contents; if (f !== undefined) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -44575,37 +44575,37 @@ function apply_subst(s1, tyl) { } } -var printing_env = { +let printing_env = { contents: empty }; -var printing_depth = { +let printing_depth = { contents: 0 }; -var printing_cont = { +let printing_cont = { contents: /* [] */0 }; -var printing_old = { +let printing_old = { contents: empty }; -var printing_pers = { +let printing_pers = { contents: /* Empty */0 }; function compare$4(_p1, _p2) { while(true) { - var p2 = _p2; - var p1 = _p1; + let p2 = _p2; + let p1 = _p1; switch (p1.TAG | 0) { case /* Pident */0 : return Caml_obj.caml_compare(p1, p2); case /* Pdot */1 : switch (p2.TAG | 0) { case /* Pdot */1 : - var c = compare$4(p1._0, p2._0); + let c = compare$4(p1._0, p2._0); if (c !== 0) { return c; } else { @@ -44622,7 +44622,7 @@ function compare$4(_p1, _p2) { case /* Pdot */1 : return Caml_obj.caml_compare(p1, p2); case /* Papply */2 : - var c$1 = compare$4(p1._0, p2._0); + let c$1 = compare$4(p1._0, p2._0); if (c$1 !== 0) { return c$1; } @@ -44636,7 +44636,7 @@ function compare$4(_p1, _p2) { }; } -var funarg$3 = { +let funarg$3 = { compare: compare$4 }; @@ -44649,8 +44649,8 @@ function height$6(param) { } function create$7(l, x, d, r) { - var hl = height$6(l); - var hr = height$6(r); + let hl = height$6(l); + let hr = height$6(r); return /* Node */{ l: l, v: x, @@ -44661,14 +44661,14 @@ function create$7(l, x, d, r) { } function bal$6(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$6(ll) >= height$6(lr)) { return create$7(ll, lv, ld, create$7(lr, x, d, r)); } @@ -44695,10 +44695,10 @@ function bal$6(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$6(rr) >= height$6(rl)) { return create$7(create$7(l, x, d, rl), rv, rd, rr); } @@ -44726,11 +44726,11 @@ function add$8(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$3.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$3.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -44745,14 +44745,14 @@ function add$8(x, data, m) { } } if (c < 0) { - var ll = add$8(x, data, l); + let ll = add$8(x, data, l); if (l === ll) { return m; } else { return bal$6(ll, v, d, r); } } - var rr = add$8(x, data, r); + let rr = add$8(x, data, r); if (r === rr) { return m; } else { @@ -44762,9 +44762,9 @@ function add$8(x, data, m) { function find$4(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$3.compare, x, param.v); + let c = Curry._2(funarg$3.compare, x, param.v); if (c === 0) { return param.d; } @@ -44777,7 +44777,7 @@ function find$4(x, _param) { }; } -var printing_map = { +let printing_map = { contents: /* Empty */0 }; @@ -44800,11 +44800,11 @@ function index(l, x) { function uniq(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } - var l = param.tl; + let l = param.tl; if (Stdlib__List.memq(param.hd, l)) { return false; } @@ -44814,12 +44814,12 @@ function uniq(_param) { } function normalize_type_path(cacheOpt, env, p) { - var cache = cacheOpt !== undefined ? cacheOpt : false; + let cache = cacheOpt !== undefined ? cacheOpt : false; try { - var match = find_type_expansion(p, env); - var params = Stdlib__List.map(repr, match[0]); - var ty = repr(match[1]); - var match$1 = ty.desc; + let match = find_type_expansion(p, env); + let params = Stdlib__List.map(repr, match[0]); + let ty = repr(match[1]); + let match$1 = ty.desc; if (typeof match$1 === "number") { return [ p, @@ -44838,8 +44838,8 @@ function normalize_type_path(cacheOpt, env, p) { } ]; } - var p1 = match$1._0; - var tyl = Stdlib__List.map(repr, match$1._1); + let p1 = match$1._0; + let tyl = Stdlib__List.map(repr, match$1._1); if (Stdlib__List.length(params) === Stdlib__List.length(tyl) && Stdlib__List.for_all2((function (prim0, prim1) { return prim0 === prim1; }), params, tyl)) { @@ -44851,17 +44851,17 @@ function normalize_type_path(cacheOpt, env, p) { /* Id */0 ]; } - var l1 = Stdlib__List.map((function (param) { + let l1 = Stdlib__List.map((function (param) { return index(params, param); }), tyl); - var match$2 = normalize_type_path(cache, env, p1); + let match$2 = normalize_type_path(cache, env, p1); return [ match$2[0], compose(l1, match$2[1]) ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return [ p, @@ -44875,20 +44875,20 @@ function normalize_type_path(cacheOpt, env, p) { function path_size(param) { switch (param.TAG | 0) { case /* Pident */0 : - var id = param._0; - var s = id.name; + let id = param._0; + let s = id.name; return [ s !== "" && Caml_string.get(s, 0) === /* '_' */95 ? 10 : 1, -id.stamp | 0 ]; case /* Pdot */1 : - var match = path_size(param._0); + let match = path_size(param._0); return [ 1 + match[0] | 0, match[1] ]; case /* Papply */2 : - var match$1 = path_size(param._0); + let match$1 = path_size(param._0); return [ match$1[0] + path_size(param._1)[0] | 0, match$1[1] @@ -44898,7 +44898,7 @@ function path_size(param) { } function same_printing_env(env) { - var used_pers = used_persistent(undefined); + let used_pers = used_persistent(undefined); if (same_types(printing_old.contents, env)) { return Curry._2(equal$3, printing_pers.contents, used_pers); } else { @@ -44915,15 +44915,15 @@ function set_printing_env(env) { printing_pers.contents = used_persistent(undefined); printing_map.contents = /* Empty */0; printing_depth.contents = 0; - var partial_arg = iter_types(function (p, param) { - var match = normalize_type_path(true, env, param[0]); + let partial_arg = iter_types(function (p, param) { + let match = normalize_type_path(true, env, param[0]); if (!Caml_obj.caml_equal(match[1], /* Id */0)) { return ; } - var p1 = match[0]; + let p1 = match[0]; try { - var r = Curry._2(find$4, p1, printing_map.contents); - var l = r.contents; + let r = Curry._2(find$4, p1, printing_map.contents); + let l = r.contents; if (l.TAG === /* Paths */0) { r.contents = { TAG: /* Paths */0, @@ -44947,7 +44947,7 @@ function set_printing_env(env) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { printing_map.contents = Curry._3(add$8, p1, { contents: { @@ -44963,7 +44963,7 @@ function set_printing_env(env) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }); - var cont = function (param) { + let cont = function (param) { return partial_arg(env, param); }; printing_cont.contents = { @@ -44980,7 +44980,7 @@ function wrap_printing_env(env, f) { } function is_unambiguous(path, env) { - var l = find_shadowed_types(path, env); + let l = find_shadowed_types(path, env); if (Stdlib__List.exists((function (param) { return same(path, param); }), l)) { @@ -44989,18 +44989,18 @@ function is_unambiguous(path, env) { if (!l) { return true; } - var rem = l.tl; - var p = l.hd; - var normalize = function (p) { + let rem = l.tl; + let p = l.hd; + let normalize = function (p) { return normalize_type_path(true, env, p)[0]; }; - var p$p = normalize(p); + let p$p = normalize(p); if (Stdlib__List.for_all((function (p) { return same(normalize(p), p$p); }), rem)) { return true; } - var id = lid_of_path(undefined, p); + let id = lid_of_path(undefined, p); if (Stdlib__List.for_all((function (p) { return Caml_obj.caml_equal(lid_of_path(undefined, p), id); }), rem)) { @@ -45017,23 +45017,23 @@ function best_type_path(p) { /* Id */0 ]; } - var match = normalize_type_path(undefined, printing_env.contents, p); - var p$p = match[0]; - var get_path = function (param) { - var r = Curry._2(find$4, p$p, printing_map.contents); + let match = normalize_type_path(undefined, printing_env.contents, p); + let p$p = match[0]; + let get_path = function (param) { + let r = Curry._2(find$4, p$p, printing_map.contents); while(true) { - var p$p$1 = r.contents; + let p$p$1 = r.contents; if (p$p$1.TAG !== /* Paths */0) { return p$p$1._0; } - var l = p$p$1._0; + let l = p$p$1._0; if (l) { r.contents = { TAG: /* Paths */0, _0: /* [] */0 }; Stdlib__List.iter((function (p) { - var p$p = r.contents; + let p$p = r.contents; if (p$p.TAG !== /* Paths */0 && Caml_obj.caml_greaterequal(path_size(p), path_size(p$p._0))) { return ; } @@ -45054,15 +45054,15 @@ function best_type_path(p) { }; }; while((function () { - var tmp = false; + let tmp = false; if (Caml_obj.caml_notequal(printing_cont.contents, /* [] */0)) { - var tmp$1; + let tmp$1; try { get_path(undefined); tmp$1 = false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { tmp$1 = true; } else { @@ -45078,12 +45078,12 @@ function best_type_path(p) { }), run_iter_cont(printing_cont.contents)); printing_depth.contents = printing_depth.contents + 1 | 0; }; - var p$p$p; + let p$p$p; try { p$p$p = get_path(undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { p$p$p = p$p; } else { @@ -45096,15 +45096,15 @@ function best_type_path(p) { ]; } -var names = { +let names = { contents: /* [] */0 }; -var name_counter = { +let name_counter = { contents: 0 }; -var named_vars = { +let named_vars = { contents: /* [] */0 }; @@ -45115,7 +45115,7 @@ function reset_names(param) { } function add_named_var(ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return ; } @@ -45126,7 +45126,7 @@ function add_named_var(ty) { default: return ; } - var name = match._0; + let name = match._0; if (name !== undefined && !Stdlib__List.mem(name, named_vars.contents)) { named_vars.contents = { hd: name, @@ -45139,12 +45139,12 @@ function add_named_var(ty) { function new_name(_param) { while(true) { - var name; + let name; if (name_counter.contents < 26) { - var c = Stdlib__Char.chr(97 + name_counter.contents | 0); + let c = Stdlib__Char.chr(97 + name_counter.contents | 0); name = Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c)); } else { - var c$1 = Stdlib__Char.chr(97 + name_counter.contents % 26 | 0); + let c$1 = Stdlib__Char.chr(97 + name_counter.contents % 26 | 0); name = Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c$1)) + String(name_counter.contents / 26 | 0); } name_counter.contents = name_counter.contents + 1 | 0; @@ -45165,11 +45165,11 @@ function name_of_type(t) { return Stdlib__List.assq(t, names.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var match = t.desc; - var name; - var exit = 0; + let match = t.desc; + let name; + let exit = 0; if (typeof match === "number") { name = new_name(undefined); } else { @@ -45183,12 +45183,12 @@ function name_of_type(t) { } } if (exit === 1) { - var name$1 = match._0; + let name$1 = match._0; if (name$1 !== undefined) { - var current_name = { + let current_name = { contents: name$1 }; - var i = 0; + let i = 0; while(Stdlib__List.exists((function (param) { return current_name.contents === param[1]; }), names.contents)) { @@ -45220,21 +45220,21 @@ function check_name_of_type(t) { } function remove_names(tyl) { - var tyl$1 = Stdlib__List.map(repr, tyl); + let tyl$1 = Stdlib__List.map(repr, tyl); names.contents = Stdlib__List.filter((function (param) { return !Stdlib__List.memq(param[0], tyl$1); }), names.contents); } -var visited_objects = { +let visited_objects = { contents: /* [] */0 }; -var aliased = { +let aliased = { contents: /* [] */0 }; -var delayed = { +let delayed = { contents: /* [] */0 }; @@ -45254,7 +45254,7 @@ function is_aliased(ty) { } function add_alias(ty) { - var px = proxy(ty); + let px = proxy(ty); if (!is_aliased(px)) { aliased.contents = { hd: px, @@ -45266,7 +45266,7 @@ function add_alias(ty) { } function aliasable(ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return true; } @@ -45285,14 +45285,14 @@ function aliasable(ty) { function namable_row(row) { if (row.row_name !== undefined) { return Stdlib__List.for_all((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return true; } if (match.TAG === /* Rpresent */0) { return true; } - var l = match._1; + let l = match._1; if (row.row_closed) { if (match._0) { return Caml_obj.caml_equal(l, /* [] */0); @@ -45310,18 +45310,18 @@ function namable_row(row) { function mark_loops_rec(_visited, _ty) { while(true) { - var ty = _ty; - var visited = _visited; - var ty$1 = repr(ty); - var px = proxy(ty$1); + let ty = _ty; + let visited = _visited; + let ty$1 = repr(ty); + let px = proxy(ty$1); if (Stdlib__List.memq(px, visited) && aliasable(ty$1)) { return add_alias(px); } - var visited$1 = { + let visited$1 = { hd: px, tl: visited }; - var tyl = ty$1.desc; + let tyl = ty$1.desc; if (typeof tyl === "number") { return ; } @@ -45338,7 +45338,7 @@ function mark_loops_rec(_visited, _ty) { } }(visited$1)), tyl._0); case /* Tconstr */3 : - var match = best_type_path(tyl._0); + let match = best_type_path(tyl._0); return Stdlib__List.iter((function(visited$1){ return function (param) { return mark_loops_rec(visited$1, param); @@ -45354,7 +45354,7 @@ function mark_loops_rec(_visited, _ty) { tl: visited_objects.contents }; } - var match$1 = tyl._1.contents; + let match$1 = tyl._1.contents; if (match$1 !== undefined) { return Stdlib__List.iter((function(visited$1){ return function (param) { @@ -45362,7 +45362,7 @@ function mark_loops_rec(_visited, _ty) { } }(visited$1)), Stdlib__List.tl(match$1[1])); } - var match$2 = flatten_fields(tyl._0); + let match$2 = flatten_fields(tyl._0); return Stdlib__List.iter((function(visited$1){ return function (param) { if (Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { @@ -45391,14 +45391,14 @@ function mark_loops_rec(_visited, _ty) { if (Stdlib__List.memq(px, visited_objects.contents)) { return add_alias(px); } - var row = row_repr_aux(/* [] */0, tyl._0); + let row = row_repr_aux(/* [] */0, tyl._0); if (!static_row(row)) { visited_objects.contents = { hd: px, tl: visited_objects.contents }; } - var match$3 = row.row_name; + let match$3 = row.row_name; if (match$3 !== undefined) { if (namable_row(row)) { return Stdlib__List.iter((function(visited$1){ @@ -45457,23 +45457,23 @@ function reset_and_mark_loops_list(tyl) { Stdlib__List.iter(mark_loops, tyl); } -var print_labels = { +let print_labels = { contents: true }; function tree_of_typexp(sch, ty) { - var ty$1 = repr(ty); - var px = proxy(ty$1); + let ty$1 = repr(ty); + let px = proxy(ty$1); if (Stdlib__List.mem_assq(px, names.contents) && !Stdlib__List.memq(px, delayed.contents)) { - var mark = is_non_gen(sch, ty$1); + let mark = is_non_gen(sch, ty$1); return { TAG: /* Otyp_var */10, _0: mark, _1: name_of_type(px) }; } - var pr_typ = function (param) { - var tyl = ty$1.desc; + let pr_typ = function (param) { + let tyl = ty$1.desc; if (typeof tyl === "number") { return tree_of_typobject(sch, ty$1, undefined); } @@ -45485,20 +45485,20 @@ function tree_of_typexp(sch, ty) { _1: name_of_type(ty$1) }; case /* Tarrow */1 : - var l = tyl._0; - var ty1 = tyl._1; - var ty2 = tyl._2; - var lab = print_labels.contents && l !== "" || is_optional(l) ? l : ""; - var t1; + let l = tyl._0; + let ty1 = tyl._1; + let ty2 = tyl._2; + let lab = print_labels.contents && l !== "" || is_optional(l) ? l : ""; + let t1; if (is_optional(l)) { - var match = repr(ty1).desc; + let match = repr(ty1).desc; if (typeof match === "number" || match.TAG !== /* Tconstr */3) { t1 = { TAG: /* Otyp_stuff */7, _0: "" }; } else { - var match$1 = match._1; + let match$1 = match._1; t1 = match$1 && !(match$1.tl || !same(match._0, path_option)) ? tree_of_typexp(sch, match$1.hd) : ({ TAG: /* Otyp_stuff */7, _0: "" @@ -45521,9 +45521,9 @@ function tree_of_typexp(sch, ty) { }), tyl._0) }; case /* Tconstr */3 : - var match$2 = best_type_path(tyl._0); - var s = match$2[1]; - var tyl$p = apply_subst(s, tyl._1); + let match$2 = best_type_path(tyl._0); + let s = match$2[1]; + let tyl$p = apply_subst(s, tyl._1); if (is_nth(s)) { return tree_of_typexp(sch, Stdlib__List.hd(tyl$p)); } else { @@ -45544,29 +45544,29 @@ function tree_of_typexp(sch, ty) { case /* Tsubst */7 : return tree_of_typexp(sch, tyl._0); case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, tyl._0); - var fields = row.row_closed ? Stdlib__List.filter((function (param) { + let row = row_repr_aux(/* [] */0, tyl._0); + let fields = row.row_closed ? Stdlib__List.filter((function (param) { return Caml_obj.caml_notequal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0); }), row.row_fields) : row.row_fields; - var present = Stdlib__List.filter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let present = Stdlib__List.filter((function (param) { + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG !== /* Rpresent */0) { return false; } else { return true; } }), fields); - var all_present = Stdlib__List.length(present) === Stdlib__List.length(fields); - var match$3 = row.row_name; + let all_present = Stdlib__List.length(present) === Stdlib__List.length(fields); + let match$3 = row.row_name; if (match$3 !== undefined) { - var tyl$1 = match$3[1]; - var p = match$3[0]; + let tyl$1 = match$3[1]; + let p = match$3[0]; if (namable_row(row)) { - var match$4 = best_type_path(p); - var s$1 = match$4[1]; - var id = tree_of_path(match$4[0]); - var tyl$2 = apply_subst(s$1, tyl$1); - var args = Stdlib__List.map((function (param) { + let match$4 = best_type_path(p); + let s$1 = match$4[1]; + let id = tree_of_path(match$4[0]); + let tyl$2 = apply_subst(s$1, tyl$1); + let args = Stdlib__List.map((function (param) { return tree_of_typexp(sch, param); }), tyl$2); if (row.row_closed && all_present) { @@ -45580,14 +45580,14 @@ function tree_of_typexp(sch, ty) { }; } } - var non_gen = is_non_gen(sch, px); - var tags = all_present ? undefined : Stdlib__List.map((function (prim) { + let non_gen = is_non_gen(sch, px); + let tags = all_present ? undefined : Stdlib__List.map((function (prim) { return prim[0]; }), present); - var inh; - var exit = 0; + let inh; + let exit = 0; if (args) { - var match$5 = args.hd; + let match$5 = args.hd; if (typeof match$5 === "number" || !(match$5.TAG === /* Otyp_constr */3 && !(args.tl || !is_nth(s$1)))) { exit = 2; } else { @@ -45619,10 +45619,10 @@ function tree_of_typexp(sch, ty) { } } - var non_gen$1 = !(row.row_closed && all_present) && is_non_gen(sch, px); - var fields$1 = Stdlib__List.map((function (param) { - var l = param[0]; - var match = row_field_repr_aux(/* [] */0, param[1]); + let non_gen$1 = !(row.row_closed && all_present) && is_non_gen(sch, px); + let fields$1 = Stdlib__List.map((function (param) { + let l = param[0]; + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return [ l, @@ -45631,7 +45631,7 @@ function tree_of_typexp(sch, ty) { ]; } if (match.TAG === /* Rpresent */0) { - var ty = match._0; + let ty = match._0; if (ty !== undefined) { return [ l, @@ -45649,7 +45649,7 @@ function tree_of_typexp(sch, ty) { ]; } } - var c = match._0; + let c = match._0; if (c && !match._1) { return [ l, @@ -45657,7 +45657,7 @@ function tree_of_typexp(sch, ty) { /* [] */0 ]; } - var tyl = match._1; + let tyl = match._1; if (c) { return [ l, @@ -45676,7 +45676,7 @@ function tree_of_typexp(sch, ty) { ]; } }), fields); - var tags$1 = all_present ? undefined : Stdlib__List.map((function (prim) { + let tags$1 = all_present ? undefined : Stdlib__List.map((function (prim) { return prim[0]; }), present); return { @@ -45696,19 +45696,19 @@ function tree_of_typexp(sch, ty) { _1: name_of_type(ty$1) }; case /* Tpoly */10 : - var ty$2 = tyl._0; + let ty$2 = tyl._0; if (!tyl._1) { return tree_of_typexp(sch, ty$2); } - var tyl$3 = Stdlib__List.map(repr, tyl._1); + let tyl$3 = Stdlib__List.map(repr, tyl._1); if (Caml_obj.caml_equal(tyl$3, /* [] */0)) { return tree_of_typexp(sch, ty$2); } - var old_delayed = delayed.contents; + let old_delayed = delayed.contents; Stdlib__List.iter(add_delayed, tyl$3); - var tl = Stdlib__List.map(name_of_type, tyl$3); - var tr_1 = tree_of_typexp(sch, ty$2); - var tr = { + let tl = Stdlib__List.map(name_of_type, tyl$3); + let tr_1 = tree_of_typexp(sch, ty$2); + let tr = { TAG: /* Otyp_poly */12, _0: tl, _1: tr_1 @@ -45717,7 +45717,7 @@ function tree_of_typexp(sch, ty) { delayed.contents = old_delayed; return tr; case /* Tpackage */11 : - var n = Stdlib__List.map((function (li) { + let n = Stdlib__List.map((function (li) { return Stdlib__String.concat(".", flat(/* [] */0, li)); }), tyl._1); return { @@ -45750,15 +45750,15 @@ function tree_of_typexp(sch, ty) { function tree_of_typobject(sch, fi, nm) { if (nm !== undefined) { - var match = nm[1]; + let match = nm[1]; if (!match) { return fatal_error("Printtyp.tree_of_typobject"); } - var non_gen = is_non_gen(sch, repr(match.hd)); - var args = Stdlib__List.map((function (param) { + let non_gen = is_non_gen(sch, repr(match.hd)); + let args = Stdlib__List.map((function (param) { return tree_of_typexp(sch, param); }), match.tl); - var match$1 = best_type_path(nm[0]); + let match$1 = best_type_path(nm[0]); if (!Caml_obj.caml_equal(match$1[1], /* Id */0)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -45776,10 +45776,10 @@ function tree_of_typobject(sch, fi, nm) { _2: args }; } - var pr_fields = function (fi) { - var match = flatten_fields(fi); - var present_fields = Stdlib__List.fold_right((function (param, l) { - var match = field_kind_repr(param[1]); + let pr_fields = function (fi) { + let match = flatten_fields(fi); + let present_fields = Stdlib__List.fold_right((function (param, l) { + let match = field_kind_repr(param[1]); if (typeof match === "number" && !match) { return { hd: [ @@ -45792,12 +45792,12 @@ function tree_of_typobject(sch, fi, nm) { return l; } }), match[0], /* [] */0); - var sorted_fields = Stdlib__List.sort((function (param, param$1) { + let sorted_fields = Stdlib__List.sort((function (param, param$1) { return Caml.caml_string_compare(param[0], param$1[0]); }), present_fields); return tree_of_typfields(sch, match[1], sorted_fields); }; - var match$2 = pr_fields(fi); + let match$2 = pr_fields(fi); return { TAG: /* Otyp_object */5, _0: match$2[0], @@ -45815,14 +45815,14 @@ function is_non_gen(sch, ty) { function tree_of_typfields(sch, rest, param) { if (param) { - var match = param.hd; - var field_0 = match[0]; - var field_1 = tree_of_typexp(sch, match[1]); - var field = [ + let match = param.hd; + let field_0 = match[0]; + let field_1 = tree_of_typexp(sch, match[1]); + let field = [ field_0, field_1 ]; - var match$1 = tree_of_typfields(sch, rest, param.tl); + let match$1 = tree_of_typfields(sch, rest, param.tl); return [ { hd: field, @@ -45831,8 +45831,8 @@ function tree_of_typfields(sch, rest, param) { match$1[1] ]; } - var match$2 = rest.desc; - var rest$1; + let match$2 = rest.desc; + let rest$1; if (typeof match$2 === "number") { rest$1 = undefined; } else { @@ -45876,11 +45876,11 @@ function tree_of_type_scheme(ty) { function tree_of_constraints(params) { return Stdlib__List.fold_right((function (ty, list) { - var ty$p = unalias(ty); + let ty$p = unalias(ty); if (proxy(ty) === proxy(ty$p)) { return list; } - var tr = tree_of_typexp(true, ty); + let tr = tree_of_typexp(true, ty); return { hd: [ tr, @@ -45893,7 +45893,7 @@ function tree_of_constraints(params) { function filter_params(tyl) { return Stdlib__List.rev(Stdlib__List.fold_left((function (tyl, ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (Stdlib__List.memq(ty$1, tyl)) { return { hd: newty2(100000000, { @@ -45912,8 +45912,8 @@ function filter_params(tyl) { } function tree_of_constructor(cd) { - var name = cd.cd_id.name; - var res = cd.cd_res; + let name = cd.cd_id.name; + let res = cd.cd_res; if (res === undefined) { return [ name, @@ -45923,10 +45923,10 @@ function tree_of_constructor(cd) { undefined ]; } - var nm = names.contents; + let nm = names.contents; names.contents = /* [] */0; - var ret = tree_of_typexp(false, res); - var args = Stdlib__List.map((function (param) { + let ret = tree_of_typexp(false, res); + let args = Stdlib__List.map((function (param) { return tree_of_typexp(false, param); }), cd.cd_args); names.contents = nm; @@ -45947,19 +45947,19 @@ function tree_of_label(l) { function tree_of_type_decl(id, decl) { reset(undefined); - var params = filter_params(decl.type_params); - var ty = decl.type_manifest; + let params = filter_params(decl.type_params); + let ty = decl.type_manifest; if (ty !== undefined) { - var vars = free_variables$1(undefined, ty); + let vars = free_variables$1(undefined, ty); Stdlib__List.iter((function (ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return ; } if (match.TAG !== /* Tvar */0) { return ; } - var match$1 = match._0; + let match$1 = match._0; if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { ty.desc = { TAG: /* Tvar */0, @@ -45973,19 +45973,19 @@ function tree_of_type_decl(id, decl) { Stdlib__List.iter(add_alias, params); Stdlib__List.iter(mark_loops, params); Stdlib__List.iter(check_name_of_type, Stdlib__List.map(proxy, params)); - var ty$1 = decl.type_manifest; - var ty_manifest; + let ty$1 = decl.type_manifest; + let ty_manifest; if (ty$1 !== undefined) { - var match = repr(ty$1); - var row = match.desc; - var ty$2; + let match = repr(ty$1); + let row = match.desc; + let ty$2; if (typeof row === "number" || row.TAG !== /* Tvariant */8) { ty$2 = ty$1; } else { - var row$1 = row_repr_aux(/* [] */0, row._0); - var match$1 = row$1.row_name; + let row$1 = row_repr_aux(/* [] */0, row._0); + let match$1 = row$1.row_name; if (match$1 !== undefined) { - var id$p = match$1[0]; + let id$p = match$1[0]; switch (id$p.TAG | 0) { case /* Pident */0 : ty$2 = Caml_obj.caml_equal(id, id$p._0) ? newty2(100000000, { @@ -46015,7 +46015,7 @@ function tree_of_type_decl(id, decl) { } else { ty_manifest = undefined; } - var cstrs = decl.type_kind; + let cstrs = decl.type_kind; if (typeof cstrs === "number") { cstrs === /* Type_abstract */0; } else if (cstrs.TAG === /* Type_record */0) { @@ -46028,16 +46028,16 @@ function tree_of_type_decl(id, decl) { may(mark_loops, c.cd_res); }), cstrs._0); } - var type_param = function (param) { + let type_param = function (param) { if (typeof param === "number" || param.TAG !== /* Otyp_var */10) { return "?"; } else { return param._1; } }; - var type_defined = function (decl) { - var tll = decl.type_kind; - var abstr; + let type_defined = function (decl) { + let tll = decl.type_kind; + let abstr; abstr = typeof tll === "number" ? ( tll === /* Type_abstract */0 ? decl.type_manifest === undefined || decl.type_private === /* Private */0 : decl.type_manifest === undefined ) : ( @@ -46045,7 +46045,7 @@ function tree_of_type_decl(id, decl) { return cd.cd_res !== undefined; }), tll._0) ); - var vari = Stdlib__List.map2((function (ty, v) { + let vari = Stdlib__List.map2((function (ty, v) { if (abstr || !is_Tvar(repr(ty))) { return Curry._1(Types_Variance.get_upper, v); } else { @@ -46065,7 +46065,7 @@ function tree_of_type_decl(id, decl) { }), params, vari) ]; }; - var tree_of_manifest = function (ty1) { + let tree_of_manifest = function (ty1) { if (ty_manifest !== undefined) { return { TAG: /* Otyp_manifest */4, @@ -46076,10 +46076,10 @@ function tree_of_type_decl(id, decl) { return ty1; } }; - var match$2 = type_defined(decl); - var constraints = tree_of_constraints(params); - var cstrs$1 = decl.type_kind; - var match$3; + let match$2 = type_defined(decl); + let constraints = tree_of_constraints(params); + let cstrs$1 = decl.type_kind; + let match$3; match$3 = typeof cstrs$1 === "number" ? ( cstrs$1 === /* Type_abstract */0 ? ( ty_manifest !== undefined ? [ @@ -46131,29 +46131,29 @@ function type_declaration$1(id, ppf, decl) { function tree_of_extension_constructor(id, ext, es) { reset(undefined); - var ty_name = name(undefined, ext.ext_type_path); - var ty_params = filter_params(ext.ext_type_params); + let ty_name = name(undefined, ext.ext_type_path); + let ty_params = filter_params(ext.ext_type_params); Stdlib__List.iter(add_alias, ty_params); Stdlib__List.iter(mark_loops, ty_params); Stdlib__List.iter(check_name_of_type, Stdlib__List.map(proxy, ty_params)); Stdlib__List.iter(mark_loops, ext.ext_args); may(mark_loops, ext.ext_ret_type); - var ty_params$1 = Stdlib__List.map((function (ty) { - var param = tree_of_typexp(false, ty); + let ty_params$1 = Stdlib__List.map((function (ty) { + let param = tree_of_typexp(false, ty); if (typeof param === "number" || param.TAG !== /* Otyp_var */10) { return "?"; } else { return param._1; } }), ty_params); - var name$1 = id.name; - var res = ext.ext_ret_type; - var match; + let name$1 = id.name; + let res = ext.ext_ret_type; + let match; if (res !== undefined) { - var nm = names.contents; + let nm = names.contents; names.contents = /* [] */0; - var ret = tree_of_typexp(false, res); - var args = Stdlib__List.map((function (param) { + let ret = tree_of_typexp(false, res); + let args = Stdlib__List.map((function (param) { return tree_of_typexp(false, param); }), ext.ext_args); names.contents = nm; @@ -46169,10 +46169,10 @@ function tree_of_extension_constructor(id, ext, es) { undefined ]; } - var ext_oext_args = match[0]; - var ext_oext_ret_type = match[1]; - var ext_oext_private = ext.ext_private; - var ext$1 = { + let ext_oext_args = match[0]; + let ext_oext_ret_type = match[1]; + let ext_oext_private = ext.ext_private; + let ext$1 = { oext_name: name$1, oext_type_name: ty_name, oext_type_params: ty_params$1, @@ -46192,10 +46192,10 @@ function extension_constructor$1(id, ppf, ext) { } function tree_of_value_description(id, decl) { - var id$1 = id.name; - var ty = tree_of_type_scheme(decl.val_type); - var p = decl.val_kind; - var prims; + let id$1 = id.name; + let ty = tree_of_type_scheme(decl.val_type); + let p = decl.val_kind; + let prims; prims = typeof p === "number" || p.TAG !== /* Val_prim */0 ? /* [] */0 : description_list(p._0); return { TAG: /* Osig_value */6, @@ -46210,8 +46210,8 @@ function value_description$1(id, ppf, decl) { } function method_type(param) { - var match = field_kind_repr(param[1]); - var match$1 = repr(param[2]); + let match = field_kind_repr(param[1]); + let match$1 = repr(param[2]); if (typeof match !== "number") { return [ match$1, @@ -46224,7 +46224,7 @@ function method_type(param) { /* [] */0 ]; } - var match$2 = match$1.desc; + let match$2 = match$1.desc; if (typeof match$2 === "number" || match$2.TAG !== /* Tpoly */10) { return [ match$1, @@ -46240,12 +46240,12 @@ function method_type(param) { function prepare_class_type(params, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : - var cty = param._2; - var tyl = param._1; - var sty = repr(signature_of_class_type(cty).csig_self); + let cty = param._2; + let tyl = param._1; + let sty = repr(signature_of_class_type(cty).csig_self); if (!(Stdlib__List.memq(proxy(sty), visited_objects.contents) || !Stdlib__List.for_all(is_Tvar, params) || Stdlib__List.exists((function(sty){ return function (param) { return deep_occur(sty, param); @@ -46256,9 +46256,9 @@ function prepare_class_type(params, _param) { _param = cty; continue ; case /* Cty_signature */1 : - var sign = param._0; - var sty$1 = repr(sign.csig_self); - var px = proxy(sty$1); + let sign = param._0; + let sty$1 = repr(sign.csig_self); + let px = proxy(sty$1); if (Stdlib__List.memq(px, visited_objects.contents)) { add_alias(sty$1); } else { @@ -46267,7 +46267,7 @@ function prepare_class_type(params, _param) { tl: visited_objects.contents }; } - var match = flatten_fields(object_fields(sign.csig_self)); + let match = flatten_fields(object_fields(sign.csig_self)); Stdlib__List.iter((function (met) { mark_loops(method_type(met)[0]); }), match[0]); @@ -46285,11 +46285,11 @@ function prepare_class_type(params, _param) { function tree_of_class_type(sch, params, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : - var cty = param._2; - var sty = repr(signature_of_class_type(cty).csig_self); + let cty = param._2; + let sty = repr(signature_of_class_type(cty).csig_self); if (!(Stdlib__List.memq(proxy(sty), visited_objects.contents) || !Stdlib__List.for_all(is_Tvar, params))) { return { TAG: /* Octy_constr */0, @@ -46302,15 +46302,15 @@ function tree_of_class_type(sch, params, _param) { _param = cty; continue ; case /* Cty_signature */1 : - var sign = param._0; - var sty$1 = repr(sign.csig_self); - var self_ty = is_aliased(sty$1) ? ({ + let sign = param._0; + let sty$1 = repr(sign.csig_self); + let self_ty = is_aliased(sty$1) ? ({ TAG: /* Otyp_var */10, _0: false, _1: name_of_type(proxy(sty$1)) }) : undefined; - var match = flatten_fields(object_fields(sign.csig_self)); - var csil = Stdlib__List.fold_left((function (csil, param) { + let match = flatten_fields(object_fields(sign.csig_self)); + let csil = Stdlib__List.fold_left((function (csil, param) { return { hd: { TAG: /* Ocsg_constraint */0, @@ -46320,7 +46320,7 @@ function tree_of_class_type(sch, params, _param) { tl: csil }; }), /* [] */0, tree_of_constraints(params)); - var all_vars = Curry._3(Meths.fold, (function (l, param, all) { + let all_vars = Curry._3(Meths.fold, (function (l, param, all) { return { hd: [ l, @@ -46331,8 +46331,8 @@ function tree_of_class_type(sch, params, _param) { tl: all }; }), sign.csig_vars, /* [] */0); - var all_vars$1 = Stdlib__List.rev(all_vars); - var csil$1 = Stdlib__List.fold_left((function (csil, param) { + let all_vars$1 = Stdlib__List.rev(all_vars); + let csil$1 = Stdlib__List.fold_left((function (csil, param) { return { hd: { TAG: /* Ocsg_value */2, @@ -46344,22 +46344,22 @@ function tree_of_class_type(sch, params, _param) { tl: csil }; }), csil, all_vars$1); - var partial_arg = sign.csig_concr; - var csil$2 = Stdlib__List.fold_left((function(partial_arg){ + let partial_arg = sign.csig_concr; + let csil$2 = Stdlib__List.fold_left((function(partial_arg){ return function (param, param$1) { - var lab = param$1[0]; + let lab = param$1[0]; if (lab === dummy_method) { return param; } - var kind = field_kind_repr(param$1[1]); - var priv = Caml_obj.caml_notequal(kind, /* Fpresent */0); - var virt = !Curry._2(mem$2, lab, partial_arg); - var match = method_type([ + let kind = field_kind_repr(param$1[1]); + let priv = Caml_obj.caml_notequal(kind, /* Fpresent */0); + let virt = !Curry._2(mem$2, lab, partial_arg); + let match = method_type([ lab, kind, param$1[2] ]); - var tty = tree_of_typexp(sch, match[0]); + let tty = tree_of_typexp(sch, match[0]); remove_names(match[1]); return { hd: { @@ -46379,17 +46379,17 @@ function tree_of_class_type(sch, params, _param) { _1: Stdlib__List.rev(csil$2) }; case /* Cty_arrow */2 : - var ty = param._1; - var l = param._0; - var lab = print_labels.contents && l !== "" || is_optional(l) ? l : ""; - var ty$1; + let ty = param._1; + let l = param._0; + let lab = print_labels.contents && l !== "" || is_optional(l) ? l : ""; + let ty$1; if (is_optional(l)) { - var match$1 = repr(ty).desc; - var exit = 0; + let match$1 = repr(ty).desc; + let exit = 0; if (typeof match$1 === "number" || match$1.TAG !== /* Tconstr */3) { exit = 1; } else { - var match$2 = match$1._1; + let match$2 = match$1._1; if (match$2 && !(match$2.tl || !same(match$1._0, path_option))) { ty$1 = match$2.hd; } else { @@ -46406,7 +46406,7 @@ function tree_of_class_type(sch, params, _param) { } else { ty$1 = ty; } - var tr = tree_of_typexp(sch, ty$1); + let tr = tree_of_typexp(sch, ty$1); return { TAG: /* Octy_arrow */1, _0: lab, @@ -46425,8 +46425,8 @@ function class_type$2(ppf, cty) { } function tree_of_class_param(param, variance) { - var match = tree_of_typexp(true, param); - var tmp; + let match = tree_of_typexp(true, param); + let tmp; tmp = typeof match === "number" || match.TAG !== /* Otyp_var */10 ? "?" : match._1; return [ tmp, @@ -46447,18 +46447,18 @@ function class_variance(param) { } function tree_of_class_declaration(id, cl, rs) { - var params = filter_params(cl.cty_params); + let params = filter_params(cl.cty_params); reset(undefined); Stdlib__List.iter(add_alias, params); prepare_class_type(params, cl.cty_type); - var sty = repr(signature_of_class_type(cl.cty_type).csig_self); + let sty = repr(signature_of_class_type(cl.cty_type).csig_self); Stdlib__List.iter(mark_loops, params); Stdlib__List.iter(check_name_of_type, Stdlib__List.map(proxy, params)); if (is_aliased(sty)) { - var t = proxy(sty); + let t = proxy(sty); name_of_type(t); } - var vir_flag = cl.cty_new === undefined; + let vir_flag = cl.cty_new === undefined; return { TAG: /* Osig_class */0, _0: vir_flag, @@ -46474,21 +46474,21 @@ function class_declaration$1(id, ppf, cl) { } function tree_of_cltype_declaration(id, cl, rs) { - var params = Stdlib__List.map(repr, cl.clty_params); + let params = Stdlib__List.map(repr, cl.clty_params); reset(undefined); Stdlib__List.iter(add_alias, params); prepare_class_type(params, cl.clty_type); - var sty = repr(signature_of_class_type(cl.clty_type).csig_self); + let sty = repr(signature_of_class_type(cl.clty_type).csig_self); Stdlib__List.iter(mark_loops, params); Stdlib__List.iter(check_name_of_type, Stdlib__List.map(proxy, params)); if (is_aliased(sty)) { - var t = proxy(sty); + let t = proxy(sty); name_of_type(t); } - var sign = signature_of_class_type(cl.clty_type); - var match = flatten_fields(object_fields(sign.csig_self)); - var virt = Stdlib__List.exists((function (param) { - var lab = param[0]; + let sign = signature_of_class_type(cl.clty_type); + let match = flatten_fields(object_fields(sign.csig_self)); + let virt = Stdlib__List.exists((function (param) { + let lab = param[0]; return !(lab === dummy_method || Curry._2(mem$2, lab, sign.csig_concr)); }), match[0]) || Curry._3(Meths.fold, (function (param, param$1, b) { if (param$1[1] === /* Virtual */0) { @@ -46512,9 +46512,9 @@ function cltype_declaration$1(id, ppf, cl) { } function wrap_env(fenv, ftree, arg) { - var env = printing_env.contents; + let env = printing_env.contents; set_printing_env(Curry._1(fenv, env)); - var tree = Curry._1(ftree, arg); + let tree = Curry._1(ftree, arg); set_printing_env(env); return tree; } @@ -46528,14 +46528,14 @@ function filter_rem_sig(item, rem) { rem ]; } - var match = rem.tl; + let match = rem.tl; if (!match) { return [ /* [] */0, rem ]; } - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { return [ { @@ -46563,7 +46563,7 @@ function filter_rem_sig(item, rem) { rem ]; } - var match$2 = rem.tl; + let match$2 = rem.tl; if (match$2) { return [ { @@ -46589,7 +46589,7 @@ function filter_rem_sig(item, rem) { } } -var dummy = { +let dummy = { type_params: /* [] */0, type_arity: 0, type_kind: /* Type_abstract */0, @@ -46605,18 +46605,18 @@ function hide_rec_items(param) { if (!param) { return ; } - var match = param.hd; + let match = param.hd; if (match.TAG !== /* Sig_type */1) { return ; } if (!(match._2 === /* Trec_first */1 && !real_paths.contents)) { return ; } - var get_ids = function (param) { + let get_ids = function (param) { if (!param) { return /* [] */0; } - var match = param.hd; + let match = param.hd; if (match.TAG === /* Sig_type */1 && match._2 >= 2) { return { hd: match._0, @@ -46626,14 +46626,14 @@ function hide_rec_items(param) { return /* [] */0; } }; - var ids_0 = match._0; - var ids_1 = get_ids(param.tl); - var ids = { + let ids_0 = match._0; + let ids_1 = get_ids(param.tl); + let ids = { hd: ids_0, tl: ids_1 }; set_printing_env(Stdlib__List.fold_right((function (id) { - var partial_arg = rename(id); + let partial_arg = rename(id); return function (param) { return add_type$1(false, partial_arg, dummy, param); }; @@ -46653,12 +46653,12 @@ function tree_of_modtype(param) { _0: tree_of_signature(param._0) }; case /* Mty_functor */2 : - var ty_res = param._2; - var ty_arg = param._1; - var param$1 = param._0; - var res; + let ty_res = param._2; + let ty_arg = param._1; + let param$1 = param._0; + let res; if (ty_arg !== undefined) { - var partial_arg = true; + let partial_arg = true; res = wrap_env((function (param$2) { return add_module$1(partial_arg, param$1, ty_arg, param$2); }), tree_of_modtype, ty_res); @@ -46681,7 +46681,7 @@ function tree_of_modtype(param) { } function tree_of_signature(sg) { - var partial_arg = printing_env.contents; + let partial_arg = printing_env.contents; return wrap_env((function (env) { return env; }), (function (param) { @@ -46693,9 +46693,9 @@ function tree_of_signature_rec(env$p, in_type_group, param) { if (!param) { return /* [] */0; } - var item = param.hd; - var in_type_group$1; - var exit = 0; + let item = param.hd; + let in_type_group$1; + let exit = 0; if (in_type_group) { if (item.TAG === /* Sig_type */1) { if (item._2 >= 2) { @@ -46714,9 +46714,9 @@ function tree_of_signature_rec(env$p, in_type_group, param) { set_printing_env(env$p); in_type_group$1 = item.TAG === /* Sig_type */1 && item._2 < 2 ? true : false; } - var match = filter_rem_sig(item, param.tl); - var rem = match[1]; - var trees; + let match = filter_rem_sig(item, param.tl); + let rem = match[1]; + let trees; switch (item.TAG | 0) { case /* Sig_value */0 : trees = { @@ -46725,7 +46725,7 @@ function tree_of_signature_rec(env$p, in_type_group, param) { }; break; case /* Sig_type */1 : - var id = item._0; + let id = item._0; if (is_row_name(id.name)) { trees = /* [] */0; } else { @@ -46780,7 +46780,7 @@ function tree_of_signature_rec(env$p, in_type_group, param) { break; } - var env$p$1 = add_signature({ + let env$p$1 = add_signature({ hd: item, tl: match[0] }, env$p); @@ -46788,8 +46788,8 @@ function tree_of_signature_rec(env$p, in_type_group, param) { } function tree_of_modtype_declaration(id, decl) { - var mty = decl.mtd_type; - var mty$1 = mty !== undefined ? tree_of_modtype(mty) : /* Omty_abstract */0; + let mty = decl.mtd_type; + let mty$1 = mty !== undefined ? tree_of_modtype(mty) : /* Omty_abstract */0; return { TAG: /* Osig_modtype */3, _0: id.name, @@ -46844,13 +46844,13 @@ function signature$3(ppf, sg) { } function same_path(t, t$p) { - var t$1 = repr(t); - var t$p$1 = repr(t$p); + let t$1 = repr(t); + let t$p$1 = repr(t$p); if (t$1 === t$p$1) { return true; } - var match = t$1.desc; - var match$1 = t$p$1.desc; + let match = t$1.desc; + let match$1 = t$p$1.desc; if (typeof match === "number") { return false; } @@ -46863,11 +46863,11 @@ function same_path(t, t$p) { if (match$1.TAG !== /* Tconstr */3) { return false; } - var match$2 = best_type_path(match._0); - var s1 = match$2[1]; - var match$3 = best_type_path(match$1._0); - var s2 = match$3[1]; - var exit = 0; + let match$2 = best_type_path(match._0); + let s1 = match$2[1]; + let match$3 = best_type_path(match$1._0); + let s2 = match$3[1]; + let exit = 0; if (typeof s1 === "number") { exit = 1; } else { @@ -46881,7 +46881,7 @@ function same_path(t, t$p) { exit = 1; } if (exit === 1) { - var exit$1 = 0; + let exit$1 = 0; if (typeof s2 === "number") { exit$1 = 2; } else { @@ -46894,8 +46894,8 @@ function same_path(t, t$p) { if (!same(match$2[0], match$3[0])) { return false; } - var tl = apply_subst(s1, match._1); - var tl$p = apply_subst(s2, match$1._1); + let tl = apply_subst(s1, match._1); + let tl$p = apply_subst(s2, match$1._1); if (Stdlib__List.length(tl) === Stdlib__List.length(tl$p)) { return Stdlib__List.for_all2(same_type, tl, tl$p); } else { @@ -46911,7 +46911,7 @@ function type_expansion(t, ppf, t$p) { if (same_path(t, t$p)) { return type_expr$1(ppf, t); } - var t$p$1 = proxy(t) === proxy(t$p) ? unalias(t$p) : t$p; + let t$p$1 = proxy(t) === proxy(t$p) ? unalias(t$p) : t$p; Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -47025,14 +47025,14 @@ function trace(fst, txt, ppf, param) { if (!param) { return ; } - var match = param.tl; + let match = param.tl; if (!match) { return ; } - var match$1 = match.hd; - var t2 = match$1[0]; - var match$2 = param.hd; - var t1 = match$2[0]; + let match$1 = match.hd; + let t2 = match$1[0]; + let match$2 = param.hd; + let t1 = match$2[0]; if (!fst) { Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -47126,20 +47126,20 @@ function filter_trace(keep_last, param) { if (!param) { return /* [] */0; } - var match = param.tl; + let match = param.tl; if (!match) { return /* [] */0; } - var match$1 = match.hd; - var t2 = match$1[0]; - var match$2 = param.hd; - var t1$p = match$2[1]; - var t1 = match$2[0]; + let match$1 = match.hd; + let t2 = match$1[0]; + let match$2 = param.hd; + let t1$p = match$2[1]; + let t1 = match$2[0]; if (!match.tl && (is_Tvar(t1$p) || is_Tvar(match$1[1]))) { return /* [] */0; } - var t2$p = match$1[1]; - var rem$p = filter_trace(keep_last, match.tl); + let t2$p = match$1[1]; + let rem$p = filter_trace(keep_last, match.tl); if (is_constr_row(t1$p) || is_constr_row(t2$p) || same_path(t1, t1$p) && same_path(t2, t2$p) && !(keep_last && Caml_obj.caml_equal(rem$p, /* [] */0))) { return rem$p; } else { @@ -47163,8 +47163,8 @@ function type_path_list(ppf, param) { if (!param) { return ; } - var match = param.hd; - var tp = match[0]; + let match = param.hd; + let tp = match[0]; if (param.tl) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -47193,20 +47193,20 @@ function type_path_list(ppf, param) { } function hide_variant_name(t) { - var t$1 = repr(t); - var row = t$1.desc; + let t$1 = repr(t); + let row = t$1.desc; if (typeof row === "number") { return t; } if (row.TAG !== /* Tvariant */8) { return t; } - var row$1 = row._0; + let row$1 = row._0; if (row_repr_aux(/* [] */0, row$1).row_name === undefined) { return t; } - var init = row_repr_aux(/* [] */0, row$1); - var level = row_more(row$1).level; + let init = row_repr_aux(/* [] */0, row$1); + let level = row_more(row$1).level; return newty2(t$1.level, { TAG: /* Tvariant */8, _0: { @@ -47224,8 +47224,8 @@ function hide_variant_name(t) { } function prepare_expansion(param) { - var t = param[0]; - var t$p = hide_variant_name(param[1]); + let t = param[0]; + let t$p = hide_variant_name(param[1]); mark_loops(t); if (!same_path(t, t$p)) { mark_loops(t$p); @@ -47237,9 +47237,9 @@ function prepare_expansion(param) { } function may_prepare_expansion(compact, param) { - var t$p = param[1]; - var t = param[0]; - var match = repr(t$p).desc; + let t$p = param[1]; + let t = param[0]; + let match = repr(t$p).desc; if (typeof match === "number") { return prepare_expansion([ t, @@ -47316,10 +47316,10 @@ function print_tags(ppf, fields) { } function has_explanation(unif, t3, t4) { - var match = t3.desc; - var match$1 = t4.desc; - var exit = 0; - var exit$1 = 0; + let match = t3.desc; + let match$1 = t4.desc; + let exit = 0; + let exit$1 = 0; if (typeof match === "number") { if (typeof match$1 === "number") { exit = 2; @@ -47349,8 +47349,8 @@ function has_explanation(unif, t3, t4) { } break; case /* Tfield */5 : - var match$2 = match._3.desc; - var exit$2 = 0; + let match$2 = match._3.desc; + let exit$2 = 0; if (typeof match$2 === "number" && typeof match$1 !== "number") { switch (match$1.TAG | 0) { case /* Tvar */0 : @@ -47360,7 +47360,7 @@ function has_explanation(unif, t3, t4) { exit$2 = 4; break; case /* Tfield */5 : - var match$3 = match$1._3.desc; + let match$3 = match$1._3.desc; if (typeof match$3 === "number") { return match._0 === match$1._0; } else { @@ -47429,11 +47429,11 @@ function mismatch(unif, param) { if (!param) { return ; } - var match = param.tl; + let match = param.tl; if (match) { - var t$p = match.hd[1]; - var t = param.hd[1]; - var m = mismatch(unif, match.tl); + let t$p = match.hd[1]; + let t = param.hd[1]; + let m = mismatch(unif, match.tl); if (m !== undefined) { return m; } else if (has_explanation(unif, t, t$p)) { @@ -47457,16 +47457,16 @@ function mismatch(unif, param) { function explanation(unif, mis, ppf) { if (mis !== undefined) { - var t3 = mis[0]; - var t4 = mis[1]; - var match = t3.desc; - var match$1 = t4.desc; - var exit = 0; - var exit$1 = 0; - var lab; - var exit$2 = 0; - var exit$3 = 0; - var exit$4 = 0; + let t3 = mis[0]; + let t4 = mis[1]; + let match = t3.desc; + let match$1 = t4.desc; + let exit = 0; + let exit$1 = 0; + let lab; + let exit$2 = 0; + let exit$3 = 0; + let exit$4 = 0; if (typeof match === "number") { if (typeof match$1 === "number") { return ; @@ -47495,7 +47495,7 @@ function explanation(unif, mis, ppf) { exit$1 = match$1._0 ? 5 : 3; break; case /* Tconstr */3 : - var p = match$1._0; + let p = match$1._0; if (unif && t3.level < binding_time(p)) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -47584,7 +47584,7 @@ function explanation(unif, mis, ppf) { } break; case /* Tconstr */3 : - var p$1 = match._0; + let p$1 = match._0; if (typeof match$1 === "number") { exit = 1; } else { @@ -47670,13 +47670,13 @@ function explanation(unif, mis, ppf) { exit$2 = 7; break; case /* Tvariant */8 : - var row1 = row_repr_aux(/* [] */0, match._0); - var row2 = row_repr_aux(/* [] */0, match$1._0); - var match$2 = row1.row_fields; - var match$3 = row1.row_closed; - var match$4 = row2.row_fields; - var match$5 = row2.row_closed; - var exit$5 = 0; + let row1 = row_repr_aux(/* [] */0, match._0); + let row2 = row_repr_aux(/* [] */0, match$1._0); + let match$2 = row1.row_fields; + let match$3 = row1.row_closed; + let match$4 = row2.row_fields; + let match$5 = row2.row_closed; + let exit$5 = 0; if (match$2) { if (match$2.tl || !match$3) { exit$5 = 10; @@ -47688,7 +47688,7 @@ function explanation(unif, mis, ppf) { if (!match$5) { return ; } - var l1 = match$2.hd[0]; + let l1 = match$2.hd[0]; if (l1 === match$4.hd[0]) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -47722,7 +47722,7 @@ function explanation(unif, mis, ppf) { exit$5 = 10; } } else if (match$3) { - var exit$6 = 0; + let exit$6 = 0; if (match$4) { exit$6 = 11; } else { @@ -47982,15 +47982,15 @@ function explanation(unif, mis, ppf) { _1: "@,The universal variable %a would escape its scope" }), type_expr$1, is_Tunivar(t3) ? t3 : t4); case 5 : - var match$6 = is_Tvar(t3) ? [ + let match$6 = is_Tvar(t3) ? [ t3, t4 ] : [ t4, t3 ]; - var t$p = match$6[1]; - var t = match$6[0]; + let t$p = match$6[1]; + let t = match$6[0]; if (occur_in(empty, t, t$p)) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -48169,7 +48169,7 @@ function explanation(unif, mis, ppf) { _1: "@,@[The %s object type has an abstract row, it cannot be closed@]" }), Caml_obj.caml_equal(t4.desc, /* Tnil */0) ? "first" : "second"); case 2 : - var exit$7 = 0; + let exit$7 = 0; if (typeof match === "number") { exit$7 = 3; } else { @@ -48178,16 +48178,16 @@ function explanation(unif, mis, ppf) { exit$7 = 3; break; case /* Tfield */5 : - var l = match._0; - var match$7 = match._3.desc; - var exit$8 = 0; + let l = match._0; + let match$7 = match._3.desc; + let exit$8 = 0; if (typeof match$7 === "number" && typeof match$1 !== "number") { switch (match$1.TAG | 0) { case /* Tconstr */3 : exit$8 = 4; break; case /* Tfield */5 : - var match$8 = match$1._3.desc; + let match$8 = match$1._3.desc; if (typeof match$8 === "number" && l === match$1._0) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -48224,7 +48224,7 @@ function explanation(unif, mis, ppf) { exit$8 = 4; } if (exit$8 === 4) { - var exit$9 = 0; + let exit$9 = 0; if (typeof match$1 === "number") { exit$9 = 5; } else { @@ -48323,14 +48323,14 @@ function explanation(unif, mis, ppf) { function path_same_name(_p1, _p2) { while(true) { - var p2 = _p2; - var p1 = _p1; + let p2 = _p2; + let p1 = _p1; switch (p1.TAG | 0) { case /* Pident */0 : switch (p2.TAG | 0) { case /* Pident */0 : - var id1 = p1._0; - var id2 = p2._0; + let id1 = p1._0; + let id2 = p2._0; if (equal(id1, id2) && !Caml_obj.caml_equal(id1, id2)) { add_unique(id1); return add_unique(id2); @@ -48374,8 +48374,8 @@ function path_same_name(_p1, _p2) { } function type_same_name(t1, t2) { - var match = repr(t1).desc; - var match$1 = repr(t2).desc; + let match = repr(t1).desc; + let match$1 = repr(t2).desc; if (typeof match === "number" || !(match.TAG === /* Tconstr */3 && !(typeof match$1 === "number" || match$1.TAG !== /* Tconstr */3))) { return ; } else { @@ -48385,16 +48385,16 @@ function type_same_name(t1, t2) { function trace_same_names(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var match = param.tl; + let match = param.tl; if (!match) { return ; } - var match$1 = match.hd; - var match$2 = param.hd; + let match$1 = match.hd; + let match$2 = param.hd; type_same_name(match$2[0], match$1[0]); type_same_name(match$2[1], match$1[1]); _param = match.tl; @@ -48403,28 +48403,28 @@ function trace_same_names(_param) { } function report_unification_error(ppf, env, unifOpt, tr, txt1, txt2) { - var unif = unifOpt !== undefined ? unifOpt : true; + let unif = unifOpt !== undefined ? unifOpt : true; wrap_printing_env(env, (function (param) { reset(undefined); trace_same_names(tr); - var tr$1 = Stdlib__List.map((function (param) { + let tr$1 = Stdlib__List.map((function (param) { return [ param[0], hide_variant_name(param[1]) ]; }), tr); - var mis = mismatch(unif, tr$1); + let mis = mismatch(unif, tr$1); if (tr$1) { - var match = tr$1.tl; + let match = tr$1.tl; if (match) { try { - var tr$2 = filter_trace(mis === undefined, match.tl); - var match$1 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), tr$1.hd); - var t1 = match$1[0]; - var match$2 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), match.hd); - var t2 = match$2[0]; + let tr$2 = filter_trace(mis === undefined, match.tl); + let match$1 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), tr$1.hd); + let t1 = match$1[0]; + let match$2 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), match.hd); + let t2 = match$2[0]; print_labels.contents = !classic.contents; - var tr$3 = Stdlib__List.map(prepare_expansion, tr$2); + let tr$3 = Stdlib__List.map(prepare_expansion, tr$2); Curry.app(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -48561,7 +48561,7 @@ function trace$1(fst, keep_last, txt, ppf, tr) { if (!tr) { return ; } - var match = tr.tl; + let match = tr.tl; if (match) { if (fst) { trace(fst, txt, ppf, { @@ -48595,8 +48595,8 @@ function class_type_declarations(env, cty1, cty2) { } function class_declarations(env, cty1, cty2) { - var match = cty1.cty_new; - var match$1 = cty2.cty_new; + let match = cty1.cty_new; + let match$1 = cty2.cty_new; if (match === undefined && match$1 !== undefined) { return { hd: /* CM_Virtual_class */0, @@ -48648,8 +48648,8 @@ function include_err(ppf, param) { }); })); case /* CM_Class_type_mismatch */2 : - var cty2 = param._2; - var cty1 = param._1; + let cty2 = param._2; + let cty1 = param._1; return wrap_printing_env(param._0, (function (param) { Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -48732,7 +48732,7 @@ function include_err(ppf, param) { }); })); case /* CM_Val_type_mismatch */4 : - var lab = param._0; + let lab = param._0; return report_unification_error(ppf, param._1, false, param._2, (function (ppf) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -48770,7 +48770,7 @@ function include_err(ppf, param) { }); })); case /* CM_Meth_type_mismatch */5 : - var lab$1 = param._0; + let lab$1 = param._0; return report_unification_error(ppf, param._1, false, param._2, (function (ppf) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -49072,7 +49072,7 @@ function report_error$3(ppf, param) { if (!param) { return ; } - var print_errs = function (ppf, errs) { + let print_errs = function (ppf, errs) { Stdlib__List.iter((function (err) { Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -49122,11 +49122,11 @@ function report_error$3(ppf, param) { }), include_err, param.hd, print_errs, param.tl); } -var Dont_match = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includecore.Dont_match"); +let Dont_match = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includecore.Dont_match"); function private_flags(decl1, decl2) { - var match = decl1.type_private; - var match$1 = decl2.type_private; + let match = decl1.type_private; + let match$1 = decl2.type_private; if (match || !match$1) { return true; } else if (Caml_obj.caml_equal(decl2.type_kind, /* Type_abstract */0)) { @@ -49141,7 +49141,7 @@ function private_flags(decl1, decl2) { } function is_absrow(env, ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return false; } @@ -49150,8 +49150,8 @@ function is_absrow(env, ty) { } switch (match._0.TAG | 0) { case /* Pident */0 : - var match$1 = expand_head(env, ty); - var match$2 = match$1.desc; + let match$1 = expand_head(env, ty); + let match$2 = match$1.desc; if (typeof match$2 === "number") { return false; } @@ -49170,17 +49170,17 @@ function is_absrow(env, ty) { } function type_manifest(env, ty1, params1, ty2, params2, priv2) { - var ty1$p = expand_head(env, ty1); - var ty2$p = expand_head(env, ty2); - var match = ty1$p.desc; - var match$1 = ty2$p.desc; + let ty1$p = expand_head(env, ty1); + let ty2$p = expand_head(env, ty2); + let match = ty1$p.desc; + let match$1 = ty2$p.desc; if (typeof match !== "number") { switch (match.TAG | 0) { case /* Tobject */4 : if (typeof match$1 !== "number" && match$1.TAG === /* Tobject */4) { - var fi2 = match$1._0; + let fi2 = match$1._0; if (is_absrow(env, flatten_fields(fi2)[1])) { - var match$2 = flatten_fields(fi2); + let match$2 = flatten_fields(fi2); if (!equal$5(env, true, { hd: ty1, tl: params1 @@ -49190,9 +49190,9 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { })) { return false; } - var match$3 = flatten_fields(match._0); - var match$4 = match$3[1].desc; - var tmp; + let match$3 = flatten_fields(match._0); + let match$4 = match$3[1].desc; + let tmp; if (typeof match$4 === "number") { tmp = true; } else { @@ -49208,11 +49208,11 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { if (!tmp) { return false; } - var match$5 = associate_fields(match$3[0], match$2[0]); + let match$5 = associate_fields(match$3[0], match$2[0]); if (!Caml_obj.caml_equal(match$5[2], /* [] */0)) { return false; } - var match$6 = Stdlib__List.split(Stdlib__List.map((function (param) { + let match$6 = Stdlib__List.split(Stdlib__List.map((function (param) { return [ param[2], param[4] @@ -49225,10 +49225,10 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { break; case /* Tvariant */8 : if (typeof match$1 !== "number" && match$1.TAG === /* Tvariant */8) { - var row2 = match$1._0; + let row2 = match$1._0; if (is_absrow(env, row_more(row2))) { - var row1 = row_repr_aux(/* [] */0, match._0); - var row2$1 = row_repr_aux(/* [] */0, row2); + let row1 = row_repr_aux(/* [] */0, match._0); + let row2$1 = row_repr_aux(/* [] */0, row2); if (!equal$5(env, true, { hd: ty1, tl: params1 @@ -49238,9 +49238,9 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { })) { return false; } - var match$7 = row1.row_more; - var match$8 = match$7.desc; - var tmp$1; + let match$7 = row1.row_more; + let match$8 = match$7.desc; + let tmp$1; if (typeof match$8 === "number") { tmp$1 = true; } else { @@ -49256,12 +49256,12 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { if (!tmp$1) { return false; } - var match$9 = merge_row_fields(row1.row_fields, row2$1.row_fields); + let match$9 = merge_row_fields(row1.row_fields, row2$1.row_fields); if (!(!row2$1.row_closed || row1.row_closed && Caml_obj.caml_equal(filter_row_fields(false, match$9[0]), /* [] */0))) { return false; } if (!Stdlib__List.for_all((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG !== /* Rpresent */0) { return true; } else { @@ -49270,12 +49270,12 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { }), match$9[1])) { return false; } - var to_equal = { + let to_equal = { contents: Stdlib__List.combine(params1, params2) }; if (!Stdlib__List.for_all((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); - var match$1 = row_field_repr_aux(/* [] */0, param[2]); + let match = row_field_repr_aux(/* [] */0, param[1]); + let match$1 = row_field_repr_aux(/* [] */0, param[2]); if (typeof match === "number") { if (typeof match$1 === "number" || match$1.TAG !== /* Rpresent */0) { return true; @@ -49284,7 +49284,7 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { } } if (match.TAG === /* Rpresent */0) { - var t1 = match._0; + let t1 = match._0; if (t1 === undefined) { if (typeof match$1 === "number") { return false; @@ -49296,12 +49296,12 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { return false; } } - var t2; + let t2; if (typeof match$1 === "number") { return false; } if (match$1.TAG === /* Rpresent */0) { - var t2$1 = match$1._0; + let t2$1 = match$1._0; if (t2$1 === undefined) { return false; } @@ -49310,7 +49310,7 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { if (match$1._0) { return false; } - var match$2 = match$1._1; + let match$2 = match$1._1; if (!match$2) { return false; } @@ -49328,14 +49328,14 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { }; return true; } - var tl1 = match._1; + let tl1 = match._1; if (typeof match$1 === "number") { return false; } if (match$1.TAG === /* Rpresent */0) { return false; } - var tl2 = match$1._1; + let tl2 = match$1._1; if (Stdlib__List.length(tl1) === Stdlib__List.length(tl2) && match._0 === match$1._0) { to_equal.contents = Stdlib.$at(Stdlib__List.combine(tl1, tl2), to_equal.contents); return true; @@ -49345,7 +49345,7 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { }), match$9[2])) { return false; } - var match$10 = Stdlib__List.split(to_equal.contents); + let match$10 = Stdlib__List.split(to_equal.contents); return equal$5(env, true, match$10[0], match$10[1]); } @@ -49355,7 +49355,7 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { } } - var check_super = function (ty1) { + let check_super = function (ty1) { if (equal$5(env, true, { hd: ty1, tl: params1 @@ -49372,7 +49372,7 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { return check_super(try_expand_once_opt(env, expand_head(env, ty1))); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { return false; } @@ -49621,9 +49621,9 @@ function report_type_mismatch(first, second, decl, ppf) { function compare_variants(env, decl1, decl2, _n, _cstrs1, _cstrs2) { while(true) { - var cstrs2 = _cstrs2; - var cstrs1 = _cstrs1; - var n = _n; + let cstrs2 = _cstrs2; + let cstrs1 = _cstrs1; + let n = _n; if (!cstrs1) { if (cstrs2) { return { @@ -49638,7 +49638,7 @@ function compare_variants(env, decl1, decl2, _n, _cstrs1, _cstrs2) { return /* [] */0; } } - var c = cstrs1.hd; + let c = cstrs1.hd; if (!cstrs2) { return { hd: { @@ -49649,13 +49649,13 @@ function compare_variants(env, decl1, decl2, _n, _cstrs1, _cstrs2) { tl: /* [] */0 }; } - var match = cstrs2.hd; - var ret2 = match.cd_res; - var arg2 = match.cd_args; - var cstr2 = match.cd_id; - var ret1 = c.cd_res; - var arg1 = c.cd_args; - var cstr1 = c.cd_id; + let match = cstrs2.hd; + let ret2 = match.cd_res; + let arg2 = match.cd_args; + let cstr2 = match.cd_id; + let ret1 = c.cd_res; + let arg1 = c.cd_args; + let cstr1 = c.cd_id; if (cstr1.name !== cstr2.name) { return { hd: { @@ -49737,9 +49737,9 @@ function compare_variants(env, decl1, decl2, _n, _cstrs1, _cstrs2) { function compare_records(env, decl1, decl2, _n, _labels1, _labels2) { while(true) { - var labels2 = _labels2; - var labels1 = _labels1; - var n = _n; + let labels2 = _labels2; + let labels1 = _labels1; + let n = _n; if (!labels1) { if (labels2) { return { @@ -49754,7 +49754,7 @@ function compare_records(env, decl1, decl2, _n, _labels1, _labels2) { return /* [] */0; } } - var l = labels1.hd; + let l = labels1.hd; if (!labels2) { return { hd: { @@ -49765,9 +49765,9 @@ function compare_records(env, decl1, decl2, _n, _labels1, _labels2) { tl: /* [] */0 }; } - var match = labels2.hd; - var lab2 = match.ld_id; - var lab1 = l.ld_id; + let match = labels2.hd; + let lab2 = match.ld_id; + let lab1 = l.ld_id; if (lab1.name !== lab2.name) { return { hd: { @@ -49811,7 +49811,7 @@ function compare_records(env, decl1, decl2, _n, _labels1, _labels2) { } function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { - var equality = equalityOpt !== undefined ? equalityOpt : false; + let equality = equalityOpt !== undefined ? equalityOpt : false; if (decl1.type_arity !== decl2.type_arity) { return { hd: /* Arity */0, @@ -49824,10 +49824,10 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { tl: /* [] */0 }; } - var match = decl1.type_kind; - var match$1 = decl2.type_kind; - var err; - var exit = 0; + let match = decl1.type_kind; + let match$1 = decl2.type_kind; + let err; + let exit = 0; if (typeof match$1 === "number" && !match$1) { err = /* [] */0; } else { @@ -49846,8 +49846,8 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { tl: /* [] */0 }; } else { - var rep2 = match$1._1; - var err$1 = compare_records(env, decl1, decl2, 1, match._0, match$1._0); + let rep2 = match$1._1; + let err$1 = compare_records(env, decl1, decl2, 1, match._0, match$1._0); err = Caml_obj.caml_notequal(err$1, /* [] */0) || match._1 === rep2 ? err$1 : ({ hd: { TAG: /* Record_representation */5, @@ -49857,20 +49857,20 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { }); } } else { - var cstrs1 = match._0; + let cstrs1 = match._0; if (typeof match$1 === "number" || match$1.TAG === /* Type_record */0) { err = { hd: /* Kind */2, tl: /* [] */0 }; } else { - var cstrs2 = match$1._0; - var mark = function (cstrs, usage, name, decl) { + let cstrs2 = match$1._0; + let mark = function (cstrs, usage, name, decl) { Stdlib__List.iter((function (c) { mark_constructor_used(usage, env, name, decl, c.cd_id.name); }), cstrs); }; - var usage = decl1.type_private === /* Private */0 || decl2.type_private === /* Public */1 ? /* Positive */0 : /* Privatize */2; + let usage = decl1.type_private === /* Private */0 || decl2.type_private === /* Public */1 ? /* Positive */0 : /* Privatize */2; mark(cstrs1, usage, name, decl1); if (equality) { mark(cstrs2, /* Positive */0, id.name, decl2); @@ -49882,9 +49882,9 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { if (Caml_obj.caml_notequal(err, /* [] */0)) { return err; } - var match$2 = decl1.type_manifest; - var match$3 = decl2.type_manifest; - var err$2; + let match$2 = decl1.type_manifest; + let match$3 = decl2.type_manifest; + let err$2; if (match$3 !== undefined) { if (match$2 !== undefined) { err$2 = type_manifest(env, match$2, decl1.type_params, match$3, decl2.type_params, decl2.type_private) ? /* [] */0 : ({ @@ -49892,7 +49892,7 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { tl: /* [] */0 }); } else { - var ty1 = newty2(100000000, { + let ty1 = newty2(100000000, { TAG: /* Tconstr */3, _0: { TAG: /* Pident */0, @@ -49928,17 +49928,17 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { if (Caml_obj.caml_notequal(err$2, /* [] */0)) { return err$2; } - var abstr = decl2.type_private === /* Private */0 || Caml_obj.caml_equal(decl2.type_kind, /* Type_abstract */0) && decl2.type_manifest === undefined; - var opn = Caml_obj.caml_equal(decl2.type_kind, /* Type_open */1) && decl2.type_manifest === undefined; + let abstr = decl2.type_private === /* Private */0 || Caml_obj.caml_equal(decl2.type_kind, /* Type_abstract */0) && decl2.type_manifest === undefined; + let opn = Caml_obj.caml_equal(decl2.type_kind, /* Type_open */1) && decl2.type_manifest === undefined; if (Stdlib__List.for_all2((function (ty, param) { - var v2 = param[1]; - var v1 = param[0]; - var match = Curry._1(Types_Variance.get_upper, v1); - var cn1 = match[1]; - var co1 = match[0]; - var match$1 = Curry._1(Types_Variance.get_upper, v2); - var cn2 = match$1[1]; - var co2 = match$1[0]; + let v2 = param[1]; + let v1 = param[0]; + let match = Curry._1(Types_Variance.get_upper, v1); + let cn1 = match[1]; + let co1 = match[0]; + let match$1 = Curry._1(Types_Variance.get_upper, v2); + let cn2 = match$1[1]; + let co2 = match$1[0]; if (!( abstr ? (!co1 || co2) && (!cn1 || cn2) : ( opn || !is_Tvar(repr(ty)) ? co1 === co2 && cn1 === cn2 : true @@ -49946,8 +49946,8 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { )) { return false; } - var match$2 = Curry._1(Types_Variance.get_lower, v1); - var match$3 = Curry._1(Types_Variance.get_lower, v2); + let match$2 = Curry._1(Types_Variance.get_lower, v1); + let match$3 = Curry._1(Types_Variance.get_lower, v2); return abstr ? ( (!match$3[0] || match$2[0]) && (!match$3[1] || match$2[1]) && (!match$3[2] || match$2[2]) ? ( match$3[3] ? match$2[3] : true @@ -49964,9 +49964,9 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { } function extension_constructors(env, id, ext1, ext2) { - var usage = ext1.ext_private === /* Private */0 || ext2.ext_private === /* Public */1 ? /* Positive */0 : /* Privatize */2; + let usage = ext1.ext_private === /* Private */0 || ext2.ext_private === /* Public */1 ? /* Positive */0 : /* Privatize */2; mark_extension_used(usage, env, ext1, id.name); - var ty1 = newty2(100000000, { + let ty1 = newty2(100000000, { TAG: /* Tconstr */3, _0: ext1.ext_type_path, _1: ext1.ext_type_params, @@ -49974,7 +49974,7 @@ function extension_constructors(env, id, ext1, ext2) { contents: /* Mnil */0 } }); - var ty2 = newty2(100000000, { + let ty2 = newty2(100000000, { TAG: /* Tconstr */3, _0: ext2.ext_type_path, _1: ext2.ext_type_params, @@ -49994,10 +49994,10 @@ function extension_constructors(env, id, ext1, ext2) { if (Stdlib__List.length(ext1.ext_args) !== Stdlib__List.length(ext2.ext_args)) { return false; } - var match = ext1.ext_ret_type; - var match$1 = ext2.ext_ret_type; - var tmp; - var exit = 0; + let match = ext1.ext_ret_type; + let match$1 = ext2.ext_ret_type; + let tmp; + let exit = 0; if (match !== undefined) { if (match$1 !== undefined && equal$5(env, true, { hd: match, @@ -50029,8 +50029,8 @@ function extension_constructors(env, id, ext1, ext2) { if (!tmp) { return false; } - var match$2 = ext1.ext_private; - var match$3 = ext2.ext_private; + let match$2 = ext1.ext_private; + let match$3 = ext2.ext_private; if (match$2 || !match$3) { return true; } else { @@ -50046,7 +50046,7 @@ function scrape(env, mty) { return scrape(env, find_modtype_expansion(mty._0, env)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return mty; } @@ -50055,7 +50055,7 @@ function scrape(env, mty) { } function strengthen$1(env, mty, p) { - var sg = scrape(env, mty); + let sg = scrape(env, mty); switch (sg.TAG | 0) { case /* Mty_signature */1 : return { @@ -50063,7 +50063,7 @@ function strengthen$1(env, mty, p) { _0: strengthen_sig(env, sg._0, p) }; case /* Mty_functor */2 : - var param = sg._0; + let param = sg._0; if (applicative_functors.contents && param.name !== "*") { return { TAG: /* Mty_functor */2, @@ -50092,23 +50092,23 @@ function strengthen_sig(env, sg, p) { if (!sg) { return /* [] */0; } - var sigelt = sg.hd; + let sigelt = sg.hd; switch (sigelt.TAG | 0) { case /* Sig_type */1 : - var decl = sigelt._1; - var id = sigelt._0; - var match = decl.type_manifest; - var match$1 = decl.type_private; - var match$2 = decl.type_kind; - var newdecl; - var exit = 0; + let decl = sigelt._1; + let id = sigelt._0; + let match = decl.type_manifest; + let match$1 = decl.type_private; + let match$2 = decl.type_kind; + let newdecl; + let exit = 0; if (match !== undefined && (match$1 || typeof match$2 !== "number")) { newdecl = decl; } else { exit = 1; } if (exit === 1) { - var manif = newty2(100000000, { + let manif = newty2(100000000, { TAG: /* Tconstr */3, _0: { TAG: /* Pdot */1, @@ -50153,9 +50153,9 @@ function strengthen_sig(env, sg, p) { tl: strengthen_sig(env, sg.tl, p) }; case /* Sig_module */3 : - var md = sigelt._1; - var id$1 = sigelt._0; - var str = strengthen_decl(env, md, { + let md = sigelt._1; + let id$1 = sigelt._0; + let str = strengthen_decl(env, md, { TAG: /* Pdot */1, _0: p, _1: id$1.name, @@ -50171,10 +50171,10 @@ function strengthen_sig(env, sg, p) { tl: strengthen_sig(add_module_declaration(undefined, id$1, md, env), sg.tl, p) }; case /* Sig_modtype */4 : - var decl$1 = sigelt._1; - var id$2 = sigelt._0; - var match$3 = decl$1.mtd_type; - var newdecl$1 = match$3 !== undefined ? decl$1 : ({ + let decl$1 = sigelt._1; + let id$2 = sigelt._0; + let match$3 = decl$1.mtd_type; + let newdecl$1 = match$3 !== undefined ? decl$1 : ({ mtd_type: { TAG: /* Mty_ident */0, _0: { @@ -50214,12 +50214,12 @@ function strengthen_decl(env, md, p) { strengthen.contents = strengthen$1; function nondep_supertype(env, mid, mty) { - var nondep_mty = function (env, va, _mty) { + let nondep_mty = function (env, va, _mty) { while(true) { - var mty = _mty; + let mty = _mty; switch (mty.TAG | 0) { case /* Mty_ident */0 : - var p = mty._0; + let p = mty._0; if (!isfree(mid, p)) { return mty; } @@ -50231,9 +50231,9 @@ function nondep_supertype(env, mid, mty) { _0: nondep_sig(env, va, mty._0) }; case /* Mty_functor */2 : - var arg = mty._1; - var param = mty._0; - var var_inv; + let arg = mty._1; + let param = mty._0; + let var_inv; switch (va) { case /* Co */0 : var_inv = /* Contra */1; @@ -50260,7 +50260,7 @@ function nondep_supertype(env, mid, mty) { }), env), va, mty._2) }; case /* Mty_alias */3 : - var p$1 = mty._0; + let p$1 = mty._0; if (!isfree(mid, p$1)) { return mty; } @@ -50270,15 +50270,15 @@ function nondep_supertype(env, mid, mty) { } }; }; - var nondep_sig = function (env, va, param) { + let nondep_sig = function (env, va, param) { if (!param) { return /* [] */0; } - var item = param.hd; - var rem$p = nondep_sig(env, va, param.tl); + let item = param.hd; + let rem$p = nondep_sig(env, va, param.tl); switch (item.TAG | 0) { case /* Sig_value */0 : - var d = item._1; + let d = item._1; return { hd: { TAG: /* Sig_value */0, @@ -50293,7 +50293,7 @@ function nondep_supertype(env, mid, mty) { tl: rem$p }; case /* Sig_type */1 : - var id = item._0; + let id = item._0; return { hd: { TAG: /* Sig_type */1, @@ -50314,7 +50314,7 @@ function nondep_supertype(env, mid, mty) { tl: rem$p }; case /* Sig_module */3 : - var md = item._1; + let md = item._1; return { hd: { TAG: /* Sig_module */3, @@ -50329,7 +50329,7 @@ function nondep_supertype(env, mid, mty) { tl: rem$p }; case /* Sig_modtype */4 : - var id$1 = item._0; + let id$1 = item._0; try { return { hd: { @@ -50341,7 +50341,7 @@ function nondep_supertype(env, mid, mty) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { if (va) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -50386,7 +50386,7 @@ function nondep_supertype(env, mid, mty) { } }; - var nondep_modtype_decl = function (env, mtd) { + let nondep_modtype_decl = function (env, mtd) { return { mtd_type: may_map((function (param) { return nondep_mty(env, /* Strict */2, param); @@ -50399,12 +50399,12 @@ function nondep_supertype(env, mid, mty) { } function enrich_typedecl(env, p, decl) { - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty !== undefined) { return decl; } try { - var orig_decl = find_type_full(p, env)[0]; + let orig_decl = find_type_full(p, env)[0]; if (orig_decl.type_arity !== decl.type_arity) { return decl; } else { @@ -50429,7 +50429,7 @@ function enrich_typedecl(env, p, decl) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return decl; } @@ -50444,7 +50444,7 @@ function enrich_modtype(env, p, mty) { _0: Stdlib__List.map((function (param) { switch (param.TAG | 0) { case /* Sig_type */1 : - var id = param._0; + let id = param._0; return { TAG: /* Sig_type */1, _0: id, @@ -50457,8 +50457,8 @@ function enrich_modtype(env, p, mty) { _2: param._2 }; case /* Sig_module */3 : - var md = param._1; - var id$1 = param._0; + let md = param._1; + let id$1 = param._0; return { TAG: /* Sig_module */3, _0: id$1, @@ -50485,7 +50485,7 @@ function enrich_modtype(env, p, mty) { } function type_paths(env, p, mty) { - var p$1 = scrape(env, mty); + let p$1 = scrape(env, mty); if (p$1.TAG === /* Mty_signature */1) { return type_paths_sig(env, p, 0, p$1._0); } else { @@ -50495,17 +50495,17 @@ function type_paths(env, p, mty) { function type_paths_sig(_env, p, _pos, _sg) { while(true) { - var sg = _sg; - var pos = _pos; - var env = _env; + let sg = _sg; + let pos = _pos; + let env = _env; if (!sg) { return /* [] */0; } - var match = sg.hd; + let match = sg.hd; switch (match.TAG | 0) { case /* Sig_value */0 : - var match$1 = match._1.val_kind; - var pos$p; + let match$1 = match._1.val_kind; + let pos$p; pos$p = typeof match$1 === "number" || match$1.TAG !== /* Val_prim */0 ? pos + 1 | 0 : pos; _sg = sg.tl; _pos = pos$p; @@ -50521,8 +50521,8 @@ function type_paths_sig(_env, p, _pos, _sg) { tl: type_paths_sig(env, p, pos, sg.tl) }; case /* Sig_module */3 : - var md = match._1; - var id = match._0; + let md = match._1; + let id = match._0; return Stdlib.$at(type_paths(env, { TAG: /* Pdot */1, _0: p, @@ -50549,11 +50549,11 @@ function type_paths_sig(_env, p, _pos, _sg) { function contains_type(env, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Mty_ident */0 : try { - var mty = find_modtype(param._0, env).mtd_type; + let mty = find_modtype(param._0, env).mtd_type; if (mty !== undefined) { return contains_type(env, mty); } @@ -50562,7 +50562,7 @@ function contains_type(env, _param) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit @@ -50587,8 +50587,8 @@ function contains_type_sig(env) { return Stdlib__List.iter((function (param) { switch (param.TAG | 0) { case /* Sig_type */1 : - var match = param._1; - var match$1 = match.type_kind; + let match = param._1; + let match$1 = match.type_kind; if (match.type_manifest !== undefined) { if (typeof match$1 !== "number") { return ; @@ -50625,7 +50625,7 @@ function contains_type$1(env, mty) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return true; } @@ -50641,7 +50641,7 @@ function compare$5(p1, p2) { } } -var P = { +let P = { compare: compare$5 }; @@ -50654,8 +50654,8 @@ function height$7(param) { } function create$8(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -50665,13 +50665,13 @@ function create$8(l, v, r) { } function bal$7(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$7(ll) >= height$7(lr)) { return create$8(ll, lv, create$8(lr, v, r)); } @@ -50697,9 +50697,9 @@ function bal$7(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$7(rr) >= height$7(rl)) { return create$8(create$8(l, v, rl), rv, rr); } @@ -50726,22 +50726,22 @@ function add$9(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(P.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(P.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$9(x, l); + let ll = add$9(x, l); if (l === ll) { return t; } else { return bal$7(ll, v, r); } } - var rr = add$9(x, r); + let rr = add$9(x, r); if (r === rr) { return t; } else { @@ -50781,8 +50781,8 @@ function join$3(l, v, r) { if (!r) { return add_max_element$2(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$7(l.l, l.v, join$3(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -50800,10 +50800,10 @@ function split$3(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(P.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(P.compare, x, v); if (c === 0) { return [ l, @@ -50812,14 +50812,14 @@ function split$3(x, param) { ]; } if (c < 0) { - var match = split$3(x, l); + let match = split$3(x, l); return [ match[0], match[1], join$3(match[2], v, r) ]; } - var match$1 = split$3(x, r); + let match$1 = split$3(x, r); return [ join$3(l, v, match$1[0]), match$1[1], @@ -50834,28 +50834,28 @@ function union$4(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add$9(v2, s1); } - var match = split$3(v1, s2); + let match = split$3(v1, s2); return join$3(union$4(s1.l, match[0]), v1, union$4(s1.r, match[2])); } if (h1 === 1) { return add$9(v1, s2); } - var match$1 = split$3(v2, s1); + let match$1 = split$3(v2, s1); return join$3(union$4(match$1[0], s2.l), v2, union$4(match$1[2], s2.r)); } function fold$6(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -50874,8 +50874,8 @@ function height$8(param) { } function create$9(l, x, d, r) { - var hl = height$8(l); - var hr = height$8(r); + let hl = height$8(l); + let hr = height$8(r); return /* Node */{ l: l, v: x, @@ -50886,14 +50886,14 @@ function create$9(l, x, d, r) { } function bal$8(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$8(ll) >= height$8(lr)) { return create$9(ll, lv, ld, create$9(lr, x, d, r)); } @@ -50920,10 +50920,10 @@ function bal$8(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$8(rr) >= height$8(rl)) { return create$9(create$9(l, x, d, rl), rv, rd, rr); } @@ -50951,11 +50951,11 @@ function add$10(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(P.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(P.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -50970,14 +50970,14 @@ function add$10(x, data, m) { } } if (c < 0) { - var ll = add$10(x, data, l); + let ll = add$10(x, data, l); if (l === ll) { return m; } else { return bal$8(ll, v, d, r); } } - var rr = add$10(x, data, r); + let rr = add$10(x, data, r); if (r === rr) { return m; } else { @@ -50987,9 +50987,9 @@ function add$10(x, data, m) { function find$5(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(P.compare, x, param.v); + let c = Curry._2(P.compare, x, param.v); if (c === 0) { return param.d; } @@ -51002,9 +51002,9 @@ function find$5(x, _param) { }; } -var compare$6 = Caml_obj.caml_compare; +let compare$6 = Caml_obj.caml_compare; -var funarg$4 = { +let funarg$4 = { compare: compare$6 }; @@ -51017,8 +51017,8 @@ function height$9(param) { } function create$10(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -51028,13 +51028,13 @@ function create$10(l, v, r) { } function bal$9(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$9(ll) >= height$9(lr)) { return create$10(ll, lv, create$10(lr, v, r)); } @@ -51060,9 +51060,9 @@ function bal$9(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$9(rr) >= height$9(rl)) { return create$10(create$10(l, v, rl), rv, rr); } @@ -51089,22 +51089,22 @@ function add$11(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$4.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$4.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$11(x, l); + let ll = add$11(x, l); if (l === ll) { return t; } else { return bal$9(ll, v, r); } } - var rr = add$11(x, r); + let rr = add$11(x, r); if (r === rr) { return t; } else { @@ -51144,8 +51144,8 @@ function join$4(l, v, r) { if (!r) { return add_max_element$3(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$9(l.l, l.v, join$4(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -51163,10 +51163,10 @@ function split$4(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg$4.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg$4.compare, x, v); if (c === 0) { return [ l, @@ -51175,14 +51175,14 @@ function split$4(x, param) { ]; } if (c < 0) { - var match = split$4(x, l); + let match = split$4(x, l); return [ match[0], match[1], join$4(match[2], v, r) ]; } - var match$1 = split$4(x, r); + let match$1 = split$4(x, r); return [ join$4(l, v, match$1[0]), match$1[1], @@ -51192,11 +51192,11 @@ function split$4(x, param) { function mem$5(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$4.compare, x, param.v); + let c = Curry._2(funarg$4.compare, x, param.v); if (c === 0) { return true; } @@ -51212,21 +51212,21 @@ function union$5(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add$11(v2, s1); } - var match = split$4(v1, s2); + let match = split$4(v1, s2); return join$4(union$5(s1.l, match[0]), v1, union$5(s1.r, match[2])); } if (h1 === 1) { return add$11(v1, s2); } - var match$1 = split$4(v2, s1); + let match$1 = split$4(v2, s1); return join$4(union$5(match$1[0], s2.l), v2, union$5(match$1[2], s2.r)); } @@ -51239,13 +51239,13 @@ function get_prefixes(param) { break; } - var p = param._0; + let p = param._0; return Curry._2(add$9, p, get_prefixes(p)); } function get_arg_paths(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Pident */0 : return /* Empty */0; @@ -51253,7 +51253,7 @@ function get_arg_paths(_param) { _param = param._0; continue ; case /* Papply */2 : - var p2 = param._1; + let p2 = param._1; return Curry._2(add$9, p2, Curry._2(union$4, get_prefixes(p2), Curry._2(union$4, get_arg_paths(param._0), get_arg_paths(p2)))); } @@ -51262,7 +51262,7 @@ function get_arg_paths(_param) { function rollback_path(subst, _p) { while(true) { - var p = _p; + let p = _p; try { return { TAG: /* Pident */0, @@ -51270,12 +51270,12 @@ function rollback_path(subst, _p) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { switch (p.TAG | 0) { case /* Pdot */1 : - var p1 = p._0; - var p1$p = rollback_path(subst, p1); + let p1 = p._0; + let p1$p = rollback_path(subst, p1); if (same(p1, p1$p)) { return p; } @@ -51299,16 +51299,16 @@ function rollback_path(subst, _p) { } function collect_ids(subst, bindings, p) { - var id = rollback_path(subst, p); + let id = rollback_path(subst, p); switch (id.TAG | 0) { case /* Pident */0 : - var id$1 = id._0; - var ids; + let id$1 = id._0; + let ids; try { ids = collect_ids(subst, bindings, find_same(id$1, bindings)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { ids = /* Empty */0; } else { @@ -51324,32 +51324,32 @@ function collect_ids(subst, bindings, p) { } function collect_arg_paths(mty) { - var paths = { + let paths = { contents: /* Empty */0 }; - var subst = { + let subst = { contents: /* Empty */0 }; - var bindings = { + let bindings = { contents: /* Empty */0 }; - var it_path = function (p) { + let it_path = function (p) { paths.contents = Curry._2(union$4, get_arg_paths(p), paths.contents); }; - var it_signature_item$1 = function (it, si) { + let it_signature_item$1 = function (it, si) { it_signature_item(it, si); if (si.TAG !== /* Sig_module */3) { return ; } - var p = si._1.md_type; - var id = si._0; + let p = si._1.md_type; + let id = si._0; switch (p.TAG | 0) { case /* Mty_signature */1 : return Stdlib__List.iter((function (param) { if (param.TAG !== /* Sig_module */3) { return ; } - var id$p = param._0; + let id$p = param._0; subst.contents = Curry._3(add$10, { TAG: /* Pdot */1, _0: { @@ -51369,7 +51369,7 @@ function collect_arg_paths(mty) { } }; - var it = { + let it = { it_signature: it_signature, it_signature_item: it_signature_item$1, it_value_description: it_value_description, @@ -51395,7 +51395,7 @@ function collect_arg_paths(mty) { function remove_aliases(env, excl, _mty) { while(true) { - var mty = _mty; + let mty = _mty; switch (mty.TAG | 0) { case /* Mty_signature */1 : return { @@ -51406,7 +51406,7 @@ function remove_aliases(env, excl, _mty) { case /* Mty_functor */2 : return mty; case /* Mty_alias */3 : - var mty$p = scrape_alias(env, undefined, mty); + let mty$p = scrape_alias(env, undefined, mty); if (Caml_obj.caml_equal(mty$p, mty)) { return mty; } @@ -51421,13 +51421,13 @@ function remove_aliases_sig(env, excl, sg) { if (!sg) { return /* [] */0; } - var it = sg.hd; + let it = sg.hd; switch (it.TAG | 0) { case /* Sig_module */3 : - var md = it._1; - var id = it._0; - var mty = md.md_type; - var mty$1; + let md = it._1; + let id = it._0; + let mty = md.md_type; + let mty$1; mty$1 = mty.TAG === /* Mty_alias */3 && Curry._2(mem$5, id, excl) ? md.md_type : remove_aliases(env, excl, mty); return { hd: { @@ -51443,8 +51443,8 @@ function remove_aliases_sig(env, excl, sg) { tl: remove_aliases_sig(add_module$1(undefined, id, mty$1, env), excl, sg.tl) }; case /* Sig_modtype */4 : - var mtd = it._1; - var id$1 = it._0; + let mtd = it._1; + let id$1 = it._0; return { hd: { TAG: /* Sig_modtype */4, @@ -51462,22 +51462,22 @@ function remove_aliases_sig(env, excl, sg) { } function remove_aliases$1(env, sg) { - var excl = collect_arg_paths(sg); + let excl = collect_arg_paths(sg); return remove_aliases(env, excl, sg); } -var $$Error$5 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includemod.Error"); +let $$Error$5 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includemod.Error"); function value_descriptions(env, cxt, subst, id, vd1, vd2) { record_value_dependency(vd1, vd2); mark_value_used(env, id.name, vd1); - var vd2$1 = value_description(subst, vd2); + let vd2$1 = value_description(subst, vd2); try { if (moregeneral(env, true, vd1.val_type, vd2$1.val_type)) { - var match = vd1.val_kind; - var match$1 = vd2$1.val_kind; + let match = vd1.val_kind; + let match$1 = vd2$1.val_kind; if (typeof match !== "number" && match.TAG === /* Val_prim */0) { - var p1 = match._0; + let p1 = match._0; if (typeof match$1 === "number") { return { TAG: /* Tcoerce_primitive */2, @@ -51515,7 +51515,7 @@ function value_descriptions(env, cxt, subst, id, vd1, vd2) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Dont_match) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -51539,10 +51539,10 @@ function value_descriptions(env, cxt, subst, id, vd1, vd2) { } function type_declarations$2(env, old_envOpt, cxt, subst, id, decl1, decl2) { - var old_env = old_envOpt !== undefined ? Caml_option.valFromOption(old_envOpt) : env; + let old_env = old_envOpt !== undefined ? Caml_option.valFromOption(old_envOpt) : env; mark_type_used(env, id.name, decl1); - var decl2$1 = type_declaration(subst, decl2); - var err = type_declarations$1(undefined, env, id.name, decl1, id, decl2$1); + let decl2$1 = type_declaration(subst, decl2); + let err = type_declarations$1(undefined, env, id.name, decl1, id, decl2$1); if (!Caml_obj.caml_notequal(err, /* [] */0)) { return ; } @@ -51566,7 +51566,7 @@ function type_declarations$2(env, old_envOpt, cxt, subst, id, decl1, decl2) { } function extension_constructors$1(env, cxt, subst, id, ext1, ext2) { - var ext2$1 = extension_constructor(subst, ext2); + let ext2$1 = extension_constructor(subst, ext2); if (extension_constructors(env, id, ext1, ext2$1)) { return ; } @@ -51589,8 +51589,8 @@ function extension_constructors$1(env, cxt, subst, id, ext1, ext2) { } function class_type_declarations$1(old_env, env, cxt, subst, id, decl1, decl2) { - var decl2$1 = cltype_declaration(subst, decl2); - var reason = class_type_declarations(env, decl1, decl2$1); + let decl2$1 = cltype_declaration(subst, decl2); + let reason = class_type_declarations(env, decl1, decl2$1); if (!reason) { return ; } @@ -51614,8 +51614,8 @@ function class_type_declarations$1(old_env, env, cxt, subst, id, decl1, decl2) { } function class_declarations$1(old_env, env, cxt, subst, id, decl1, decl2) { - var decl2$1 = class_declaration(subst, decl2); - var reason = class_declarations(env, decl1, decl2$1); + let decl2$1 = class_declaration(subst, decl2); + let reason = class_declarations(env, decl1, decl2$1); if (!reason) { return ; } @@ -51638,7 +51638,7 @@ function class_declarations$1(old_env, env, cxt, subst, id, decl1, decl2) { }); } -var Dont_match$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includemod.Dont_match"); +let Dont_match$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Includemod.Dont_match"); function may_expand_module_path(env, path) { try { @@ -51646,7 +51646,7 @@ function may_expand_module_path(env, path) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return false; } @@ -51659,7 +51659,7 @@ function expand_module_path(env, cxt, path) { return find_modtype_expansion(path, env); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -51685,7 +51685,7 @@ function expand_module_alias(env, cxt, path) { return find_module(false, path, env).md_type; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -51729,7 +51729,7 @@ function kind_of_field_desc(param) { function item_ident_name(param) { switch (param.TAG | 0) { case /* Sig_value */0 : - var id = param._0; + let id = param._0; return [ id, param._1.val_loc, @@ -51739,7 +51739,7 @@ function item_ident_name(param) { } ]; case /* Sig_type */1 : - var id$1 = param._0; + let id$1 = param._0; return [ id$1, param._1.type_loc, @@ -51749,7 +51749,7 @@ function item_ident_name(param) { } ]; case /* Sig_typext */2 : - var id$2 = param._0; + let id$2 = param._0; return [ id$2, param._1.ext_loc, @@ -51759,7 +51759,7 @@ function item_ident_name(param) { } ]; case /* Sig_module */3 : - var id$3 = param._0; + let id$3 = param._0; return [ id$3, param._1.md_loc, @@ -51769,7 +51769,7 @@ function item_ident_name(param) { } ]; case /* Sig_modtype */4 : - var id$4 = param._0; + let id$4 = param._0; return [ id$4, param._1.mtd_loc, @@ -51779,7 +51779,7 @@ function item_ident_name(param) { } ]; case /* Sig_class */5 : - var id$5 = param._0; + let id$5 = param._0; return [ id$5, param._1.cty_loc, @@ -51789,7 +51789,7 @@ function item_ident_name(param) { } ]; case /* Sig_class_type */6 : - var id$6 = param._0; + let id$6 = param._0; return [ id$6, param._1.clty_loc, @@ -51805,7 +51805,7 @@ function item_ident_name(param) { function is_runtime_component(param) { switch (param.TAG | 0) { case /* Sig_value */0 : - var tmp = param._1.val_kind; + let tmp = param._1.val_kind; if (typeof tmp === "number" || tmp.TAG !== /* Val_prim */0) { return true; } else { @@ -51825,7 +51825,7 @@ function modtypes(env, cxt, subst, mty1, mty2) { return try_modtypes(env, cxt, subst, mty1, mty2); } catch (raw_err){ - var err = Caml_js_exceptions.internalToOCamlException(raw_err); + let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.MEL_EXN_ID === Dont_match$1) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -51872,10 +51872,10 @@ function modtypes(env, cxt, subst, mty1, mty2) { function try_modtypes(env, cxt, subst, _mty1, mty2) { while(true) { - var mty1 = _mty1; + let mty1 = _mty1; switch (mty1.TAG | 0) { case /* Mty_ident */0 : - var p1 = mty1._0; + let p1 = mty1._0; if (may_expand_module_path(env, p1)) { _mty1 = expand_module_path(env, cxt, p1); continue ; @@ -51896,24 +51896,24 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { } break; case /* Mty_functor */2 : - var arg1 = mty1._1; - var param1 = mty1._0; + let arg1 = mty1._1; + let param1 = mty1._0; if (arg1 !== undefined) { switch (mty2.TAG | 0) { case /* Mty_ident */0 : break; case /* Mty_functor */2 : - var arg2 = mty2._1; + let arg2 = mty2._1; if (arg2 !== undefined) { - var arg2$p = modtype(subst, arg2); - var cc_arg = modtypes(env, { + let arg2$p = modtype(subst, arg2); + let cc_arg = modtypes(env, { hd: { TAG: /* Arg */2, _0: param1 }, tl: cxt }, identity, arg2$p, arg1); - var cc_res = modtypes(add_module$1(undefined, param1, arg2$p, env), { + let cc_res = modtypes(add_module$1(undefined, param1, arg2$p, env), { hd: { TAG: /* Body */3, _0: param1 @@ -51953,7 +51953,7 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { MEL_EXN_ID: Dont_match$1 }); } - var cc = modtypes(env, { + let cc = modtypes(env, { hd: { TAG: /* Body */3, _0: param1 @@ -51979,9 +51979,9 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { } break; case /* Mty_alias */3 : - var p1$1 = mty1._0; + let p1$1 = mty1._0; if (mty2.TAG === /* Mty_alias */3) { - var p2 = mty2._0; + let p2 = mty2._0; if (is_functor_arg(p2, env)) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -52001,8 +52001,8 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { if (same(p1$1, p2)) { return /* Tcoerce_none */0; } - var p1$2 = normalize_path$1(undefined, env, p1$1); - var p2$1 = normalize_path$1(undefined, env, module_path(subst, p2)); + let p1$2 = normalize_path$1(undefined, env, p1$1); + let p2$1 = normalize_path$1(undefined, env, module_path(subst, p2)); if (same(p1$2, p2$1)) { return /* Tcoerce_none */0; } @@ -52010,14 +52010,14 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { MEL_EXN_ID: Dont_match$1 }); } - var p1$3; + let p1$3; try { p1$3 = normalize_path$1(none, env, p1$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$2) { - var match = exn._1; + let match = exn._1; if (match.TAG === /* Missing_module */3) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -52038,7 +52038,7 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var mty1$1 = strengthen$1(env, expand_module_alias(env, cxt, p1$3), p1$3); + let mty1$1 = strengthen$1(env, expand_module_alias(env, cxt, p1$3), p1$3); return { TAG: /* Tcoerce_alias */3, _0: p1$3, @@ -52047,7 +52047,7 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { } if (mty2.TAG === /* Mty_ident */0) { - var mty2$1 = modtype(subst, mty2); + let mty2$1 = modtype(subst, mty2); if (mty1.TAG === /* Mty_ident */0) { if (mty2$1.TAG === /* Mty_ident */0) { if (same(mty1._0, mty2$1._0)) { @@ -52084,10 +52084,10 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { } function signatures(env, cxt, subst, sig1, sig2) { - var new_env = add_signature(sig1, in_signature(env)); - var match = Stdlib__List.fold_left((function (param, item) { - var pos = param[1]; - var l = param[0]; + let new_env = add_signature(sig1, in_signature(env)); + let match = Stdlib__List.fold_left((function (param, item) { + let pos = param[1]; + let l = param[0]; if (item.TAG === /* Sig_module */3) { return [ { @@ -52110,21 +52110,21 @@ function signatures(env, cxt, subst, sig1, sig2) { /* [] */0, 0 ], sig1); - var id_pos_list = match[0]; - var build_component_table = function (_pos, _tbl, _param) { + let id_pos_list = match[0]; + let build_component_table = function (_pos, _tbl, _param) { while(true) { - var param = _param; - var tbl = _tbl; - var pos = _pos; + let param = _param; + let tbl = _tbl; + let pos = _pos; if (!param) { return [ pos, tbl ]; } - var item = param.hd; - var match = item_ident_name(item); - var nextpos = is_runtime_component(item) ? pos + 1 | 0 : pos; + let item = param.hd; + let match = item_ident_name(item); + let nextpos = is_runtime_component(item) ? pos + 1 | 0 : pos; _param = param.tl; _tbl = add$5(match[2], [ match[0], @@ -52135,30 +52135,30 @@ function signatures(env, cxt, subst, sig1, sig2) { continue ; }; }; - var match$1 = build_component_table(0, /* Empty */0, sig1); - var comps1 = match$1[1]; - var len1 = match$1[0]; - var len2 = Stdlib__List.fold_left((function (n, i) { + let match$1 = build_component_table(0, /* Empty */0, sig1); + let comps1 = match$1[1]; + let len1 = match$1[0]; + let len2 = Stdlib__List.fold_left((function (n, i) { if (is_runtime_component(i)) { return n + 1 | 0; } else { return n; } }), 0, sig2); - var pair_components = function (subst, paired, _unpaired, _param) { + let pair_components = function (subst, paired, _unpaired, _param) { while(true) { - var param = _param; - var unpaired = _unpaired; + let param = _param; + let unpaired = _unpaired; if (param) { - var rem = param.tl; - var item2 = param.hd; - var match = item_ident_name(item2); - var name2 = match[2]; - var id2 = match[0]; - var match$1; + let rem = param.tl; + let item2 = param.hd; + let match = item_ident_name(item2); + let name2 = match[2]; + let id2 = match[0]; + let match$1; if (item2.TAG === /* Sig_type */1 && !(item2._1.type_manifest !== undefined || name2.TAG !== /* Field_type */1)) { - var s = name2._0; - var l = s.length; + let s = name2._0; + let l = s.length; match$1 = l >= 4 && Stdlib__String.sub(s, l - 4 | 0, 4) === "#row" ? [ { TAG: /* Field_type */1, @@ -52175,11 +52175,11 @@ function signatures(env, cxt, subst, sig1, sig2) { true ]; } - var name2$1 = match$1[0]; + let name2$1 = match$1[0]; try { - var match$2 = find$2(name2$1, comps1); - var id1 = match$2[0]; - var new_subst; + let match$2 = find$2(name2$1, comps1); + let id1 = match$2[0]; + let new_subst; switch (item2.TAG | 0) { case /* Sig_type */1 : new_subst = add_type(id2, { @@ -52215,9 +52215,9 @@ function signatures(env, cxt, subst, sig1, sig2) { }, unpaired, rem); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var unpaired$1 = match$1[1] ? ({ + let unpaired$1 = match$1[1] ? ({ hd: [ cxt, env, @@ -52243,16 +52243,16 @@ function signatures(env, cxt, subst, sig1, sig2) { _1: unpaired }); } - var cc = signature_components(env, new_env, cxt, subst, Stdlib__List.rev(paired)); + let cc = signature_components(env, new_env, cxt, subst, Stdlib__List.rev(paired)); if (len1 === len2) { - var is_identity_coercion = function (_pos, _param) { + let is_identity_coercion = function (_pos, _param) { while(true) { - var param = _param; - var pos = _pos; + let param = _param; + let pos = _pos; if (!param) { return true; } - var match = param.hd; + let match = param.hd; if (match[0] !== pos) { return false; } @@ -52287,23 +52287,23 @@ function signatures(env, cxt, subst, sig1, sig2) { } function signature_components(old_env, env, cxt, subst, paired) { - var comps_rec = function (rem) { + let comps_rec = function (rem) { return signature_components(old_env, env, cxt, subst, rem); }; if (!paired) { return /* [] */0; } - var match = paired.hd; - var match$1 = match[0]; + let match = paired.hd; + let match$1 = match[0]; switch (match$1.TAG | 0) { case /* Sig_value */0 : - var match$2 = match[1]; + let match$2 = match[1]; if (match$2.TAG === /* Sig_value */0) { - var rem = paired.tl; - var pos = match[2]; - var valdecl2 = match$2._1; - var cc = value_descriptions(env, cxt, subst, match$1._0, match$1._1, valdecl2); - var p = valdecl2.val_kind; + let rem = paired.tl; + let pos = match[2]; + let valdecl2 = match$2._1; + let cc = value_descriptions(env, cxt, subst, match$1._0, match$1._1, valdecl2); + let p = valdecl2.val_kind; if (typeof p === "number" || p.TAG !== /* Val_prim */0) { return { hd: [ @@ -52318,14 +52318,14 @@ function signature_components(old_env, env, cxt, subst, paired) { } break; case /* Sig_type */1 : - var match$3 = match[1]; + let match$3 = match[1]; if (match$3.TAG === /* Sig_type */1) { type_declarations$2(env, Caml_option.some(old_env), cxt, subst, match$1._0, match$1._1, match$3._1); return comps_rec(paired.tl); } break; case /* Sig_typext */2 : - var match$4 = match[1]; + let match$4 = match[1]; if (match$4.TAG === /* Sig_typext */2) { extension_constructors$1(env, cxt, subst, match$1._0, match$1._1, match$4._1); return { @@ -52338,10 +52338,10 @@ function signature_components(old_env, env, cxt, subst, paired) { } break; case /* Sig_module */3 : - var match$5 = match[1]; + let match$5 = match[1]; if (match$5.TAG === /* Sig_module */3) { - var id1 = match$1._0; - var cc$1 = modtypes(env, { + let id1 = match$1._0; + let cc$1 = modtypes(env, { hd: { TAG: /* Module */0, _0: id1 @@ -52361,14 +52361,14 @@ function signature_components(old_env, env, cxt, subst, paired) { } break; case /* Sig_modtype */4 : - var match$6 = match[1]; + let match$6 = match[1]; if (match$6.TAG === /* Sig_modtype */4) { modtype_infos(env, cxt, subst, match$1._0, match$1._1, match$6._1); return comps_rec(paired.tl); } break; case /* Sig_class */5 : - var match$7 = match[1]; + let match$7 = match[1]; if (match$7.TAG === /* Sig_class */5) { class_declarations$1(old_env, env, cxt, subst, match$1._0, match$1._1, match$7._1); return { @@ -52381,7 +52381,7 @@ function signature_components(old_env, env, cxt, subst, paired) { } break; case /* Sig_class_type */6 : - var match$8 = match[1]; + let match$8 = match[1]; if (match$8.TAG === /* Sig_class_type */6) { class_type_declarations$1(old_env, env, cxt, subst, match$1._0, match$1._1, match$8._1); return comps_rec(paired.tl); @@ -52400,18 +52400,18 @@ function signature_components(old_env, env, cxt, subst, paired) { } function modtype_infos(env, cxt, subst, id, info1, info2) { - var info2$1 = modtype_declaration(subst, info2); - var cxt$p_0 = { + let info2$1 = modtype_declaration(subst, info2); + let cxt$p_0 = { TAG: /* Modtype */1, _0: id }; - var cxt$p = { + let cxt$p = { hd: cxt$p_0, tl: cxt }; try { - var match = info1.mtd_type; - var match$1 = info2$1.mtd_type; + let match = info1.mtd_type; + let match$1 = info2$1.mtd_type; if (match !== undefined) { if (match$1 !== undefined) { return check_modtype_equiv(env, cxt$p, match, match$1); @@ -52431,7 +52431,7 @@ function modtype_infos(env, cxt, subst, id, info1, info2) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -52455,8 +52455,8 @@ function modtype_infos(env, cxt, subst, id, info1, info2) { } function check_modtype_equiv(env, cxt, mty1, mty2) { - var match = modtypes(env, cxt, identity, mty1, mty2); - var match$1 = modtypes(env, cxt, identity, mty2, mty1); + let match = modtypes(env, cxt, identity, mty1, mty2); + let match$1 = modtypes(env, cxt, identity, mty2, mty1); if (typeof match === "number" && typeof match$1 === "number") { return ; } @@ -52479,7 +52479,7 @@ function check_modtype_inclusion$1(env, mty1, path1, mty2) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -52496,7 +52496,7 @@ function compunit(env, impl_name, impl_sig, intf_name, intf_sig) { return signatures(env, /* [] */0, identity, impl_sig, intf_sig); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, @@ -52527,7 +52527,7 @@ function type_declarations$3(env, id, decl1, decl2) { } function show_loc(msg, ppf, loc) { - var pos = loc.loc_start; + let pos = loc.loc_start; if (Stdlib__List.mem(pos.pos_fname, { hd: "", tl: { @@ -52632,9 +52632,9 @@ function include_err$1(ppf, param) { }), param._2, ident$3, param._0); return show_loc("Expected declaration", ppf, param._1); case /* Value_descriptions */1 : - var d2 = param._2; - var d1 = param._1; - var id = param._0; + let d2 = param._2; + let d1 = param._1; + let id = param._0; Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -52707,9 +52707,9 @@ function include_err$1(ppf, param) { d2.val_loc ]); case /* Type_declarations */2 : - var d2$1 = param._2; - var d1$1 = param._1; - var id$1 = param._0; + let d2$1 = param._2; + let d1$1 = param._1; + let id$1 = param._0; return Curry.app(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -52822,9 +52822,9 @@ function include_err$1(ppf, param) { param._3 ]); case /* Extension_constructors */3 : - var x2 = param._2; - var x1 = param._1; - var id$2 = param._0; + let x2 = param._2; + let x1 = param._1; + let id$2 = param._0; Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -52961,7 +52961,7 @@ function include_err$1(ppf, param) { _1: "@[Modules do not match:@ %a@;<1 -2>is not included in@ %a@]" }), modtype$1, param._0, modtype$1, param._1); case /* Modtype_infos */5 : - var id$3 = param._0; + let id$3 = param._0; return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -53074,7 +53074,7 @@ function include_err$1(ppf, param) { _1: "@[The implementation %s@ does not match the interface %s:" }), param._0, param._1); case /* Class_type_declarations */7 : - var id$4 = param._0; + let id$4 = param._0; return Curry._6(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -53155,7 +53155,7 @@ function include_err$1(ppf, param) { return cltype_declaration$1(id$4, param, param$1); }), param._2, report_error$3, param._3); case /* Class_declarations */8 : - var id$5 = param._0; + let id$5 = param._0; return Curry._6(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -53290,7 +53290,7 @@ function context(ppf, param) { _1: "" }); } - var id = param.hd; + let id = param.hd; switch (id.TAG | 0) { case /* Module */0 : return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -53495,7 +53495,7 @@ function context_mty(ppf, rem) { function args(ppf, cxt) { if (cxt) { - var x = cxt.hd; + let x = cxt.hd; switch (x.TAG | 0) { case /* Module */0 : case /* Modtype */1 : @@ -53578,7 +53578,7 @@ function args(ppf, cxt) { } function argname(x) { - var s = x.name; + let s = x.name; if (s === "*") { return ""; } else { @@ -53588,20 +53588,20 @@ function argname(x) { function path_of_context(param) { if (param) { - var id = param.hd; + let id = param.hd; if (id.TAG === /* Module */0) { - var _path = { + let _path = { TAG: /* Pident */0, _0: id._0 }; - var _param = param.tl; + let _param = param.tl; while(true) { - var param$1 = _param; - var path = _path; + let param$1 = _param; + let path = _path; if (!param$1) { return path; } - var id$1 = param$1.hd; + let id$1 = param$1.hd; if (id$1.TAG === /* Module */0) { _param = param$1.tl; _path = { @@ -53723,8 +53723,8 @@ function context$1(ppf, cxt) { } function include_err$2(ppf, param) { - var err = param[2]; - var cxt = param[0]; + let err = param[2]; + let cxt = param[0]; wrap_printing_env(param[1], (function (param) { Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -53757,12 +53757,12 @@ function include_err$2(ppf, param) { })); } -var buffer = { +let buffer = { contents: Stdlib__Bytes.empty }; function is_big(obj) { - var size = error_size.contents; + let size = error_size.contents; if (size <= 0) { return false; } @@ -53782,11 +53782,11 @@ function report_error$4(ppf, errs) { if (Caml_obj.caml_equal(errs, /* [] */0)) { return ; } - var match = split_last(errs); - var pe = { + let match = split_last(errs); + let pe = { contents: true }; - var print_errs = function (ppf) { + let print_errs = function (ppf) { return function (param) { return Stdlib__List.iter((function (param) { if (is_big(param[2])) { @@ -53888,11 +53888,11 @@ function get_location(ti) { } } -var annotations$1 = { +let annotations$1 = { contents: /* [] */0 }; -var phrases = { +let phrases = { contents: /* [] */0 }; @@ -53918,9 +53918,9 @@ function make_pat(desc, ty, tenv) { }; } -var omega = make_pat(/* Tpat_any */0, none$2, empty); +let omega = make_pat(/* Tpat_any */0, none$2, empty); -var extra_pat = make_pat({ +let extra_pat = make_pat({ TAG: /* Tpat_var */0, _0: create("+"), _1: { @@ -53940,7 +53940,7 @@ function omegas(i) { } } -var zero = make_pat({ +let zero = make_pat({ TAG: /* Tpat_constant */2, _0: { TAG: /* Const_int */0, @@ -53953,7 +53953,7 @@ function is_absent(tag, row) { } function is_absent_pat(p) { - var match = p.pat_desc; + let match = p.pat_desc; if (typeof match === "number" || match.TAG !== /* Tpat_variant */5) { return false; } else { @@ -53981,25 +53981,25 @@ function const_compare(x, y) { } function records_args(l1, l2) { - var _r1 = /* [] */0; - var _r2 = /* [] */0; - var _l1 = l1; - var _l2 = l2; + let _r1 = /* [] */0; + let _r2 = /* [] */0; + let _l1 = l1; + let _l2 = l2; while(true) { - var l2$1 = _l2; - var l1$1 = _l1; - var r2 = _r2; - var r1 = _r1; + let l2$1 = _l2; + let l1$1 = _l1; + let r2 = _r2; + let r1 = _r1; if (l1$1) { - var rem1 = l1$1.tl; - var match = l1$1.hd; - var p1 = match[2]; - var lbl1 = match[1]; + let rem1 = l1$1.tl; + let match = l1$1.hd; + let p1 = match[2]; + let lbl1 = match[1]; if (l2$1) { - var rem2 = l2$1.tl; - var match$1 = l2$1.hd; - var p2 = match$1[2]; - var lbl2 = match$1[1]; + let rem2 = l2$1.tl; + let match$1 = l2$1.hd; + let p2 = match$1[2]; + let lbl2 = match$1[1]; if (lbl1.lbl_pos < lbl2.lbl_pos) { _l1 = rem1; _r2 = { @@ -54070,11 +54070,11 @@ function records_args(l1, l2) { function compat(_p, _q) { while(true) { - var q = _q; - var p = _p; - var match = p.pat_desc; - var match$1 = q.pat_desc; - var exit = 0; + let q = _q; + let p = _p; + let match = p.pat_desc; + let match$1 = q.pat_desc; + let exit = 0; if (typeof match === "number") { exit = 1; } else { @@ -54144,8 +54144,8 @@ function compat(_p, _q) { } break; case /* Tpat_variant */5 : - var p1 = match._1; - var l1 = match._0; + let p1 = match._1; + let l1 = match._0; if (p1 !== undefined) { if (typeof match$1 === "number") { exit = 1; @@ -54156,7 +54156,7 @@ function compat(_p, _q) { exit = 1; break; case /* Tpat_variant */5 : - var p2 = match$1._1; + let p2 = match$1._1; if (p2 === undefined) { return false; } @@ -54205,7 +54205,7 @@ function compat(_p, _q) { exit = 1; break; case /* Tpat_record */6 : - var match$2 = records_args(match._0, match$1._0); + let match$2 = records_args(match._0, match$1._0); return compats(match$2[0], match$2[1]); case /* Tpat_or */8 : exit = 2; @@ -54216,7 +54216,7 @@ function compat(_p, _q) { } break; case /* Tpat_array */7 : - var ps = match._0; + let ps = match._0; if (typeof match$1 === "number") { exit = 1; } else { @@ -54226,7 +54226,7 @@ function compat(_p, _q) { exit = 1; break; case /* Tpat_array */7 : - var qs = match$1._0; + let qs = match$1._0; if (Stdlib__List.length(ps) === Stdlib__List.length(qs)) { return compats(ps, qs); } else { @@ -54311,8 +54311,8 @@ function compat(_p, _q) { function compats(_ps, _qs) { while(true) { - var qs = _qs; - var ps = _ps; + let qs = _qs; + let ps = _ps; if (ps) { if (qs) { if (!compat(ps.hd, qs.hd)) { @@ -54345,7 +54345,7 @@ function compats(_ps, _qs) { }; } -var Empty = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Parmatch.Empty"); +let Empty = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Parmatch.Empty"); function clean_copy(ty) { if (ty.level === 100000000) { @@ -54356,8 +54356,8 @@ function clean_copy(ty) { } function get_type_path(ty, tenv) { - var ty$1 = repr(expand_head(tenv, clean_copy(ty))); - var match = ty$1.desc; + let ty$1 = repr(expand_head(tenv, clean_copy(ty))); + let match = ty$1.desc; if (typeof match === "number" || match.TAG !== /* Tconstr */3) { return fatal_error("Parmatch.get_type_path"); } else { @@ -54462,10 +54462,10 @@ function pretty_const(c) { } function pretty_val(ppf, v) { - var match = v.pat_extra; + let match = v.pat_extra; if (match) { - var rem = match.tl; - var tmp = match.hd[0]; + let rem = match.tl; + let tmp = match.hd[0]; if (typeof tmp === "number") { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -54579,7 +54579,7 @@ function pretty_val(ppf, v) { }); } } - var c = v.pat_desc; + let c = v.pat_desc; if (typeof c === "number") { return Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -54681,8 +54681,8 @@ function pretty_val(ppf, v) { return pretty_vals(",", param, param$1); }), c._0); case /* Tpat_construct */4 : - var match$1 = c._2; - var cstr = c._1; + let match$1 = c._2; + let cstr = c._1; if (!match$1) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -54733,10 +54733,10 @@ function pretty_val(ppf, v) { _1: "@[<2>%s@ %a@]" }), cstr.cstr_name, pretty_arg, match$1.hd); } - var vs = c._2; - var name = c._1.cstr_name; + let vs = c._2; + let name = c._1.cstr_name; if (name === "::" && vs) { - var match$2 = vs.tl; + let match$2 = vs.tl; if (match$2 && !match$2.tl) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -54842,8 +54842,8 @@ function pretty_val(ppf, v) { }), vs); break; case /* Tpat_variant */5 : - var w = c._1; - var l = c._0; + let w = c._1; + let l = c._0; if (w !== undefined) { return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -55059,18 +55059,18 @@ function pretty_val(ppf, v) { } function pretty_car(ppf, v) { - var match = v.pat_desc; + let match = v.pat_desc; if (typeof match === "number") { return pretty_val(ppf, v); } if (match.TAG !== /* Tpat_construct */4) { return pretty_val(ppf, v); } - var match$1 = match._2; + let match$1 = match._2; if (!match$1) { return pretty_val(ppf, v); } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2 && !(match$2.tl || !is_cons(match._1))) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -55093,18 +55093,18 @@ function pretty_car(ppf, v) { } function pretty_cdr(ppf, v) { - var match = v.pat_desc; + let match = v.pat_desc; if (typeof match === "number") { return pretty_val(ppf, v); } if (match.TAG !== /* Tpat_construct */4) { return pretty_val(ppf, v); } - var match$1 = match._2; + let match$1 = match._2; if (!match$1) { return pretty_val(ppf, v); } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2 && !(match$2.tl || !is_cons(match._1))) { return Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -55135,7 +55135,7 @@ function pretty_cdr(ppf, v) { } function pretty_arg(ppf, v) { - var match = v.pat_desc; + let match = v.pat_desc; if (typeof match === "number") { return pretty_val(ppf, v); } @@ -55171,7 +55171,7 @@ function pretty_arg(ppf, v) { } function pretty_or(ppf, v) { - var match = v.pat_desc; + let match = v.pat_desc; if (typeof match === "number" || match.TAG !== /* Tpat_or */8) { return pretty_val(ppf, v); } else { @@ -55205,7 +55205,7 @@ function pretty_vals(sep, ppf, param) { if (!param) { return ; } - var v = param.hd; + let v = param.hd; if (param.tl) { return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -55241,7 +55241,7 @@ function pretty_lvals(ppf, param) { if (!param) { return ; } - var match = param.hd; + let match = param.hd; if (param.tl) { return Curry._5(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -55322,8 +55322,8 @@ function top_pretty(ppf, v) { } function simple_match(p1, p2) { - var match = p1.pat_desc; - var match$1 = p2.pat_desc; + let match = p1.pat_desc; + let match$1 = p2.pat_desc; if (typeof match !== "number") { switch (match.TAG | 0) { case /* Tpat_constant */2 : @@ -55422,7 +55422,7 @@ function simple_match(p1, p2) { } function record_arg(p) { - var match = p.pat_desc; + let match = p.pat_desc; if (typeof match === "number") { return /* [] */0; } else if (match.TAG === /* Tpat_record */6) { @@ -55440,8 +55440,8 @@ function get_field(pos, arg) { function simple_match_args(p1, _p2) { while(true) { - var p2 = _p2; - var args = p2.pat_desc; + let p2 = _p2; + let args = p2.pat_desc; if (typeof args !== "number") { switch (args.TAG | 0) { case /* Tpat_var */0 : @@ -55452,7 +55452,7 @@ function simple_match_args(p1, _p2) { case /* Tpat_construct */4 : return args._2; case /* Tpat_variant */5 : - var arg = args._1; + let arg = args._1; if (arg !== undefined) { return { hd: arg, @@ -55462,15 +55462,15 @@ function simple_match_args(p1, _p2) { return /* [] */0; } case /* Tpat_record */6 : - var omegas = record_arg(p1); - var arg$1 = args._0; + let omegas = record_arg(p1); + let arg$1 = args._0; return Stdlib__List.map((function(arg$1){ return function (param) { try { return get_field(param[1].lbl_pos, arg$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return omega; } @@ -55492,7 +55492,7 @@ function simple_match_args(p1, _p2) { } } - var args$1 = p1.pat_desc; + let args$1 = p1.pat_desc; if (typeof args$1 === "number") { return /* [] */0; } @@ -55535,8 +55535,8 @@ function simple_match_args(p1, _p2) { function normalize_pat(_q) { while(true) { - var q = _q; - var args = q.pat_desc; + let q = _q; + let args = q.pat_desc; if (typeof args === "number") { return q; } @@ -55605,23 +55605,23 @@ function normalize_pat(_q) { } function discr_pat(q, pss) { - var q$1 = normalize_pat(q); - var tmp = q$1.pat_desc; + let q$1 = normalize_pat(q); + let tmp = q$1.pat_desc; if (typeof tmp === "number" || tmp.TAG === /* Tpat_record */6) { - var _acc = q$1; - var _pss = pss; + let _acc = q$1; + let _pss = pss; while(true) { - var pss$1 = _pss; - var acc = _acc; + let pss$1 = _pss; + let acc = _acc; if (!pss$1) { return acc; } - var match = pss$1.hd; + let match = pss$1.hd; if (!match) { return acc; } - var p = match.hd; - var match$1 = p.pat_desc; + let p = match.hd; + let match$1 = p.pat_desc; if (typeof match$1 === "number") { _pss = pss$1.tl; continue ; @@ -55640,14 +55640,14 @@ function discr_pat(q, pss) { }; continue ; case /* Tpat_record */6 : - var new_omegas = Stdlib__List.fold_right((function (param, r) { - var lbl = param[1]; + let new_omegas = Stdlib__List.fold_right((function (param, r) { + let lbl = param[1]; try { get_field(lbl.lbl_pos, r); return r; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: [ @@ -55669,7 +55669,7 @@ function discr_pat(q, pss) { }, p.pat_type, p.pat_env); continue ; case /* Tpat_or */8 : - var ps = match.tl; + let ps = match.tl; _pss = { hd: { hd: match$1._0, @@ -55706,7 +55706,7 @@ function read_args(xs, r) { if (!r) { return fatal_error("Parmatch.read_args"); } - var match = read_args(xs.tl, r.tl); + let match = read_args(xs.tl, r.tl); return [ { hd: r.hd, @@ -55717,7 +55717,7 @@ function read_args(xs, r) { } function do_set_args(erase_mutable, q, r) { - var omegas = q.pat_desc; + let omegas = q.pat_desc; if (typeof omegas === "number") { return { hd: q, @@ -55731,7 +55731,7 @@ function do_set_args(erase_mutable, q, r) { tl: r }; case /* Tpat_tuple */3 : - var match = read_args(omegas._0, r); + let match = read_args(omegas._0, r); return { hd: make_pat({ TAG: /* Tpat_tuple */3, @@ -55740,7 +55740,7 @@ function do_set_args(erase_mutable, q, r) { tl: match[1] }; case /* Tpat_construct */4 : - var match$1 = read_args(omegas._2, r); + let match$1 = read_args(omegas._2, r); return { hd: make_pat({ TAG: /* Tpat_construct */4, @@ -55751,7 +55751,7 @@ function do_set_args(erase_mutable, q, r) { tl: match$1[1] }; case /* Tpat_variant */5 : - var match$2; + let match$2; if (omegas._1 !== undefined) { if (r) { match$2 = [ @@ -55784,17 +55784,17 @@ function do_set_args(erase_mutable, q, r) { tl: match$2[1] }; case /* Tpat_record */6 : - var omegas$1 = omegas._0; - var match$3 = read_args(omegas$1, r); + let omegas$1 = omegas._0; + let match$3 = read_args(omegas$1, r); return { hd: make_pat({ TAG: /* Tpat_record */6, _0: Stdlib__List.map2((function (param, arg) { - var lbl = param[1]; - var lid = param[0]; - var tmp = false; + let lbl = param[1]; + let lid = param[0]; + let tmp = false; if (erase_mutable) { - var match = lbl.lbl_mut; + let match = lbl.lbl_mut; tmp = match ? true : false; } if (tmp) { @@ -55816,7 +55816,7 @@ function do_set_args(erase_mutable, q, r) { tl: match$3[1] }; case /* Tpat_array */7 : - var match$4 = read_args(omegas._0, r); + let match$4 = read_args(omegas._0, r); return { hd: make_pat({ TAG: /* Tpat_array */7, @@ -55842,18 +55842,18 @@ function do_set_args(erase_mutable, q, r) { } function filter_one(q, pss) { - var filter_rec = function (_param) { + let filter_rec = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var match = param.hd; + let match = param.hd; if (!match) { return /* [] */0; } - var p = match.hd; - var match$1 = p.pat_desc; + let p = match.hd; + let match$1 = p.pat_desc; if (typeof match$1 !== "number") { switch (match$1.TAG | 0) { case /* Tpat_alias */1 : @@ -55866,7 +55866,7 @@ function filter_one(q, pss) { }; continue ; case /* Tpat_or */8 : - var ps = match.tl; + let ps = match.tl; _param = { hd: { hd: match$1._0, @@ -55885,7 +55885,7 @@ function filter_one(q, pss) { } } - var pss = param.tl; + let pss = param.tl; if (simple_match(q, p)) { return { hd: Stdlib.$at(simple_match_args(q, p), match.tl), @@ -55900,15 +55900,15 @@ function filter_one(q, pss) { } function filter_extra(pss) { - var filter_rec = function (_param) { + let filter_rec = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var match = param.hd; + let match = param.hd; if (match) { - var match$1 = match.hd.pat_desc; + let match$1 = match.hd.pat_desc; if (typeof match$1 === "number") { return { hd: match.tl, @@ -55931,7 +55931,7 @@ function filter_extra(pss) { }; continue ; case /* Tpat_or */8 : - var ps = match.tl; + let ps = match.tl; _param = { hd: { hd: match$1._0, @@ -55960,11 +55960,11 @@ function filter_extra(pss) { } function filter_all(pat0, pss) { - var insert = function (q, qs, env) { + let insert = function (q, qs, env) { if (env) { - var env$1 = env.tl; - var c = env.hd; - var q0 = c[0]; + let env$1 = env.tl; + let c = env.hd; + let q0 = c[0]; if (simple_match(q0, q)) { return { hd: [ @@ -55983,7 +55983,7 @@ function filter_all(pat0, pss) { }; } } - var q0$1 = normalize_pat(q); + let q0$1 = normalize_pat(q); return { hd: [ q0$1, @@ -55995,19 +55995,19 @@ function filter_all(pat0, pss) { tl: /* [] */0 }; }; - var filter_rec = function (_env, _param) { + let filter_rec = function (_env, _param) { while(true) { - var param = _param; - var env = _env; + let param = _param; + let env = _env; if (!param) { return env; } - var match = param.hd; + let match = param.hd; if (!match) { return env; } - var p = match.hd; - var match$1 = p.pat_desc; + let p = match.hd; + let match$1 = p.pat_desc; if (typeof match$1 === "number") { _param = param.tl; continue ; @@ -56026,7 +56026,7 @@ function filter_all(pat0, pss) { }; continue ; case /* Tpat_or */8 : - var ps = match.tl; + let ps = match.tl; _param = { hd: { hd: match$1._0, @@ -56048,9 +56048,9 @@ function filter_all(pat0, pss) { } }; }; - var match = pat0.pat_desc; - var tmp; - var exit = 0; + let match = pat0.pat_desc; + let tmp; + let exit = 0; if (typeof match === "number") { tmp = /* [] */0; } else { @@ -56073,17 +56073,17 @@ function filter_all(pat0, pss) { tl: /* [] */0 }; } - var _env = filter_rec(tmp, pss); - var _param = pss; + let _env = filter_rec(tmp, pss); + let _param = pss; while(true) { - var param = _param; - var env = _env; + let param = _param; + let env = _env; if (!param) { return env; } - var match$1 = param.hd; + let match$1 = param.hd; if (match$1) { - var match$2 = match$1.hd.pat_desc; + let match$2 = match$1.hd.pat_desc; if (typeof match$2 !== "number") { switch (match$2.TAG | 0) { case /* Tpat_var */0 : @@ -56098,7 +56098,7 @@ function filter_all(pat0, pss) { }; continue ; case /* Tpat_or */8 : - var ps = match$1.tl; + let ps = match$1.tl; _param = { hd: { hd: match$2._0, @@ -56118,11 +56118,11 @@ function filter_all(pat0, pss) { continue ; } } - var ps$1 = match$1.tl; + let ps$1 = match$1.tl; _param = param.tl; _env = Stdlib__List.map((function(ps$1){ return function (param) { - var q = param[0]; + let q = param[0]; return [ q, { @@ -56159,13 +56159,13 @@ function set_last(a, param) { function mark_partial(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var ps = param.hd; + let ps = param.hd; if (ps) { - var match = ps.hd.pat_desc; + let match = ps.hd.pat_desc; if (typeof match === "number") { return { hd: ps, @@ -56188,7 +56188,7 @@ function mark_partial(_param) { }; continue ; case /* Tpat_or */8 : - var ps$1 = ps.tl; + let ps$1 = ps.tl; _param = { hd: { hd: match._0, @@ -56215,9 +56215,9 @@ function mark_partial(_param) { } function close_variant(env, row) { - var row$1 = row_repr_aux(/* [] */0, row); - var nm = Stdlib__List.fold_left((function (nm, param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let row$1 = row_repr_aux(/* [] */0, row); + let nm = Stdlib__List.fold_left((function (nm, param) { + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || match.TAG === /* Rpresent */0 || match._2) { return nm; } else { @@ -56245,8 +56245,8 @@ function close_variant(env, row) { } function row_of_pat(pat) { - var match = expand_head(pat.pat_env, pat.pat_type); - var row = match.desc; + let match = expand_head(pat.pat_env, pat.pat_type); + let row = match.desc; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -56271,7 +56271,7 @@ function row_of_pat(pat) { } function generalized_constructor(x) { - var match = x[0].pat_desc; + let match = x[0].pat_desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -56296,14 +56296,14 @@ function generalized_constructor(x) { } function clean_env(env) { - var loop = function (_param) { + let loop = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var xs = param.tl; - var x = param.hd; + let xs = param.tl; + let x = param.hd; if (!generalized_constructor(x)) { return { hd: x, @@ -56321,8 +56321,8 @@ function full_match(ignore_generalized, closing, env) { if (!env) { return fatal_error("Parmatch.full_match"); } - var p = env.hd[0]; - var match = p.pat_desc; + let p = env.hd[0]; + let match = p.pat_desc; if (typeof match === "number") { return fatal_error("Parmatch.full_match"); } @@ -56334,18 +56334,18 @@ function full_match(ignore_generalized, closing, env) { return false; } case /* Tpat_construct */4 : - var c = match._1; + let c = match._1; if (c.cstr_consts < 0) { return false; } if (!ignore_generalized) { return Stdlib__List.length(env) === (c.cstr_consts + c.cstr_nonconsts | 0); } - var env$1 = clean_env(env); + let env$1 = clean_env(env); return Stdlib__List.length(env$1) === c.cstr_normal; case /* Tpat_variant */5 : - var fields = Stdlib__List.map((function (param) { - var match = param[0].pat_desc; + let fields = Stdlib__List.map((function (param) { + let match = param[0].pat_desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -56368,11 +56368,11 @@ function full_match(ignore_generalized, closing, env) { ] }); }), env); - var row = row_of_pat(p); + let row = row_of_pat(p); if (closing && !row_fixed(row)) { return Stdlib__List.for_all((function (param) { - var tag = param[0]; - var match = row_field_repr_aux(/* [] */0, param[1]); + let tag = param[0]; + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number" || !(match.TAG === /* Rpresent */0 || match._2)) { return true; } else { @@ -56405,14 +56405,14 @@ function full_match_gadt(env) { if (!env) { return true; } - var match = env.hd[0].pat_desc; + let match = env.hd[0].pat_desc; if (typeof match === "number") { return true; } if (match.TAG !== /* Tpat_construct */4) { return true; } - var c = match._1; + let c = match._1; return Stdlib__List.length(env) === (c.cstr_consts + c.cstr_nonconsts | 0); } @@ -56423,8 +56423,8 @@ function should_extend(ext, env) { if (!env) { return false; } - var p = env.hd[0]; - var match = p.pat_desc; + let p = env.hd[0]; + let match = p.pat_desc; if (typeof match === "number") { return false; } @@ -56439,13 +56439,13 @@ function should_extend(ext, env) { return false; } - var path = get_type_path(p.pat_type, p.pat_env); + let path = get_type_path(p.pat_type, p.pat_env); return same(path, ext); } function complete_tags(nconsts, nconstrs, tags) { - var seen_const = Caml_array.make(nconsts, false); - var seen_constr = Caml_array.make(nconstrs, false); + let seen_const = Caml_array.make(nconsts, false); + let seen_constr = Caml_array.make(nconstrs, false); Stdlib__List.iter((function (param) { switch (param.TAG | 0) { case /* Cstr_constant */0 : @@ -56464,8 +56464,8 @@ function complete_tags(nconsts, nconstrs, tags) { } }), tags); - var r = /* [] */0; - for(var i = 0; i < nconsts; ++i){ + let r = /* [] */0; + for(let i = 0; i < nconsts; ++i){ if (!Caml_array.get(seen_const, i)) { r = { hd: { @@ -56477,7 +56477,7 @@ function complete_tags(nconsts, nconstrs, tags) { } } - for(var i$1 = 0; i$1 < nconstrs; ++i$1){ + for(let i$1 = 0; i$1 < nconstrs; ++i$1){ if (!Caml_array.get(seen_constr, i$1)) { r = { hd: { @@ -56516,7 +56516,7 @@ function pat_of_constr(ex_pat, cstr) { function pat_of_constrs(ex_pat, param) { if (param) { - var cstr = param.hd; + let cstr = param.hd; if (param.tl) { return { pat_desc: { @@ -56542,17 +56542,17 @@ function pat_of_constrs(ex_pat, param) { function get_variant_constructors(env, _ty) { while(true) { - var ty = _ty; - var match = repr(ty).desc; + let ty = _ty; + let match = repr(ty).desc; if (typeof match === "number") { return fatal_error("Parmatch.get_variant_constructors"); } if (match.TAG !== /* Tconstr */3) { return fatal_error("Parmatch.get_variant_constructors"); } - var path = match._0; - var match$1 = find_type_full(path, env)[0]; - var tmp = match$1.type_kind; + let path = match._0; + let match$1 = find_type_full(path, env)[0]; + let tmp = match$1.type_kind; if (typeof tmp !== "number" && tmp.TAG === /* Type_variant */1) { return find_type_full(path, env)[1][0]; } @@ -56566,12 +56566,12 @@ function get_variant_constructors(env, _ty) { function map_filter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var xs = param.tl; - var y = Curry._1(f, param.hd); + let xs = param.tl; + let y = Curry._1(f, param.hd); if (y !== undefined) { return { hd: Caml_option.valFromOption(y), @@ -56584,16 +56584,16 @@ function map_filter(f, _param) { } function complete_constrs(p, all_tags) { - var match = p.pat_desc; + let match = p.pat_desc; if (typeof match === "number") { return fatal_error("Parmatch.complete_constr"); } if (match.TAG !== /* Tpat_construct */4) { return fatal_error("Parmatch.complete_constr"); } - var c = match._1; - var not_tags = complete_tags(c.cstr_consts, c.cstr_nonconsts, all_tags); - var constrs = get_variant_constructors(p.pat_env, c.cstr_res); + let c = match._1; + let not_tags = complete_tags(c.cstr_consts, c.cstr_nonconsts, all_tags); + let constrs = get_variant_constructors(p.pat_env, c.cstr_res); return map_filter((function (cnstr) { if (Stdlib__List.exists((function (tag) { return equal_tag(tag, cnstr.cstr_tag); @@ -56605,12 +56605,12 @@ function complete_constrs(p, all_tags) { } function build_other_constant(proj, make, first, next, p, env) { - var all = Stdlib__List.map((function (param) { + let all = Stdlib__List.map((function (param) { return Curry._1(proj, param[0].pat_desc); }), env); - var _i = first; + let _i = first; while(true) { - var i = _i; + let i = _i; if (!Stdlib__List.mem(i, all)) { return make_pat(Curry._1(make, i), p.pat_type, p.pat_env); } @@ -56623,8 +56623,8 @@ function build_other(ext, env) { if (!env) { return omega; } - var p = env.hd[0]; - var args = p.pat_desc; + let p = env.hd[0]; + let args = p.pat_desc; if (typeof args === "number") { return omega; } @@ -56634,7 +56634,7 @@ function build_other(ext, env) { case /* Const_int */0 : return build_other_constant((function (param) { if (typeof param !== "number" && param.TAG === /* Tpat_constant */2) { - var i = param._0; + let i = param._0; if (i.TAG === /* Const_int */0) { return i._0; } @@ -56660,10 +56660,10 @@ function build_other(ext, env) { return prim + 1 | 0; }), p, env); case /* Const_char */1 : - var all_chars = Stdlib__List.map((function (param) { - var match = param[0].pat_desc; + let all_chars = Stdlib__List.map((function (param) { + let match = param[0].pat_desc; if (typeof match !== "number" && match.TAG === /* Tpat_constant */2) { - var c = match._0; + let c = match._0; if (c.TAG === /* Const_char */1) { return c._0; } @@ -56678,7 +56678,7 @@ function build_other(ext, env) { ] }); }), env); - var _param = { + let _param = { hd: [ /* 'a' */97, /* 'z' */122 @@ -56710,22 +56710,22 @@ function build_other(ext, env) { } }; while(true) { - var param = _param; + let param = _param; if (!param) { return omega; } - var match = param.hd; + let match = param.hd; try { - var _i = match[0]; - var imax = match[1]; + let _i = match[0]; + let imax = match[1]; while(true) { - var i = _i; + let i = _i; if (i > imax) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var ci = Stdlib__Char.chr(i); + let ci = Stdlib__Char.chr(i); if (!Stdlib__List.mem(ci, all_chars)) { return make_pat({ TAG: /* Tpat_constant */2, @@ -56740,7 +56740,7 @@ function build_other(ext, env) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { _param = param.tl; continue ; @@ -56751,7 +56751,7 @@ function build_other(ext, env) { case /* Const_string */2 : return build_other_constant((function (param) { if (typeof param !== "number" && param.TAG === /* Tpat_constant */2) { - var match = param._0; + let match = param._0; if (match.TAG === /* Const_string */2) { return match._0.length; } @@ -56780,7 +56780,7 @@ function build_other(ext, env) { case /* Const_float */3 : return build_other_constant((function (param) { if (typeof param !== "number" && param.TAG === /* Tpat_constant */2) { - var f = param._0; + let f = param._0; if (f.TAG === /* Const_float */3) { return Caml_format.caml_float_of_string(f._0); } @@ -56808,7 +56808,7 @@ function build_other(ext, env) { case /* Const_int32 */4 : return build_other_constant((function (param) { if (typeof param !== "number" && param.TAG === /* Tpat_constant */2) { - var i = param._0; + let i = param._0; if (i.TAG === /* Const_int32 */4) { return i._0; } @@ -56834,7 +56834,7 @@ function build_other(ext, env) { case /* Const_int64 */5 : return build_other_constant((function (param) { if (typeof param !== "number" && param.TAG === /* Tpat_constant */2) { - var i = param._0; + let i = param._0; if (i.TAG === /* Const_int64 */5) { return i._0; } @@ -56869,27 +56869,27 @@ function build_other(ext, env) { } case /* Tpat_construct */4 : - var exit = 0; - var c = args._1; + let exit = 0; + let c = args._1; switch (c.cstr_tag.TAG | 0) { case /* Cstr_constant */0 : case /* Cstr_block */1 : exit = 1; break; case /* Cstr_extension */2 : - var c_cstr_res = c.cstr_res; - var c_cstr_existentials = c.cstr_existentials; - var c_cstr_args = c.cstr_args; - var c_cstr_arity = c.cstr_arity; - var c_cstr_tag = c.cstr_tag; - var c_cstr_consts = c.cstr_consts; - var c_cstr_nonconsts = c.cstr_nonconsts; - var c_cstr_normal = c.cstr_normal; - var c_cstr_generalized = c.cstr_generalized; - var c_cstr_private = c.cstr_private; - var c_cstr_loc = c.cstr_loc; - var c_cstr_attributes = c.cstr_attributes; - var c$1 = { + let c_cstr_res = c.cstr_res; + let c_cstr_existentials = c.cstr_existentials; + let c_cstr_args = c.cstr_args; + let c_cstr_arity = c.cstr_arity; + let c_cstr_tag = c.cstr_tag; + let c_cstr_consts = c.cstr_consts; + let c_cstr_nonconsts = c.cstr_nonconsts; + let c_cstr_normal = c.cstr_normal; + let c_cstr_generalized = c.cstr_generalized; + let c_cstr_private = c.cstr_private; + let c_cstr_loc = c.cstr_loc; + let c_cstr_attributes = c.cstr_attributes; + let c$1 = { cstr_name: "*extension*", cstr_res: c_cstr_res, cstr_existentials: c_cstr_existentials, @@ -56913,7 +56913,7 @@ function build_other(ext, env) { } if (exit === 1) { - var exit$1 = 0; + let exit$1 = 0; if (ext !== undefined) { if (same(ext, get_type_path(p.pat_type, p.pat_env))) { return extra_pat; @@ -56923,9 +56923,9 @@ function build_other(ext, env) { exit$1 = 2; } if (exit$1 === 2) { - var all_tags = Stdlib__List.map((function (param) { - var param$1 = param[0]; - var match = param$1.pat_desc; + let all_tags = Stdlib__List.map((function (param) { + let param$1 = param[0]; + let match = param$1.pat_desc; if (typeof match === "number" || match.TAG !== /* Tpat_construct */4) { return fatal_error("Parmatch.get_tag"); } else { @@ -56938,9 +56938,9 @@ function build_other(ext, env) { } break; case /* Tpat_variant */5 : - var r = args._2; - var tags = Stdlib__List.map((function (param) { - var match = param[0].pat_desc; + let r = args._2; + let tags = Stdlib__List.map((function (param) { + let match = param[0].pat_desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -56963,9 +56963,9 @@ function build_other(ext, env) { ] }); }), env); - var row = row_of_pat(p); - var make_other_pat = function (tag, $$const) { - var arg = $$const ? undefined : omega; + let row = row_of_pat(p); + let make_other_pat = function (tag, $$const) { + let arg = $$const ? undefined : omega; return make_pat({ TAG: /* Tpat_variant */5, _0: tag, @@ -56973,12 +56973,12 @@ function build_other(ext, env) { _2: r }, p.pat_type, p.pat_env); }; - var match$1 = Stdlib__List.fold_left((function (others, param) { - var tag = param[0]; + let match$1 = Stdlib__List.fold_left((function (others, param) { + let tag = param[0]; if (Stdlib__List.mem(tag, tags)) { return others; } - var arg = row_field_repr_aux(/* [] */0, param[1]); + let arg = row_field_repr_aux(/* [] */0, param[1]); if (typeof arg === "number") { return others; } else if (arg.TAG === /* Rpresent */0) { @@ -57006,8 +57006,8 @@ function build_other(ext, env) { return make_other_pat("AnyExtraTag", true); } case /* Tpat_array */7 : - var all_lengths = Stdlib__List.map((function (param) { - var args = param[0].pat_desc; + let all_lengths = Stdlib__List.map((function (param) { + let args = param[0].pat_desc; if (typeof args === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -57030,9 +57030,9 @@ function build_other(ext, env) { ] }); }), env); - var _l = 0; + let _l = 0; while(true) { - var l = _l; + let l = _l; if (!Stdlib__List.mem(l, all_lengths)) { return make_pat({ TAG: /* Tpat_array */7, @@ -57049,19 +57049,19 @@ function build_other(ext, env) { function build_other_gadt(ext, env) { if (env) { - var p = env.hd[0]; - var tmp = p.pat_desc; + let p = env.hd[0]; + let tmp = p.pat_desc; if (typeof tmp !== "number" && tmp.TAG === /* Tpat_construct */4) { - var all_tags = Stdlib__List.map((function (param) { - var param$1 = param[0]; - var match = param$1.pat_desc; + let all_tags = Stdlib__List.map((function (param) { + let param$1 = param[0]; + let match = param$1.pat_desc; if (typeof match === "number" || match.TAG !== /* Tpat_construct */4) { return fatal_error("Parmatch.get_tag"); } else { return match._1.cstr_tag; } }), env); - var cnstrs = complete_constrs(p, all_tags); + let cnstrs = complete_constrs(p, all_tags); return Stdlib__List.map((function (param) { return pat_of_constr(p, param); }), cnstrs); @@ -57080,8 +57080,8 @@ function build_other_gadt(ext, env) { function has_instance(_p) { while(true) { - var p = _p; - var p$1 = p.pat_desc; + let p = _p; + let p$1 = p.pat_desc; if (typeof p$1 === "number") { return true; } @@ -57089,7 +57089,7 @@ function has_instance(_p) { case /* Tpat_construct */4 : return has_instances(p$1._2); case /* Tpat_variant */5 : - var p$2 = p$1._1; + let p$2 = p$1._1; if (is_absent(p$1._0, p$1._2)) { return false; } @@ -57123,7 +57123,7 @@ function has_instance(_p) { function has_instances(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -57137,17 +57137,17 @@ function has_instances(_param) { function satisfiable(_pss, _qs) { while(true) { - var qs = _qs; - var pss = _pss; + let qs = _qs; + let pss = _pss; if (!pss) { return has_instances(qs); } if (!qs) { return false; } - var q = qs.hd; - var match = q.pat_desc; - var exit = 0; + let q = qs.hd; + let match = q.pat_desc; + let exit = 0; if (typeof match === "number") { exit = 2; } else { @@ -57167,7 +57167,7 @@ function satisfiable(_pss, _qs) { } break; case /* Tpat_or */8 : - var qs$1 = qs.tl; + let qs$1 = qs.tl; if (satisfiable(pss, { hd: match._0, tl: qs$1 @@ -57184,14 +57184,14 @@ function satisfiable(_pss, _qs) { } } if (exit === 2) { - var qs$2 = qs.tl; - var q0 = discr_pat(omega, pss); - var constrs = filter_all(q0, pss); + let qs$2 = qs.tl; + let q0 = discr_pat(omega, pss); + let constrs = filter_all(q0, pss); if (constrs) { if (full_match(false, false, constrs)) { return Stdlib__List.exists((function(qs$2){ return function (param) { - var p = param[0]; + let p = param[0]; if (is_absent_pat(p)) { return false; } else { @@ -57208,7 +57208,7 @@ function satisfiable(_pss, _qs) { _pss = filter_extra(pss); continue ; } - var q0$1 = discr_pat(q, pss); + let q0$1 = discr_pat(q, pss); _qs = Stdlib.$at(simple_match_args(q0$1, q), qs.tl); _pss = filter_one(q0$1, pss); continue ; @@ -57217,9 +57217,9 @@ function satisfiable(_pss, _qs) { function orify_many(param) { if (param) { - var x = param.hd; + let x = param.hd; if (param.tl) { - var y = Curry._1(orify_many, param.tl); + let y = Curry._1(orify_many, param.tl); return make_pat({ TAG: /* Tpat_or */8, _0: x, @@ -57244,12 +57244,12 @@ function try_many_gadt(f, param) { if (!param) { return /* Rnone */0; } - var match = param.hd; - var r1 = Curry._1(f, [ + let match = param.hd; + let r1 = Curry._1(f, [ match[0], match[1] ]); - var r2 = try_many_gadt(f, param.tl); + let r2 = try_many_gadt(f, param.tl); if (r1) { if (r2) { return /* Rsome */{ @@ -57272,15 +57272,15 @@ function exhaust(ext, pss, n) { if (!pss.hd) { return /* Rnone */0; } - var q0 = discr_pat(omega, pss); - var constrs = filter_all(q0, pss); + let q0 = discr_pat(omega, pss); + let constrs = filter_all(q0, pss); if (constrs) { - var try_non_omega = function (param) { - var p = param[0]; + let try_non_omega = function (param) { + let p = param[0]; if (is_absent_pat(p)) { return /* Rnone */0; } - var r = exhaust(ext, param[1], (Stdlib__List.length(simple_match_args(p, omega)) + n | 0) - 1 | 0); + let r = exhaust(ext, param[1], (Stdlib__List.length(simple_match_args(p, omega)) + n | 0) - 1 | 0); if (r) { return /* Rsome */{ _0: do_set_args(false, p, r._0) @@ -57290,14 +57290,14 @@ function exhaust(ext, pss, n) { } }; if (full_match(true, false, constrs) && !should_extend(ext, constrs)) { - var _param = constrs; + let _param = constrs; while(true) { - var param = _param; + let param = _param; if (!param) { return /* Rnone */0; } - var match = param.hd; - var r = Curry._1(try_non_omega, [ + let match = param.hd; + let r = Curry._1(try_non_omega, [ match[0], match[1] ]); @@ -57308,7 +57308,7 @@ function exhaust(ext, pss, n) { continue ; }; } - var r$1 = exhaust(ext, filter_extra(pss), n - 1 | 0); + let r$1 = exhaust(ext, filter_extra(pss), n - 1 | 0); if (!r$1) { return /* Rnone */0; } @@ -57321,14 +57321,14 @@ function exhaust(ext, pss, n) { }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Empty) { return fatal_error("Parmatch.exhaust"); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } else { - var r$2 = exhaust(ext, filter_extra(pss), n - 1 | 0); + let r$2 = exhaust(ext, filter_extra(pss), n - 1 | 0); if (r$2) { return /* Rsome */{ _0: { @@ -57343,7 +57343,7 @@ function exhaust(ext, pss, n) { } function combinations(f, lst, lst$p) { - var iter2 = function (x, param) { + let iter2 = function (x, param) { if (param) { return { hd: Curry._2(f, x, param.hd), @@ -57353,7 +57353,7 @@ function combinations(f, lst, lst$p) { return /* [] */0; } }; - var iter = function (param) { + let iter = function (param) { if (param) { return Stdlib.$at(iter2(param.hd, lst$p), iter(param.tl)); } else { @@ -57375,15 +57375,15 @@ function exhaust_gadt(ext, pss, n) { if (!pss.hd) { return /* Rnone */0; } - var q0 = discr_pat(omega, pss); - var constrs = filter_all(q0, pss); + let q0 = discr_pat(omega, pss); + let constrs = filter_all(q0, pss); if (constrs) { - var try_non_omega = function (param) { - var p = param[0]; + let try_non_omega = function (param) { + let p = param[0]; if (is_absent_pat(p)) { return /* Rnone */0; } - var r = exhaust_gadt(ext, param[1], (Stdlib__List.length(simple_match_args(p, omega)) + n | 0) - 1 | 0); + let r = exhaust_gadt(ext, param[1], (Stdlib__List.length(simple_match_args(p, omega)) + n | 0) - 1 | 0); if (r) { return /* Rsome */{ _0: Stdlib__List.map((function (row) { @@ -57394,17 +57394,17 @@ function exhaust_gadt(ext, pss, n) { return r; } }; - var before = try_many_gadt(try_non_omega, constrs); + let before = try_many_gadt(try_non_omega, constrs); if (full_match_gadt(constrs) && !should_extend(ext, constrs)) { return before; } - var r = exhaust_gadt(ext, filter_extra(pss), n - 1 | 0); + let r = exhaust_gadt(ext, filter_extra(pss), n - 1 | 0); if (!r) { return before; } try { - var missing_trailing = build_other_gadt(ext, constrs); - var dug = combinations((function (head, tail) { + let missing_trailing = build_other_gadt(ext, constrs); + let dug = combinations((function (head, tail) { return { hd: head, tl: tail @@ -57421,14 +57421,14 @@ function exhaust_gadt(ext, pss, n) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Empty) { return fatal_error("Parmatch.exhaust"); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } else { - var r$1 = exhaust_gadt(ext, filter_extra(pss), n - 1 | 0); + let r$1 = exhaust_gadt(ext, filter_extra(pss), n - 1 | 0); if (r$1) { return /* Rsome */{ _0: Stdlib__List.map((function (row) { @@ -57445,17 +57445,17 @@ function exhaust_gadt(ext, pss, n) { } function exhaust_gadt$1(ext, pss, n) { - var ret = exhaust_gadt(ext, pss, n); + let ret = exhaust_gadt(ext, pss, n); if (!ret) { return /* Rnone */0; } - var lst = ret._0; + let lst = ret._0; if (Caml_obj.caml_equal(lst, /* [] */0)) { return /* Rsome */{ _0: omegas(n) }; } - var singletons = Stdlib__List.map((function (param) { + let singletons = Stdlib__List.map((function (param) { if (param) { if (param.tl) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -57488,23 +57488,23 @@ function exhaust_gadt$1(ext, pss, n) { function pressure_variants(_tdefs, _pss) { while(true) { - var pss = _pss; - var tdefs = _tdefs; + let pss = _pss; + let tdefs = _tdefs; if (!pss) { return false; } if (!pss.hd) { return true; } - var q0 = discr_pat(omega, pss); - var constrs = filter_all(q0, pss); + let q0 = discr_pat(omega, pss); + let constrs = filter_all(q0, pss); if (constrs) { - var try_non_omega = (function(tdefs){ + let try_non_omega = (function(tdefs){ return function try_non_omega(param) { if (!param) { return true; } - var ok = pressure_variants(tdefs, param.hd[1]); + let ok = pressure_variants(tdefs, param.hd[1]); if (try_non_omega(param.tl)) { return ok; } else { @@ -57520,13 +57520,13 @@ function pressure_variants(_tdefs, _pss) { _tdefs = undefined; continue ; } - var full = full_match(true, true, constrs); - var ok = full ? try_non_omega(constrs) : try_non_omega(filter_all(q0, mark_partial(pss))); + let full = full_match(true, true, constrs); + let ok = full ? try_non_omega(constrs) : try_non_omega(filter_all(q0, mark_partial(pss))); if (constrs) { - var p = constrs.hd[0]; - var tmp = p.pat_desc; + let p = constrs.hd[0]; + let tmp = p.pat_desc; if (typeof tmp !== "number" && tmp.TAG === /* Tpat_variant */5 && tdefs !== undefined) { - var row = row_of_pat(p); + let row = row_of_pat(p); if (row_fixed(row) || pressure_variants(undefined, filter_extra(pss))) { } else { @@ -57552,8 +57552,8 @@ function make_row(ps) { function unalias$1(_p) { while(true) { - var p = _p; - var match = p.pat_desc; + let p = _p; + let match = p.pat_desc; if (typeof match === "number") { return p; } @@ -57567,10 +57567,10 @@ function unalias$1(_p) { function is_var_column(rs) { return Stdlib__List.for_all((function (r) { - var match = r.active; + let match = r.active; if (match) { - var p = match.hd; - var match$1 = unalias$1(p).pat_desc; + let p = match.hd; + let match$1 = unalias$1(p).pat_desc; if (typeof match$1 === "number" || match$1.TAG === /* Tpat_var */0) { return true; } else { @@ -57590,8 +57590,8 @@ function is_var_column(rs) { function or_args(_p) { while(true) { - var p = _p; - var match = p.pat_desc; + let p = _p; + let match = p.pat_desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -57625,7 +57625,7 @@ function or_args(_p) { } function remove$1(r) { - var match = r.active; + let match = r.active; if (match) { return { no_ors: r.no_ors, @@ -57644,7 +57644,7 @@ function remove$1(r) { } function push_no_or(r) { - var match = r.active; + let match = r.active; if (match) { return { no_ors: { @@ -57666,7 +57666,7 @@ function push_no_or(r) { } function push_or(r) { - var match = r.active; + let match = r.active; if (match) { return { no_ors: r.no_ors, @@ -57694,18 +57694,18 @@ function discr_pat$1(q, rs) { } function filter_one$1(q, rs) { - var filter_rec = function (_rs) { + let filter_rec = function (_rs) { while(true) { - var rs = _rs; + let rs = _rs; if (!rs) { return /* [] */0; } - var rem = rs.tl; - var r = rs.hd; - var match = r.active; + let rem = rs.tl; + let r = rs.hd; + let match = r.active; if (match) { - var p = match.hd; - var match$1 = p.pat_desc; + let p = match.hd; + let match$1 = p.pat_desc; if (typeof match$1 !== "number") { switch (match$1.TAG | 0) { case /* Tpat_alias */1 : @@ -57722,7 +57722,7 @@ function filter_one$1(q, rs) { }; continue ; case /* Tpat_or */8 : - var ps = match.tl; + let ps = match.tl; _rs = { hd: { no_ors: r.no_ors, @@ -57780,12 +57780,12 @@ function make_vector(r) { } function extract_elements(qs) { - var do_rec = function (seen, param) { + let do_rec = function (seen, param) { if (!param) { return /* [] */0; } - var rem = param.tl; - var q = param.hd; + let rem = param.tl; + let q = param.hd; return { hd: { no_ors: Stdlib.$at(Stdlib__List.rev_append(seen, rem), qs.no_ors), @@ -57806,9 +57806,9 @@ function extract_elements(qs) { function extract_columns(pss, qs) { if (pss) { - var rs = Stdlib__List.map(extract_elements, pss); + let rs = Stdlib__List.map(extract_elements, pss); if (rs) { - var i = Stdlib__List.map((function (x) { + let i = Stdlib__List.map((function (x) { return { hd: x, tl: /* [] */0 @@ -57840,14 +57840,14 @@ function extract_columns(pss, qs) { function every_satisfiables(_pss, _qs) { while(true) { - var qs = _qs; - var pss = _pss; - var match = qs.active; + let qs = _qs; + let pss = _pss; + let match = qs.active; if (match) { - var q = match.hd; - var uq = unalias$1(q); - var match$1 = uq.pat_desc; - var exit = 0; + let q = match.hd; + let uq = unalias$1(q); + let match$1 = uq.pat_desc; + let exit = 0; if (typeof match$1 === "number") { exit = 2; } else { @@ -57876,7 +57876,7 @@ function every_satisfiables(_pss, _qs) { } switch (exit) { case 1 : - var q0 = discr_pat$1(q, pss); + let q0 = discr_pat$1(q, pss); _qs = { no_ors: qs.no_ors, ors: qs.ors, @@ -57896,13 +57896,13 @@ function every_satisfiables(_pss, _qs) { } } else { - var match$2 = qs.ors; + let match$2 = qs.ors; if (match$2) { return Stdlib__List.fold_right2((function (pss, qs, r) { if (typeof r === "number" && r) { return /* Unused */1; } - var match = qs.active; + let match = qs.active; if (match) { if (match.tl) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -57914,8 +57914,8 @@ function every_satisfiables(_pss, _qs) { ] }); } - var match$1 = or_args(match.hd); - var r_loc = every_both(pss, qs, match$1[0], match$1[1]); + let match$1 = or_args(match.hd); + let r_loc = every_both(pss, qs, match$1[0], match$1[1]); if (typeof r === "number") { if (r) { return /* Unused */1; @@ -57957,30 +57957,30 @@ function every_satisfiables(_pss, _qs) { } function every_both(pss, qs, q1, q2) { - var qs1_no_ors = qs.no_ors; - var qs1_ors = qs.ors; - var qs1_active = { + let qs1_no_ors = qs.no_ors; + let qs1_ors = qs.ors; + let qs1_active = { hd: q1, tl: /* [] */0 }; - var qs1 = { + let qs1 = { no_ors: qs1_no_ors, ors: qs1_ors, active: qs1_active }; - var qs2_no_ors = qs.no_ors; - var qs2_ors = qs.ors; - var qs2_active = { + let qs2_no_ors = qs.no_ors; + let qs2_ors = qs.ors; + let qs2_active = { hd: q2, tl: /* [] */0 }; - var qs2 = { + let qs2 = { no_ors: qs2_no_ors, ors: qs2_ors, active: qs2_active }; - var r1 = every_satisfiables(pss, qs1); - var r2 = every_satisfiables(compat(q1, q2) ? ({ + let r1 = every_satisfiables(pss, qs1); + let r2 = every_satisfiables(compat(q1, q2) ? ({ hd: qs1, tl: pss }) : pss, qs2); @@ -58016,7 +58016,7 @@ function every_both(pss, qs, q1, q2) { return r2; } } - var u1 = r1._0; + let u1 = r1._0; if (typeof r2 === "number") { if (r2) { return /* Upartial */{ @@ -58037,11 +58037,11 @@ function every_both(pss, qs, q1, q2) { function le_pat(_p, _q) { while(true) { - var q = _q; - var p = _p; - var match = p.pat_desc; - var match$1 = q.pat_desc; - var exit = 0; + let q = _q; + let p = _p; + let match = p.pat_desc; + let match$1 = q.pat_desc; + let exit = 0; if (typeof match === "number") { return true; } @@ -58095,8 +58095,8 @@ function le_pat(_p, _q) { } break; case /* Tpat_variant */5 : - var p1 = match._1; - var l1 = match._0; + let p1 = match._1; + let l1 = match._0; if (p1 !== undefined) { if (typeof match$1 !== "number") { switch (match$1.TAG | 0) { @@ -58104,7 +58104,7 @@ function le_pat(_p, _q) { exit = 2; break; case /* Tpat_variant */5 : - var p2 = match$1._1; + let p2 = match$1._1; if (p2 === undefined) { return false; } @@ -58142,7 +58142,7 @@ function le_pat(_p, _q) { exit = 2; break; case /* Tpat_record */6 : - var match$2 = records_args(match._0, match$1._0); + let match$2 = records_args(match._0, match$1._0); return le_pats(match$2[0], match$2[1]); default: @@ -58150,14 +58150,14 @@ function le_pat(_p, _q) { } break; case /* Tpat_array */7 : - var ps = match._0; + let ps = match._0; if (typeof match$1 !== "number") { switch (match$1.TAG | 0) { case /* Tpat_alias */1 : exit = 2; break; case /* Tpat_array */7 : - var qs = match$1._0; + let qs = match$1._0; if (Stdlib__List.length(ps) === Stdlib__List.length(qs)) { return le_pats(ps, qs); } else { @@ -58207,8 +58207,8 @@ function le_pat(_p, _q) { function le_pats(_ps, _qs) { while(true) { - var qs = _qs; - var ps = _ps; + let qs = _qs; + let ps = _ps; if (!ps) { return true; } @@ -58225,15 +58225,15 @@ function le_pats(_ps, _qs) { } function get_mins(le, ps) { - var select_rec = function (_r, _param) { + let select_rec = function (_r, _param) { while(true) { - var param = _param; - var r = _r; + let param = _param; + let r = _r; if (!param) { return r; } - var ps = param.tl; - var p = param.hd; + let ps = param.tl; + let p = param.hd; if (Stdlib__List.exists((function(p){ return function (p0) { return Curry._2(le, p0, p); @@ -58254,7 +58254,7 @@ function get_mins(le, ps) { } function pressure_variants$1(tdefs, patl) { - var pss = Stdlib__List.map((function (p) { + let pss = Stdlib__List.map((function (p) { return { hd: p, tl: { @@ -58268,11 +58268,11 @@ function pressure_variants$1(tdefs, patl) { function initial_matrix(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var match = param.hd; + let match = param.hd; if (match.c_guard === undefined) { return { hd: { @@ -58287,12 +58287,12 @@ function initial_matrix(_param) { }; } -var NoGuard = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Parmatch.NoGuard"); +let NoGuard = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Parmatch.NoGuard"); function initial_all(no_guard, param) { if (param) { - var match = param.hd; - var pat = match.c_lhs; + let match = param.hd; + let pat = match.c_lhs; return { hd: [ { @@ -58316,8 +58316,8 @@ function do_filter_var(param) { if (!param) { return /* [] */0; } - var match = param.hd; - var match$1 = match[0]; + let match = param.hd; + let match$1 = match[0]; if (match$1) { return { hd: [ @@ -58332,19 +58332,19 @@ function do_filter_var(param) { } function do_filter_one(q, pss) { - var filter_rec = function (_param) { + let filter_rec = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var match = param.hd; - var match$1 = match[0]; + let match = param.hd; + let match$1 = match[0]; if (!match$1) { return /* [] */0; } - var p = match$1.hd; - var match$2 = p.pat_desc; + let p = match$1.hd; + let match$2 = p.pat_desc; if (typeof match$2 !== "number") { switch (match$2.TAG | 0) { case /* Tpat_alias */1 : @@ -58360,8 +58360,8 @@ function do_filter_one(q, pss) { }; continue ; case /* Tpat_or */8 : - var loc = match[1]; - var ps = match$1.tl; + let loc = match[1]; + let ps = match$1.tl; _param = { hd: [ { @@ -58386,7 +58386,7 @@ function do_filter_one(q, pss) { } } - var pss = param.tl; + let pss = param.tl; if (simple_match(q, p)) { return { hd: [ @@ -58405,19 +58405,19 @@ function do_filter_one(q, pss) { function do_match(_pss, _qs) { while(true) { - var qs = _qs; - var pss = _pss; + let qs = _qs; + let pss = _pss; if (qs) { - var qs$1 = qs.tl; - var q = qs.hd; - var match = q.pat_desc; + let qs$1 = qs.tl; + let q = qs.hd; + let match = q.pat_desc; if (typeof match === "number") { _qs = qs$1; _pss = do_filter_var(pss); continue ; } if (match.TAG === /* Tpat_or */8) { - var r = do_match(pss, { + let r = do_match(pss, { hd: match._0, tl: qs$1 }); @@ -58430,7 +58430,7 @@ function do_match(_pss, _qs) { }; continue ; } - var q0 = normalize_pat(q); + let q0 = normalize_pat(q); _qs = Stdlib.$at(simple_match_args(q0, q), qs$1); _pss = do_filter_one(q0, pss); continue ; @@ -58438,7 +58438,7 @@ function do_match(_pss, _qs) { if (!pss) { return ; } - var match$1 = pss.hd; + let match$1 = pss.hd; if (match$1[0]) { return ; } else { @@ -58450,14 +58450,14 @@ function do_match(_pss, _qs) { function check_partial_all(v, casel) { try { - var pss = initial_all(true, casel); + let pss = initial_all(true, casel); return do_match(pss, { hd: v, tl: /* [] */0 }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === NoGuard) { return ; } @@ -58467,11 +58467,11 @@ function check_partial_all(v, casel) { function get_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var x = Curry._1(f, param.hd); + let x = Curry._1(f, param.hd); if (x !== undefined) { return x; } @@ -58484,7 +58484,7 @@ function select(param) { if (!param) { return /* [] */0; } - var xs = param.hd; + let xs = param.hd; if (!param.tl) { return Stdlib__List.map((function (y) { return { @@ -58496,8 +58496,8 @@ function select(param) { if (!xs) { return /* [] */0; } - var ys = param.tl; - var x = xs.hd; + let ys = param.tl; + let x = xs.hd; return Stdlib.$at(Stdlib__List.map((function (lst) { return { hd: x, @@ -58509,23 +58509,23 @@ function select(param) { })); } -var name_counter$1 = { +let name_counter$1 = { contents: 0 }; function fresh(name) { - var current = name_counter$1.contents; + let current = name_counter$1.contents; name_counter$1.contents = name_counter$1.contents + 1 | 0; return "#$" + (name + String(current)); } function conv(typed) { - var constrs = Stdlib__Hashtbl.create(undefined, 0); - var labels = Stdlib__Hashtbl.create(undefined, 0); - var loop = function (_pat) { + let constrs = Stdlib__Hashtbl.create(undefined, 0); + let labels = Stdlib__Hashtbl.create(undefined, 0); + let loop = function (_pat) { while(true) { - var pat = _pat; - var lst = pat.pat_desc; + let pat = _pat; + let lst = pat.pat_desc; if (typeof lst === "number") { return { hd: mk$1(undefined, undefined, /* Ppat_any */0), @@ -58537,7 +58537,7 @@ function conv(typed) { _pat = lst._0; continue ; case /* Tpat_tuple */3 : - var results = select(Stdlib__List.map(loop, lst._0)); + let results = select(Stdlib__List.map(loop, lst._0)); return Stdlib__List.map((function (lst) { return mk$1(undefined, undefined, { TAG: /* Ppat_tuple */4, @@ -58545,24 +58545,24 @@ function conv(typed) { }); }), results); case /* Tpat_construct */4 : - var lst$1 = lst._2; - var cstr = lst._1; - var id = fresh(cstr.cstr_name); - var lid_txt = { + let lst$1 = lst._2; + let cstr = lst._1; + let id = fresh(cstr.cstr_name); + let lid_txt = { TAG: /* Lident */0, _0: id }; - var lid_loc = lst._0.loc; - var lid = { + let lid_loc = lst._0.loc; + let lid = { txt: lid_txt, loc: lid_loc }; Stdlib__Hashtbl.add(constrs, id, cstr); - var results$1 = select(Stdlib__List.map(loop, lst$1)); + let results$1 = select(Stdlib__List.map(loop, lst$1)); if (lst$1) { return Stdlib__List.map((function(lid){ return function (lst) { - var arg; + let arg; if (lst) { arg = lst.tl ? mk$1(undefined, undefined, { TAG: /* Ppat_tuple */4, @@ -58596,8 +58596,8 @@ function conv(typed) { }; } case /* Tpat_variant */5 : - var p_opt = lst._1; - var label = lst._0; + let p_opt = lst._1; + let label = lst._0; if (p_opt === undefined) { return { hd: mk$1(undefined, undefined, { @@ -58608,7 +58608,7 @@ function conv(typed) { tl: /* [] */0 }; } - var results$2 = loop(p_opt); + let results$2 = loop(p_opt); return Stdlib__List.map((function(label){ return function (p) { return mk$1(undefined, undefined, { @@ -58619,13 +58619,13 @@ function conv(typed) { } }(label)), results$2); case /* Tpat_record */6 : - var subpatterns = lst._0; - var pats = select(Stdlib__List.map((function (param) { + let subpatterns = lst._0; + let pats = select(Stdlib__List.map((function (param) { return loop(param[2]); }), subpatterns)); - var label_idents = Stdlib__List.map((function (param) { - var lbl = param[1]; - var id = fresh(lbl.lbl_name); + let label_idents = Stdlib__List.map((function (param) { + let lbl = param[1]; + let id = fresh(lbl.lbl_name); Stdlib__Hashtbl.add(labels, id, lbl); return { TAG: /* Lident */0, @@ -58634,7 +58634,7 @@ function conv(typed) { }), subpatterns); return Stdlib__List.map((function(label_idents){ return function (lst) { - var lst$1 = Stdlib__List.map2((function (lid, pat) { + let lst$1 = Stdlib__List.map2((function (lid, pat) { return [ { txt: lid, @@ -58651,7 +58651,7 @@ function conv(typed) { } }(label_idents)), pats); case /* Tpat_array */7 : - var results$3 = select(Stdlib__List.map(loop, lst._0)); + let results$3 = select(Stdlib__List.map(loop, lst._0)); return Stdlib__List.map((function (lst) { return mk$1(undefined, undefined, { TAG: /* Ppat_array */8, @@ -58661,7 +58661,7 @@ function conv(typed) { case /* Tpat_or */8 : return Stdlib.$at(loop(lst._0), loop(lst._1)); case /* Tpat_lazy */9 : - var results$4 = loop(lst._0); + let results$4 = loop(lst._0); return Stdlib__List.map((function (p) { return mk$1(undefined, undefined, { TAG: /* Ppat_lazy */12, @@ -58676,7 +58676,7 @@ function conv(typed) { } }; }; - var ps = loop(typed); + let ps = loop(typed); return [ ps, constrs, @@ -58686,21 +58686,21 @@ function conv(typed) { function do_check_partial(pred, exhaust, loc, casel, pss) { if (pss) { - var match = Curry._3(exhaust, undefined, pss, Stdlib__List.length(pss.hd)); + let match = Curry._3(exhaust, undefined, pss, Stdlib__List.length(pss.hd)); if (!match) { return /* Total */1; } - var match$1 = match._0; + let match$1 = match._0; if (!match$1) { return fatal_error("Parmatch.check_partial"); } if (match$1.tl) { return fatal_error("Parmatch.check_partial"); } - var u = match$1.hd; - var v; + let u = match$1.hd; + let v; if (pred !== undefined) { - var match$2 = conv(u); + let match$2 = conv(u); v = get_first(Curry._2(pred, match$2[1], match$2[2]), match$2[0]); } else { v = u; @@ -58708,9 +58708,9 @@ function do_check_partial(pred, exhaust, loc, casel, pss) { if (v === undefined) { return /* Total */1; } - var match$3 = v.pat_desc; - var errmsg; - var exit = 0; + let match$3 = v.pat_desc; + let errmsg; + let exit = 0; if (typeof match$3 === "number" || !(match$3.TAG === /* Tpat_construct */4 && match$3._1.cstr_name === "*extension*")) { exit = 1; } else { @@ -58718,10 +58718,10 @@ function do_check_partial(pred, exhaust, loc, casel, pss) { } if (exit === 1) { try { - var buf = Stdlib__Buffer.create(16); - var fmt = Stdlib__Format.formatter_of_buffer(buf); + let buf = Stdlib__Buffer.create(16); + let fmt = Stdlib__Format.formatter_of_buffer(buf); top_pretty(fmt, v); - var match$4 = check_partial_all(v, casel); + let match$4 = check_partial_all(v, casel); if (match$4 !== undefined) { Stdlib__Buffer.add_string(buf, "\n(However, some guarded clause may match this value.)"); } @@ -58754,7 +58754,7 @@ function add_path(path, paths) { tl: /* [] */0 }; } - var x = paths.hd; + let x = paths.hd; if (same(path, x)) { return paths; } else { @@ -58771,9 +58771,9 @@ function extendable_path(path) { function collect_paths_from_pat(_r, _p) { while(true) { - var p = _p; - var r = _r; - var p$1 = p.pat_desc; + let p = _p; + let r = _r; + let p$1 = p.pat_desc; if (typeof p$1 === "number") { return r; } @@ -58787,10 +58787,10 @@ function collect_paths_from_pat(_r, _p) { return Stdlib__List.fold_left(collect_paths_from_pat, r, p$1._2); } - var path = get_type_path(p.pat_type, p.pat_env); + let path = get_type_path(p.pat_type, p.pat_env); return Stdlib__List.fold_left(collect_paths_from_pat, extendable_path(path) ? add_path(path, r) : r, p$1._2); case /* Tpat_variant */5 : - var p$2 = p$1._1; + let p$2 = p$1._1; if (p$2 === undefined) { return r; } @@ -58818,7 +58818,7 @@ function collect_paths_from_pat(_r, _p) { } function do_check_fragile_param(exhaust, loc, casel, pss) { - var exts = Stdlib__List.fold_left((function (r, c) { + let exts = Stdlib__List.fold_left((function (r, c) { return collect_paths_from_pat(r, c.c_lhs); }), /* [] */0, casel); if (!exts) { @@ -58827,9 +58827,9 @@ function do_check_fragile_param(exhaust, loc, casel, pss) { if (!pss) { return ; } - var ps = pss.hd; + let ps = pss.hd; Stdlib__List.iter((function (ext) { - var match = Curry._3(exhaust, ext, pss, Stdlib__List.length(ps)); + let match = Curry._3(exhaust, ext, pss, Stdlib__List.length(ps)); if (match) { return ; } else { @@ -58856,9 +58856,9 @@ function check_partial_param(do_check_partial, do_check_fragile, loc, casel) { })) { return /* Partial */0; } - var pss = initial_matrix(casel); - var pss$1 = get_mins(le_pats, pss); - var total = Curry._3(do_check_partial, loc, casel, pss$1); + let pss = initial_matrix(casel); + let pss$1 = get_mins(le_pats, pss); + let total = Curry._3(do_check_partial, loc, casel, pss$1); if (total === /* Total */1 && is_active({ TAG: /* Fragile_match */1, _0: "" @@ -58872,26 +58872,26 @@ function check_partial(param, param$1) { return check_partial_param(do_check_partial_normal, do_check_fragile_normal, param, param$1); } -var Already_bound = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Already_bound"); +let Already_bound = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Already_bound"); -var $$Error$6 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Error"); +let $$Error$6 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Error"); -var Error_forward = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Error_forward"); +let Error_forward = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typetexp.Error_forward"); function string_of_payload(param) { switch (param.TAG | 0) { case /* PStr */0 : - var match = param._0; + let match = param._0; if (!match) { return ; } - var match$1 = match.hd.pstr_desc; + let match$1 = match.hd.pstr_desc; if (match$1.TAG !== /* Pstr_eval */0) { return ; } - var c = match$1._0.pexp_desc; + let c = match$1._0.pexp_desc; if (c.TAG === /* Pexp_constant */1 && !match.tl) { - var param$1 = c._0; + let param$1 = c._0; if (param$1.TAG === /* Const_string */2) { return param$1._0; } else { @@ -58908,9 +58908,9 @@ function string_of_payload(param) { } function error_of_extension(ext) { - var match = ext[0]; - var txt = match.txt; - var exit = 0; + let match = ext[0]; + let txt = match.txt; + let exit = 0; switch (txt) { case "error" : case "ocaml.error" : @@ -58935,13 +58935,13 @@ function error_of_extension(ext) { }), txt); } if (exit === 1) { - var p = ext[1]; - var loc = match.loc; - var sub_from = function (inner) { + let p = ext[1]; + let loc = match.loc; + let sub_from = function (inner) { if (!inner) { return /* [] */0; } - var match = inner.hd.pstr_desc; + let match = inner.hd.pstr_desc; if (match.TAG === /* Pstr_extension */14) { return { hd: error_of_extension(match._0), @@ -58969,26 +58969,26 @@ function error_of_extension(ext) { }; } }; - var exit$1 = 0; + let exit$1 = 0; switch (p.TAG | 0) { case /* PStr */0 : - var match$1 = p._0; + let match$1 = p._0; if (match$1) { - var match$2 = match$1.hd.pstr_desc; + let match$2 = match$1.hd.pstr_desc; if (match$2.TAG === /* Pstr_eval */0) { - var match$3 = match$2._0.pexp_desc; + let match$3 = match$2._0.pexp_desc; if (match$3.TAG === /* Pexp_constant */1) { - var match$4 = match$3._0; + let match$4 = match$3._0; if (match$4.TAG === /* Const_string */2) { - var msg = match$4._0; - var exit$2 = 0; - var match$5 = match$1.tl; + let msg = match$4._0; + let exit$2 = 0; + let match$5 = match$1.tl; if (match$5) { - var match$6 = match$5.hd.pstr_desc; + let match$6 = match$5.hd.pstr_desc; if (match$6.TAG === /* Pstr_eval */0) { - var match$7 = match$6._0.pexp_desc; + let match$7 = match$6._0.pexp_desc; if (match$7.TAG === /* Pexp_constant */1) { - var match$8 = match$7._0; + let match$8 = match$7._0; if (match$8.TAG === /* Const_string */2) { return error(loc, sub_from(match$5.tl), match$8._0, msg); } @@ -59057,7 +59057,7 @@ function check_deprecated(loc, attrs, s) { default: return ; } - var txt = string_of_payload(param[1]); + let txt = string_of_payload(param[1]); if (txt !== undefined) { if (bs_vscode) { return prerr_warning(loc, { @@ -59079,10 +59079,10 @@ function check_deprecated(loc, attrs, s) { }), attrs); } -var newrecord$1 = Caml_obj.caml_obj_dup(default_mapper); +let newrecord$1 = Caml_obj.caml_obj_dup(default_mapper); newrecord$1.attribute = (function (param, a) { - var exit = 0; + let exit = 0; switch (a[0].txt) { case "ocaml.ppwarning" : case "ppwarning" : @@ -59092,17 +59092,17 @@ newrecord$1.attribute = (function (param, a) { } if (exit === 1) { - var match = a[1]; + let match = a[1]; switch (match.TAG | 0) { case /* PStr */0 : - var match$1 = match._0; + let match$1 = match._0; if (match$1) { - var match$2 = match$1.hd; - var match$3 = match$2.pstr_desc; + let match$2 = match$1.hd; + let match$3 = match$2.pstr_desc; if (match$3.TAG === /* Pstr_eval */0) { - var match$4 = match$3._0.pexp_desc; + let match$4 = match$3._0.pexp_desc; if (match$4.TAG === /* Pexp_constant */1) { - var match$5 = match$4._0; + let match$5 = match$4._0; if (match$5.TAG === /* Const_string */2) { if (match$1.tl) { @@ -59129,7 +59129,7 @@ newrecord$1.attribute = (function (param, a) { return a; }); -var warning_scope = { +let warning_scope = { contents: /* [] */0 }; @@ -59141,7 +59141,7 @@ function warning_enter_scope(param) { } function warning_leave_scope(param) { - var match = warning_scope.contents; + let match = warning_scope.contents; if (match) { current.contents = match.hd; warning_scope.contents = match.tl; @@ -59158,8 +59158,8 @@ function warning_leave_scope(param) { } function warning_attribute(attrs) { - var $$process = function (loc, txt, errflag, payload) { - var s = string_of_payload(payload); + let $$process = function (loc, txt, errflag, payload) { + let s = string_of_payload(payload); if (s === undefined) { return prerr_warning(loc, { TAG: /* Attribute_payload */30, @@ -59171,7 +59171,7 @@ function warning_attribute(attrs) { return parse_options(errflag, s); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Arg.Bad) { return prerr_warning(loc, { TAG: /* Attribute_payload */30, @@ -59183,9 +59183,9 @@ function warning_attribute(attrs) { } }; Stdlib__List.iter((function (param) { - var match = param[0]; - var txt = match.txt; - var exit = 0; + let match = param[0]; + let txt = match.txt; + let exit = 0; switch (txt) { case "ocaml.warnerror" : case "warnerror" : @@ -59209,13 +59209,13 @@ function warning_attribute(attrs) { } function narrow_unbound_lid_error(env, loc, lid, make_error) { - var check_module = function (mlid) { + let check_module = function (mlid) { try { lookup_module(true, mlid, env); return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return narrow_unbound_lid_error(env, loc, mlid, (function (lid) { return { @@ -59239,10 +59239,10 @@ function narrow_unbound_lid_error(env, loc, lid, make_error) { case /* Lident */0 : break; case /* Ldot */1 : - var mlid = lid._0; + let mlid = lid._0; check_module(mlid); - var md = find_module(false, lookup_module(true, mlid, env), env); - var match = scrape_alias(env, undefined, md.md_type); + let md = find_module(false, lookup_module(true, mlid, env), env); + let match = scrape_alias(env, undefined, md.md_type); if (match.TAG === /* Mty_functor */2) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59281,7 +59281,7 @@ function find_component(lookup, make_error, env, loc, lid) { try { switch (lid.TAG | 0) { case /* Ldot */1 : - var match = lid._0; + let match = lid._0; switch (match.TAG | 0) { case /* Lident */0 : if (match._0 === "*predef*") { @@ -59304,7 +59304,7 @@ function find_component(lookup, make_error, env, loc, lid) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return narrow_unbound_lid_error(env, loc, lid, make_error); } @@ -59321,7 +59321,7 @@ function find_component(lookup, make_error, env, loc, lid) { } function find_type(env, loc, lid) { - var r = find_component(lookup_type$1, (function (lid) { + let r = find_component(lookup_type$1, (function (lid) { return { TAG: /* Unbound_type_constructor */1, _0: lid @@ -59359,7 +59359,7 @@ function find_all_labels(param, param$1, param$2) { } function find_class$1(env, loc, lid) { - var r = find_component(lookup_class$1, (function (lid) { + let r = find_component(lookup_class$1, (function (lid) { return { TAG: /* Unbound_class */21, _0: lid @@ -59371,7 +59371,7 @@ function find_class$1(env, loc, lid) { function find_value$1(env, loc, lid) { check_value_name(last$1(lid), loc); - var r = find_component(lookup_value$1, (function (lid) { + let r = find_component(lookup_value$1, (function (lid) { return { TAG: /* Unbound_value */17, _0: lid @@ -59382,7 +59382,7 @@ function find_value$1(env, loc, lid) { } function lookup_module$1(loadOpt, env, loc, lid) { - var load = loadOpt !== undefined ? loadOpt : false; + let load = loadOpt !== undefined ? loadOpt : false; return find_component((function (lid, env) { return [ lookup_module(load, lid, env), @@ -59397,8 +59397,8 @@ function lookup_module$1(loadOpt, env, loc, lid) { } function find_module$1(env, loc, lid) { - var path = lookup_module$1(true, env, loc, lid); - var decl = find_module(false, path, env); + let path = lookup_module$1(true, env, loc, lid); + let decl = find_module(false, path, env); check_deprecated(loc, decl.md_attributes, name(undefined, path)); return [ path, @@ -59407,7 +59407,7 @@ function find_module$1(env, loc, lid) { } function find_modtype$1(env, loc, lid) { - var r = find_component(lookup_modtype, (function (lid) { + let r = find_component(lookup_modtype, (function (lid) { return { TAG: /* Unbound_modtype */22, _0: lid @@ -59418,7 +59418,7 @@ function find_modtype$1(env, loc, lid) { } function find_class_type(env, loc, lid) { - var r = find_component(lookup_cltype$1, (function (lid) { + let r = find_component(lookup_cltype$1, (function (lid) { return { TAG: /* Unbound_cltype */23, _0: lid @@ -59446,7 +59446,7 @@ function unbound_label_error(env, lid) { })); } -var transl_modtype_longident = { +let transl_modtype_longident = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -59459,7 +59459,7 @@ var transl_modtype_longident = { }) }; -var transl_modtype = { +let transl_modtype = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -59473,9 +59473,9 @@ var transl_modtype = { }; function create_package_mty(fake, loc, env, param) { - var l = Stdlib__List.sort((function (param, param$1) { - var s2 = param$1[0]; - var s1 = param[0]; + let l = Stdlib__List.sort((function (param, param$1) { + let s2 = param$1[0]; + let s1 = param[0]; if (Caml_obj.caml_equal(s1.txt, s2.txt)) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59492,13 +59492,13 @@ function create_package_mty(fake, loc, env, param) { return [ l, Stdlib__List.fold_left((function (mty, param) { - var s = param[0]; - var d_ptype_name = { + let s = param[0]; + let d_ptype_name = { txt: last$1(s.txt), loc: s.loc }; - var d_ptype_manifest = fake ? undefined : param[1]; - var d = { + let d_ptype_manifest = fake ? undefined : param[1]; + let d = { ptype_name: d_ptype_name, ptype_params: /* [] */0, ptype_cstrs: /* [] */0, @@ -59530,19 +59530,19 @@ function create_package_mty(fake, loc, env, param) { ]; } -var type_variables = { +let type_variables = { contents: /* Empty */0 }; -var univars = { +let univars = { contents: /* [] */0 }; -var pre_univars = { +let pre_univars = { contents: /* [] */0 }; -var used_variables = { +let used_variables = { contents: /* Empty */0 }; @@ -59581,10 +59581,10 @@ function validate_name(s) { } function transl_type_param(env, styp) { - var loc = styp.ptyp_loc; - var name = styp.ptyp_desc; + let loc = styp.ptyp_loc; + let name = styp.ptyp_desc; if (typeof name === "number") { - var ty = new_global_var(validate_name("_"), undefined); + let ty = new_global_var(validate_name("_"), undefined); return { ctyp_desc: /* Ttyp_any */0, ctyp_type: ty, @@ -59594,8 +59594,8 @@ function transl_type_param(env, styp) { }; } if (name.TAG === /* Ptyp_var */0) { - var name$1 = name._0; - var ty$1; + let name$1 = name._0; + let ty$1; try { if (name$1 !== "" && Caml_string.get(name$1, 0) === /* '_' */95) { throw new Caml_js_exceptions.MelangeError($$Error$6, { @@ -59614,9 +59614,9 @@ function transl_type_param(env, styp) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var v = new_global_var(validate_name(name$1), undefined); + let v = new_global_var(validate_name(name$1), undefined); type_variables.contents = add$5(name$1, v, type_variables.contents); ty$1 = v; } else { @@ -59645,7 +59645,7 @@ function transl_type_param(env, styp) { } function new_pre_univar(name, param) { - var v = newvar(validate_name(name), undefined); + let v = newvar(validate_name(name), undefined); pre_univars.contents = { hd: v, tl: pre_univars.contents @@ -59657,7 +59657,7 @@ function swap_list(l) { if (!l) { return l; } - var match = l.tl; + let match = l.tl; if (match) { return { hd: match.hd, @@ -59672,8 +59672,8 @@ function swap_list(l) { } function transl_type(env, policy, styp) { - var loc = styp.ptyp_loc; - var ctyp = function (ctyp_desc, ctyp_type) { + let loc = styp.ptyp_loc; + let ctyp = function (ctyp_desc, ctyp_type) { return { ctyp_desc: ctyp_desc, ctyp_type: ctyp_type, @@ -59682,9 +59682,9 @@ function transl_type(env, policy, styp) { ctyp_attributes: styp.ptyp_attributes }; }; - var name = styp.ptyp_desc; + let name = styp.ptyp_desc; if (typeof name === "number") { - var ty; + let ty; if (policy === /* Univars */2) { ty = new_pre_univar(undefined, undefined); } else { @@ -59705,7 +59705,7 @@ function transl_type(env, policy, styp) { } switch (name.TAG | 0) { case /* Ptyp_var */0 : - var name$1 = name._0; + let name$1 = name._0; if (name$1 !== "" && Caml_string.get(name$1, 0) === /* '_' */95) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59717,20 +59717,20 @@ function transl_type(env, policy, styp) { } }); } - var ty$1; + let ty$1; try { ty$1 = instance(undefined, env, Stdlib__List.assoc(name$1, univars.contents)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { try { ty$1 = instance(undefined, env, find$2(name$1, used_variables.contents)[0]); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { - var v = policy === /* Univars */2 ? new_pre_univar(name$1, undefined) : newvar(validate_name(name$1), undefined); + let v = policy === /* Univars */2 ? new_pre_univar(name$1, undefined) : newvar(validate_name(name$1), undefined); used_variables.contents = add$5(name$1, [ v, styp.ptyp_loc @@ -59749,10 +59749,10 @@ function transl_type(env, policy, styp) { _0: name$1 }, ty$1); case /* Ptyp_arrow */1 : - var l = name._0; - var cty1 = transl_type(env, policy, name._1); - var cty2 = transl_type(env, policy, name._2); - var ty$2 = newty2(current_level.contents, { + let l = name._0; + let cty1 = transl_type(env, policy, name._1); + let cty2 = transl_type(env, policy, name._2); + let ty$2 = newty2(current_level.contents, { TAG: /* Tarrow */1, _0: l, _1: cty1.ctyp_type, @@ -59766,33 +59766,33 @@ function transl_type(env, policy, styp) { _2: cty2 }, ty$2); case /* Ptyp_tuple */2 : - var stl = name._0; + let stl = name._0; if (Stdlib__List.length(stl) < 2) { ill_formed_ast(loc, "Tuples must have at least 2 components."); } - var ctys = Stdlib__List.map((function (param) { + let ctys = Stdlib__List.map((function (param) { return transl_type(env, policy, param); }), stl); - var desc = { + let desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (ctyp) { return ctyp.ctyp_type; }), ctys) }; - var ty$3 = newty2(current_level.contents, desc); + let ty$3 = newty2(current_level.contents, desc); return ctyp({ TAG: /* Ttyp_tuple */2, _0: ctys }, ty$3); case /* Ptyp_constr */3 : - var stl$1 = name._1; - var lid = name._0; - var match = find_type(env, styp.ptyp_loc, lid.txt); - var decl = match[1]; - var path = match[0]; - var stl$2; + let stl$1 = name._1; + let lid = name._0; + let match = find_type(env, styp.ptyp_loc, lid.txt); + let decl = match[1]; + let path = match[0]; + let stl$2; if (stl$1) { - var t = stl$1.hd; + let t = stl$1.hd; stl$2 = typeof t.ptyp_desc === "number" && !(stl$1.tl || decl.type_arity <= 1) ? Stdlib__List.map((function (param) { return t; }), decl.type_params) : stl$1; @@ -59812,18 +59812,18 @@ function transl_type(env, policy, styp) { } }); } - var args = Stdlib__List.map((function (param) { + let args = Stdlib__List.map((function (param) { return transl_type(env, policy, param); }), stl$2); - var params = instance_list(empty, decl.type_params); - var ty$4 = decl.type_manifest; - var unify_param = ty$4 !== undefined && repr(ty$4).level !== 100000000 ? unify$2 : unify_var; + let params = instance_list(empty, decl.type_params); + let ty$4 = decl.type_manifest; + let unify_param = ty$4 !== undefined && repr(ty$4).level !== 100000000 ? unify$2 : unify_var; Stdlib__List.iter2((function (param, ty$p) { try { return Curry._3(unify_param, env, ty$p, param[1].ctyp_type); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59838,14 +59838,14 @@ function transl_type(env, policy, styp) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), Stdlib__List.combine(stl$2, args), params); - var constr = newconstr(path, Stdlib__List.map((function (ctyp) { + let constr = newconstr(path, Stdlib__List.map((function (ctyp) { return ctyp.ctyp_type; }), args)); try { enforce_constraints(env, constr); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59866,33 +59866,33 @@ function transl_type(env, policy, styp) { _2: args }, constr); case /* Ptyp_object */4 : - var o = name._1; - var fields = Stdlib__List.map((function (param) { + let o = name._1; + let fields = Stdlib__List.map((function (param) { return [ param[0], param[1], transl_poly_type(env, policy, param[2]) ]; }), name._0); - var ty$5 = newobj(transl_fields(loc, env, policy, /* [] */0, o, fields)); + let ty$5 = newobj(transl_fields(loc, env, policy, /* [] */0, o, fields)); return ctyp({ TAG: /* Ttyp_object */4, _0: fields, _1: o }, ty$5); case /* Ptyp_class */5 : - var stl$3 = name._1; - var lid$1 = name._0; - var match$1; + let stl$3 = name._1; + let lid$1 = name._0; + let match$1; try { - var match$2 = lookup_type$1(lid$1.txt, env); - var decl$1 = match$2[1]; - var check = function (_decl) { + let match$2 = lookup_type$1(lid$1.txt, env); + let decl$1 = match$2[1]; + let check = function (_decl) { while(true) { - var decl = _decl; - var ty = decl.type_manifest; + let decl = _decl; + let ty = decl.type_manifest; if (ty !== undefined) { - var row = repr(ty).desc; + let row = repr(ty).desc; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -59933,11 +59933,11 @@ function transl_type(env, policy, styp) { ]; } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { try { - var s = lid$1.txt; - var lid2; + let s = lid$1.txt; + let lid2; switch (s.TAG | 0) { case /* Lident */0 : lid2 = { @@ -59957,7 +59957,7 @@ function transl_type(env, policy, styp) { break; } - var match$3 = lookup_type$1(lid2, env); + let match$3 = lookup_type$1(lid2, env); match$1 = [ match$3[0], match$3[1], @@ -59965,7 +59965,7 @@ function transl_type(env, policy, styp) { ]; } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Stdlib.Not_found) { find_class$1(env, styp.ptyp_loc, lid$1.txt); throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -59983,8 +59983,8 @@ function transl_type(env, policy, styp) { throw new Caml_js_exceptions.MelangeError(exn$3.MEL_EXN_ID, exn$3); } } - var decl$2 = match$1[1]; - var path$1 = match$1[0]; + let decl$2 = match$1[1]; + let path$1 = match$1[0]; if (Stdlib__List.length(stl$3) !== decl$2.type_arity) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -59998,16 +59998,16 @@ function transl_type(env, policy, styp) { } }); } - var args$1 = Stdlib__List.map((function (param) { + let args$1 = Stdlib__List.map((function (param) { return transl_type(env, policy, param); }), stl$3); - var params$1 = instance_list(empty, decl$2.type_params); + let params$1 = instance_list(empty, decl$2.type_params); Stdlib__List.iter2((function (param, ty$p) { try { return unify_var(env, ty$p, param[1].ctyp_type); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60022,15 +60022,15 @@ function transl_type(env, policy, styp) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), Stdlib__List.combine(stl$3, args$1), params$1); - var ty_args = Stdlib__List.map((function (ctyp) { + let ty_args = Stdlib__List.map((function (ctyp) { return ctyp.ctyp_type; }), args$1); - var ty$6; + let ty$6; try { ty$6 = expand_head(env, newconstr(path$1, ty_args)); } catch (raw_exn$5){ - var exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); + let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60044,8 +60044,8 @@ function transl_type(env, policy, styp) { } throw new Caml_js_exceptions.MelangeError(exn$5.MEL_EXN_ID, exn$5); } - var row = ty$6.desc; - var ty$7; + let row = ty$6.desc; + let ty$7; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -60058,7 +60058,7 @@ function transl_type(env, policy, styp) { } switch (row.TAG | 0) { case /* Tobject */4 : - var match$4 = flatten_fields(row._0); + let match$4 = flatten_fields(row._0); if (policy === /* Univars */2) { pre_univars.contents = { hd: match$4[1], @@ -60068,15 +60068,15 @@ function transl_type(env, policy, styp) { ty$7 = ty$6; break; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); - var fields$1 = Stdlib__List.map((function (param) { - var f = param[1]; - var match = row_field_repr_aux(/* [] */0, f); - var tmp; + let row$1 = row_repr_aux(/* [] */0, row._0); + let fields$1 = Stdlib__List.map((function (param) { + let f = param[1]; + let match = row_field_repr_aux(/* [] */0, f); + let tmp; if (typeof match === "number" || match.TAG !== /* Rpresent */0) { tmp = f; } else { - var ty = match._0; + let ty = match._0; tmp = ty !== undefined ? ({ TAG: /* Reither */1, _0: false, @@ -60103,12 +60103,12 @@ function transl_type(env, policy, styp) { tmp ]; }), row$1.row_fields); - var row_row_more = newvar(validate_name(undefined), undefined); - var row_row_name = [ + let row_row_more = newvar(validate_name(undefined), undefined); + let row_row_name = [ path$1, ty_args ]; - var row$2 = { + let row$2 = { row_fields: fields$1, row_more: row_row_more, row_bound: undefined, @@ -60116,8 +60116,8 @@ function transl_type(env, policy, styp) { row_fixed: false, row_name: row_row_name }; - var $$static = static_row(row$2); - var row$3 = $$static ? ({ + let $$static = static_row(row$2); + let row$3 = $$static ? ({ row_fields: fields$1, row_more: newty2(current_level.contents, /* Tnil */0), row_bound: undefined, @@ -60156,30 +60156,30 @@ function transl_type(env, policy, styp) { _2: args$1 }, ty$7); case /* Ptyp_alias */6 : - var alias = name._1; - var st = name._0; - var cty; + let alias = name._1; + let st = name._0; + let cty; try { - var t$1; + let t$1; try { t$1 = Stdlib__List.assoc(alias, univars.contents); } catch (raw_exn$6){ - var exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); + let exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); if (exn$6.MEL_EXN_ID === Stdlib.Not_found) { t$1 = instance(undefined, env, find$2(alias, used_variables.contents)[0]); } else { throw new Caml_js_exceptions.MelangeError(exn$6.MEL_EXN_ID, exn$6); } } - var ty$8 = transl_type(env, policy, st); + let ty$8 = transl_type(env, policy, st); try { unify_var(env, t$1, ty$8.ctyp_type); } catch (raw_exn$7){ - var exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); + let exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); if (exn$7.MEL_EXN_ID === Unify) { - var trace = swap_list(exn$7._1); + let trace = swap_list(exn$7._1); throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, _1: styp.ptyp_loc, @@ -60195,24 +60195,24 @@ function transl_type(env, policy, styp) { cty = ty$8; } catch (raw_exn$8){ - var exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); + let exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); if (exn$8.MEL_EXN_ID === Stdlib.Not_found) { if (principal.contents) { begin_def(undefined); } - var t$2 = newvar(validate_name(undefined), undefined); + let t$2 = newvar(validate_name(undefined), undefined); used_variables.contents = add$5(alias, [ t$2, styp.ptyp_loc ], used_variables.contents); - var ty$9 = transl_type(env, policy, st); + let ty$9 = transl_type(env, policy, st); try { unify_var(env, t$2, ty$9.ctyp_type); } catch (raw_exn$9){ - var exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); + let exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); if (exn$9.MEL_EXN_ID === Unify) { - var trace$1 = swap_list(exn$9._1); + let trace$1 = swap_list(exn$9._1); throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, _1: styp.ptyp_loc, @@ -60229,9 +60229,9 @@ function transl_type(env, policy, styp) { end_def(undefined); generalize_structure$1(current_level.contents, t$2); } - var t$3 = instance(undefined, env, t$2); - var px = proxy(t$3); - var match$5 = px.desc; + let t$3 = instance(undefined, env, t$2); + let px = proxy(t$3); + let match$5 = px.desc; if (typeof match$5 !== "number") { switch (match$5.TAG | 0) { case /* Tvar */0 : @@ -60277,13 +60277,13 @@ function transl_type(env, policy, styp) { _1: alias }, cty.ctyp_type); case /* Ptyp_variant */7 : - var present = name._2; - var closed = name._1; - var name$2 = { + let present = name._2; + let closed = name._1; + let name$2 = { contents: undefined }; - var mkfield = function (l, f) { - var desc = { + let mkfield = function (l, f) { + let desc = { TAG: /* Tvariant */8, _0: { row_fields: { @@ -60302,12 +60302,12 @@ function transl_type(env, policy, styp) { }; return newty2(current_level.contents, desc); }; - var hfields = Stdlib__Hashtbl.create(undefined, 17); - var add_typed_field = function (loc, l, f) { - var h = hash_variant(l); + let hfields = Stdlib__Hashtbl.create(undefined, 17); + let add_typed_field = function (loc, l, f) { + let h = hash_variant(l); try { - var match = Stdlib__Hashtbl.find(hfields, h); - var l$p = match[0]; + let match = Stdlib__Hashtbl.find(hfields, h); + let l$p = match[0]; if (l !== l$p) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60320,8 +60320,8 @@ function transl_type(env, policy, styp) { } }); } - var ty = mkfield(l, f); - var ty$p = mkfield(l, match[1]); + let ty = mkfield(l, f); + let ty$p = mkfield(l, match[1]); if (equal$5(env, false, { hd: ty, tl: /* [] */0 @@ -60335,7 +60335,7 @@ function transl_type(env, policy, styp) { return unify$2(env, ty, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60352,7 +60352,7 @@ function transl_type(env, policy, styp) { } } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__Hashtbl.add(hfields, h, [ l, @@ -60362,19 +60362,19 @@ function transl_type(env, policy, styp) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } }; - var add_field = function (param) { + let add_field = function (param) { if (param.TAG === /* Rtag */0) { - var stl = param._3; - var c = param._2; - var l = param._0; + let stl = param._3; + let c = param._2; + let l = param._0; name$2.contents = undefined; - var tl = Stdlib__List.map((function (param) { + let tl = Stdlib__List.map((function (param) { return transl_type(env, policy, param); }), stl); - var f; - var exit = 0; + let f; + let exit = 0; if (present !== undefined && !Stdlib__List.mem(l, present)) { - var ty_tl = Stdlib__List.map((function (cty) { + let ty_tl = Stdlib__List.map((function (cty) { return cty.ctyp_type; }), tl); f = { @@ -60418,12 +60418,12 @@ function transl_type(env, policy, styp) { _3: tl }; } - var sty = param._0; - var cty = transl_type(env, policy, sty); - var ty = cty.ctyp_type; - var match = repr(cty.ctyp_type); - var match$1 = match.desc; - var nm; + let sty = param._0; + let cty = transl_type(env, policy, sty); + let ty = cty.ctyp_type; + let match = repr(cty.ctyp_type); + let match$1 = match.desc; + let nm; nm = typeof match$1 === "number" || match$1.TAG !== /* Tconstr */3 ? undefined : [ match$1._0, match$1._1 @@ -60437,17 +60437,17 @@ function transl_type(env, policy, styp) { name$2.contents = nm; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { name$2.contents = undefined; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var match$2 = expand_head(env, cty.ctyp_type); - var fl; - var exit$1 = 0; - var row = match$2.desc; + let match$2 = expand_head(env, cty.ctyp_type); + let fl; + let exit$1 = 0; + let row = match$2.desc; if (typeof row === "number") { exit$1 = 1; } else { @@ -60467,7 +60467,7 @@ function transl_type(env, policy, styp) { exit$1 = 1; break; case /* Tvariant */8 : - var row$1 = row._0; + let row$1 = row._0; if (static_row(row$1)) { fl = row_repr_aux(/* [] */0, row$1).row_fields; } else { @@ -60490,9 +60490,9 @@ function transl_type(env, policy, styp) { }); } Stdlib__List.iter((function (param) { - var f = param[1]; - var l = param[0]; - var f$1; + let f = param[1]; + let l = param[0]; + let f$1; if (present !== undefined && !Stdlib__List.mem(l, present)) { if (typeof f === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -60505,7 +60505,7 @@ function transl_type(env, policy, styp) { }); } if (f.TAG === /* Rpresent */0) { - var ty = f._0; + let ty = f._0; f$1 = ty !== undefined ? ({ TAG: /* Reither */1, _0: false, @@ -60546,8 +60546,8 @@ function transl_type(env, policy, styp) { _0: cty }; }; - var tfields = Stdlib__List.map(add_field, name._0); - var fields$2 = Stdlib__Hashtbl.fold((function (param, p, l) { + let tfields = Stdlib__List.map(add_field, name._0); + let fields$2 = Stdlib__Hashtbl.fold((function (param, p, l) { return { hd: p, tl: l @@ -60569,11 +60569,11 @@ function transl_type(env, policy, styp) { }); }), present); } - var row_row_fields = Stdlib__List.rev(fields$2); - var row_row_more$1 = newvar(validate_name(undefined), undefined); - var row_row_closed = closed === /* Closed */0; - var row_row_name$1 = name$2.contents; - var row$4 = { + let row_row_fields = Stdlib__List.rev(fields$2); + let row_row_more$1 = newvar(validate_name(undefined), undefined); + let row_row_closed = closed === /* Closed */0; + let row_row_name$1 = name$2.contents; + let row$4 = { row_fields: row_row_fields, row_more: row_row_more$1, row_bound: undefined, @@ -60581,8 +60581,8 @@ function transl_type(env, policy, styp) { row_fixed: false, row_name: row_row_name$1 }; - var $$static$1 = static_row(row$4); - var row$5 = $$static$1 ? ({ + let $$static$1 = static_row(row$4); + let row$5 = $$static$1 ? ({ row_fields: row_row_fields, row_more: newty2(current_level.contents, /* Tnil */0), row_bound: undefined, @@ -60599,7 +60599,7 @@ function transl_type(env, policy, styp) { row_name: row_row_name$1 }) ); - var ty$10 = newty2(current_level.contents, { + let ty$10 = newty2(current_level.contents, { TAG: /* Tvariant */8, _0: row$5 }); @@ -60610,29 +60610,29 @@ function transl_type(env, policy, styp) { _2: present }, ty$10); case /* Ptyp_poly */8 : - var vars = name._0; + let vars = name._0; begin_def(undefined); - var new_univars = Stdlib__List.map((function (name) { + let new_univars = Stdlib__List.map((function (name) { return [ name, newvar(validate_name(name), undefined) ]; }), vars); - var old_univars = univars.contents; + let old_univars = univars.contents; univars.contents = Stdlib.$at(new_univars, univars.contents); - var cty$1 = transl_type(env, policy, name._1); - var ty$11 = cty$1.ctyp_type; + let cty$1 = transl_type(env, policy, name._1); + let ty$11 = cty$1.ctyp_type; univars.contents = old_univars; end_def(undefined); iter_generalize$1({ contents: /* [] */0 }, ty$11); - var ty_list = Stdlib__List.fold_left((function (tyl, param) { - var v = proxy(param[1]); + let ty_list = Stdlib__List.fold_left((function (tyl, param) { + let v = proxy(param[1]); if (!deep_occur(v, ty$11)) { return tyl; } - var name = v.desc; + let name = v.desc; if (typeof name !== "number" && name.TAG === /* Tvar */0 && v.level === 100000000) { v.desc = { TAG: /* Tunivar */9, @@ -60654,7 +60654,7 @@ function transl_type(env, policy, styp) { } }); }), /* [] */0, new_univars); - var ty$p = newty2(100000000, { + let ty$p = newty2(100000000, { TAG: /* Tpoly */10, _0: ty$11, _1: Stdlib__List.rev(ty_list) @@ -60666,36 +60666,36 @@ function transl_type(env, policy, styp) { _1: cty$1 }, ty$p); case /* Ptyp_package */9 : - var match$6 = name._0; - var p = match$6[0]; - var match$7 = create_package_mty(true, styp.ptyp_loc, env, [ + let match$6 = name._0; + let p = match$6[0]; + let match$7 = create_package_mty(true, styp.ptyp_loc, env, [ p, match$6[1] ]); - var l$1 = match$7[0]; - var z = narrow(undefined); - var mty = Curry._2(transl_modtype.contents, env, match$7[1]); + let l$1 = match$7[0]; + let z = narrow(undefined); + let mty = Curry._2(transl_modtype.contents, env, match$7[1]); widen(z); - var ptys = Stdlib__List.map((function (param) { + let ptys = Stdlib__List.map((function (param) { return [ param[0], transl_type(env, policy, param[1]) ]; }), l$1); - var path$2 = Curry._3(transl_modtype_longident.contents, styp.ptyp_loc, env, p.txt); - var desc_1 = Stdlib__List.map((function (param) { + let path$2 = Curry._3(transl_modtype_longident.contents, styp.ptyp_loc, env, p.txt); + let desc_1 = Stdlib__List.map((function (param) { return param[0].txt; }), l$1); - var desc_2 = Stdlib__List.map((function (param) { + let desc_2 = Stdlib__List.map((function (param) { return param[1].ctyp_type; }), ptys); - var desc$1 = { + let desc$1 = { TAG: /* Tpackage */11, _0: path$2, _1: desc_1, _2: desc_2 }; - var ty$12 = newty2(current_level.contents, desc$1); + let ty$12 = newty2(current_level.contents, desc$1); return ctyp({ TAG: /* Ttyp_package */9, _0: { @@ -60730,8 +60730,8 @@ function transl_fields(loc, env, policy, seen, o, param) { return newty2(current_level.contents, /* Tnil */0); } } - var match = param.hd; - var s = match[0]; + let match = param.hd; + let s = match[0]; if (Stdlib__List.mem(s, seen)) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60743,7 +60743,7 @@ function transl_fields(loc, env, policy, seen, o, param) { } }); } - var ty2 = transl_fields(loc, env, policy, { + let ty2 = transl_fields(loc, env, policy, { hd: s, tl: seen }, o, param.tl); @@ -60757,25 +60757,25 @@ function transl_fields(loc, env, policy, seen, o, param) { } function make_fixed_univars(ty) { - var ty$1 = repr(ty); + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } mark_type_node(ty$1); - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr(make_fixed_univars, ty$1); } if (row.TAG !== /* Tvariant */8) { return iter_type_expr(make_fixed_univars, ty$1); } - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); if (is_Tunivar(row_more(row$1))) { ty$1.desc = { TAG: /* Tvariant */8, _0: { row_fields: Stdlib__List.map((function (p) { - var match = row_field_repr_aux(/* [] */0, p[1]); + let match = row_field_repr_aux(/* [] */0, p[1]); if (typeof match === "number" || match.TAG === /* Rpresent */0) { return p; } else { @@ -60803,15 +60803,15 @@ function make_fixed_univars(ty) { } function globalize_used_variables(env, fixed) { - var r = { + let r = { contents: /* [] */0 }; iter$2((function (name, param) { - var loc = param[1]; - var ty = param[0]; - var v = new_global_var(validate_name(undefined), undefined); - var snap = snapshot(undefined); - var tmp; + let loc = param[1]; + let ty = param[0]; + let v = new_global_var(validate_name(undefined), undefined); + let snap = snapshot(undefined); + let tmp; try { unify$2(env, v, ty); tmp = true; @@ -60835,7 +60835,7 @@ function globalize_used_variables(env, fixed) { return ; } catch (raw_exn){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { if (fixed && is_Tvar(repr(ty))) { throw new Caml_js_exceptions.MelangeError($$Error$6, { @@ -60848,7 +60848,7 @@ function globalize_used_variables(env, fixed) { } }); } - var v2 = new_global_var(validate_name(undefined), undefined); + let v2 = new_global_var(validate_name(undefined), undefined); r.contents = { hd: [ loc, @@ -60870,7 +60870,7 @@ function globalize_used_variables(env, fixed) { return unify$2(env, param[1], param[2]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -60891,9 +60891,9 @@ function globalize_used_variables(env, fixed) { function transl_simple_type(env, fixed, styp) { univars.contents = /* [] */0; used_variables.contents = /* Empty */0; - var typ = transl_type(env, fixed ? /* Fixed */0 : /* Extensible */1, styp); + let typ = transl_type(env, fixed ? /* Fixed */0 : /* Extensible */1, styp); globalize_used_variables(env, fixed)(undefined); - var ty = typ.ctyp_type; + let ty = typ.ctyp_type; make_fixed_univars(ty); unmark_type(ty); return typ; @@ -60904,8 +60904,8 @@ function transl_simple_type_univars(env, styp) { used_variables.contents = /* Empty */0; pre_univars.contents = /* [] */0; begin_def(undefined); - var typ = transl_type(env, /* Univars */2, styp); - var new_variables = used_variables.contents; + let typ = transl_type(env, /* Univars */2, styp); + let new_variables = used_variables.contents; used_variables.contents = /* Empty */0; iter$2((function (name, p) { if (mem$4(name, type_variables.contents)) { @@ -60919,9 +60919,9 @@ function transl_simple_type_univars(env, styp) { iter_generalize$1({ contents: /* [] */0 }, typ.ctyp_type); - var univs = Stdlib__List.fold_left((function (acc, v) { - var v$1 = repr(v); - var name = v$1.desc; + let univs = Stdlib__List.fold_left((function (acc, v) { + let v$1 = repr(v); + let name = v$1.desc; if (typeof name === "number" || !(name.TAG === /* Tvar */0 && v$1.level === 100000000)) { return acc; } else { @@ -60935,7 +60935,7 @@ function transl_simple_type_univars(env, styp) { }; } }), /* [] */0, pre_univars.contents); - var ty = typ.ctyp_type; + let ty = typ.ctyp_type; make_fixed_univars(ty); unmark_type(ty); return { @@ -60954,8 +60954,8 @@ function transl_simple_type_univars(env, styp) { function transl_simple_type_delayed(env, styp) { univars.contents = /* [] */0; used_variables.contents = /* Empty */0; - var typ = transl_type(env, /* Extensible */1, styp); - var ty = typ.ctyp_type; + let typ = transl_type(env, /* Extensible */1, styp); + let ty = typ.ctyp_type; make_fixed_univars(ty); unmark_type(ty); return [ @@ -60967,7 +60967,7 @@ function transl_simple_type_delayed(env, styp) { function transl_type_scheme(env, styp) { reset_type_variables(undefined); begin_def(undefined); - var typ = transl_simple_type(env, false, styp); + let typ = transl_simple_type(env, false, styp); end_def(undefined); iter_generalize$1({ contents: /* [] */0 @@ -60976,23 +60976,23 @@ function transl_type_scheme(env, styp) { } function spellcheck(ppf, fold, env, lid) { - var match = last$1(lid).length; - var cutoff = match > 4 || match < 1 ? ( + let match = last$1(lid).length; + let cutoff = match > 4 || match < 1 ? ( match === 6 || match === 5 ? 2 : 3 ) : ( match >= 3 ? 1 : 0 ); - var compare = function (target, head, acc) { - var best_dist = acc[1]; - var best_choice = acc[0]; - var dist = edit_distance(target, head, cutoff); + let compare = function (target, head, acc) { + let best_dist = acc[1]; + let best_choice = acc[0]; + let dist = edit_distance(target, head, cutoff); if (dist === undefined) { return [ best_choice, best_dist ]; } - var choice = dist < best_dist ? ({ + let choice = dist < best_dist ? ({ hd: head, tl: /* [] */0 }) : ( @@ -61006,16 +61006,16 @@ function spellcheck(ppf, fold, env, lid) { dist < best_dist ? dist : best_dist ]; }; - var init = [ + let init = [ /* [] */0, Stdlib.max_int ]; - var handle = function (param) { - var match = Stdlib__List.rev(param[0]); + let handle = function (param) { + let match = Stdlib__List.rev(param[0]); if (!match) { return ; } - var rev_rest = match.tl; + let rev_rest = match.tl; Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Formatting_lit */17, @@ -61055,12 +61055,12 @@ function spellcheck(ppf, fold, env, lid) { }); switch (lid.TAG | 0) { case /* Lident */0 : - var s = lid._0; + let s = lid._0; return handle(Curry._4(fold, (function (param, param$1) { return compare(s, param, param$1); }), undefined, env, init)); case /* Ldot */1 : - var s$1 = lid._1; + let s$1 = lid._1; return handle(Curry._4(fold, (function (param, param$1) { return compare(s$1, param, param$1); }), lid._0, env, init)); @@ -61098,7 +61098,7 @@ register_error_of_exn(function (param) { return ; } } - var env = param._2; + let env = param._2; return error_of_printer(param._1, (function (param, param$1) { if (typeof param$1 === "number") { if (param$1 === /* Recursive_type */0) { @@ -61140,7 +61140,7 @@ register_error_of_exn(function (param) { _1: "Unbound type parameter %s@." }), param$1._0); case /* Unbound_type_constructor */1 : - var lid = param$1._0; + let lid = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61359,8 +61359,8 @@ register_error_of_exn(function (param) { _1: "The present constructor %s has no type" }), param$1._0); case /* Constructor_mismatch */10 : - var ty$p = param$1._1; - var ty = param$1._0; + let ty$p = param$1._1; + let ty = param$1._0; return wrap_printing_env(env, (function (param$2) { reset_and_mark_loops_list({ hd: ty, @@ -61429,7 +61429,7 @@ register_error_of_exn(function (param) { }), "This variant type contains a constructor", type_expr$1, ty, "which should be", type_expr$1, ty$p); })); case /* Not_a_variant */11 : - var ty$1 = param$1._0; + let ty$1 = param$1._0; reset(undefined); mark_loops(ty$1); return Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ @@ -61549,7 +61549,7 @@ register_error_of_exn(function (param) { _1: "The type variable name %s is not allowed in programs" }), param$1._0); case /* Cannot_quantify */14 : - var v = param$1._1; + let v = param$1._1; return Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -61660,7 +61660,7 @@ register_error_of_exn(function (param) { _1: "@[This is the second method `%s' of this object type.@ %s@]" }), param$1._0, "Multiple occurences are not allowed."); case /* Unbound_value */17 : - var lid$1 = param$1._0; + let lid$1 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61674,7 +61674,7 @@ register_error_of_exn(function (param) { }), longident, lid$1); return spellcheck$1(param, fold_values)(env, lid$1); case /* Unbound_constructor */18 : - var lid$2 = param$1._0; + let lid$2 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61690,7 +61690,7 @@ register_error_of_exn(function (param) { return d.cstr_name; }))(env, lid$2); case /* Unbound_label */19 : - var lid$3 = param$1._0; + let lid$3 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61706,7 +61706,7 @@ register_error_of_exn(function (param) { return d.lbl_name; }))(env, lid$3); case /* Unbound_module */20 : - var lid$4 = param$1._0; + let lid$4 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61720,7 +61720,7 @@ register_error_of_exn(function (param) { }), longident, lid$4); return spellcheck$1(param, fold_modules)(env, lid$4); case /* Unbound_class */21 : - var lid$5 = param$1._0; + let lid$5 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61734,7 +61734,7 @@ register_error_of_exn(function (param) { }), longident, lid$5); return spellcheck$1(param, fold_classs)(env, lid$5); case /* Unbound_modtype */22 : - var lid$6 = param$1._0; + let lid$6 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61748,7 +61748,7 @@ register_error_of_exn(function (param) { }), longident, lid$6); return spellcheck$1(param, fold_modtypes)(env, lid$6); case /* Unbound_cltype */23 : - var lid$7 = param$1._0; + let lid$7 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -61794,11 +61794,11 @@ register_error_of_exn(function (param) { }), param._3); }); -var $$Error$7 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typecore.Error"); +let $$Error$7 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typecore.Error"); -var Error_forward$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typecore.Error_forward"); +let Error_forward$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typecore.Error_forward"); -var type_module = { +let type_module = { contents: (function (env, md) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -61811,7 +61811,7 @@ var type_module = { }) }; -var type_open = { +let type_open = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -61824,7 +61824,7 @@ var type_open = { }) }; -var type_package = { +let type_package = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -61837,7 +61837,7 @@ var type_package = { }) }; -var type_object = { +let type_object = { contents: (function (env, s) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -61879,11 +61879,11 @@ function snd3(param) { } function iter_expression(f, e) { - var expr = function (_e) { + let expr = function (_e) { while(true) { - var e = _e; + let e = _e; Curry._1(f, e); - var pel = e.pexp_desc; + let pel = e.pexp_desc; switch (pel.TAG | 0) { case /* Pexp_let */2 : expr(pel._2); @@ -61962,17 +61962,17 @@ function iter_expression(f, e) { return Stdlib__List.iter($$case, pel._1); }; }; - var $$case = function (param) { + let $$case = function (param) { may(expr, param.pc_guard); expr(param.pc_rhs); }; - var binding = function (x) { + let binding = function (x) { expr(x.pvb_expr); }; - var module_expr = function (_me) { + let module_expr = function (_me) { while(true) { - var me = _me; - var str = me.pmod_desc; + let me = _me; + let str = me.pmod_desc; switch (str.TAG | 0) { case /* Pmod_structure */1 : return Stdlib__List.iter(structure_item, str._0); @@ -61995,8 +61995,8 @@ function iter_expression(f, e) { } }; }; - var structure_item = function (str) { - var l = str.pstr_desc; + let structure_item = function (str) { + let l = str.pstr_desc; switch (l.TAG | 0) { case /* Pstr_eval */0 : return expr(l._0); @@ -62018,10 +62018,10 @@ function iter_expression(f, e) { return ; } }; - var class_expr = function (_ce) { + let class_expr = function (_ce) { while(true) { - var ce = _ce; - var match = ce.pcl_desc; + let ce = _ce; + let match = ce.pcl_desc; switch (match.TAG | 0) { case /* Pcl_structure */1 : return Stdlib__List.iter(class_field, match._0.pcstr_fields); @@ -62048,20 +62048,20 @@ function iter_expression(f, e) { } }; }; - var class_field = function (cf) { - var e = cf.pcf_desc; + let class_field = function (cf) { + let e = cf.pcf_desc; switch (e.TAG | 0) { case /* Pcf_inherit */0 : return class_expr(e._1); case /* Pcf_val */1 : - var match = e._0[2]; + let match = e._0[2]; if (match.TAG === /* Cfk_virtual */0) { return ; } else { return expr(match._1); } case /* Pcf_method */2 : - var match$1 = e._0[2]; + let match$1 = e._0[2]; if (match$1.TAG === /* Cfk_virtual */0) { return ; } else { @@ -62080,13 +62080,13 @@ function iter_expression(f, e) { } function all_idents_cases(el) { - var idents = Stdlib__Hashtbl.create(undefined, 8); - var f = function (param) { - var match = param.pexp_desc; + let idents = Stdlib__Hashtbl.create(undefined, 8); + let f = function (param) { + let match = param.pexp_desc; if (match.TAG !== /* Pexp_ident */0) { return ; } - var id = match._0.txt; + let id = match._0.txt; switch (id.TAG | 0) { case /* Lident */0 : return Stdlib__Hashtbl.replace(idents, id._0, undefined); @@ -62156,11 +62156,11 @@ function mkexp$1(exp_desc, exp_type, exp_loc, exp_env) { } function option_none(ty, loc) { - var lid = { + let lid = { TAG: /* Lident */0, _0: "None" }; - var cnone = lookup_constructor(lid, initial_safe_string); + let cnone = lookup_constructor(lid, initial_safe_string); return mkexp$1({ TAG: /* Texp_construct */8, _0: { @@ -62173,11 +62173,11 @@ function option_none(ty, loc) { } function option_some(texp) { - var lid = { + let lid = { TAG: /* Lident */0, _0: "Some" }; - var csome = lookup_constructor(lid, initial_safe_string); + let csome = lookup_constructor(lid, initial_safe_string); return mkexp$1({ TAG: /* Texp_construct */8, _0: { @@ -62193,10 +62193,10 @@ function option_some(texp) { } function extract_option_type(env, ty) { - var match = expand_head(env, ty); - var match$1 = match.desc; + let match = expand_head(env, ty); + let match$1 = match.desc; if (typeof match$1 !== "number" && match$1.TAG === /* Tconstr */3) { - var match$2 = match$1._1; + let match$2 = match$1._1; if (match$2 && !match$2.tl && same(match$1._0, path_option)) { return match$2.hd; } @@ -62213,8 +62213,8 @@ function extract_option_type(env, ty) { } function extract_concrete_record(env, ty) { - var match = extract_concrete_typedecl(env, ty); - var match$1 = match[2].type_kind; + let match = extract_concrete_typedecl(env, ty); + let match$1 = match[2].type_kind; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -62233,10 +62233,10 @@ function extract_concrete_record(env, ty) { } function extract_concrete_variant(env, ty) { - var match = extract_concrete_typedecl(env, ty); - var cstrs = match[2].type_kind; - var p = match[1]; - var p0 = match[0]; + let match = extract_concrete_typedecl(env, ty); + let cstrs = match[2].type_kind; + let p = match[1]; + let p0 = match[0]; if (typeof cstrs === "number") { if (cstrs !== /* Type_abstract */0) { return [ @@ -62264,13 +62264,13 @@ function extract_concrete_variant(env, ty) { function extract_label_names(sexp, env, ty) { try { - var match = extract_concrete_record(env, ty); + let match = extract_concrete_record(env, ty); return Stdlib__List.map((function (l) { return l.ld_id; }), match[2]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -62302,7 +62302,7 @@ function unify_pat_types(loc, env, ty, ty$p) { return unify$2(env, ty, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -62335,7 +62335,7 @@ function unify_exp_types(loc, env, ty, expected_ty) { return unify$2(env, ty, expected_ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -62363,12 +62363,12 @@ function unify_exp_types(loc, env, ty, expected_ty) { } } -var newtype_level$1 = { +let newtype_level$1 = { contents: undefined }; function get_newtype_level$1(param) { - var y = newtype_level$1.contents; + let y = newtype_level$1.contents; if (y !== undefined) { return y; } @@ -62383,8 +62383,8 @@ function get_newtype_level$1(param) { } function unify_pat_types_gadt(loc, env, ty, ty$p) { - var x = newtype_level$1.contents; - var newtype_level$2; + let x = newtype_level$1.contents; + let newtype_level$2; if (x !== undefined) { newtype_level$2 = x; } else { @@ -62408,7 +62408,7 @@ function unify_pat_types_gadt(loc, env, ty, ty$p) { return Curry._1(TypePairs.clear, unify_eq_set); } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); Curry._1(TypePairs.clear, unify_eq_set); if (e.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -62421,7 +62421,7 @@ function unify_pat_types_gadt(loc, env, ty, ty$p) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -62465,17 +62465,17 @@ function unify_pat(env, pat, expected_ty) { } function finalize_variant(pat) { - var match = pat.pat_desc; + let match = pat.pat_desc; if (typeof match === "number") { return ; } if (match.TAG !== /* Tpat_variant */5) { return ; } - var opat = match._1; - var match$1 = expand_head(pat.pat_env, pat.pat_type); - var row = match$1.desc; - var row$1; + let opat = match._1; + let match$1 = expand_head(pat.pat_env, pat.pat_type); + let row = match$1.desc; + let row$1; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -62487,7 +62487,7 @@ function finalize_variant(pat) { }); } if (row.TAG === /* Tvariant */8) { - var row$2 = row._0; + let row$2 = row._0; match._2.contents = row$2; row$1 = row_repr_aux(/* [] */0, row$2); } else { @@ -62500,14 +62500,14 @@ function finalize_variant(pat) { ] }); } - var match$2 = row_field(match._0, row$1); + let match$2 = row_field(match._0, row$1); if (typeof match$2 === "number") { return ; } if (match$2.TAG === /* Rpresent */0) { return ; } - var c = match$2._0; + let c = match$2._0; if (c) { if (!match$2._1 && !row$1.row_closed) { return set_row_field(match$2._3, { @@ -62517,15 +62517,15 @@ function finalize_variant(pat) { } } else { - var match$3 = match$2._1; + let match$3 = match$2._1; if (match$3 && !row$1.row_closed) { - var ty = match$3.hd; + let ty = match$3.hd; set_row_field(match$2._3, { TAG: /* Rpresent */0, _0: ty }); if (opat !== undefined) { - var partial_arg = opat.pat_env; + let partial_arg = opat.pat_env; return Stdlib__List.iter((function (param) { return unify_pat(partial_arg, opat, param); }), { @@ -62568,7 +62568,7 @@ function iter_pattern(f, p) { function has_variants(p) { try { iter_pattern((function (param) { - var tmp = param.pat_desc; + let tmp = param.pat_desc; if (typeof tmp === "number") { return ; } @@ -62582,7 +62582,7 @@ function has_variants(p) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return true; } @@ -62590,23 +62590,23 @@ function has_variants(p) { } } -var pattern_variables = { +let pattern_variables = { contents: /* [] */0 }; -var pattern_force = { +let pattern_force = { contents: /* [] */0 }; -var pattern_scope = { +let pattern_scope = { contents: undefined }; -var allow_modules = { +let allow_modules = { contents: false }; -var module_variables = { +let module_variables = { contents: /* [] */0 }; @@ -62619,8 +62619,8 @@ function reset_pattern(scope, allow) { } function enter_variable(is_moduleOpt, is_as_variableOpt, loc, name, ty) { - var is_module = is_moduleOpt !== undefined ? is_moduleOpt : false; - var is_as_variable = is_as_variableOpt !== undefined ? is_as_variableOpt : false; + let is_module = is_moduleOpt !== undefined ? is_moduleOpt : false; + let is_as_variable = is_as_variableOpt !== undefined ? is_as_variableOpt : false; if (Stdlib__List.exists((function (param) { return param[0].name === name.txt; }), pattern_variables.contents)) { @@ -62634,7 +62634,7 @@ function enter_variable(is_moduleOpt, is_as_variableOpt, loc, name, ty) { } }); } - var id = create(name.txt); + let id = create(name.txt); pattern_variables.contents = { hd: [ id, @@ -62681,20 +62681,20 @@ function sort_pattern_variables(vs) { } function enter_orpat_variables(loc, env, p1_vs, p2_vs) { - var p1_vs$1 = sort_pattern_variables(p1_vs); - var p2_vs$1 = sort_pattern_variables(p2_vs); - var unify_vars = function (_p1_vs, _p2_vs) { + let p1_vs$1 = sort_pattern_variables(p1_vs); + let p2_vs$1 = sort_pattern_variables(p2_vs); + let unify_vars = function (_p1_vs, _p2_vs) { while(true) { - var p2_vs = _p2_vs; - var p1_vs = _p1_vs; + let p2_vs = _p2_vs; + let p1_vs = _p1_vs; if (p1_vs) { - var match = p1_vs.hd; - var x1 = match[0]; + let match = p1_vs.hd; + let x1 = match[0]; if (p2_vs) { - var match$1 = p2_vs.hd; - var x2 = match$1[0]; - var rem1 = p1_vs.tl; - var rem2 = p2_vs.tl; + let match$1 = p2_vs.hd; + let x2 = match$1[0]; + let rem1 = p1_vs.tl; + let rem2 = p2_vs.tl; if (equal(x1, x2)) { if (x1 === x2) { _p2_vs = rem2; @@ -62705,7 +62705,7 @@ function enter_orpat_variables(loc, env, p1_vs, p2_vs) { unify$2(env, match[1], match$1[1]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -62728,7 +62728,7 @@ function enter_orpat_variables(loc, env, p1_vs, p2_vs) { tl: unify_vars(rem1, rem2) }; } - var min_var = x1.name < x2.name ? x1 : x2; + let min_var = x1.name < x2.name ? x1 : x2; throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -62768,8 +62768,8 @@ function enter_orpat_variables(loc, env, p1_vs, p2_vs) { function build_as_type(env, _p) { while(true) { - var p = _p; - var pl = p.pat_desc; + let p = _p; + let pl = p.pat_desc; if (typeof pl === "number") { return p.pat_type; } @@ -62778,7 +62778,7 @@ function build_as_type(env, _p) { _p = pl._0; continue ; case /* Tpat_tuple */3 : - var tyl = Stdlib__List.map((function (param) { + let tyl = Stdlib__List.map((function (param) { return build_as_type(env, param); }), pl._0); return newty2(current_level.contents, { @@ -62786,19 +62786,19 @@ function build_as_type(env, _p) { _0: tyl }); case /* Tpat_construct */4 : - var pl$1 = pl._2; - var cstr = pl._1; - var keep = cstr.cstr_private === /* Private */0 || Caml_obj.caml_notequal(cstr.cstr_existentials, /* [] */0); + let pl$1 = pl._2; + let cstr = pl._1; + let keep = cstr.cstr_private === /* Private */0 || Caml_obj.caml_notequal(cstr.cstr_existentials, /* [] */0); if (keep) { return p.pat_type; } - var tyl$1 = Stdlib__List.map((function (param) { + let tyl$1 = Stdlib__List.map((function (param) { return build_as_type(env, param); }), pl$1); - var match = instance_constructor(undefined, cstr); + let match = instance_constructor(undefined, cstr); Stdlib__List.iter2((function (param) { - var p = param[0]; - var partial_arg = { + let p = param[0]; + let partial_arg = { pat_desc: p.pat_desc, pat_loc: p.pat_loc, pat_extra: p.pat_extra, @@ -62812,10 +62812,10 @@ function build_as_type(env, _p) { }), Stdlib__List.combine(pl$1, tyl$1), match[0]); return match[1]; case /* Tpat_variant */5 : - var ty = may_map((function (param) { + let ty = may_map((function (param) { return build_as_type(env, param); }), pl._1); - var desc = { + let desc = { TAG: /* Tvariant */8, _0: { row_fields: { @@ -62837,22 +62837,22 @@ function build_as_type(env, _p) { }; return newty2(current_level.contents, desc); case /* Tpat_record */6 : - var lpl = pl._0; - var lbl = snd3(Stdlib__List.hd(lpl)); + let lpl = pl._0; + let lbl = snd3(Stdlib__List.hd(lpl)); if (lbl.lbl_private === /* Private */0) { return p.pat_type; } - var ty$1 = newvar(undefined, undefined); - var ppl = Stdlib__List.map((function (param) { + let ty$1 = newvar(undefined, undefined); + let ppl = Stdlib__List.map((function (param) { return [ param[1].lbl_pos, param[2] ]; }), lpl); - var do_label = (function(p,ty$1,ppl){ + let do_label = (function(p,ty$1,ppl){ return function do_label(lbl) { - var match = instance_label(false, lbl); - var ty_arg = match[1]; + let match = instance_label(false, lbl); + let ty_arg = match[1]; unify_pat(env, { pat_desc: p.pat_desc, pat_loc: p.pat_loc, @@ -62861,19 +62861,19 @@ function build_as_type(env, _p) { pat_env: p.pat_env, pat_attributes: p.pat_attributes }, match[2]); - var refinable = false; + let refinable = false; if (lbl.lbl_mut === /* Immutable */0) { - var tmp = false; + let tmp = false; if (Stdlib__List.mem_assoc(lbl.lbl_pos, ppl)) { - var match$1 = repr(lbl.lbl_arg).desc; - var tmp$1; + let match$1 = repr(lbl.lbl_arg).desc; + let tmp$1; tmp$1 = typeof match$1 === "number" || match$1.TAG !== /* Tpoly */10 ? true : false; tmp = tmp$1; } refinable = tmp; } if (refinable) { - var arg = Stdlib__List.assoc(lbl.lbl_pos, ppl); + let arg = Stdlib__List.assoc(lbl.lbl_pos, ppl); return unify_pat(env, { pat_desc: arg.pat_desc, pat_loc: arg.pat_loc, @@ -62883,7 +62883,7 @@ function build_as_type(env, _p) { pat_attributes: arg.pat_attributes }, ty_arg); } - var match$2 = instance_label(false, lbl); + let match$2 = instance_label(false, lbl); unify$2(env, ty_arg, match$2[1]); unify_pat(env, p, match$2[2]); } @@ -62891,11 +62891,11 @@ function build_as_type(env, _p) { Stdlib__Array.iter(do_label, lbl.lbl_all); return ty$1; case /* Tpat_or */8 : - var row = pl._2; - var p2 = pl._1; + let row = pl._2; + let p2 = pl._1; if (row !== undefined) { - var row$1 = row_repr_aux(/* [] */0, row); - var desc$1 = { + let row$1 = row_repr_aux(/* [] */0, row); + let desc$1 = { TAG: /* Tvariant */8, _0: { row_fields: row$1.row_fields, @@ -62908,8 +62908,8 @@ function build_as_type(env, _p) { }; return newty2(current_level.contents, desc$1); } - var ty1 = build_as_type(env, pl._0); - var ty2 = build_as_type(env, p2); + let ty1 = build_as_type(env, pl._0); + let ty2 = build_as_type(env, p2); unify_pat(env, { pat_desc: p2.pat_desc, pat_loc: p2.pat_loc, @@ -62926,12 +62926,12 @@ function build_as_type(env, _p) { } function build_or_pat(env, loc, lid) { - var match = find_type(env, loc, lid); - var path = match[0]; - var tyl = Stdlib__List.map((function (param) { + let match = find_type(env, loc, lid); + let path = match[0]; + let tyl = Stdlib__List.map((function (param) { return newvar(undefined, undefined); }), match[1].type_params); - var ty = expand_head(env, newty2(current_level.contents, { + let ty = expand_head(env, newty2(current_level.contents, { TAG: /* Tconstr */3, _0: path, _1: tyl, @@ -62939,13 +62939,13 @@ function build_or_pat(env, loc, lid) { contents: /* Mnil */0 } })); - var row = ty.desc; - var row0; - var exit = 0; + let row = ty.desc; + let row0; + let exit = 0; if (typeof row === "number" || row.TAG !== /* Tvariant */8) { exit = 1; } else { - var row$1 = row._0; + let row$1 = row._0; if (static_row(row$1)) { row0 = row$1; } else { @@ -62963,11 +62963,11 @@ function build_or_pat(env, loc, lid) { } }); } - var match$1 = Stdlib__List.fold_left((function (param, param$1) { - var l = param$1[0]; - var fields = param[1]; - var pats = param[0]; - var match = row_field_repr_aux(/* [] */0, param$1[1]); + let match$1 = Stdlib__List.fold_left((function (param, param$1) { + let l = param$1[0]; + let fields = param[1]; + let pats = param[0]; + let match = row_field_repr_aux(/* [] */0, param$1[1]); if (typeof match === "number") { return [ pats, @@ -62980,7 +62980,7 @@ function build_or_pat(env, loc, lid) { fields ]; } - var ty = match._0; + let ty = match._0; if (ty !== undefined) { return [ { @@ -63046,13 +63046,13 @@ function build_or_pat(env, loc, lid) { /* [] */0, /* [] */0 ], row_repr_aux(/* [] */0, row0).row_fields); - var row_row_fields = Stdlib__List.rev(match$1[1]); - var row_row_more = newvar(undefined, undefined); - var row_row_name = [ + let row_row_fields = Stdlib__List.rev(match$1[1]); + let row_row_more = newvar(undefined, undefined); + let row_row_name = [ path, tyl ]; - var row$2 = { + let row$2 = { row_fields: row_row_fields, row_more: row_row_more, row_bound: undefined, @@ -63060,18 +63060,18 @@ function build_or_pat(env, loc, lid) { row_fixed: false, row_name: row_row_name }; - var ty$1 = newty2(current_level.contents, { + let ty$1 = newty2(current_level.contents, { TAG: /* Tvariant */8, _0: row$2 }); - var gloc_loc_start = loc.loc_start; - var gloc_loc_end = loc.loc_end; - var gloc = { + let gloc_loc_start = loc.loc_start; + let gloc_loc_end = loc.loc_end; + let gloc = { loc_start: gloc_loc_start, loc_end: gloc_loc_end, loc_ghost: true }; - var row$p = { + let row$p = { contents: { row_fields: row_row_fields, row_more: newvar(undefined, undefined), @@ -63081,7 +63081,7 @@ function build_or_pat(env, loc, lid) { row_name: row_row_name } }; - var pats = Stdlib__List.map((function (param) { + let pats = Stdlib__List.map((function (param) { return { pat_desc: { TAG: /* Tpat_variant */5, @@ -63097,7 +63097,7 @@ function build_or_pat(env, loc, lid) { }; }), match$1[0]); if (pats) { - var r = Stdlib__List.fold_left((function (pat, pat0) { + let r = Stdlib__List.fold_left((function (pat, pat0) { return { pat_desc: { TAG: /* Tpat_or */8, @@ -63138,13 +63138,13 @@ function build_or_pat(env, loc, lid) { function expand_path(env, _p) { while(true) { - var p = _p; - var decl; + let p = _p; + let decl; try { decl = find_type_full(p, env)[0]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { decl = undefined; } else { @@ -63152,10 +63152,10 @@ function expand_path(env, _p) { } } if (decl !== undefined) { - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty !== undefined) { - var match = repr(ty); - var match$1 = match.desc; + let match = repr(ty); + let match$1 = match.desc; if (typeof match$1 === "number") { return p; } @@ -63167,7 +63167,7 @@ function expand_path(env, _p) { } } - var p$p = normalize_path$1(undefined, env, p); + let p$p = normalize_path$1(undefined, env, p); if (same(p, p$p)) { return p; } @@ -63185,9 +63185,9 @@ function wrap_disambiguate(kind, ty, f, x) { return Curry._1(f, x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$7) { - var match = exn._3; + let match = exn._3; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -63213,10 +63213,10 @@ function wrap_disambiguate(kind, ty, f, x) { } } -var type_kind = "record"; +let type_kind = "record"; function get_type_path$1(env, d) { - var match = d.lbl_res.desc; + let match = d.lbl_res.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -63241,19 +63241,19 @@ function get_type_path$1(env, d) { } function lookup_from_type(env, tpath, lid) { - var descrs = find_type_full(tpath, env)[1][1]; + let descrs = find_type_full(tpath, env)[1][1]; mark_type_used(env, last(tpath), find_type_full(tpath, env)[0]); - var s = lid.txt; + let s = lid.txt; switch (s.TAG | 0) { case /* Lident */0 : - var s$1 = s._0; + let s$1 = s._0; try { return Stdlib__List.find((function (nd) { return nd.lbl_name === s$1; }), descrs); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -63282,13 +63282,13 @@ function lookup_from_type(env, tpath, lid) { function unique(eq, _acc, _param) { while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return Stdlib__List.rev(acc); } - var rem = param.tl; - var x = param.hd; + let rem = param.tl; + let x = param.hd; if (Stdlib__List.exists(Curry._1(eq, x), acc)) { _param = rem; continue ; @@ -63303,11 +63303,11 @@ function unique(eq, _acc, _param) { } function ambiguous_types(env, lbl, others) { - var tpath = get_type_path$1(env, lbl); - var others$1 = Stdlib__List.map((function (param) { + let tpath = get_type_path$1(env, lbl); + let others$1 = Stdlib__List.map((function (param) { return get_type_path$1(env, param[0]); }), others); - var tpaths = unique((function (param, param$1) { + let tpaths = unique((function (param, param$1) { return compare_type_path(env, param, param$1); }), { hd: tpath, @@ -63321,39 +63321,39 @@ function ambiguous_types(env, lbl, others) { } function disambiguate_by_type(env, tpath, lbls) { - var check_type = function (param) { - var lbl_tpath = get_type_path$1(env, param[0]); + let check_type = function (param) { + let lbl_tpath = get_type_path$1(env, param[0]); return compare_type_path(env, tpath, lbl_tpath); }; return Stdlib__List.find(check_type, lbls); } function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { - var warn = warnOpt !== undefined ? warnOpt : prerr_warning; - var check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { + let warn = warnOpt !== undefined ? warnOpt : prerr_warning; + let check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { }); - var scope$1 = scope !== undefined ? scope : lbls; - var lbl; + let scope$1 = scope !== undefined ? scope : lbls; + let lbl; if (opath !== undefined) { - var pr = opath[2]; - var tpath = opath[1]; - var warn_pr = function (param) { - var kind = type_kind === "record" ? "field" : "constructor"; + let pr = opath[2]; + let tpath = opath[1]; + let warn_pr = function (param) { + let kind = type_kind === "record" ? "field" : "constructor"; Curry._2(warn, lid.loc, { TAG: /* Not_principal */8, _0: "this type-based " + (kind + " disambiguation") }); }; try { - var match = disambiguate_by_type(env, tpath, scope$1); - var lbl$1 = match[0]; + let match = disambiguate_by_type(env, tpath, scope$1); + let lbl$1 = match[0]; Curry._1(match[1], undefined); if (!pr) { if (lbls) { - var lbl_tpath = get_type_path$1(env, lbls.hd[0]); + let lbl_tpath = get_type_path$1(env, lbls.hd[0]); if (compare_type_path(env, tpath, lbl_tpath)) { - var paths = ambiguous_types(env, lbl$1, lbls.tl); + let paths = ambiguous_types(env, lbl$1, lbls.tl); if (Caml_obj.caml_notequal(paths, /* [] */0)) { Curry._2(warn, lid.loc, { TAG: /* Ambiguous_name */24, @@ -63376,12 +63376,12 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { lbl = lbl$1; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { try { - var lbl$2 = lookup_from_type(env, tpath, lid); + let lbl$2 = lookup_from_type(env, tpath, lid); Curry._2(check_lk, tpath, lbl$2); - var s = string_of_out_ident(tree_of_path(tpath)); + let s = string_of_out_ident(tree_of_path(tpath)); Curry._2(warn, lid.loc, { TAG: /* Name_out_of_scope */23, _0: s, @@ -63397,20 +63397,20 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { lbl = lbl$2; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { if (Caml_obj.caml_equal(lbls, /* [] */0)) { lbl = unbound_label_error(env, lid); } else { - var tp_0 = opath[0]; - var tp_1 = expand_path(env, tpath); - var tp = [ + let tp_0 = opath[0]; + let tp_1 = expand_path(env, tpath); + let tp = [ tp_0, tp_1 ]; - var tpl = Stdlib__List.map((function (param) { - var tp0 = get_type_path$1(env, param[0]); - var tp = expand_path(env, tp0); + let tpl = Stdlib__List.map((function (param) { + let tp0 = get_type_path$1(env, param[0]); + let tp = expand_path(env, tp0); return [ tp0, tp @@ -63438,10 +63438,10 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } } } else if (lbls) { - var match$1 = lbls.hd; - var lbl$3 = match$1[0]; + let match$1 = lbls.hd; + let lbl$3 = match$1[0]; Curry._1(match$1[1], undefined); - var paths$1 = ambiguous_types(env, lbl$3, lbls.tl); + let paths$1 = ambiguous_types(env, lbl$3, lbls.tl); if (Caml_obj.caml_notequal(paths$1, /* [] */0)) { Curry._2(warn, lid.loc, { TAG: /* Ambiguous_name */24, @@ -63469,8 +63469,8 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } function disambiguate_label_by_ids(keep, env, closed, ids, labels) { - var check_ids = function (param) { - var lbls = Stdlib__Hashtbl.create(undefined, 8); + let check_ids = function (param) { + let lbls = Stdlib__Hashtbl.create(undefined, 8); Stdlib__Array.iter((function (lbl) { Stdlib__Hashtbl.add(lbls, lbl.lbl_name, undefined); }), param[0].lbl_all); @@ -63478,21 +63478,21 @@ function disambiguate_label_by_ids(keep, env, closed, ids, labels) { return Stdlib__Hashtbl.mem(lbls, param); }), ids); }; - var check_closed = function (param) { + let check_closed = function (param) { if (closed) { return Stdlib__List.length(ids) === param[0].lbl_all.length; } else { return true; } }; - var labels$p = Stdlib__List.filter(check_ids, labels); + let labels$p = Stdlib__List.filter(check_ids, labels); if (keep && Caml_obj.caml_equal(labels$p, /* [] */0)) { return [ false, labels ]; } - var labels$p$p = Stdlib__List.filter(check_closed, labels$p); + let labels$p$p = Stdlib__List.filter(check_closed, labels$p); if (keep && Caml_obj.caml_equal(labels$p$p, /* [] */0)) { return [ false, @@ -63507,22 +63507,22 @@ function disambiguate_label_by_ids(keep, env, closed, ids, labels) { } function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { - var ids = Stdlib__List.map((function (param) { + let ids = Stdlib__List.map((function (param) { return last$1(param[0].txt); }), lid_a_list); - var w_pr = { + let w_pr = { contents: false }; - var w_amb = { + let w_amb = { contents: /* [] */0 }; - var w_scope = { + let w_scope = { contents: /* [] */0 }; - var w_scope_ty = { + let w_scope_ty = { contents: "" }; - var warn = function (loc, msg) { + let warn = function (loc, msg) { if (typeof msg === "number") { return prerr_warning(loc, msg); } @@ -63531,7 +63531,7 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { w_pr.contents = true; return ; case /* Name_out_of_scope */23 : - var match = msg._1; + let match = msg._1; if (match && !match.tl) { w_scope.contents = { hd: match.hd, @@ -63543,7 +63543,7 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { return prerr_warning(loc, msg); } case /* Ambiguous_name */24 : - var match$1 = msg._0; + let match$1 = msg._0; if (match$1 && !match$1.tl) { w_amb.contents = { hd: [ @@ -63560,13 +63560,13 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { return prerr_warning(loc, msg); } }; - var process_label = function (lid) { - var scope = find_all_labels(env, lid.loc, lid.txt); + let process_label = function (lid) { + let scope = find_all_labels(env, lid.loc, lid.txt); if (opath === undefined && Caml_obj.caml_equal(scope, /* [] */0)) { unbound_label_error(env, lid); } - var match; - var exit = 0; + let match; + let exit = 0; if (opath !== undefined && opath[2]) { match = [ true, @@ -63578,15 +63578,15 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { if (exit === 1) { match = disambiguate_label_by_ids(opath === undefined, env, closed, ids, scope); } - var labels = match[1]; + let labels = match[1]; if (match[0]) { return disambiguate(warn, undefined, scope, lid, env, opath, labels); } else { return Stdlib__List.hd(labels)[0]; } }; - var lbl_a_list = Stdlib__List.map((function (param) { - var lid = param[0]; + let lbl_a_list = Stdlib__List.map((function (param) { + let lid = param[0]; return [ lid, process_label(lid), @@ -63599,12 +63599,12 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { _0: "this type-based record disambiguation" }); } else { - var amb = Stdlib__List.rev(w_amb.contents); + let amb = Stdlib__List.rev(w_amb.contents); if (amb) { - var paths = Stdlib__List.map((function (param) { + let paths = Stdlib__List.map((function (param) { return get_type_path$1(env, param[1]); }), lbl_a_list); - var path = Stdlib__List.hd(paths); + let path = Stdlib__List.hd(paths); if (Stdlib__List.for_all((function (param) { return compare_type_path(env, path, param); }), Stdlib__List.tl(paths))) { @@ -63645,11 +63645,11 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { function find_record_qual(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var match = param.hd[0].txt; + let match = param.hd[0].txt; switch (match.TAG | 0) { case /* Ldot */1 : return match._0; @@ -63663,18 +63663,18 @@ function find_record_qual(_param) { } function type_label_a_list(labels, loc, closed, env, type_lbl_a, opath, lid_a_list) { - var lbl_a_list; - var exit = 0; + let lbl_a_list; + let exit = 0; if (lid_a_list) { - var s = lid_a_list.hd[0].txt; + let s = lid_a_list.hd[0].txt; switch (s.TAG | 0) { case /* Lident */0 : if (labels !== undefined) { - var labels$1 = Caml_option.valFromOption(labels); + let labels$1 = Caml_option.valFromOption(labels); if (Stdlib__Hashtbl.mem(labels$1, s._0)) { lbl_a_list = Stdlib__List.map((function (param) { - var lid = param[0]; - var s = lid.txt; + let lid = param[0]; + let s = lid.txt; switch (s.TAG | 0) { case /* Lident */0 : return [ @@ -63712,10 +63712,10 @@ function type_label_a_list(labels, loc, closed, env, type_lbl_a, opath, lid_a_li exit = 1; } if (exit === 1) { - var modname = find_record_qual(lid_a_list); - var lid_a_list$1 = modname !== undefined ? Stdlib__List.map((function (lid_a) { - var lid = lid_a[0]; - var s = lid.txt; + let modname = find_record_qual(lid_a_list); + let lid_a_list$1 = modname !== undefined ? Stdlib__List.map((function (lid_a) { + let lid = lid_a[0]; + let s = lid.txt; switch (s.TAG | 0) { case /* Lident */0 : return [ @@ -63737,7 +63737,7 @@ function type_label_a_list(labels, loc, closed, env, type_lbl_a, opath, lid_a_li }), lid_a_list) : lid_a_list; lbl_a_list = disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list$1); } - var lbl_a_list$1 = Stdlib__List.sort((function (param, param$1) { + let lbl_a_list$1 = Stdlib__List.sort((function (param, param$1) { return Caml.caml_int_compare(param[1].lbl_pos, param$1[1].lbl_pos); }), lbl_a_list); return Stdlib__List.map(type_lbl_a, lbl_a_list$1); @@ -63747,10 +63747,10 @@ function check_recordpat_labels(loc, lbl_pat_list, closed) { if (!lbl_pat_list) { return ; } - var all = lbl_pat_list.hd[1].lbl_all; - var defined = Caml_array.make(all.length, false); - var check_defined = function (param) { - var label = param[1]; + let all = lbl_pat_list.hd[1].lbl_all; + let defined = Caml_array.make(all.length, false); + let check_defined = function (param) { + let label = param[1]; if (Caml_array.get(defined, label.lbl_pos)) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -63771,8 +63771,8 @@ function check_recordpat_labels(loc, lbl_pat_list, closed) { }))) { return ; } - var $$undefined = /* [] */0; - for(var i = 0 ,i_finish = all.length; i < i_finish; ++i){ + let $$undefined = /* [] */0; + for(let i = 0 ,i_finish = all.length; i < i_finish; ++i){ if (!Caml_array.get(defined, i)) { $$undefined = { hd: Caml_array.get(all, i).lbl_name, @@ -63784,17 +63784,17 @@ function check_recordpat_labels(loc, lbl_pat_list, closed) { if (!Caml_obj.caml_notequal($$undefined, /* [] */0)) { return ; } - var u = Stdlib__String.concat(", ", Stdlib__List.rev($$undefined)); + let u = Stdlib__String.concat(", ", Stdlib__List.rev($$undefined)); prerr_warning(loc, { TAG: /* Non_closed_record_pattern */4, _0: u }); } -var type_kind$1 = "variant"; +let type_kind$1 = "variant"; function get_type_path$2(env, d) { - var match = d.cstr_res.desc; + let match = d.cstr_res.desc; if (typeof match === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -63819,19 +63819,19 @@ function get_type_path$2(env, d) { } function lookup_from_type$1(env, tpath, lid) { - var descrs = find_type_full(tpath, env)[1][0]; + let descrs = find_type_full(tpath, env)[1][0]; mark_type_used(env, last(tpath), find_type_full(tpath, env)[0]); - var s = lid.txt; + let s = lid.txt; switch (s.TAG | 0) { case /* Lident */0 : - var s$1 = s._0; + let s$1 = s._0; try { return Stdlib__List.find((function (nd) { return nd.cstr_name === s$1; }), descrs); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -63860,13 +63860,13 @@ function lookup_from_type$1(env, tpath, lid) { function unique$1(eq, _acc, _param) { while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return Stdlib__List.rev(acc); } - var rem = param.tl; - var x = param.hd; + let rem = param.tl; + let x = param.hd; if (Stdlib__List.exists(Curry._1(eq, x), acc)) { _param = rem; continue ; @@ -63881,11 +63881,11 @@ function unique$1(eq, _acc, _param) { } function ambiguous_types$1(env, lbl, others) { - var tpath = get_type_path$2(env, lbl); - var others$1 = Stdlib__List.map((function (param) { + let tpath = get_type_path$2(env, lbl); + let others$1 = Stdlib__List.map((function (param) { return get_type_path$2(env, param[0]); }), others); - var tpaths = unique$1((function (param, param$1) { + let tpaths = unique$1((function (param, param$1) { return compare_type_path(env, param, param$1); }), { hd: tpath, @@ -63899,39 +63899,39 @@ function ambiguous_types$1(env, lbl, others) { } function disambiguate_by_type$1(env, tpath, lbls) { - var check_type = function (param) { - var lbl_tpath = get_type_path$2(env, param[0]); + let check_type = function (param) { + let lbl_tpath = get_type_path$2(env, param[0]); return compare_type_path(env, tpath, lbl_tpath); }; return Stdlib__List.find(check_type, lbls); } function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { - var warn = warnOpt !== undefined ? warnOpt : prerr_warning; - var check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { + let warn = warnOpt !== undefined ? warnOpt : prerr_warning; + let check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { }); - var scope$1 = scope !== undefined ? scope : lbls; - var lbl; + let scope$1 = scope !== undefined ? scope : lbls; + let lbl; if (opath !== undefined) { - var pr = opath[2]; - var tpath = opath[1]; - var warn_pr = function (param) { - var kind = type_kind$1 === "record" ? "field" : "constructor"; + let pr = opath[2]; + let tpath = opath[1]; + let warn_pr = function (param) { + let kind = type_kind$1 === "record" ? "field" : "constructor"; Curry._2(warn, lid.loc, { TAG: /* Not_principal */8, _0: "this type-based " + (kind + " disambiguation") }); }; try { - var match = disambiguate_by_type$1(env, tpath, scope$1); - var lbl$1 = match[0]; + let match = disambiguate_by_type$1(env, tpath, scope$1); + let lbl$1 = match[0]; Curry._1(match[1], undefined); if (!pr) { if (lbls) { - var lbl_tpath = get_type_path$2(env, lbls.hd[0]); + let lbl_tpath = get_type_path$2(env, lbls.hd[0]); if (compare_type_path(env, tpath, lbl_tpath)) { - var paths = ambiguous_types$1(env, lbl$1, lbls.tl); + let paths = ambiguous_types$1(env, lbl$1, lbls.tl); if (Caml_obj.caml_notequal(paths, /* [] */0)) { Curry._2(warn, lid.loc, { TAG: /* Ambiguous_name */24, @@ -63954,12 +63954,12 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { lbl = lbl$1; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { try { - var lbl$2 = lookup_from_type$1(env, tpath, lid); + let lbl$2 = lookup_from_type$1(env, tpath, lid); Curry._2(check_lk, tpath, lbl$2); - var s = string_of_out_ident(tree_of_path(tpath)); + let s = string_of_out_ident(tree_of_path(tpath)); Curry._2(warn, lid.loc, { TAG: /* Name_out_of_scope */23, _0: s, @@ -63975,20 +63975,20 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { lbl = lbl$2; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { if (Caml_obj.caml_equal(lbls, /* [] */0)) { lbl = unbound_constructor_error(env, lid); } else { - var tp_0 = opath[0]; - var tp_1 = expand_path(env, tpath); - var tp = [ + let tp_0 = opath[0]; + let tp_1 = expand_path(env, tpath); + let tp = [ tp_0, tp_1 ]; - var tpl = Stdlib__List.map((function (param) { - var tp0 = get_type_path$2(env, param[0]); - var tp = expand_path(env, tp0); + let tpl = Stdlib__List.map((function (param) { + let tp0 = get_type_path$2(env, param[0]); + let tp = expand_path(env, tp0); return [ tp0, tp @@ -64016,10 +64016,10 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } } } else if (lbls) { - var match$1 = lbls.hd; - var lbl$3 = match$1[0]; + let match$1 = lbls.hd; + let lbl$3 = match$1[0]; Curry._1(match$1[1], undefined); - var paths$1 = ambiguous_types$1(env, lbl$3, lbls.tl); + let paths$1 = ambiguous_types$1(env, lbl$3, lbls.tl); if (Caml_obj.caml_notequal(paths$1, /* [] */0)) { Curry._2(warn, lid.loc, { TAG: /* Ambiguous_name */24, @@ -64047,9 +64047,9 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } function unify_head_only(loc, env, ty, constr) { - var match = instance_constructor(undefined, constr); - var ty_res = match[1]; - var match$1 = repr(ty_res).desc; + let match = instance_constructor(undefined, constr); + let ty_res = match[1]; + let match$1 = repr(ty_res).desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -64083,15 +64083,15 @@ function unify_head_only(loc, env, ty, constr) { } function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) { - var type_pat$1 = function (modeOpt, envOpt) { - var mode$1 = modeOpt !== undefined ? modeOpt : mode; - var env$1 = envOpt !== undefined ? envOpt : env; + let type_pat$1 = function (modeOpt, envOpt) { + let mode$1 = modeOpt !== undefined ? modeOpt : mode; + let env$1 = envOpt !== undefined ? envOpt : env; return function (param, param$1) { return type_pat(constrs, labels, no_existentials, mode$1, env$1, param, param$1); }; }; - var loc = sp.ppat_loc; - var name = sp.ppat_desc; + let loc = sp.ppat_loc; + let name = sp.ppat_desc; if (typeof name === "number") { return rp({ pat_desc: /* Tpat_any */0, @@ -64104,8 +64104,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } switch (name.TAG | 0) { case /* Ppat_var */0 : - var name$1 = name._0; - var id = enter_variable(undefined, undefined, loc, name$1, expected_ty); + let name$1 = name._0; + let id = enter_variable(undefined, undefined, loc, name$1, expected_ty); return rp({ pat_desc: { TAG: /* Tpat_var */0, @@ -64119,15 +64119,15 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_alias */1 : - var name$2 = name._1; - var q = type_pat$1(undefined, undefined)(name._0, expected_ty); + let name$2 = name._1; + let q = type_pat$1(undefined, undefined)(name._0, expected_ty); begin_def(undefined); - var ty_var = build_as_type(env.contents, q); + let ty_var = build_as_type(env.contents, q); end_def(undefined); iter_generalize$1({ contents: /* [] */0 }, ty_var); - var id$1 = enter_variable(undefined, true, loc, name$2, ty_var); + let id$1 = enter_variable(undefined, true, loc, name$2, ty_var); return rp({ pat_desc: { TAG: /* Tpat_alias */1, @@ -64142,7 +64142,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_constant */2 : - var cst = name._0; + let cst = name._0; unify_pat_types(loc, env.contents, type_constant(cst), expected_ty); return rp({ pat_desc: { @@ -64156,20 +64156,20 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_interval */3 : - var c1 = name._0; + let c1 = name._0; if (c1.TAG === /* Const_char */1) { - var c2 = name._1; + let c2 = name._1; if (c2.TAG === /* Const_char */1) { - var c2$1 = c2._0; - var c1$1 = c1._0; - var gloc_loc_start = loc.loc_start; - var gloc_loc_end = loc.loc_end; - var gloc = { + let c2$1 = c2._0; + let c1$1 = c1._0; + let gloc_loc_start = loc.loc_start; + let gloc_loc_end = loc.loc_end; + let gloc = { loc_start: gloc_loc_start, loc_end: gloc_loc_end, loc_ghost: true }; - var loop = function (c1, c2) { + let loop = function (c1, c2) { if (c1 === c2) { return constant(gloc, undefined, { TAG: /* Const_char */1, @@ -64182,10 +64182,10 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) }), loop(Stdlib__Char.chr(c1 + 1 | 0), c2)); } }; - var p = c1$1 <= c2$1 ? loop(c1$1, c2$1) : loop(c2$1, c1$1); - var p_ppat_desc = p.ppat_desc; - var p_ppat_attributes = p.ppat_attributes; - var p$1 = { + let p = c1$1 <= c2$1 ? loop(c1$1, c2$1) : loop(c2$1, c1$1); + let p_ppat_desc = p.ppat_desc; + let p_ppat_attributes = p.ppat_attributes; + let p$1 = { ppat_desc: p_ppat_desc, ppat_loc: loc, ppat_attributes: p_ppat_attributes @@ -64206,25 +64206,25 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) _3: /* Invalid_interval */5 }); case /* Ppat_tuple */4 : - var spl = name._0; + let spl = name._0; if (Stdlib__List.length(spl) < 2) { ill_formed_ast(loc, "Tuples must have at least 2 components."); } - var spl_ann = Stdlib__List.map((function (p) { + let spl_ann = Stdlib__List.map((function (p) { return [ p, newvar(undefined, undefined) ]; }), spl); - var desc = { + let desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (prim) { return prim[1]; }), spl_ann) }; - var ty = newty2(current_level.contents, desc); + let ty = newty2(current_level.contents, desc); unify_pat_types(loc, env.contents, ty, expected_ty); - var pl = Stdlib__List.map((function (param) { + let pl = Stdlib__List.map((function (param) { return type_pat$1(undefined, undefined)(param[0], param[1]); }), spl_ann); return rp({ @@ -64239,11 +64239,11 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_construct */5 : - var sarg = name._1; - var lid = name._0; - var opath; + let sarg = name._1; + let lid = name._0; + let opath; try { - var match = extract_concrete_variant(env.contents, expected_ty); + let match = extract_concrete_variant(env.contents, expected_ty); opath = [ match[0], match[1], @@ -64251,21 +64251,21 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { opath = undefined; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var match$1 = lid.txt; - var constrs$1; - var exit = 0; + let match$1 = lid.txt; + let constrs$1; + let exit = 0; switch (match$1.TAG | 0) { case /* Lident */0 : if (constrs !== undefined) { - var constrs$2 = Caml_option.valFromOption(constrs); - var s = match$1._0; + let constrs$2 = Caml_option.valFromOption(constrs); + let s = match$1._0; if (Stdlib__Hashtbl.mem(constrs$2, s)) { constrs$1 = { hd: [ @@ -64292,7 +64292,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) if (exit === 1) { constrs$1 = find_all_constructors(env.contents, lid.loc, lid.txt); } - var check_lk = function (tpath, constr) { + let check_lk = function (tpath, constr) { if (!constr.cstr_generalized) { return ; } @@ -64307,9 +64307,9 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } }); }; - var partial_arg = env.contents; - var partial_arg$1 = check_lk; - var constr = wrap_disambiguate("This variant pattern is expected to have", expected_ty, (function (param) { + let partial_arg = env.contents; + let partial_arg$1 = check_lk; + let constr = wrap_disambiguate("This variant pattern is expected to have", expected_ty, (function (param) { return disambiguate$1(undefined, partial_arg$1, undefined, lid, partial_arg, opath, param); }), constrs$1); mark_constructor(/* Pattern */1, env.contents, last$1(lid.txt), constr); @@ -64325,9 +64325,9 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) if (constr.cstr_generalized) { unify_head_only(loc, env.contents, expected_ty, constr); } - var sargs; + let sargs; if (sarg !== undefined) { - var spl$1 = sarg.ppat_desc; + let spl$1 = sarg.ppat_desc; if (typeof spl$1 === "number") { if (constr.cstr_arity !== 1) { if (constr.cstr_arity === 0) { @@ -64362,17 +64362,17 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } }); } - var match$2 = instance_constructor([ + let match$2 = instance_constructor([ env, get_newtype_level$1(undefined) ], constr); - var ty_res = match$2[1]; + let ty_res = match$2[1]; if (constr.cstr_generalized && mode === /* Normal */0) { unify_pat_types_gadt(loc, env, ty_res, expected_ty); } else { unify_pat_types(loc, env.contents, ty_res, expected_ty); } - var args = Stdlib__List.map2((function (p, t) { + let args = Stdlib__List.map2((function (p, t) { return type_pat$1(undefined, undefined)(p, t); }), sargs, match$2[0]); return rp({ @@ -64389,13 +64389,13 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_variant */6 : - var sarg$1 = name._1; - var l = name._0; - var arg_type = sarg$1 !== undefined ? ({ + let sarg$1 = name._1; + let l = name._0; + let arg_type = sarg$1 !== undefined ? ({ hd: newvar(undefined, undefined), tl: /* [] */0 }) : /* [] */0; - var row_row_fields = { + let row_row_fields = { hd: [ l, { @@ -64410,8 +64410,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) ], tl: /* [] */0 }; - var row_row_more = newvar(undefined, undefined); - var row = { + let row_row_more = newvar(undefined, undefined); + let row = { row_fields: row_row_fields, row_more: row_row_more, row_bound: undefined, @@ -64423,7 +64423,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) TAG: /* Tvariant */8, _0: row }), expected_ty); - var arg = sarg$1 !== undefined && arg_type && !arg_type.tl ? type_pat$1(undefined, undefined)(sarg$1, arg_type.hd) : undefined; + let arg = sarg$1 !== undefined && arg_type && !arg_type.tl ? type_pat$1(undefined, undefined)(sarg$1, arg_type.hd) : undefined; return rp({ pat_desc: { TAG: /* Tpat_variant */5, @@ -64447,14 +64447,14 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_record */7 : - var closed = name._1; - var lid_sp_list = name._0; + let closed = name._1; + let lid_sp_list = name._0; if (Caml_obj.caml_equal(lid_sp_list, /* [] */0)) { ill_formed_ast(loc, "Records cannot be empty."); } - var match$3; + let match$3; try { - var match$4 = extract_concrete_record(env.contents, expected_ty); + let match$4 = extract_concrete_record(env.contents, expected_ty); match$3 = [ [ match$4[0], @@ -64465,7 +64465,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) ]; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { match$3 = [ undefined, @@ -64475,15 +64475,15 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } } - var record_ty = match$3[1]; - var opath$1 = match$3[0]; - var type_label_pat = function (param) { - var label = param[1]; - var label_lid = param[0]; + let record_ty = match$3[1]; + let opath$1 = match$3[0]; + let type_label_pat = function (param) { + let label = param[1]; + let label_lid = param[0]; begin_def(undefined); - var match = instance_label(false, label); - var ty_arg = match[1]; - var vars = match[0]; + let match = instance_label(false, label); + let ty_arg = match[1]; + let vars = match[0]; if (Caml_obj.caml_equal(vars, /* [] */0)) { end_def(undefined); } @@ -64491,7 +64491,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) unify_pat_types(loc, env.contents, match[2], record_ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -64506,15 +64506,15 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var arg = type_pat$1(undefined, undefined)(param[2], ty_arg); + let arg = type_pat$1(undefined, undefined)(param[2], ty_arg); if (Caml_obj.caml_notequal(vars, /* [] */0)) { end_def(undefined); iter_generalize$1({ contents: /* [] */0 }, ty_arg); Stdlib__List.iter(generalize, vars); - var instantiated = function (tv) { - var tv$1 = expand_head(env.contents, tv); + let instantiated = function (tv) { + let tv$1 = expand_head(env.contents, tv); if (is_Tvar(tv$1)) { return tv$1.level !== 100000000; } else { @@ -64540,8 +64540,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) arg ]; }; - var partial_arg$2 = env.contents; - var lbl_pat_list = wrap_disambiguate("This record pattern is expected to have", expected_ty, (function (param) { + let partial_arg$2 = env.contents; + let lbl_pat_list = wrap_disambiguate("This record pattern is expected to have", expected_ty, (function (param) { return type_label_a_list(labels, loc, false, partial_arg$2, type_label_pat, opath$1, param); }), lid_sp_list); check_recordpat_labels(loc, lbl_pat_list, closed); @@ -64559,15 +64559,15 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_array */8 : - var ty_elt = newvar(undefined, undefined); + let ty_elt = newvar(undefined, undefined); unify_pat_types(loc, env.contents, instance_def(type_array(ty_elt)), expected_ty); - var spl_ann$1 = Stdlib__List.map((function (p) { + let spl_ann$1 = Stdlib__List.map((function (p) { return [ p, newvar(undefined, undefined) ]; }), name._0); - var pl$1 = Stdlib__List.map((function (param) { + let pl$1 = Stdlib__List.map((function (param) { return type_pat$1(undefined, undefined)(param[0], ty_elt); }), spl_ann$1); return rp({ @@ -64582,13 +64582,13 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_or */9 : - var initial_pattern_variables = pattern_variables.contents; - var p1 = type_pat$1(/* Inside_or */1, undefined)(name._0, expected_ty); - var p1_variables = pattern_variables.contents; + let initial_pattern_variables = pattern_variables.contents; + let p1 = type_pat$1(/* Inside_or */1, undefined)(name._0, expected_ty); + let p1_variables = pattern_variables.contents; pattern_variables.contents = initial_pattern_variables; - var p2 = type_pat$1(/* Inside_or */1, undefined)(name._1, expected_ty); - var p2_variables = pattern_variables.contents; - var alpha_env = enter_orpat_variables(loc, env.contents, p1_variables, p2_variables); + let p2 = type_pat$1(/* Inside_or */1, undefined)(name._1, expected_ty); + let p2_variables = pattern_variables.contents; + let alpha_env = enter_orpat_variables(loc, env.contents, p1_variables, p2_variables); pattern_variables.contents = p1_variables; return rp({ pat_desc: { @@ -64604,28 +64604,28 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_constraint */10 : - var sp$1 = name._0; - var exit$1 = 0; - var name$3 = sp$1.ppat_desc; + let sp$1 = name._0; + let exit$1 = 0; + let name$3 = sp$1.ppat_desc; if (typeof name$3 === "number" || name$3.TAG !== /* Ppat_var */0) { exit$1 = 1; } else { - var sty = name._1; - var tmp = sty.ptyp_desc; + let sty = name._1; + let tmp = sty.ptyp_desc; if (typeof tmp === "number" || tmp.TAG !== /* Ptyp_poly */8) { exit$1 = 1; } else { - var lloc = sp$1.ppat_loc; - var name$4 = name$3._0; - var match$5 = transl_simple_type_delayed(env.contents, sty); - var cty = match$5[0]; - var ty$1 = cty.ctyp_type; + let lloc = sp$1.ppat_loc; + let name$4 = name$3._0; + let match$5 = transl_simple_type_delayed(env.contents, sty); + let cty = match$5[0]; + let ty$1 = cty.ctyp_type; unify_pat_types(lloc, env.contents, ty$1, expected_ty); pattern_force.contents = { hd: match$5[1], tl: pattern_force.contents }; - var match$6 = ty$1.desc; + let match$6 = ty$1.desc; if (typeof match$6 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -64638,13 +64638,13 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } if (match$6.TAG === /* Tpoly */10) { begin_def(undefined); - var match$7 = instance_poly(true, false, match$6._1, match$6._0); - var ty$p = match$7[1]; + let match$7 = instance_poly(true, false, match$6._1, match$6._0); + let ty$p = match$7[1]; end_def(undefined); iter_generalize$1({ contents: /* [] */0 }, ty$p); - var id$2 = enter_variable(undefined, undefined, lloc, name$4, ty$p); + let id$2 = enter_variable(undefined, undefined, lloc, name$4, ty$p); return rp({ pat_desc: { TAG: /* Tpat_var */0, @@ -64680,31 +64680,31 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } if (exit$1 === 1) { begin_def(undefined); - var match$8 = transl_simple_type_delayed(env.contents, name._1); - var cty$1 = match$8[0]; - var ty$2 = cty$1.ctyp_type; + let match$8 = transl_simple_type_delayed(env.contents, name._1); + let cty$1 = match$8[0]; + let ty$2 = cty$1.ctyp_type; end_def(undefined); generalize_structure$1(current_level.contents, ty$2); - var ty$3 = instance(undefined, env.contents, ty$2); - var expected_ty$p = instance(undefined, env.contents, ty$2); + let ty$3 = instance(undefined, env.contents, ty$2); + let expected_ty$p = instance(undefined, env.contents, ty$2); unify_pat_types(loc, env.contents, ty$3, expected_ty); - var p$2 = type_pat$1(undefined, undefined)(sp$1, expected_ty$p); + let p$2 = type_pat$1(undefined, undefined)(sp$1, expected_ty$p); pattern_force.contents = { hd: match$8[1], tl: pattern_force.contents }; - var extra_0 = { + let extra_0 = { TAG: /* Tpat_constraint */0, _0: cty$1 }; - var extra_2 = sp$1.ppat_attributes; - var extra = [ + let extra_2 = sp$1.ppat_attributes; + let extra = [ extra_0, loc, extra_2 ]; - var match$9 = p$2.pat_desc; - var exit$2 = 0; + let match$9 = p$2.pat_desc; + let exit$2 = 0; if (typeof match$9 === "number") { exit$2 = 2; } else { @@ -64752,9 +64752,9 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } break; case /* Ppat_type */11 : - var lid$1 = name._0; - var match$10 = build_or_pat(env.contents, loc, lid$1.txt); - var p$3 = match$10[1]; + let lid$1 = name._0; + let match$10 = build_or_pat(env.contents, loc, lid$1.txt); + let p$3 = match$10[1]; unify_pat_types(loc, env.contents, match$10[2], expected_ty); return { pat_desc: p$3.pat_desc, @@ -64776,9 +64776,9 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: p$3.pat_attributes }; case /* Ppat_lazy */12 : - var nv = newvar(undefined, undefined); + let nv = newvar(undefined, undefined); unify_pat_types(loc, env.contents, instance_def(type_lazy_t(nv)), expected_ty); - var p1$1 = type_pat$1(undefined, undefined)(name._0, nv); + let p1$1 = type_pat$1(undefined, undefined)(name._0, nv); return rp({ pat_desc: { TAG: /* Tpat_lazy */9, @@ -64791,8 +64791,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) pat_attributes: sp.ppat_attributes }); case /* Ppat_unpack */13 : - var name$5 = name._0; - var id$3 = enter_variable(true, undefined, loc, name$5, expected_ty); + let name$5 = name._0; + let id$3 = enter_variable(true, undefined, loc, name$5, expected_ty); return rp({ pat_desc: { TAG: /* Tpat_var */0, @@ -64829,11 +64829,11 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } function type_pat$1(allow_existentialsOpt, constrs, labels, levOpt, env, sp, expected_ty) { - var allow_existentials = allow_existentialsOpt !== undefined ? allow_existentialsOpt : false; - var lev = levOpt !== undefined ? levOpt : current_level.contents; + let allow_existentials = allow_existentialsOpt !== undefined ? allow_existentialsOpt : false; + let lev = levOpt !== undefined ? levOpt : current_level.contents; newtype_level$1.contents = lev; try { - var r = type_pat(constrs, labels, !allow_existentials, /* Normal */0, env, sp, expected_ty); + let r = type_pat(constrs, labels, !allow_existentials, /* Normal */0, env, sp, expected_ty); iter_pattern((function (p) { p.pat_env = env.contents; }), r); @@ -64847,10 +64847,10 @@ function type_pat$1(allow_existentialsOpt, constrs, labels, levOpt, env, sp, exp } function partial_pred(lev, env, expected_ty, constrs, labels, p) { - var snap = snapshot(undefined); + let snap = snapshot(undefined); try { reset_pattern(undefined, true); - var typed_p = type_pat$1(true, Caml_option.some(constrs), Caml_option.some(labels), lev, { + let typed_p = type_pat$1(true, Caml_option.some(constrs), Caml_option.some(labels), lev, { contents: env }, p, expected_ty); backtrack(snap); @@ -64863,12 +64863,12 @@ function partial_pred(lev, env, expected_ty, constrs, labels, p) { } function check_partial$1(levOpt, env, expected_ty) { - var lev = levOpt !== undefined ? levOpt : current_level.contents; + let lev = levOpt !== undefined ? levOpt : current_level.contents; return function (param, param$1) { - var pred = function (param, param$1, param$2) { + let pred = function (param, param$1, param$2) { return partial_pred(lev, env, expected_ty, param, param$1, param$2); }; - var first_check = check_partial(param, param$1); + let first_check = check_partial(param, param$1); if (first_check) { return check_partial_param((function (param, param$1, param$2) { return do_check_partial(pred, exhaust_gadt$1, param, param$1, param$2); @@ -64880,10 +64880,10 @@ function check_partial$1(levOpt, env, expected_ty) { } function add_pattern_variables(check, check_as, env) { - var pv = get_ref(pattern_variables); + let pv = get_ref(pattern_variables); return [ Stdlib__List.fold_right((function (param, env) { - var check$1 = param[4] ? check_as : check; + let check$1 = param[4] ? check_as : check; return add_value(check$1, param[0], { val_type: param[1], val_kind: /* Val_reg */0, @@ -64897,11 +64897,11 @@ function add_pattern_variables(check, check_as, env) { function type_pattern(lev, env, spat, scope, expected_ty) { reset_pattern(scope, true); - var new_env = { + let new_env = { contents: env }; - var pat = type_pat$1(true, undefined, undefined, lev, new_env, spat, expected_ty); - var match = add_pattern_variables((function (s) { + let pat = type_pat$1(true, undefined, undefined, lev, new_env, spat, expected_ty); + let match = add_pattern_variables((function (s) { return { TAG: /* Unused_var_strict */13, _0: s @@ -64922,13 +64922,13 @@ function type_pattern(lev, env, spat, scope, expected_ty) { function type_pattern_list(env, spatl, scope, expected_tys, allow) { reset_pattern(scope, allow); - var new_env = { + let new_env = { contents: env }; - var patl = Stdlib__List.map2((function (param, param$1) { + let patl = Stdlib__List.map2((function (param, param$1) { return type_pat$1(undefined, undefined, undefined, undefined, new_env, param, param$1); }), spatl, expected_tys); - var match = add_pattern_variables(undefined, undefined, new_env.contents); + let match = add_pattern_variables(undefined, undefined, new_env.contents); return [ patl, match[0], @@ -64939,8 +64939,8 @@ function type_pattern_list(env, spatl, scope, expected_tys, allow) { function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { reset_pattern(undefined, false); - var nv = newvar(undefined, undefined); - var pat = type_pat$1(undefined, undefined, undefined, undefined, { + let nv = newvar(undefined, undefined); + let pat = type_pat$1(undefined, undefined, undefined, undefined, { contents: val_env }, spat, nv); if (has_variants(pat)) { @@ -64956,11 +64956,11 @@ function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { if (is_optional(l)) { unify_pat(val_env, pat, type_option$1(newvar(undefined, undefined))); } - var match = Stdlib__List.fold_right((function (param, param$1) { - var as_var = param[4]; - var ty = param[1]; - var id = param[0]; - var check = function (s) { + let match = Stdlib__List.fold_right((function (param, param$1) { + let as_var = param[4]; + let ty = param[1]; + let id = param[0]; + let check = function (s) { if (as_var) { return { TAG: /* Unused_var */12, @@ -64973,7 +64973,7 @@ function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { }; } }; - var id$p = create(id.name); + let id$p = create(id.name); return [ { hd: [ @@ -64999,7 +64999,7 @@ function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { /* [] */0, met_env ]); - var match$1 = add_pattern_variables(undefined, undefined, val_env); + let match$1 = add_pattern_variables(undefined, undefined, val_env); return [ pat, match[0], @@ -65009,7 +65009,7 @@ function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { } function type_self_pattern(cl_num, privty, val_env, met_env, par_env, spat) { - var spat$1 = mk$1(undefined, undefined, { + let spat$1 = mk$1(undefined, undefined, { TAG: /* Ppat_alias */1, _0: mk$1(undefined, undefined, { TAG: /* Ppat_alias */1, @@ -65025,26 +65025,26 @@ function type_self_pattern(cl_num, privty, val_env, met_env, par_env, spat) { } }); reset_pattern(undefined, false); - var nv = newvar(undefined, undefined); - var pat = type_pat$1(undefined, undefined, undefined, undefined, { + let nv = newvar(undefined, undefined); + let pat = type_pat$1(undefined, undefined, undefined, undefined, { contents: val_env }, spat$1, nv); Stdlib__List.iter((function (f) { Curry._1(f, undefined); }), get_ref(pattern_force)); - var meths = { + let meths = { contents: /* Empty */0 }; - var vars = { + let vars = { contents: Meths.empty }; - var pv = pattern_variables.contents; + let pv = pattern_variables.contents; pattern_variables.contents = /* [] */0; - var match = Stdlib__List.fold_right((function (param, param$1) { - var as_var = param[4]; - var loc = param[3]; - var ty = param[1]; - var id = param[0]; + let match = Stdlib__List.fold_right((function (param, param$1) { + let as_var = param[4]; + let loc = param[3]; + let ty = param[1]; + let id = param[0]; return [ add_value(undefined, id, { val_type: ty, @@ -65098,7 +65098,7 @@ function type_self_pattern(cl_num, privty, val_env, met_env, par_env, spat) { ]; } -var delayed_checks = { +let delayed_checks = { contents: /* [] */0 }; @@ -65113,8 +65113,8 @@ function add_delayed_check(f) { } function force_delayed_checks(param) { - var snap = snapshot(undefined); - var w_old = current.contents; + let snap = snapshot(undefined); + let w_old = current.contents; Stdlib__List.iter((function (param) { current.contents = param[1]; Curry._1(param[0], undefined); @@ -65126,14 +65126,14 @@ function force_delayed_checks(param) { function final_subexpression(_sexp) { while(true) { - var sexp = _sexp; - var match = sexp.pexp_desc; + let sexp = _sexp; + let match = sexp.pexp_desc; switch (match.TAG | 0) { case /* Pexp_let */2 : _sexp = match._2; continue ; case /* Pexp_match */6 : - var match$1 = match._1; + let match$1 = match._1; if (!match$1) { return sexp; } @@ -65154,8 +65154,8 @@ function final_subexpression(_sexp) { function is_nonexpansive(_exp) { while(true) { - var exp = _exp; - var el = exp.exp_desc; + let exp = _exp; + let el = exp.exp_desc; switch (el.TAG | 0) { case /* Texp_let */2 : if (!Stdlib__List.for_all((function (vb) { @@ -65170,7 +65170,7 @@ function is_nonexpansive(_exp) { case /* Texp_function */3 : return true; case /* Texp_apply */4 : - var match = el._1; + let match = el._1; if (match && !(match.hd[1] !== undefined || !is_nonexpansive(el._0))) { return Stdlib__List.for_all(is_nonexpansive_opt, Stdlib__List.map(snd3, match.tl)); } else { @@ -65230,18 +65230,18 @@ function is_nonexpansive(_exp) { _exp = el._0; continue ; case /* Texp_object */26 : - var match$1 = el._0; - var count = { + let match$1 = el._0; + let count = { contents: 0 }; if (Stdlib__List.for_all((function(count){ return function (field) { - var e = field.cf_desc; + let e = field.cf_desc; switch (e.TAG | 0) { case /* Tcf_inherit */0 : return false; case /* Tcf_val */1 : - var match = e._3; + let match = e._3; if (match.TAG === /* Tcfk_virtual */0) { count.contents = count.contents + 1 | 0; return true; @@ -65274,12 +65274,12 @@ function is_nonexpansive(_exp) { function is_nonexpansive_mod(_mexp) { while(true) { - var mexp = _mexp; - var str = mexp.mod_desc; + let mexp = _mexp; + let str = mexp.mod_desc; switch (str.TAG | 0) { case /* Tmod_structure */1 : return Stdlib__List.for_all((function (item) { - var id_mod_list = item.str_desc; + let id_mod_list = item.str_desc; switch (id_mod_list.TAG | 0) { case /* Tstr_value */1 : return Stdlib__List.for_all((function (vb) { @@ -65340,17 +65340,17 @@ function is_nonexpansive_opt(param) { function approx_type(env, _sty) { while(true) { - var sty = _sty; - var args = sty.ptyp_desc; + let sty = _sty; + let args = sty.ptyp_desc; if (typeof args === "number") { return newvar(undefined, undefined); } switch (args.TAG | 0) { case /* Ptyp_arrow */1 : - var p = args._0; - var ty1 = is_optional(p) ? type_option$1(newvar(undefined, undefined)) : newvar(undefined, undefined); - var desc_2 = approx_type(env, args._2); - var desc = { + let p = args._0; + let ty1 = is_optional(p) ? type_option$1(newvar(undefined, undefined)) : newvar(undefined, undefined); + let desc_2 = approx_type(env, args._2); + let desc = { TAG: /* Tarrow */1, _0: p, _1: ty1, @@ -65359,7 +65359,7 @@ function approx_type(env, _sty) { }; return newty2(current_level.contents, desc); case /* Ptyp_tuple */2 : - var desc$1 = { + let desc$1 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (param) { return approx_type(env, param); @@ -65367,21 +65367,21 @@ function approx_type(env, _sty) { }; return newty2(current_level.contents, desc$1); case /* Ptyp_constr */3 : - var ctl = args._1; + let ctl = args._1; try { - var match = lookup_type$1(args._0.txt, env); + let match = lookup_type$1(args._0.txt, env); if (Stdlib__List.length(ctl) !== match[1].type_arity) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } - var tyl = Stdlib__List.map((function (param) { + let tyl = Stdlib__List.map((function (param) { return approx_type(env, param); }), ctl); return newconstr(match[0], tyl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return newvar(undefined, undefined); } @@ -65398,20 +65398,20 @@ function approx_type(env, _sty) { function type_approx(env, _sexp) { while(true) { - var sexp = _sexp; - var l = sexp.pexp_desc; + let sexp = _sexp; + let l = sexp.pexp_desc; switch (l.TAG | 0) { case /* Pexp_let */2 : _sexp = l._2; continue ; case /* Pexp_function */3 : - var match = l._0; + let match = l._0; if (!match) { return newvar(undefined, undefined); } - var desc_1 = newvar(undefined, undefined); - var desc_2 = type_approx(env, match.hd.pc_rhs); - var desc = { + let desc_1 = newvar(undefined, undefined); + let desc_2 = type_approx(env, match.hd.pc_rhs); + let desc = { TAG: /* Tarrow */1, _0: "", _1: desc_1, @@ -65420,11 +65420,11 @@ function type_approx(env, _sexp) { }; return newty2(current_level.contents, desc); case /* Pexp_fun */4 : - var p = l._0; + let p = l._0; if (is_optional(p)) { - var desc_1$1 = type_option$1(newvar(undefined, undefined)); - var desc_2$1 = type_approx(env, l._3); - var desc$1 = { + let desc_1$1 = type_option$1(newvar(undefined, undefined)); + let desc_2$1 = type_approx(env, l._3); + let desc$1 = { TAG: /* Tarrow */1, _0: p, _1: desc_1$1, @@ -65433,9 +65433,9 @@ function type_approx(env, _sexp) { }; return newty2(current_level.contents, desc$1); } - var desc_1$2 = newvar(undefined, undefined); - var desc_2$2 = type_approx(env, l._3); - var desc$2 = { + let desc_1$2 = newvar(undefined, undefined); + let desc_2$2 = type_approx(env, l._3); + let desc$2 = { TAG: /* Tarrow */1, _0: p, _1: desc_1$2, @@ -65444,7 +65444,7 @@ function type_approx(env, _sexp) { }; return newty2(current_level.contents, desc$2); case /* Pexp_match */6 : - var match$1 = l._1; + let match$1 = l._1; if (!match$1) { return newvar(undefined, undefined); } @@ -65454,7 +65454,7 @@ function type_approx(env, _sexp) { _sexp = l._0; continue ; case /* Pexp_tuple */8 : - var desc$3 = { + let desc$3 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (param) { return type_approx(env, param); @@ -65466,13 +65466,13 @@ function type_approx(env, _sexp) { _sexp = l._1; continue ; case /* Pexp_constraint */19 : - var ty = type_approx(env, l._0); - var ty1 = approx_type(env, l._1); + let ty = type_approx(env, l._0); + let ty1 = approx_type(env, l._1); try { unify$2(env, ty, ty1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -65488,21 +65488,21 @@ function type_approx(env, _sexp) { } return ty1; case /* Pexp_coerce */20 : - var approx_ty_opt = function (param) { + let approx_ty_opt = function (param) { if (param !== undefined) { return approx_type(env, param); } else { return newvar(undefined, undefined); } }; - var ty$1 = type_approx(env, l._0); - var ty1$1 = approx_ty_opt(l._1); - var ty2 = approx_type(env, l._2); + let ty$1 = type_approx(env, l._0); + let ty1$1 = approx_ty_opt(l._1); + let ty2 = approx_type(env, l._2); try { unify$2(env, ty$1, ty1$1); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -65525,21 +65525,21 @@ function type_approx(env, _sexp) { function list_labels(env, ty) { return wrap_trace_gadt_instances(env, (function (param) { - var _visited = /* [] */0; - var _ls = /* [] */0; - var _ty_fun = param; + let _visited = /* [] */0; + let _ls = /* [] */0; + let _ty_fun = param; while(true) { - var ty_fun = _ty_fun; - var ls = _ls; - var visited = _visited; - var ty = expand_head(env, ty_fun); + let ty_fun = _ty_fun; + let ls = _ls; + let visited = _visited; + let ty = expand_head(env, ty_fun); if (Stdlib__List.memq(ty, visited)) { return [ Stdlib__List.rev(ls), false ]; } - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return [ Stdlib__List.rev(ls), @@ -65570,18 +65570,18 @@ function check_univars(env, expans, kind, exp, ty_expected, vars) { if (expans && !is_nonexpansive(exp)) { generalize_expansive$1(env, exp.exp_type); } - var vars$1 = Stdlib__List.map((function (param) { + let vars$1 = Stdlib__List.map((function (param) { return expand_head(env, param); }), vars); - var vars$2 = Stdlib__List.map((function (param) { + let vars$2 = Stdlib__List.map((function (param) { return expand_head(env, param); }), vars$1); - var vars$p = Stdlib__List.filter((function (t) { - var t$1 = repr(t); + let vars$p = Stdlib__List.filter((function (t) { + let t$1 = repr(t); iter_generalize$1({ contents: /* [] */0 }, t$1); - var name = t$1.desc; + let name = t$1.desc; if (typeof name === "number" || !(name.TAG === /* Tvar */0 && t$1.level === 100000000)) { return false; } else { @@ -65596,12 +65596,12 @@ function check_univars(env, expans, kind, exp, ty_expected, vars) { if (Stdlib__List.length(vars$2) === Stdlib__List.length(vars$p)) { return ; } - var ty = newty2(100000000, { + let ty = newty2(100000000, { TAG: /* Tpoly */10, _0: repr(exp.exp_type), _1: vars$p }); - var ty_expected$1 = repr(ty_expected); + let ty_expected$1 = repr(ty_expected); throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: exp.exp_loc, @@ -65627,8 +65627,8 @@ function check_univars(env, expans, kind, exp, ty_expected, vars) { } function check_application_result(env, statement, exp) { - var loc = exp.exp_loc; - var match = expand_head(env, exp.exp_type).desc; + let loc = exp.exp_loc; + let match = expand_head(env, exp.exp_type).desc; if (typeof match !== "number") { switch (match.TAG | 0) { case /* Tvar */0 : @@ -65651,8 +65651,8 @@ function check_application_result(env, statement, exp) { } function generalizable(level, ty) { - var check = function (ty) { - var ty$1 = repr(ty); + let check = function (ty) { + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } @@ -65670,7 +65670,7 @@ function generalizable(level, ty) { return true; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { unmark_type(ty); return false; @@ -65679,13 +65679,13 @@ function generalizable(level, ty) { } } -var self_coercion = { +let self_coercion = { contents: /* [] */0 }; function wrap_unpacks(sexp, unpacks) { return Stdlib__List.fold_left((function (sexp, param) { - var name = param[0]; + let name = param[0]; return Curry._5(Ast_helper_Exp.letmodule, sexp.pexp_loc, undefined, name, unpack$1(param[1], undefined, Curry._3(Ast_helper_Exp.ident, name.loc, undefined, { txt: { TAG: /* Lident */0, @@ -65697,23 +65697,23 @@ function wrap_unpacks(sexp, unpacks) { } function contains_variant_either(ty) { - var loop = function (ty) { - var ty$1 = repr(ty); + let loop = function (ty) { + let ty$1 = repr(ty); if (ty$1.level < 0) { return ; } mark_type_node(ty$1); - var row = ty$1.desc; + let row = ty$1.desc; if (typeof row === "number") { return iter_type_expr(loop, ty$1); } if (row.TAG !== /* Tvariant */8) { return iter_type_expr(loop, ty$1); } - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); if (!row$1.row_fixed) { Stdlib__List.iter((function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return ; } @@ -65733,7 +65733,7 @@ function contains_variant_either(ty) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { unmark_type(ty); return true; @@ -65743,7 +65743,7 @@ function contains_variant_either(ty) { } function iter_ppat(f, p) { - var pats = p.ppat_desc; + let pats = p.ppat_desc; if (typeof pats === "number") { return ; } @@ -65772,8 +65772,8 @@ function iter_ppat(f, p) { } function contains_polymorphic_variant(p) { - var loop = function (p) { - var match = p.ppat_desc; + let loop = function (p) { + let match = p.ppat_desc; if (typeof match === "number") { return iter_ppat(loop, p); } @@ -65792,7 +65792,7 @@ function contains_polymorphic_variant(p) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return true; } @@ -65801,8 +65801,8 @@ function contains_polymorphic_variant(p) { } function contains_gadt(env, p) { - var loop = function (p) { - var match = p.ppat_desc; + let loop = function (p) { + let match = p.ppat_desc; if (typeof match === "number") { return iter_ppat(loop, p); } @@ -65810,7 +65810,7 @@ function contains_gadt(env, p) { return iter_ppat(loop, p); } try { - var cstrs = lookup_all_constructors$1(match._0.txt, env); + let cstrs = lookup_all_constructors$1(match._0.txt, env); Stdlib__List.iter((function (param) { if (!param[0].cstr_generalized) { return ; @@ -65821,7 +65821,7 @@ function contains_gadt(env, p) { }), cstrs); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -65834,7 +65834,7 @@ function contains_gadt(env, p) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return true; } @@ -65845,16 +65845,16 @@ function contains_gadt(env, p) { function check_absent_variant(env) { return function (param) { return iter_pattern((function (pat) { - var match = pat.pat_desc; + let match = pat.pat_desc; if (typeof match === "number") { return ; } if (match.TAG !== /* Tpat_variant */5) { return ; } - var arg = match._1; - var s = match._0; - var row = row_repr_aux(/* [] */0, match._2.contents); + let arg = match._1; + let s = match._0; + let row = row_repr_aux(/* [] */0, match._2.contents); if (Stdlib__List.exists((function (param) { if (s === param[0]) { return Caml_obj.caml_notequal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0); @@ -65864,11 +65864,11 @@ function check_absent_variant(env) { }), row.row_fields) || !row.row_fixed && !static_row(row)) { return ; } - var ty_arg = arg !== undefined ? ({ + let ty_arg = arg !== undefined ? ({ hd: type_expr(identity, arg.pat_type), tl: /* [] */0 }) : /* [] */0; - var row$p_row_fields = { + let row$p_row_fields = { hd: [ s, { @@ -65883,8 +65883,8 @@ function check_absent_variant(env) { ], tl: /* [] */0 }; - var row$p_row_more = newvar(undefined, undefined); - var row$p = { + let row$p_row_more = newvar(undefined, undefined); + let row$p = { row_fields: row$p_row_fields, row_more: row$p_row_more, row_bound: undefined, @@ -65908,25 +65908,25 @@ function check_absent_variant(env) { } function duplicate_ident_types(loc, caselist, env) { - var caselist$1 = Stdlib__List.filter((function (param) { + let caselist$1 = Stdlib__List.filter((function (param) { return contains_gadt(env, param.pc_lhs); }), caselist); - var idents = all_idents_cases(caselist$1); + let idents = all_idents_cases(caselist$1); return Stdlib__List.fold_left((function (env, s) { try { - var match = lookup_value$1({ + let match = lookup_value$1({ TAG: /* Lident */0, _0: s }, env); - var desc = match[1]; - var path = match[0]; + let desc = match[1]; + let path = match[0]; switch (path.TAG | 0) { case /* Pident */0 : - var desc_val_type = type_expr(identity, desc.val_type); - var desc_val_kind = desc.val_kind; - var desc_val_loc = desc.val_loc; - var desc_val_attributes = desc.val_attributes; - var desc$1 = { + let desc_val_type = type_expr(identity, desc.val_type); + let desc_val_kind = desc.val_kind; + let desc_val_loc = desc.val_loc; + let desc_val_attributes = desc.val_attributes; + let desc$1 = { val_type: desc_val_type, val_kind: desc_val_kind, val_loc: desc_val_loc, @@ -65940,7 +65940,7 @@ function duplicate_ident_types(loc, caselist, env) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return env; } @@ -65958,10 +65958,10 @@ function type_exp(env, sexp) { } function type_expect(in_function, env, sexp, ty_expected) { - var previous_saved_types = saved_types.contents; + let previous_saved_types = saved_types.contents; warning_enter_scope(undefined); warning_attribute(sexp.pexp_attributes); - var exp = type_expect_(in_function, env, sexp, ty_expected); + let exp = type_expect_(in_function, env, sexp, ty_expected); warning_leave_scope(undefined); saved_types.contents = { hd: { @@ -65974,25 +65974,25 @@ function type_expect(in_function, env, sexp, ty_expected) { } function type_expect_(in_function, env, sexp, ty_expected) { - var loc = sexp.pexp_loc; - var rue = function (exp) { + let loc = sexp.pexp_loc; + let rue = function (exp) { unify_exp(env, re(exp), instance(undefined, env, ty_expected)); return exp; }; - var lid = sexp.pexp_desc; + let lid = sexp.pexp_desc; switch (lid.TAG | 0) { case /* Pexp_ident */0 : - var lid$1 = lid._0; - var match = find_value$1(env, loc, lid$1.txt); - var desc = match[1]; - var path = match[0]; + let lid$1 = lid._0; + let match = find_value$1(env, loc, lid$1.txt); + let desc = match[1]; + let path = match[0]; if (annotations.contents) { - var dloc = desc.val_loc; - var annot = dloc.loc_ghost ? /* Iref_external */0 : ({ + let dloc = desc.val_loc; + let annot = dloc.loc_ghost ? /* Iref_external */0 : ({ TAG: /* Iref_internal */0, _0: dloc }); - var name$1 = name(parenthesized_ident, path); + let name$1 = name(parenthesized_ident, path); record$2({ TAG: /* An_ident */5, _0: loc, @@ -66000,8 +66000,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { _2: annot }); } - var match$1 = desc.val_kind; - var tmp; + let match$1 = desc.val_kind; + let tmp; if (typeof match$1 === "number") { if (match$1 === /* Val_unbound */1) { throw new Caml_js_exceptions.MelangeError($$Error$7, { @@ -66023,12 +66023,12 @@ function type_expect_(in_function, env, sexp, ty_expected) { } else { switch (match$1.TAG | 0) { case /* Val_ivar */1 : - var match$2 = lookup_value$1({ + let match$2 = lookup_value$1({ TAG: /* Lident */0, _0: "self-" + match$1._1 }, env); - var txt = lid$1.txt; - var tmp$1; + let txt = lid$1.txt; + let tmp$1; switch (txt.TAG | 0) { case /* Lident */0 : tmp$1 = { @@ -66056,7 +66056,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }; break; case /* Val_self */2 : - var match$3 = lookup_value$1({ + let match$3 = lookup_value$1({ TAG: /* Lident */0, _0: "self-" + match$1._2 }, env); @@ -66085,7 +66085,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_constant */1 : - var cst = lid._0; + let cst = lid._0; if (cst.TAG !== /* Const_string */2) { return rue({ exp_desc: { @@ -66099,8 +66099,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); } - var ty_exp = expand_head(env, ty_expected); - var fmt6_path_0 = { + let ty_exp = expand_head(env, ty_expected); + let fmt6_path_0 = { TAG: /* Pident */0, _0: { stamp: 0, @@ -66108,14 +66108,14 @@ function type_expect_(in_function, env, sexp, ty_expected) { flags: 1 } }; - var fmt6_path = { + let fmt6_path = { TAG: /* Pdot */1, _0: fmt6_path_0, _1: "format6", _2: 0 }; - var match$4 = ty_exp.desc; - var is_format; + let match$4 = ty_exp.desc; + let is_format; if (typeof match$4 === "number" || !(match$4.TAG === /* Tconstr */3 && same(match$4._0, fmt6_path))) { is_format = false; } else { @@ -66140,29 +66140,29 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); } - var init = type_format(loc, cst._0, env); - var format_parsetree_pexp_desc = init.pexp_desc; - var format_parsetree_pexp_loc = sexp.pexp_loc; - var format_parsetree_pexp_attributes = init.pexp_attributes; - var format_parsetree = { + let init = type_format(loc, cst._0, env); + let format_parsetree_pexp_desc = init.pexp_desc; + let format_parsetree_pexp_loc = sexp.pexp_loc; + let format_parsetree_pexp_attributes = init.pexp_attributes; + let format_parsetree = { pexp_desc: format_parsetree_pexp_desc, pexp_loc: format_parsetree_pexp_loc, pexp_attributes: format_parsetree_pexp_attributes }; return type_expect(in_function, env, format_parsetree, ty_expected); case /* Pexp_let */2 : - var rec_flag = lid._0; - var exit = 0; + let rec_flag = lid._0; + let exit = 0; if (rec_flag) { exit = 1; } else { - var match$5 = lid._1; + let match$5 = lid._1; if (match$5) { - var match$6 = match$5.hd; + let match$6 = match$5.hd; if (match$6.pvb_attributes || match$5.tl) { exit = 1; } else { - var spat = match$6.pvb_pat; + let spat = match$6.pvb_pat; if (contains_gadt(env, spat)) { return type_expect(in_function, env, { pexp_desc: { @@ -66184,10 +66184,10 @@ function type_expect_(in_function, env, sexp, ty_expected) { } } if (exit === 1) { - var sbody = lid._2; - var match$7 = sexp.pexp_attributes; - var scp; - var exit$1 = 0; + let sbody = lid._2; + let match$7 = sexp.pexp_attributes; + let scp; + let exit$1 = 0; if (match$7 && match$7.hd[0].txt === "#default" && !match$7.tl) { scp = undefined; } else { @@ -66202,8 +66202,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { _0: sbody.pexp_loc }); } - var match$8 = type_let(undefined, undefined, env, rec_flag, lid._1, scp, true); - var body = type_expect(undefined, match$8[1], wrap_unpacks(sbody, match$8[2]), ty_expected); + let match$8 = type_let(undefined, undefined, env, rec_flag, lid._1, scp, true); + let body = type_expect(undefined, match$8[1], wrap_unpacks(sbody, match$8[2]), ty_expected); return re({ exp_desc: { TAG: /* Texp_let */2, @@ -66222,8 +66222,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { case /* Pexp_function */3 : return type_function(in_function, loc, sexp.pexp_attributes, env, ty_expected, "", lid._0); case /* Pexp_fun */4 : - var $$default = lid._1; - var l = lid._0; + let $$default = lid._1; + let l = lid._0; if ($$default !== undefined) { if (!is_optional(l)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -66235,8 +66235,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { ] }); } - var default_loc = $$default.pexp_loc; - var scases_0 = Curry._3(Ast_helper_Exp.$$case, construct(default_loc, undefined, { + let default_loc = $$default.pexp_loc; + let scases_0 = Curry._3(Ast_helper_Exp.$$case, construct(default_loc, undefined, { txt: { TAG: /* Ldot */1, _0: { @@ -66256,7 +66256,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }, loc: none })); - var scases_1 = { + let scases_1 = { hd: Curry._3(Ast_helper_Exp.$$case, construct(default_loc, undefined, { txt: { TAG: /* Ldot */1, @@ -66270,18 +66270,18 @@ function type_expect_(in_function, env, sexp, ty_expected) { }, undefined), undefined, $$default), tl: /* [] */0 }; - var scases = { + let scases = { hd: scases_0, tl: scases_1 }; - var smatch = Curry._4(Ast_helper_Exp.match_, loc, undefined, Curry._3(Ast_helper_Exp.ident, loc, undefined, { + let smatch = Curry._4(Ast_helper_Exp.match_, loc, undefined, Curry._3(Ast_helper_Exp.ident, loc, undefined, { txt: { TAG: /* Lident */0, _0: "*opt*" }, loc: none }), scases); - var sfun = Curry._6(Ast_helper_Exp.fun_, loc, undefined, l, undefined, $$var$1(loc, undefined, { + let sfun = Curry._6(Ast_helper_Exp.fun_, loc, undefined, l, undefined, $$var$1(loc, undefined, { txt: "*opt*", loc: none }), Curry._5(Ast_helper_Exp.let_, loc, { @@ -66302,7 +66302,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }, lid._3)); return type_expect(in_function, env, sfun, ty_expected); } - var sexp$1 = lid._3; + let sexp$1 = lid._3; return type_function(in_function, loc, sexp$1.pexp_attributes, env, ty_expected, l, { hd: { pc_lhs: lid._2, @@ -66312,7 +66312,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { tl: /* [] */0 }); case /* Pexp_apply */5 : - var sargs = lid._1; + let sargs = lid._1; if (Caml_obj.caml_equal(sargs, /* [] */0)) { ill_formed_ast(loc, "Function application with no argument."); } @@ -66320,24 +66320,24 @@ function type_expect_(in_function, env, sexp, ty_expected) { if (principal.contents) { begin_def(undefined); } - var funct = type_exp(env, lid._0); + let funct = type_exp(env, lid._0); if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, funct.exp_type); } - var ty = instance(undefined, env, funct.exp_type); + let ty = instance(undefined, env, funct.exp_type); end_def(undefined); wrap_trace_gadt_instances(env, (function (param) { - var _seen = /* [] */0; - var _ty_fun = param; + let _seen = /* [] */0; + let _ty_fun = param; while(true) { - var ty_fun = _ty_fun; - var seen = _seen; - var ty = expand_head(env, ty_fun); + let ty_fun = _ty_fun; + let seen = _seen; + let ty = expand_head(env, ty_fun); if (Stdlib__List.memq(ty, seen)) { return ; } - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return ; } @@ -66348,7 +66348,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { unify_var(env, newvar(undefined, undefined), match._1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -66370,7 +66370,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }; }), ty); begin_def(undefined); - var match$9 = type_application(env, funct, sargs); + let match$9 = type_application(env, funct, sargs); end_def(undefined); unify_var(env, newvar(undefined, undefined), funct.exp_type); return rue({ @@ -66387,7 +66387,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); case /* Pexp_match */6 : begin_def(undefined); - var arg = type_exp(env, lid._0); + let arg = type_exp(env, lid._0); end_def(undefined); if (is_nonexpansive(arg)) { iter_generalize$1({ @@ -66396,19 +66396,19 @@ function type_expect_(in_function, env, sexp, ty_expected) { } else { generalize_expansive$1(env, arg.exp_type); } - var split_cases = function (_vc, _ec, _param) { + let split_cases = function (_vc, _ec, _param) { while(true) { - var param = _param; - var ec = _ec; - var vc = _vc; + let param = _param; + let ec = _ec; + let vc = _vc; if (!param) { return [ Stdlib__List.rev(vc), Stdlib__List.rev(ec) ]; } - var c = param.hd; - var p = c.pc_lhs.ppat_desc; + let c = param.hd; + let p = c.pc_lhs.ppat_desc; if (typeof p !== "number" && p.TAG === /* Ppat_exception */14) { _param = param.tl; _ec = { @@ -66429,9 +66429,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { continue ; }; }; - var match$10 = split_cases(/* [] */0, /* [] */0, lid._1); - var exn_caselist = match$10[1]; - var val_caselist = match$10[0]; + let match$10 = split_cases(/* [] */0, /* [] */0, lid._1); + let exn_caselist = match$10[1]; + let val_caselist = match$10[0]; if (Caml_obj.caml_equal(val_caselist, /* [] */0) && Caml_obj.caml_notequal(exn_caselist, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -66440,8 +66440,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { _3: /* No_value_clauses */7 }); } - var match$11 = type_cases(undefined, env, arg.exp_type, ty_expected, true, loc, val_caselist); - var match$12 = type_cases(undefined, env, type_exn, ty_expected, false, loc, exn_caselist); + let match$11 = type_cases(undefined, env, arg.exp_type, ty_expected, true, loc, val_caselist); + let match$12 = type_cases(undefined, env, type_exn, ty_expected, false, loc, exn_caselist); return re({ exp_desc: { TAG: /* Texp_match */5, @@ -66457,8 +66457,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_try */7 : - var body$1 = type_expect(undefined, env, lid._0, ty_expected); - var match$13 = type_cases(undefined, env, type_exn, ty_expected, false, loc, lid._1); + let body$1 = type_expect(undefined, env, lid._0, ty_expected); + let match$13 = type_cases(undefined, env, type_exn, ty_expected, false, loc, lid._1); return re({ exp_desc: { TAG: /* Texp_try */6, @@ -66472,25 +66472,25 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_tuple */8 : - var sexpl = lid._0; + let sexpl = lid._0; if (Stdlib__List.length(sexpl) < 2) { ill_formed_ast(loc, "Tuples must have at least 2 components."); } - var subtypes = Stdlib__List.map((function (param) { + let subtypes = Stdlib__List.map((function (param) { return newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); }), sexpl); - var to_unify = newty2(100000000, { + let to_unify = newty2(100000000, { TAG: /* Ttuple */2, _0: subtypes }); unify_exp_types(loc, env, to_unify, ty_expected); - var expl = Stdlib__List.map2((function (body, ty) { + let expl = Stdlib__List.map2((function (body, ty) { return type_expect(undefined, env, body, ty); }), sexpl, subtypes); - var desc$1 = { + let desc$1 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (e) { return e.exp_type; @@ -66508,12 +66508,12 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_construct */9 : - var lid$2 = lid._0; - var sarg = lid._1; - var attrs = sexp.pexp_attributes; - var opath; + let lid$2 = lid._0; + let sarg = lid._1; + let attrs = sexp.pexp_attributes; + let opath; try { - var match$14 = extract_concrete_variant(env, ty_expected); + let match$14 = extract_concrete_variant(env, ty_expected); opath = [ match$14[0], match$14[1], @@ -66521,22 +66521,22 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { opath = undefined; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var constrs = find_all_constructors(env, lid$2.loc, lid$2.txt); - var constr = wrap_disambiguate("This variant expression is expected to have", ty_expected, (function (param) { + let constrs = find_all_constructors(env, lid$2.loc, lid$2.txt); + let constr = wrap_disambiguate("This variant expression is expected to have", ty_expected, (function (param) { return disambiguate$1(undefined, undefined, undefined, lid$2, env, opath, param); }), constrs); mark_constructor(/* Positive */0, env, last$1(lid$2.txt), constr); check_deprecated(loc, constr.cstr_attributes, constr.cstr_name); - var sargs$1; + let sargs$1; if (sarg !== undefined) { - var sel = sarg.pexp_desc; + let sel = sarg.pexp_desc; sargs$1 = sel.TAG === /* Pexp_tuple */8 && (constr.cstr_arity > 1 || explicit_arity(attrs)) ? sel._0 : ({ hd: sarg, tl: /* [] */0 @@ -66557,15 +66557,15 @@ function type_expect_(in_function, env, sexp, ty_expected) { } }); } - var separate = principal.contents || env.local_constraints; + let separate = principal.contents || env.local_constraints; if (separate) { begin_def(undefined); begin_def(undefined); } - var match$15 = instance_constructor(undefined, constr); - var ty_res = match$15[1]; - var ty_args = match$15[0]; - var texp = re({ + let match$15 = instance_constructor(undefined, constr); + let ty_res = match$15[1]; + let ty_args = match$15[0]; + let texp = re({ exp_desc: { TAG: /* Texp_construct */8, _0: lid$2, @@ -66593,11 +66593,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { Stdlib__List.iter(generalize_structure$2, ty_args); generalize_structure$1(current_level.contents, ty_res); } - var match$16 = instance_list(env, { + let match$16 = instance_list(env, { hd: ty_res, tl: ty_args }); - var match$17; + let match$17; if (match$16) { match$17 = [ match$16.tl, @@ -66613,13 +66613,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { ] }); } - var ty_res$1 = match$17[1]; - var texp_exp_desc = texp.exp_desc; - var texp_exp_loc = texp.exp_loc; - var texp_exp_extra = texp.exp_extra; - var texp_exp_env = texp.exp_env; - var texp_exp_attributes = texp.exp_attributes; - var texp$1 = { + let ty_res$1 = match$17[1]; + let texp_exp_desc = texp.exp_desc; + let texp_exp_loc = texp.exp_loc; + let texp_exp_extra = texp.exp_extra; + let texp_exp_env = texp.exp_env; + let texp_exp_attributes = texp.exp_attributes; + let texp$1 = { exp_desc: texp_exp_desc, exp_loc: texp_exp_loc, exp_extra: texp_exp_extra, @@ -66630,7 +66630,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { if (!separate) { unify_exp(env, texp$1, instance(undefined, env, ty_expected)); } - var args = Stdlib__List.map2((function (e, param) { + let args = Stdlib__List.map2((function (e, param) { return type_argument(env, e, param[0], param[1]); }), sargs$1, Stdlib__List.combine(ty_args, match$17[0])); if (constr.cstr_private === /* Private */0) { @@ -66658,37 +66658,37 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: texp_exp_attributes }; case /* Pexp_variant */10 : - var sarg$1 = lid._1; - var l$1 = lid._0; - var ty_expected0 = instance(undefined, env, ty_expected); + let sarg$1 = lid._1; + let l$1 = lid._0; + let ty_expected0 = instance(undefined, env, ty_expected); try { - var match$18 = expand_head(env, ty_expected); - var match$19 = expand_head(env, ty_expected0); + let match$18 = expand_head(env, ty_expected); + let match$19 = expand_head(env, ty_expected0); if (sarg$1 !== undefined) { - var row = match$18.desc; + let row = match$18.desc; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (row.TAG === /* Tvariant */8) { - var row0 = match$19.desc; + let row0 = match$19.desc; if (typeof row0 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (row0.TAG === /* Tvariant */8) { - var row$1 = row_repr_aux(/* [] */0, row._0); - var match$20 = row_field_repr_aux(/* [] */0, Stdlib__List.assoc(l$1, row$1.row_fields)); - var match$21 = row_field_repr_aux(/* [] */0, Stdlib__List.assoc(l$1, row0._0.row_fields)); + let row$1 = row_repr_aux(/* [] */0, row._0); + let match$20 = row_field_repr_aux(/* [] */0, Stdlib__List.assoc(l$1, row$1.row_fields)); + let match$21 = row_field_repr_aux(/* [] */0, Stdlib__List.assoc(l$1, row0._0.row_fields)); if (typeof match$20 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); } if (match$20.TAG === /* Rpresent */0) { - var ty$1 = match$20._0; + let ty$1 = match$20._0; if (ty$1 !== undefined) { if (typeof match$21 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -66696,9 +66696,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); } if (match$21.TAG === /* Rpresent */0) { - var ty0 = match$21._0; + let ty0 = match$21._0; if (ty0 !== undefined) { - var arg$1 = type_argument(env, sarg$1, ty$1, ty0); + let arg$1 = type_argument(env, sarg$1, ty$1, ty0); return re({ exp_desc: { TAG: /* Texp_variant */9, @@ -66746,15 +66746,15 @@ function type_expect_(in_function, env, sexp, ty_expected) { } } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { - var arg$2 = may_map((function (param) { + let arg$2 = may_map((function (param) { return type_exp(env, param); }), sarg$1); - var arg_type = may_map((function (arg) { + let arg_type = may_map((function (arg) { return arg.exp_type; }), arg$2); - var desc$2 = { + let desc$2 = { TAG: /* Tvariant */8, _0: { row_fields: { @@ -66790,17 +66790,17 @@ function type_expect_(in_function, env, sexp, ty_expected) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } case /* Pexp_record */11 : - var opt_sexp = lid._1; - var lid_sexp_list = lid._0; + let opt_sexp = lid._1; + let lid_sexp_list = lid._0; if (Caml_obj.caml_equal(lid_sexp_list, /* [] */0)) { ill_formed_ast(loc, "Records cannot be empty."); } - var opt_exp; + let opt_exp; if (opt_sexp !== undefined) { if (principal.contents) { begin_def(undefined); } - var exp = type_exp(env, opt_sexp); + let exp = type_exp(env, opt_sexp); if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, exp.exp_type); @@ -66809,9 +66809,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { } else { opt_exp = undefined; } - var get_path = function (ty) { + let get_path = function (ty) { try { - var match = extract_concrete_record(env, ty); + let match = extract_concrete_record(env, ty); return [ match[0], match[1], @@ -66819,27 +66819,27 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var op = get_path(ty_expected); - var match$22; + let op = get_path(ty_expected); + let match$22; if (op !== undefined) { match$22 = [ ty_expected, op ]; } else if (opt_exp !== undefined) { - var op$1 = get_path(opt_exp.exp_type); + let op$1 = get_path(opt_exp.exp_type); if (op$1 !== undefined) { - var p$p = op$1[1]; - var decl = find_type_full(p$p, env)[0]; + let p$p = op$1[1]; + let decl = find_type_full(p$p, env)[0]; begin_def(undefined); - var ty$2 = newconstr(p$p, instance_list(env, decl.type_params)); + let ty$2 = newconstr(p$p, instance_list(env, decl.type_params)); end_def(undefined); generalize_structure$1(current_level.contents, ty$2); match$22 = [ @@ -66858,24 +66858,24 @@ function type_expect_(in_function, env, sexp, ty_expected) { undefined ]; } - var opath$1 = match$22[1]; - var ty_record = match$22[0]; - var closed = opt_sexp === undefined; - var lbl_exp_list = wrap_disambiguate("This record expression is expected to have", ty_record, (function (param) { + let opath$1 = match$22[1]; + let ty_record = match$22[0]; + let closed = opt_sexp === undefined; + let lbl_exp_list = wrap_disambiguate("This record expression is expected to have", ty_record, (function (param) { return type_label_a_list(undefined, loc, closed, env, (function (param) { return type_label_exp(true, env, loc, ty_record, param); }), opath$1, param); }), lid_sexp_list); unify_exp_types(loc, env, ty_record, instance(undefined, env, ty_expected)); - var check_duplicates = function (_param) { + let check_duplicates = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var match = param.tl; + let match = param.tl; if (match) { - var lbl1 = param.hd[1]; + let lbl1 = param.hd[1]; if (lbl1.lbl_pos === match.hd[1].lbl_pos) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -66895,18 +66895,18 @@ function type_expect_(in_function, env, sexp, ty_expected) { }; }; check_duplicates(lbl_exp_list); - var opt_exp$1; + let opt_exp$1; if (opt_exp !== undefined) { if (lbl_exp_list) { - var ty_exp$1 = instance(undefined, env, opt_exp.exp_type); - var unify_kept = function (lbl) { + let ty_exp$1 = instance(undefined, env, opt_exp.exp_type); + let unify_kept = function (lbl) { if (!Stdlib__List.for_all((function (param) { return param[1].lbl_pos !== lbl.lbl_pos; }), lbl_exp_list)) { return ; } - var match = instance_label(false, lbl); - var match$1 = instance_label(false, lbl); + let match = instance_label(false, lbl); + let match$1 = instance_label(false, lbl); unify$2(env, match[1], match$1[1]); unify$2(env, instance(undefined, env, ty_expected), match$1[2]); unify_exp_types(opt_exp.exp_loc, env, ty_exp$1, match[2]); @@ -66933,7 +66933,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } else { opt_exp$1 = undefined; } - var num_fields; + let num_fields; if (lbl_exp_list) { num_fields = lbl_exp_list.hd[1].lbl_all.length; } else { @@ -66947,18 +66947,18 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); } if (opt_sexp === undefined && Stdlib__List.length(lid_sexp_list) !== num_fields) { - var present_indices = Stdlib__List.map((function (param) { + let present_indices = Stdlib__List.map((function (param) { return param[1].lbl_pos; }), lbl_exp_list); - var label_names = extract_label_names(sexp, env, ty_expected); - var missing_labels = function (_n, _param) { + let label_names = extract_label_names(sexp, env, ty_expected); + let missing_labels = function (_n, _param) { while(true) { - var param = _param; - var n = _n; + let param = _param; + let n = _n; if (!param) { return /* [] */0; } - var rem = param.tl; + let rem = param.tl; if (!Stdlib__List.mem(n, present_indices)) { return { hd: param.hd, @@ -66970,7 +66970,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { continue ; }; }; - var missing = missing_labels(0, label_names); + let missing = missing_labels(0, label_names); throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -66997,11 +66997,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_field */12 : - var lid$3 = lid._1; - var match$23 = type_label_access(env, loc, lid._0, lid$3); - var label = match$23[1]; - var record$3 = match$23[0]; - var match$24 = instance_label(false, label); + let lid$3 = lid._1; + let match$23 = type_label_access(env, loc, lid._0, lid$3); + let label = match$23[1]; + let record$3 = match$23[0]; + let match$24 = instance_label(false, label); unify_exp(env, record$3, match$24[2]); return rue({ exp_desc: { @@ -67017,16 +67017,16 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_setfield */13 : - var lid$4 = lid._1; - var match$25 = type_label_access(env, loc, lid._0, lid$4); - var record$4 = match$25[0]; - var ty_record$1 = match$25[2] === undefined ? newvar(undefined, undefined) : record$4.exp_type; - var match$26 = type_label_exp(false, env, loc, ty_record$1, [ + let lid$4 = lid._1; + let match$25 = type_label_access(env, loc, lid._0, lid$4); + let record$4 = match$25[0]; + let ty_record$1 = match$25[2] === undefined ? newvar(undefined, undefined) : record$4.exp_type; + let match$26 = type_label_exp(false, env, loc, ty_record$1, [ lid$4, match$25[1], lid._2 ]); - var label$1 = match$26[1]; + let label$1 = match$26[1]; unify_exp(env, record$4, ty_record$1); if (label$1.lbl_mut === /* Immutable */0) { throw new Caml_js_exceptions.MelangeError($$Error$7, { @@ -67054,13 +67054,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_array */14 : - var ty$3 = newty2(100000000, { + let ty$3 = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var to_unify$1 = type_array(ty$3); + let to_unify$1 = type_array(ty$3); unify_exp_types(loc, env, to_unify$1, ty_expected); - var argl = Stdlib__List.map((function (sarg) { + let argl = Stdlib__List.map((function (sarg) { return type_expect(undefined, env, sarg, ty$3); }), lid._0); return re({ @@ -67075,12 +67075,12 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_ifthenelse */15 : - var sifnot = lid._2; - var sifso = lid._1; - var cond = type_expect(undefined, env, lid._0, type_bool); + let sifnot = lid._2; + let sifso = lid._1; + let cond = type_expect(undefined, env, lid._0, type_bool); if (sifnot !== undefined) { - var ifso = type_expect(undefined, env, sifso, ty_expected); - var ifnot = type_expect(undefined, env, sifnot, ty_expected); + let ifso = type_expect(undefined, env, sifso, ty_expected); + let ifnot = type_expect(undefined, env, sifnot, ty_expected); unify_exp(env, ifnot, ifso.exp_type); return re({ exp_desc: { @@ -67096,7 +67096,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); } - var ifso$1 = type_expect(undefined, env, sifso, type_unit); + let ifso$1 = type_expect(undefined, env, sifso, type_unit); return rue({ exp_desc: { TAG: /* Texp_ifthenelse */14, @@ -67111,8 +67111,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_sequence */16 : - var exp1 = type_statement(env, lid._0); - var exp2 = type_expect(undefined, env, lid._1, ty_expected); + let exp1 = type_statement(env, lid._0); + let exp2 = type_expect(undefined, env, lid._1, ty_expected); return re({ exp_desc: { TAG: /* Texp_sequence */15, @@ -67126,8 +67126,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_while */17 : - var cond$1 = type_expect(undefined, env, lid._0, type_bool); - var body$2 = type_statement(env, lid._1); + let cond$1 = type_expect(undefined, env, lid._0, type_bool); + let body$2 = type_statement(env, lid._1); return rue({ exp_desc: { TAG: /* Texp_while */16, @@ -67141,11 +67141,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_for */18 : - var param = lid._0; - var low = type_expect(undefined, env, lid._1, type_int); - var high = type_expect(undefined, env, lid._2, type_int); - var match$27 = param.ppat_desc; - var match$28; + let param = lid._0; + let low = type_expect(undefined, env, lid._1, type_int); + let high = type_expect(undefined, env, lid._2, type_int); + let match$27 = param.ppat_desc; + let match$28; if (typeof match$27 === "number") { match$28 = [ create("_for"), @@ -67171,7 +67171,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { _3: /* Invalid_for_loop_index */6 }); } - var body$3 = type_statement(match$28[1], lid._4); + let body$3 = type_statement(match$28[1], lid._4); return rue({ exp_desc: { TAG: /* Texp_for */17, @@ -67190,12 +67190,12 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); case /* Pexp_constraint */19 : begin_def(undefined); - var cty = transl_simple_type(env, false, lid._1); - var ty$4 = cty.ctyp_type; + let cty = transl_simple_type(env, false, lid._1); + let ty$4 = cty.ctyp_type; end_def(undefined); generalize_structure$1(current_level.contents, ty$4); - var arg$3 = type_argument(env, lid._0, ty$4, instance(undefined, env, ty$4)); - var ty$p = instance(undefined, env, ty$4); + let arg$3 = type_argument(env, lid._0, ty$4, instance(undefined, env, ty$4)); + let ty$p = instance(undefined, env, ty$4); return rue({ exp_desc: arg$3.exp_desc, exp_loc: arg$3.exp_loc, @@ -67215,26 +67215,26 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: arg$3.exp_attributes }); case /* Pexp_coerce */20 : - var sty$p = lid._2; - var sty = lid._1; - var sarg$2 = lid._0; - var match$29; + let sty$p = lid._2; + let sty = lid._1; + let sarg$2 = lid._0; + let match$29; if (sty !== undefined) { begin_def(undefined); - var match$30 = transl_simple_type_delayed(env, sty); - var cty$1 = match$30[0]; - var match$31 = transl_simple_type_delayed(env, sty$p); - var cty$p = match$31[0]; - var ty$5 = cty$1.ctyp_type; - var ty$p$1 = cty$p.ctyp_type; + let match$30 = transl_simple_type_delayed(env, sty); + let cty$1 = match$30[0]; + let match$31 = transl_simple_type_delayed(env, sty$p); + let cty$p = match$31[0]; + let ty$5 = cty$1.ctyp_type; + let ty$p$1 = cty$p.ctyp_type; try { - var force$p$p = subtype(env, ty$5, ty$p$1); + let force$p$p = subtype(env, ty$5, ty$p$1); Curry._1(match$30[1], undefined); Curry._1(match$31[1], undefined); Curry._1(force$p$p, undefined); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Subtype) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67259,27 +67259,27 @@ function type_expect_(in_function, env, sexp, ty_expected) { cty$p ]; } else { - var match$32 = transl_simple_type_delayed(env, sty$p); - var force = match$32[1]; - var cty$p$1 = match$32[0]; - var ty$p$2 = cty$p$1.ctyp_type; + let match$32 = transl_simple_type_delayed(env, sty$p); + let force = match$32[1]; + let cty$p$1 = match$32[0]; + let ty$p$2 = cty$p$1.ctyp_type; begin_def(undefined); - var arg$4 = type_exp(env, sarg$2); + let arg$4 = type_exp(env, sarg$2); end_def(undefined); - var tv = newvar(undefined, undefined); - var gen = generalizable(tv.level, arg$4.exp_type); + let tv = newvar(undefined, undefined); + let gen = generalizable(tv.level, arg$4.exp_type); unify_var(env, tv, arg$4.exp_type); - var match$33 = arg$4.exp_desc; - var match$34 = self_coercion.contents; - var match$35 = repr(ty$p$2).desc; - var exit$2 = 0; + let match$33 = arg$4.exp_desc; + let match$34 = self_coercion.contents; + let match$35 = repr(ty$p$2).desc; + let exit$2 = 0; if (match$33.TAG === /* Texp_ident */0) { - var tmp$2 = match$33._2.val_kind; + let tmp$2 = match$33._2.val_kind; if (typeof tmp$2 === "number" || !(tmp$2.TAG === /* Val_self */2 && match$34 && !(typeof match$35 === "number" || match$35.TAG !== /* Tconstr */3))) { exit$2 = 1; } else { - var match$36 = match$34.hd; - var r = match$36[1]; + let match$36 = match$34.hd; + let r = match$36[1]; if (same(match$36[0], match$35._0)) { r.contents = { hd: loc, @@ -67295,18 +67295,18 @@ function type_expect_(in_function, env, sexp, ty_expected) { } if (exit$2 === 1) { if (Caml_obj.caml_equal(free_variables$1(Caml_option.some(env), arg$4.exp_type), /* [] */0) && Caml_obj.caml_equal(free_variables$1(Caml_option.some(env), ty$p$2), /* [] */0)) { - var tmp$3 = false; + let tmp$3 = false; if (!gen) { - var snap = snapshot(undefined); - var match$37 = enlarge_type(env, ty$p$2); - var tmp$4; + let snap = snapshot(undefined); + let match$37 = enlarge_type(env, ty$p$2); + let tmp$4; try { Curry._1(force, undefined); unify$2(env, arg$4.exp_type, match$37[0]); tmp$4 = true; } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Unify) { backtrack(snap); tmp$4 = false; @@ -67318,7 +67318,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } if (!tmp$3) { try { - var force$p = subtype(env, arg$4.exp_type, ty$p$2); + let force$p = subtype(env, arg$4.exp_type, ty$p$2); Curry._1(force, undefined); Curry._1(force$p, undefined); if (!gen) { @@ -67330,7 +67330,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Subtype) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67348,13 +67348,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { } } else { - var match$38 = enlarge_type(env, ty$p$2); + let match$38 = enlarge_type(env, ty$p$2); Curry._1(force, undefined); try { unify$2(env, arg$4.exp_type, match$38[0]); } catch (raw_exn$5){ - var exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); + let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67380,7 +67380,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { cty$p$1 ]; } - var arg$5 = match$29[0]; + let arg$5 = match$29[0]; return rue({ exp_desc: arg$5.exp_desc, exp_loc: arg$5.exp_loc, @@ -67401,26 +67401,26 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: arg$5.exp_attributes }); case /* Pexp_send */21 : - var met = lid._1; - var e = lid._0; + let met = lid._1; + let e = lid._0; if (principal.contents) { begin_def(undefined); } - var obj = type_exp(env, e); + let obj = type_exp(env, e); try { - var match$39 = obj.exp_desc; - var match$40; - var exit$3 = 0; + let match$39 = obj.exp_desc; + let match$40; + let exit$3 = 0; if (match$39.TAG === /* Texp_ident */0) { - var match$41 = match$39._2.val_kind; - var lid$5 = match$39._1; + let match$41 = match$39._2.val_kind; + let lid$5 = match$39._1; if (typeof match$41 === "number") { exit$3 = 1; } else { switch (match$41.TAG | 0) { case /* Val_self */2 : - var match$42 = filter_self_method(env, met, /* Private */0, match$41._0, match$41._3); - var typ = match$42[1]; + let match$42 = filter_self_method(env, met, /* Private */0, match$41._0, match$41._3); + let typ = match$42[1]; if (is_Tvar(repr(typ))) { prerr_warning(loc, { TAG: /* Undeclared_virtual_method */7, @@ -67437,13 +67437,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; break; case /* Val_anc */3 : - var cl_num = match$41._1; - var method_id; + let cl_num = match$41._1; + let method_id; try { method_id = Stdlib__List.assoc(met, match$41._0); } catch (raw_exn$6){ - var exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); + let exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); if (exn$6.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67457,16 +67457,16 @@ function type_expect_(in_function, env, sexp, ty_expected) { } throw new Caml_js_exceptions.MelangeError(exn$6.MEL_EXN_ID, exn$6); } - var match$43 = lookup_value$1({ + let match$43 = lookup_value$1({ TAG: /* Lident */0, _0: "selfpat-" + cl_num }, env); - var match$44 = lookup_value$1({ + let match$44 = lookup_value$1({ TAG: /* Lident */0, _0: "self-" + cl_num }, env); - var desc$3 = match$43[1]; - var match$45 = desc$3.val_kind; + let desc$3 = match$43[1]; + let match$45 = desc$3.val_kind; if (typeof match$45 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -67478,13 +67478,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); } if (match$45.TAG === /* Val_self */2) { - var match$46 = filter_self_method(env, met, /* Private */0, match$45._0, match$45._3); - var typ$1 = match$46[1]; - var method_type = newvar(undefined, undefined); - var match$47 = filter_arrow(env, method_type, ""); + let match$46 = filter_self_method(env, met, /* Private */0, match$45._0, match$45._3); + let typ$1 = match$46[1]; + let method_type = newvar(undefined, undefined); + let match$47 = filter_arrow(env, method_type, ""); unify$2(env, match$47[0], desc$3.val_type); unify$2(env, match$47[1], instance(undefined, env, typ$1)); - var exp_0 = { + let exp_0 = { exp_desc: { TAG: /* Texp_ident */0, _0: { @@ -67505,7 +67505,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_env: env, exp_attributes: /* [] */0 }; - var exp_1 = { + let exp_1 = { hd: [ "", { @@ -67525,7 +67525,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { ], tl: /* [] */0 }; - var exp$1 = { + let exp$1 = { TAG: /* Texp_apply */4, _0: exp_0, _1: exp_1 @@ -67573,14 +67573,14 @@ function type_expect_(in_function, env, sexp, ty_expected) { filter_method(env, met, /* Public */1, obj.exp_type) ]; } - var typ$2 = match$40[2]; + let typ$2 = match$40[2]; if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, typ$2); } - var ty$6 = repr(typ$2); - var match$48 = ty$6.desc; - var typ$3; + let ty$6 = repr(typ$2); + let match$48 = ty$6.desc; + let typ$3; if (typeof match$48 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -67593,7 +67593,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } switch (match$48.TAG | 0) { case /* Tvar */0 : - var ty$p$3 = newvar(undefined, undefined); + let ty$p$3 = newvar(undefined, undefined); unify$2(env, instance_def(ty$6), newty2(current_level.contents, { TAG: /* Tpoly */10, _0: ty$p$3, @@ -67602,9 +67602,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { typ$3 = ty$p$3; break; case /* Tpoly */10 : - var ty$7 = match$48._0; + let ty$7 = match$48._0; if (match$48._1) { - var l$2 = ty$6.level; + let l$2 = ty$6.level; if (principal.contents && l$2 !== 100000000) { prerr_warning(loc, { TAG: /* Not_principal */8, @@ -67641,7 +67641,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); } catch (raw_exn$7){ - var exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); + let exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); if (exn$7.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67658,10 +67658,10 @@ function type_expect_(in_function, env, sexp, ty_expected) { } break; case /* Pexp_new */22 : - var cl = lid._0; - var match$49 = find_class$1(env, loc, cl.txt); - var cl_decl = match$49[1]; - var ty$8 = cl_decl.cty_new; + let cl = lid._0; + let match$49 = find_class$1(env, loc, cl.txt); + let cl_decl = match$49[1]; + let ty$8 = cl_decl.cty_new; if (ty$8 !== undefined) { return rue({ exp_desc: { @@ -67687,22 +67687,22 @@ function type_expect_(in_function, env, sexp, ty_expected) { } }); case /* Pexp_setinstvar */23 : - var lab = lid._0; + let lab = lid._0; try { - var match$50 = lookup_value$1({ + let match$50 = lookup_value$1({ TAG: /* Lident */0, _0: lab.txt }, env); - var desc$4 = match$50[1]; - var match$51 = desc$4.val_kind; - var exit$4 = 0; + let desc$4 = match$50[1]; + let match$51 = desc$4.val_kind; + let exit$4 = 0; if (typeof match$51 === "number") { exit$4 = 1; } else { if (match$51.TAG === /* Val_ivar */1) { if (match$51._0) { - var newval = type_expect(undefined, env, lid._1, instance(undefined, env, desc$4.val_type)); - var match$52 = lookup_value$1({ + let newval = type_expect(undefined, env, lid._1, instance(undefined, env, desc$4.val_type)); + let match$52 = lookup_value$1({ TAG: /* Lident */0, _0: "self-" + match$51._1 }, env); @@ -67749,7 +67749,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn$8){ - var exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); + let exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); if (exn$8.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67765,9 +67765,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { } break; case /* Pexp_override */24 : - var lst = lid._0; + let lst = lid._0; Stdlib__List.fold_right((function (param, l) { - var lab = param[0]; + let lab = param[0]; if (Stdlib__List.exists((function (l) { return l.txt === lab.txt; }), l)) { @@ -67786,7 +67786,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { tl: l }; }), lst, /* [] */0); - var match$53; + let match$53; try { match$53 = [ lookup_value$1({ @@ -67800,7 +67800,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; } catch (raw_exn$9){ - var exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); + let exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); if (exn$9.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67811,8 +67811,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { } throw new Caml_js_exceptions.MelangeError(exn$9.MEL_EXN_ID, exn$9); } - var match$54 = match$53[0][1]; - var match$55 = match$54.val_kind; + let match$54 = match$53[0][1]; + let match$55 = match$54.val_kind; if (typeof match$55 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -67824,11 +67824,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { }); } if (match$55.TAG === /* Val_self */2) { - var vars = match$55._1; - var type_override = function (param) { - var lab = param[0]; + let vars = match$55._1; + let type_override = function (param) { + let lab = param[0]; try { - var match = Curry._2(Meths.find, lab.txt, vars.contents); + let match = Curry._2(Meths.find, lab.txt, vars.contents); return [ { TAG: /* Pident */0, @@ -67839,7 +67839,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67854,7 +67854,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var modifs = Stdlib__List.map(type_override, lst); + let modifs = Stdlib__List.map(type_override, lst); return rue({ exp_desc: { TAG: /* Texp_override */22, @@ -67877,23 +67877,23 @@ function type_expect_(in_function, env, sexp, ty_expected) { ] }); case /* Pexp_letmodule */25 : - var name$2 = lid._0; - var ty$9 = newvar(undefined, undefined); + let name$2 = lid._0; + let ty$9 = newvar(undefined, undefined); begin_def(undefined); set_current_time(ty$9.level); - var context = narrow(undefined); - var modl = Curry._2(type_module.contents, env, lid._1); - var match$56 = enter_module(undefined, name$2.txt, modl.mod_type, env); - var new_env = match$56[1]; + let context = narrow(undefined); + let modl = Curry._2(type_module.contents, env, lid._1); + let match$56 = enter_module(undefined, name$2.txt, modl.mod_type, env); + let new_env = match$56[1]; init_def(currentstamp.contents); widen(context); - var body$4 = type_expect(undefined, new_env, lid._2, ty_expected); + let body$4 = type_expect(undefined, new_env, lid._2, ty_expected); end_def(undefined); try { unify_var(new_env, ty$9, body$4.exp_type); } catch (raw_exn$10){ - var exn$10 = Caml_js_exceptions.internalToOCamlException(raw_exn$10); + let exn$10 = Caml_js_exceptions.internalToOCamlException(raw_exn$10); if (exn$10.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67923,9 +67923,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_assert */26 : - var cond$2 = type_expect(undefined, env, lid._0, type_bool); - var match$57 = cond$2.exp_desc; - var exp_type; + let cond$2 = type_expect(undefined, env, lid._0, type_bool); + let match$57 = cond$2.exp_desc; + let exp_type; exp_type = match$57.TAG === /* Texp_construct */8 && match$57._1.cstr_name === "false" ? instance(undefined, env, ty_expected) : instance_def(type_unit); return rue({ exp_desc: { @@ -67939,13 +67939,13 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_lazy */27 : - var ty$10 = newty2(100000000, { + let ty$10 = newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); - var to_unify$2 = type_lazy_t(ty$10); + let to_unify$2 = type_lazy_t(ty$10); unify_exp_types(loc, env, to_unify$2, ty_expected); - var arg$6 = type_expect(undefined, env, lid._0, ty$10); + let arg$6 = type_expect(undefined, env, lid._0, ty$10); return re({ exp_desc: { TAG: /* Texp_lazy */25, @@ -67958,15 +67958,15 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_poly */28 : - var sty$1 = lid._1; - var sbody$1 = lid._0; + let sty$1 = lid._1; + let sbody$1 = lid._0; if (principal.contents) { begin_def(undefined); } - var match$58; + let match$58; if (sty$1 !== undefined) { - var sty$2 = force_poly(sty$1); - var cty$2 = transl_simple_type(env, false, sty$2); + let sty$2 = force_poly(sty$1); + let cty$2 = transl_simple_type(env, false, sty$2); match$58 = [ repr(cty$2.ctyp_type), cty$2 @@ -67977,7 +67977,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { undefined ]; } - var ty$11 = match$58[0]; + let ty$11 = match$58[0]; if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, ty$11); @@ -67985,8 +67985,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { if (sty$1 !== undefined) { unify_exp_types(loc, env, instance(undefined, env, ty$11), instance(undefined, env, ty_expected)); } - var match$59 = expand_head(env, ty$11).desc; - var exp$2; + let match$59 = expand_head(env, ty$11).desc; + let exp$2; if (typeof match$59 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -67999,18 +67999,18 @@ function type_expect_(in_function, env, sexp, ty_expected) { } switch (match$59.TAG | 0) { case /* Tvar */0 : - var exp$3 = type_exp(env, sbody$1); - var exp_exp_desc = exp$3.exp_desc; - var exp_exp_loc = exp$3.exp_loc; - var exp_exp_extra = exp$3.exp_extra; - var exp_exp_type = newty2(current_level.contents, { + let exp$3 = type_exp(env, sbody$1); + let exp_exp_desc = exp$3.exp_desc; + let exp_exp_loc = exp$3.exp_loc; + let exp_exp_extra = exp$3.exp_extra; + let exp_exp_type = newty2(current_level.contents, { TAG: /* Tpoly */10, _0: exp$3.exp_type, _1: /* [] */0 }); - var exp_exp_env = exp$3.exp_env; - var exp_exp_attributes = exp$3.exp_attributes; - var exp$4 = { + let exp_exp_env = exp$3.exp_env; + let exp_exp_attributes = exp$3.exp_attributes; + let exp$4 = { exp_desc: exp_exp_desc, exp_loc: exp_exp_loc, exp_extra: exp_exp_extra, @@ -68022,19 +68022,19 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp$2 = exp$4; break; case /* Tpoly */10 : - var ty$p$4 = match$59._0; + let ty$p$4 = match$59._0; if (match$59._1) { begin_def(undefined); if (principal.contents) { begin_def(undefined); } - var match$60 = instance_poly(undefined, true, match$59._1, ty$p$4); - var ty$p$p = match$60[1]; + let match$60 = instance_poly(undefined, true, match$59._1, ty$p$4); + let ty$p$p = match$60[1]; if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, ty$p$p); } - var exp$5 = type_expect(undefined, env, sbody$1, ty$p$p); + let exp$5 = type_expect(undefined, env, sbody$1, ty$p$p); end_def(undefined); check_univars(env, false, "method", exp$5, ty_expected, match$60[0]); exp$2 = { @@ -68046,7 +68046,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: exp$5.exp_attributes }; } else { - var exp$6 = type_expect(undefined, env, sbody$1, ty$p$4); + let exp$6 = type_expect(undefined, env, sbody$1, ty$p$4); exp$2 = { exp_desc: exp$6.exp_desc, exp_loc: exp$6.exp_loc, @@ -68086,7 +68086,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: exp$2.exp_attributes }); case /* Pexp_object */29 : - var match$61 = Curry._3(type_object.contents, env, loc, lid._0); + let match$61 = Curry._3(type_object.contents, env, loc, lid._0); return rue({ exp_desc: { TAG: /* Texp_object */26, @@ -68100,15 +68100,15 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_newtype */30 : - var name$3 = lid._0; - var ty$12 = newvar(undefined, undefined); + let name$3 = lid._0; + let ty$12 = newvar(undefined, undefined); begin_def(undefined); - var level = current_level.contents; - var decl_type_newtype_level = [ + let level = current_level.contents; + let decl_type_newtype_level = [ level, level ]; - var decl$1 = { + let decl$1 = { type_params: /* [] */0, type_arity: 0, type_kind: /* Type_abstract */0, @@ -68120,24 +68120,24 @@ function type_expect_(in_function, env, sexp, ty_expected) { type_attributes: /* [] */0 }; set_current_time(ty$12.level); - var match$62 = enter_type(name$3, decl$1, env); - var id = match$62[0]; + let match$62 = enter_type(name$3, decl$1, env); + let id = match$62[0]; init_def(currentstamp.contents); - var body$5 = type_exp(match$62[1], lid._1); - var seen = Stdlib__Hashtbl.create(undefined, 8); - var replace = function (t) { + let body$5 = type_exp(match$62[1], lid._1); + let seen = Stdlib__Hashtbl.create(undefined, 8); + let replace = function (t) { if (Stdlib__Hashtbl.mem(seen, t.id)) { return ; } Stdlib__Hashtbl.add(seen, t.id, undefined); - var match = t.desc; + let match = t.desc; if (typeof match === "number") { return iter_type_expr(replace, t); } if (match.TAG !== /* Tconstr */3) { return iter_type_expr(replace, t); } - var id$p = match._0; + let id$p = match._0; switch (id$p.TAG | 0) { case /* Pident */0 : if (id === id$p._0) { @@ -68151,7 +68151,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } }; - var ety = type_expr(identity, body$5.exp_type); + let ety = type_expr(identity, body$5.exp_type); replace(ety); end_def(undefined); return rue({ @@ -68173,9 +68173,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: body$5.exp_attributes }); case /* Pexp_pack */31 : - var match$63 = expand_head(env, instance(undefined, env, ty_expected)); - var match$64 = match$63.desc; - var match$65; + let match$63 = expand_head(env, instance(undefined, env, ty_expected)); + let match$64 = match$63.desc; + let match$65; if (typeof match$64 === "number") { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -68219,9 +68219,9 @@ function type_expect_(in_function, env, sexp, ty_expected) { } }); } - var nl = match$65[1]; - var p = match$65[0]; - var match$66 = Curry._5(type_package.contents, env, lid._0, p, nl, match$65[2]); + let nl = match$65[1]; + let p = match$65[0]; + let match$66 = Curry._5(type_package.contents, env, lid._0, p, nl, match$65[2]); return rue({ exp_desc: { TAG: /* Texp_pack */27, @@ -68239,11 +68239,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); case /* Pexp_open */32 : - var lid$6 = lid._1; - var ovf = lid._0; - var match$67 = Curry._4(type_open.contents, ovf, env, sexp.pexp_loc, lid$6); - var newenv = match$67[1]; - var exp$7 = type_expect(undefined, newenv, lid._2, ty_expected); + let lid$6 = lid._1; + let ovf = lid._0; + let match$67 = Curry._4(type_open.contents, ovf, env, sexp.pexp_loc, lid$6); + let newenv = match$67[1]; + let exp$7 = type_expect(undefined, newenv, lid._2, ty_expected); return { exp_desc: exp$7.exp_desc, exp_loc: exp$7.exp_loc, @@ -68275,26 +68275,26 @@ function type_expect_(in_function, env, sexp, ty_expected) { } function type_function(in_function, loc, attrs, env, ty_expected, l, caselist) { - var match = in_function !== undefined ? in_function : [ + let match = in_function !== undefined ? in_function : [ loc, instance(undefined, env, ty_expected) ]; - var ty_fun = match[1]; - var loc_fun = match[0]; - var separate = principal.contents || env.local_constraints; + let ty_fun = match[1]; + let loc_fun = match[0]; + let separate = principal.contents || env.local_constraints; if (separate) { begin_def(undefined); } - var match$1; + let match$1; try { match$1 = filter_arrow(env, instance(undefined, env, ty_expected), l); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var ty = expand_head(env, ty_expected); - var exit = 0; - var match$2 = ty.desc; + let ty = expand_head(env, ty_expected); + let exit = 0; + let match$2 = ty.desc; if (typeof match$2 === "number") { exit = 1; } else { @@ -68329,16 +68329,16 @@ function type_function(in_function, loc, attrs, env, ty_expected, l, caselist) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var ty_res = match$1[1]; - var ty_arg = match$1[0]; - var ty_arg$1; + let ty_res = match$1[1]; + let ty_arg = match$1[0]; + let ty_arg$1; if (is_optional(l)) { - var tv = newvar(undefined, undefined); + let tv = newvar(undefined, undefined); try { unify$2(env, ty_arg, type_option$1(tv)); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -68360,13 +68360,13 @@ function type_function(in_function, loc, attrs, env, ty_expected, l, caselist) { generalize_structure$1(current_level.contents, ty_arg$1); generalize_structure$1(current_level.contents, ty_res); } - var match$3 = type_cases([ + let match$3 = type_cases([ loc_fun, ty_fun ], env, ty_arg$1, ty_res, true, loc, caselist); - var cases = match$3[0]; - var not_function = function (ty) { - var match = list_labels(env, ty); + let cases = match$3[0]; + let not_function = function (ty) { + let match = list_labels(env, ty); if (Caml_obj.caml_equal(match[0], /* [] */0)) { return !match[1]; } else { @@ -68401,15 +68401,15 @@ function type_label_access(env, loc, srecord, lid) { if (principal.contents) { begin_def(undefined); } - var record = type_exp(env, srecord); + let record = type_exp(env, srecord); if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, record.exp_type); } - var ty_exp = record.exp_type; - var opath; + let ty_exp = record.exp_type; + let opath; try { - var match = extract_concrete_record(env, ty_exp); + let match = extract_concrete_record(env, ty_exp); opath = [ match[0], match[1], @@ -68417,15 +68417,15 @@ function type_label_access(env, loc, srecord, lid) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { opath = undefined; } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var labels = find_all_labels(env, lid.loc, lid.txt); - var label = wrap_disambiguate("This expression has", ty_exp, (function (param) { + let labels = find_all_labels(env, lid.loc, lid.txt); + let label = wrap_disambiguate("This expression has", ty_exp, (function (param) { return disambiguate(undefined, undefined, undefined, lid, env, opath, param); }), labels); return [ @@ -68447,19 +68447,19 @@ function type_format(loc, str, env) { } function type_label_exp(create, env, loc, ty_expected, param) { - var sarg = param[2]; - var label = param[1]; - var lid = param[0]; + let sarg = param[2]; + let label = param[1]; + let lid = param[0]; begin_def(undefined); - var separate = principal.contents || env.local_constraints; + let separate = principal.contents || env.local_constraints; if (separate) { begin_def(undefined); begin_def(undefined); } - var match = instance_label(true, label); - var ty_res = match[2]; - var ty_arg = match[1]; - var vars = match[0]; + let match = instance_label(true, label); + let ty_res = match[2]; + let ty_arg = match[1]; + let vars = match[0]; if (separate) { end_def(undefined); generalize_structure$1(current_level.contents, ty_arg); @@ -68469,7 +68469,7 @@ function type_label_exp(create, env, loc, ty_expected, param) { unify$2(env, instance_def(ty_res), instance(undefined, env, ty_expected)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -68484,7 +68484,7 @@ function type_label_exp(create, env, loc, ty_expected, param) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var ty_arg$1 = instance_def(ty_arg); + let ty_arg$1 = instance_def(ty_arg); if (separate) { end_def(undefined); generalize_structure$1(current_level.contents, ty_arg$1); @@ -68512,10 +68512,10 @@ function type_label_exp(create, env, loc, ty_expected, param) { } }); } - var snap = Caml_obj.caml_equal(vars, /* [] */0) ? undefined : Caml_option.some(snapshot(undefined)); - var arg = type_argument(env, sarg, ty_arg$1, instance(undefined, env, ty_arg$1)); + let snap = Caml_obj.caml_equal(vars, /* [] */0) ? undefined : Caml_option.some(snapshot(undefined)); + let arg = type_argument(env, sarg, ty_arg$1, instance(undefined, env, ty_arg$1)); end_def(undefined); - var arg$1; + let arg$1; try { check_univars(env, Caml_obj.caml_notequal(vars, /* [] */0), "field value", arg, label.lbl_arg, vars); arg$1 = arg; @@ -68527,7 +68527,7 @@ function type_label_exp(create, env, loc, ty_expected, param) { try { may(backtrack, snap); begin_def(undefined); - var arg$2 = type_exp(env, sarg); + let arg$2 = type_exp(env, sarg); end_def(undefined); generalize_expansive$1(env, arg$2.exp_type); unify_exp(env, arg$2, ty_arg$1); @@ -68535,9 +68535,9 @@ function type_label_exp(create, env, loc, ty_expected, param) { arg$1 = arg$2; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); if (e.MEL_EXN_ID === $$Error$7) { - var tmp = e._3; + let tmp = e._3; if (typeof tmp === "number") { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } @@ -68565,8 +68565,8 @@ function type_label_exp(create, env, loc, ty_expected, param) { } function type_argument(env, sarg, ty_expected$p, ty_expected) { - var no_labels = function (ty) { - var match = list_labels(env, ty); + let no_labels = function (ty) { + let match = list_labels(env, ty); if (match[1]) { return false; } else { @@ -68575,13 +68575,13 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { }), match[0]); } }; - var is_inferred = function (_sexp) { + let is_inferred = function (_sexp) { while(true) { - var sexp = _sexp; - var match = sexp.pexp_desc; + let sexp = _sexp; + let match = sexp.pexp_desc; switch (match.TAG | 0) { case /* Pexp_ifthenelse */15 : - var e2 = match._2; + let e2 = match._2; if (e2 === undefined) { return false; } @@ -68609,25 +68609,25 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { } }; }; - var match = expand_head(env, ty_expected$p); - var match$1 = match.desc; + let match = expand_head(env, ty_expected$p); + let match$1 = match.desc; if (typeof match$1 !== "number" && match$1.TAG === /* Tarrow */1 && match$1._0 === "") { - var ty_res = match$1._2; - var lv = match.level; + let ty_res = match$1._2; + let lv = match.level; if (is_inferred(sarg)) { if (principal.contents) { begin_def(undefined); } - var texp = type_exp(env, sarg); + let texp = type_exp(env, sarg); if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, texp.exp_type); } - var make_args = function (_args, _ty_fun) { + let make_args = function (_args, _ty_fun) { while(true) { - var ty_fun = _ty_fun; - var args = _args; - var match = expand_head(env, ty_fun).desc; + let ty_fun = _ty_fun; + let args = _args; + let match = expand_head(env, ty_fun).desc; if (typeof match !== "number") { switch (match.TAG | 0) { case /* Tvar */0 : @@ -68637,9 +68637,9 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { false ]; case /* Tarrow */1 : - var l = match._0; + let l = match._0; if (is_optional(l)) { - var ty = option_none(instance(undefined, env, match._1), sarg.pexp_loc); + let ty = option_none(instance(undefined, env, match._1), sarg.pexp_loc); _ty_fun = match._2; _args = { hd: [ @@ -68670,17 +68670,17 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { ]; }; }; - var match$2 = make_args(/* [] */0, texp.exp_type); - var ty_fun$p = match$2[1]; - var args = match$2[0]; - var warn = principal.contents && (lv !== 100000000 || repr(ty_fun$p).level !== 100000000); - var texp_exp_desc = texp.exp_desc; - var texp_exp_loc = texp.exp_loc; - var texp_exp_extra = texp.exp_extra; - var texp_exp_type = instance(undefined, env, texp.exp_type); - var texp_exp_env = texp.exp_env; - var texp_exp_attributes = texp.exp_attributes; - var texp$1 = { + let match$2 = make_args(/* [] */0, texp.exp_type); + let ty_fun$p = match$2[1]; + let args = match$2[0]; + let warn = principal.contents && (lv !== 100000000 || repr(ty_fun$p).level !== 100000000); + let texp_exp_desc = texp.exp_desc; + let texp_exp_loc = texp.exp_loc; + let texp_exp_extra = texp.exp_extra; + let texp_exp_type = instance(undefined, env, texp.exp_type); + let texp_exp_env = texp.exp_env; + let texp_exp_attributes = texp.exp_attributes; + let texp$1 = { exp_desc: texp_exp_desc, exp_loc: texp_exp_loc, exp_extra: texp_exp_extra, @@ -68688,7 +68688,7 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { exp_env: texp_exp_env, exp_attributes: texp_exp_attributes }; - var ty_fun = instance(undefined, env, ty_fun$p); + let ty_fun = instance(undefined, env, ty_fun$p); if (match$2[2] || no_labels(ty_res)) { unify_exp(env, { exp_desc: texp_exp_desc, @@ -68701,8 +68701,8 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { if (Caml_obj.caml_equal(args, /* [] */0)) { return texp$1; } - var var_pair = function (name, ty) { - var id = create(name); + let var_pair = function (name, ty) { + let id = create(name); return [ { pat_desc: { @@ -68748,11 +68748,11 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { } ]; }; - var match$3 = var_pair("eta", match$1._1); - var eta_var = match$3[1]; - var eta_pat = match$3[0]; - var func = function (texp) { - var e_exp_desc = { + let match$3 = var_pair("eta", match$1._1); + let eta_var = match$3[1]; + let eta_pat = match$3[0]; + let func = function (texp) { + let e_exp_desc = { TAG: /* Texp_apply */4, _0: texp, _1: Stdlib.$at(args, { @@ -68764,11 +68764,11 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { tl: /* [] */0 }) }; - var e_exp_loc = texp.exp_loc; - var e_exp_extra = texp.exp_extra; - var e_exp_env = texp.exp_env; - var e_exp_attributes = texp.exp_attributes; - var e = { + let e_exp_loc = texp.exp_loc; + let e_exp_extra = texp.exp_extra; + let e_exp_env = texp.exp_env; + let e_exp_attributes = texp.exp_attributes; + let e = { exp_desc: e_exp_desc, exp_loc: e_exp_loc, exp_extra: e_exp_extra, @@ -68812,7 +68812,7 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { if (is_nonexpansive(texp$1)) { return func(texp$1); } - var match$4 = var_pair("arg", texp_exp_type); + let match$4 = var_pair("arg", texp_exp_type); return re({ exp_desc: { TAG: /* Texp_let */2, @@ -68840,13 +68840,13 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { } } - var texp$2 = type_expect(undefined, env, sarg, ty_expected$p); + let texp$2 = type_expect(undefined, env, sarg, ty_expected$p); unify_exp(env, texp$2, ty_expected); return texp$2; } function type_application(env, funct, sargs) { - var result_type = function (omitted, ty_fun) { + let result_type = function (omitted, ty_fun) { return Stdlib__List.fold_left((function (ty_fun, param) { return newty2(param[2], { TAG: /* Tarrow */1, @@ -68857,23 +68857,23 @@ function type_application(env, funct, sargs) { }); }), ty_fun, omitted); }; - var has_label = function (l, ty_fun) { - var match = list_labels(env, ty_fun); + let has_label = function (l, ty_fun) { + let match = list_labels(env, ty_fun); if (match[1]) { return true; } else { return Stdlib__List.mem(l, match[0]); } }; - var ignored = { + let ignored = { contents: /* [] */0 }; - var ignore_labels = true; + let ignore_labels = true; if (!classic.contents) { - var match = list_labels(env, funct.exp_type); - var tmp = false; + let match = list_labels(env, funct.exp_type); + let tmp = false; if (!match[1]) { - var labels = Stdlib__List.filter((function (l) { + let labels = Stdlib__List.filter((function (l) { return !is_optional(l); }), match[0]); tmp = Stdlib__List.length(labels) === Stdlib__List.length(sargs) && Stdlib__List.for_all((function (param) { @@ -68884,36 +68884,36 @@ function type_application(env, funct, sargs) { } ignore_labels = tmp; } - var warned = { + let warned = { contents: false }; - var type_args = function (_args, _omitted, _ty_fun, _ty_fun0, _ty_old, _sargs, _more_sargs) { + let type_args = function (_args, _omitted, _ty_fun, _ty_fun0, _ty_old, _sargs, _more_sargs) { while(true) { - var more_sargs = _more_sargs; - var sargs = _sargs; - var ty_old = _ty_old; - var ty_fun0 = _ty_fun0; - var ty_fun = _ty_fun; - var omitted = _omitted; - var args = _args; - var match = expand_head(env, ty_fun); - var match$1 = expand_head(env, ty_fun0); - var exit = 0; - var match$2 = match.desc; + let more_sargs = _more_sargs; + let sargs = _sargs; + let ty_old = _ty_old; + let ty_fun0 = _ty_fun0; + let ty_fun = _ty_fun; + let omitted = _omitted; + let args = _args; + let match = expand_head(env, ty_fun); + let match$1 = expand_head(env, ty_fun0); + let exit = 0; + let match$2 = match.desc; if (typeof match$2 === "number" || match$2.TAG !== /* Tarrow */1) { exit = 1; } else { - var ty_fun$1 = match$2._2; - var ty = match$2._1; - var l = match$2._0; - var lv = match.level; - var match$3 = match$1.desc; + let ty_fun$1 = match$2._2; + let ty = match$2._1; + let l = match$2._0; + let lv = match.level; + let match$3 = match$1.desc; if (typeof match$3 === "number" || match$3.TAG !== /* Tarrow */1) { exit = 1; } else { - var ty0 = match$3._1; + let ty0 = match$3._1; if ((Caml_obj.caml_notequal(sargs, /* [] */0) || Caml_obj.caml_notequal(more_sargs, /* [] */0)) && Caml_obj.caml_equal(commu_repr(match$2._3), /* Cok */0)) { - var may_warn = (function(lv){ + let may_warn = (function(lv){ return function may_warn(loc, w) { if (!warned.contents && principal.contents && lv !== 100000000) { warned.contents = true; @@ -68922,12 +68922,12 @@ function type_application(env, funct, sargs) { } }(lv)); - var name = label_name(l); - var optional = is_optional(l) ? /* Optional */1 : /* Required */0; - var match$4; + let name = label_name(l); + let optional = is_optional(l) ? /* Optional */1 : /* Required */0; + let match$4; if (ignore_labels && !is_optional(l)) { if (sargs) { - var match$5 = sargs.hd; + let match$5 = sargs.hd; throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: match$5[1].pexp_loc, @@ -68940,9 +68940,9 @@ function type_application(env, funct, sargs) { }); } if (more_sargs) { - var match$6 = more_sargs.hd; - var sarg0 = match$6[1]; - var l$p = match$6[0]; + let match$6 = more_sargs.hd; + let sarg0 = match$6[1]; + let l$p = match$6[0]; if (l !== l$p && l$p !== "") { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -68976,11 +68976,11 @@ function type_application(env, funct, sargs) { } } else { try { - var match$7; + let match$7; try { - var match$8 = extract_label_aux(/* [] */0, name, sargs); - var sargs1 = match$8[2]; - var sarg0$1 = match$8[1]; + let match$8 = extract_label_aux(/* [] */0, name, sargs); + let sargs1 = match$8[2]; + let sarg0$1 = match$8[1]; if (Caml_obj.caml_notequal(sargs1, /* [] */0)) { may_warn(sarg0$1.pexp_loc, { TAG: /* Not_principal */8, @@ -68995,11 +68995,11 @@ function type_application(env, funct, sargs) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var match$9 = extract_label_aux(/* [] */0, name, more_sargs); - var sargs1$1 = match$9[2]; - var sarg0$2 = match$9[1]; + let match$9 = extract_label_aux(/* [] */0, name, more_sargs); + let sargs1$1 = match$9[2]; + let sarg0$2 = match$9[1]; if (Caml_obj.caml_notequal(sargs1$1, /* [] */0) || Caml_obj.caml_notequal(sargs, /* [] */0)) { may_warn(sarg0$2.pexp_loc, { TAG: /* Not_principal */8, @@ -69016,8 +69016,8 @@ function type_application(env, funct, sargs) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var sarg0$3 = match$7[1]; - var l$p$1 = match$7[0]; + let sarg0$3 = match$7[1]; + let l$p$1 = match$7[0]; if (optional === /* Required */0 && is_optional(l$p$1)) { prerr_warning(sarg0$3.pexp_loc, { TAG: /* Nonoptional_label */26, @@ -69042,7 +69042,7 @@ function type_application(env, funct, sargs) { ]; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { match$4 = [ sargs, @@ -69071,9 +69071,9 @@ function type_application(env, funct, sargs) { } } } - var arg = match$4[2]; - var sargs$1 = match$4[0]; - var omitted$1 = arg === undefined ? ({ + let arg = match$4[2]; + let sargs$1 = match$4[0]; + let omitted$1 = arg === undefined ? ({ hd: [ l, ty, @@ -69081,7 +69081,7 @@ function type_application(env, funct, sargs) { ], tl: omitted }) : omitted; - var ty_old$1 = Caml_obj.caml_equal(sargs$1, /* [] */0) ? ty_fun$1 : ty_old; + let ty_old$1 = Caml_obj.caml_equal(sargs$1, /* [] */0) ? ty_fun$1 : ty_old; _more_sargs = match$4[1]; _sargs = sargs$1; _ty_old = ty_old$1; @@ -69102,10 +69102,10 @@ function type_application(env, funct, sargs) { } } if (exit === 1) { - var exit$1 = 0; + let exit$1 = 0; if (sargs) { if (ignore_labels) { - var match$10 = sargs.hd; + let match$10 = sargs.hd; throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: match$10[1].pexp_loc, @@ -69122,18 +69122,18 @@ function type_application(env, funct, sargs) { exit$1 = 2; } if (exit$1 === 2) { - var _args$1 = args; - var _ty_fun$1 = ty_fun0; - var _param = Stdlib.$at(sargs, more_sargs); + let _args$1 = args; + let _ty_fun$1 = ty_fun0; + let _param = Stdlib.$at(sargs, more_sargs); while(true) { - var param = _param; - var ty_fun$2 = _ty_fun$1; - var args$1 = _args$1; + let param = _param; + let ty_fun$2 = _ty_fun$1; + let args$1 = _args$1; if (!param) { return [ Stdlib__List.map((function (param) { - var f = param[1]; - var l = param[0]; + let f = param[1]; + let l = param[0]; if (f !== undefined) { return [ l, @@ -69151,25 +69151,25 @@ function type_application(env, funct, sargs) { instance(undefined, env, result_type(omitted, ty_fun$2)) ]; } - var match$11 = param.hd; - var sarg1 = match$11[1]; - var l1 = match$11[0]; - var ty_fun$3 = expand_head(env, ty_fun$2); - var td = ty_fun$3.desc; - var match$12; - var exit$2 = 0; + let match$11 = param.hd; + let sarg1 = match$11[1]; + let l1 = match$11[0]; + let ty_fun$3 = expand_head(env, ty_fun$2); + let td = ty_fun$3.desc; + let match$12; + let exit$2 = 0; if (typeof td === "number") { exit$2 = 1; } else { switch (td.TAG | 0) { case /* Tvar */0 : - var t1 = newvar(undefined, undefined); - var t2 = newvar(undefined, undefined); - var not_identity = function (param) { + let t1 = newvar(undefined, undefined); + let t2 = newvar(undefined, undefined); + let not_identity = function (param) { if (param.TAG !== /* Texp_ident */0) { return true; } - var match = param._2.val_kind; + let match = param._2.val_kind; if (typeof match === "number" || !(match.TAG === /* Val_prim */0 && match._0.prim_name === "%identity")) { return true; } else { @@ -69196,7 +69196,7 @@ function type_application(env, funct, sargs) { ]; break; case /* Tarrow */1 : - var l$1 = td._0; + let l$1 = td._0; if (l$1 === l1 || classic.contents && l1 === "" && !is_optional(l$1)) { match$12 = [ td._1, @@ -69211,11 +69211,11 @@ function type_application(env, funct, sargs) { } } if (exit$2 === 1) { - var ty_fun$4; + let ty_fun$4; ty_fun$4 = typeof td === "number" || td.TAG !== /* Tarrow */1 ? ty_fun$3 : newty2(current_level.contents, td); - var ty_res = result_type(Stdlib.$at(omitted, ignored.contents), ty_fun$4); - var match$13 = ty_res.desc; - var exit$3 = 0; + let ty_res = result_type(Stdlib.$at(omitted, ignored.contents), ty_fun$4); + let match$13 = ty_res.desc; + let exit$3 = 0; if (typeof match$13 === "number") { exit$3 = 2; } else { @@ -69254,11 +69254,11 @@ function type_application(env, funct, sargs) { } } - var ty1 = match$12[0]; - var optional$1 = is_optional(l1) ? /* Optional */1 : /* Required */0; - var arg1 = (function(sarg1,ty1,optional$1){ + let ty1 = match$12[0]; + let optional$1 = is_optional(l1) ? /* Optional */1 : /* Required */0; + let arg1 = (function(sarg1,ty1,optional$1){ return function arg1(param) { - var arg1$1 = type_expect(undefined, env, sarg1, ty1); + let arg1$1 = type_expect(undefined, env, sarg1, ty1); if (optional$1 === /* Optional */1) { unify_exp(env, arg1$1, type_option$1(newvar(undefined, undefined))); } @@ -69283,15 +69283,15 @@ function type_application(env, funct, sargs) { }; }; - var match$1 = funct.exp_desc; + let match$1 = funct.exp_desc; if (match$1.TAG === /* Texp_ident */0) { - var match$2 = match$1._2.val_kind; + let match$2 = match$1._2.val_kind; if (typeof match$2 !== "number" && match$2.TAG === /* Val_prim */0 && match$2._0.prim_name === "%ignore" && sargs) { - var match$3 = sargs.hd; + let match$3 = sargs.hd; if (match$3[0] === "" && !sargs.tl) { - var match$4 = filter_arrow(env, instance(undefined, env, funct.exp_type), ""); - var exp = type_expect(undefined, env, match$3[1], match$4[0]); - var match$5 = expand_head(env, exp.exp_type).desc; + let match$4 = filter_arrow(env, instance(undefined, env, funct.exp_type), ""); + let exp = type_expect(undefined, env, match$3[1], match$4[0]); + let match$5 = expand_head(env, exp.exp_type).desc; if (typeof match$5 !== "number") { switch (match$5.TAG | 0) { case /* Tvar */0 : @@ -69322,7 +69322,7 @@ function type_application(env, funct, sargs) { } } - var ty = funct.exp_type; + let ty = funct.exp_type; if (ignore_labels) { return type_args(/* [] */0, /* [] */0, ty, instance(undefined, env, ty), ty, /* [] */0, sargs); } else { @@ -69331,18 +69331,18 @@ function type_application(env, funct, sargs) { } function type_statement(env, sexp) { - var loc = final_subexpression(sexp).pexp_loc; + let loc = final_subexpression(sexp).pexp_loc; begin_def(undefined); - var exp = type_exp(env, sexp); + let exp = type_exp(env, sexp); end_def(undefined); if (strict_sequence.contents) { - var expected_ty = instance_def(type_unit); + let expected_ty = instance_def(type_unit); unify_exp(env, exp, expected_ty); return exp; } - var ty = expand_head(env, exp.exp_type); - var tv = newvar(undefined, undefined); - var match = ty.desc; + let ty = expand_head(env, exp.exp_type); + let tv = newvar(undefined, undefined); + let match = ty.desc; if (typeof match === "number") { prerr_warning(loc, /* Statement_type */4); } else { @@ -69375,28 +69375,28 @@ function type_statement(env, sexp) { } function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselist) { - var patterns = Stdlib__List.map((function (param) { + let patterns = Stdlib__List.map((function (param) { return param.pc_lhs; }), caselist); - var erase_either = Stdlib__List.exists(contains_polymorphic_variant, patterns) && contains_variant_either(ty_arg); - var has_gadts = Stdlib__List.exists((function (param) { + let erase_either = Stdlib__List.exists(contains_polymorphic_variant, patterns) && contains_variant_either(ty_arg); + let has_gadts = Stdlib__List.exists((function (param) { return contains_gadt(env, param); }), patterns); - var ty_arg$1 = (has_gadts || erase_either) && !principal.contents ? type_expr(identity, ty_arg) : ty_arg; - var match = has_gadts && !principal.contents ? [ + let ty_arg$1 = (has_gadts || erase_either) && !principal.contents ? type_expr(identity, ty_arg) : ty_arg; + let match = has_gadts && !principal.contents ? [ type_expr(identity, ty_res), duplicate_ident_types(loc, caselist, env) ] : [ ty_res, env ]; - var env$1 = match[1]; - var ty_res$1 = match[0]; - var match$1; + let env$1 = match[1]; + let ty_res$1 = match[0]; + let match$1; if (has_gadts) { begin_def(undefined); set_current_time(current_level.contents); - var lev = currentstamp.contents; + let lev = currentstamp.contents; init_def(lev + 1000 | 0); match$1 = [ lev, @@ -69408,19 +69408,19 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis env$1 ]; } - var env$2 = match$1[1]; - var lev$1 = match$1[0]; + let env$2 = match$1[1]; + let lev$1 = match$1[0]; begin_def(undefined); - var ty_arg$p = newvar(undefined, undefined); - var pattern_force = { + let ty_arg$p = newvar(undefined, undefined); + let pattern_force = { contents: /* [] */0 }; - var pat_env_list = Stdlib__List.map((function (param) { - var pc_rhs = param.pc_rhs; - var pc_guard = param.pc_guard; - var loc; + let pat_env_list = Stdlib__List.map((function (param) { + let pc_rhs = param.pc_rhs; + let pc_guard = param.pc_guard; + let loc; if (pc_guard !== undefined) { - var init = pc_rhs.pexp_loc; + let init = pc_rhs.pexp_loc; loc = { loc_start: pc_guard.pexp_loc.loc_start, loc_end: init.loc_end, @@ -69432,16 +69432,16 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis if (principal.contents) { begin_def(undefined); } - var scope = { + let scope = { TAG: /* Idef */1, _0: loc }; - var partial = principal.contents || erase_either ? false : undefined; - var ty_arg$2 = instance(partial, env$2, ty_arg$1); - var match = type_pattern(lev$1, env$2, param.pc_lhs, scope, ty_arg$2); - var pat = match[0]; + let partial = principal.contents || erase_either ? false : undefined; + let ty_arg$2 = instance(partial, env$2, ty_arg$1); + let match = type_pattern(lev$1, env$2, param.pc_lhs, scope, ty_arg$2); + let pat = match[0]; pattern_force.contents = Stdlib.$at(match[2], pattern_force.contents); - var pat$1 = principal.contents ? (end_def(undefined), iter_pattern((function (param) { + let pat$1 = principal.contents ? (end_def(undefined), iter_pattern((function (param) { generalize_structure$1(current_level.contents, param.pat_type); }), pat), { pat_desc: pat.pat_desc, @@ -69459,7 +69459,7 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis ] ]; }), caselist); - var patl = Stdlib__List.map((function (prim) { + let patl = Stdlib__List.map((function (prim) { return prim[0]; }), pat_env_list); Stdlib__List.iter((function (pat) { @@ -69490,25 +69490,25 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis }, param.pat_type); }), param); }), patl); - var in_function$1 = Stdlib__List.length(caselist) === 1 ? in_function : undefined; - var cases = Stdlib__List.map2((function (param, param$1) { - var pc_guard = param$1.pc_guard; - var match = param[1]; - var unpacks = match[1]; - var ext_env = match[0]; - var sexp = wrap_unpacks(param$1.pc_rhs, unpacks); - var ty_res$p; + let in_function$1 = Stdlib__List.length(caselist) === 1 ? in_function : undefined; + let cases = Stdlib__List.map2((function (param, param$1) { + let pc_guard = param$1.pc_guard; + let match = param[1]; + let unpacks = match[1]; + let ext_env = match[0]; + let sexp = wrap_unpacks(param$1.pc_rhs, unpacks); + let ty_res$p; if (principal.contents) { begin_def(undefined); - var ty = instance(true, env$2, ty_res$1); + let ty = instance(true, env$2, ty_res$1); end_def(undefined); generalize_structure$1(current_level.contents, ty); ty_res$p = ty; } else { ty_res$p = contains_gadt(env$2, param$1.pc_lhs) ? type_expr(identity, ty_res$1) : ty_res$1; } - var guard = pc_guard !== undefined ? type_expect(undefined, ext_env, wrap_unpacks(pc_guard, unpacks), type_bool) : undefined; - var exp = type_expect(in_function$1, ext_env, sexp, ty_res$p); + let guard = pc_guard !== undefined ? type_expect(undefined, ext_env, wrap_unpacks(pc_guard, unpacks), type_bool) : undefined; + let exp = type_expect(in_function$1, ext_env, sexp, ty_res$p); return { c_lhs: param[0], c_guard: guard, @@ -69523,12 +69523,12 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis }; }), pat_env_list, caselist); if (principal.contents || has_gadts) { - var ty_res$p = instance(undefined, env$2, ty_res$1); + let ty_res$p = instance(undefined, env$2, ty_res$1); Stdlib__List.iter((function (c) { unify_exp(env$2, c.c_rhs, ty_res$p); }), cases); } - var partial = partial_flag ? check_partial$1(lev$1, env$2, ty_arg$1)(loc, cases) : /* Partial */0; + let partial = partial_flag ? check_partial$1(lev$1, env$2, ty_arg$1)(loc, cases) : /* Partial */0; add_delayed_check(function (param) { Stdlib__List.iter((function (param) { check_absent_variant(param[1][0])(param[0]); @@ -69536,28 +69536,28 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis if (!is_active(/* Unused_match */5)) { return ; } - var _pref = /* [] */0; - var _param = cases; + let _pref = /* [] */0; + let _param = cases; while(true) { - var param$1 = _param; - var pref = _pref; + let param$1 = _param; + let pref = _pref; if (!param$1) { return ; } - var rem = param$1.tl; - var match = param$1.hd; - var q = match.c_lhs; - var qs = { + let rem = param$1.tl; + let match = param$1.hd; + let q = match.c_lhs; + let qs = { hd: q, tl: /* [] */0 }; try { - var pss = get_mins(le_pats, Stdlib__List.filter((function(qs){ + let pss = get_mins(le_pats, Stdlib__List.filter((function(qs){ return function (param) { return compats(qs, param); } }(qs)), pref)); - var r = every_satisfiables(Stdlib__List.map(make_row, pss), { + let r = every_satisfiables(Stdlib__List.map(make_row, pss), { no_ors: /* [] */0, ors: /* [] */0, active: qs @@ -69574,8 +69574,8 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - var exit = 0; + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exit = 0; if (exn.MEL_EXN_ID === Empty || exn.MEL_EXN_ID === Stdlib.Not_found || exn.MEL_EXN_ID === NoGuard) { exit = 1; } else { @@ -69619,13 +69619,13 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis } function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scope, allow) { - var check = checkOpt !== undefined ? checkOpt : (function (s) { + let check = checkOpt !== undefined ? checkOpt : (function (s) { return { TAG: /* Unused_var */12, _0: s }; }); - var check_strict = check_strictOpt !== undefined ? check_strictOpt : (function (s) { + let check_strict = check_strictOpt !== undefined ? check_strictOpt : (function (s) { return { TAG: /* Unused_var_strict */13, _0: s @@ -69635,13 +69635,13 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop if (principal.contents) { begin_def(undefined); } - var is_fake_let; + let is_fake_let; if (spat_sexp_list) { - var match = spat_sexp_list.hd.pvb_expr.pexp_desc; + let match = spat_sexp_list.hd.pvb_expr.pexp_desc; if (match.TAG === /* Pexp_match */6) { - var match$1 = match._0.pexp_desc; + let match$1 = match._0.pexp_desc; if (match$1.TAG === /* Pexp_ident */0) { - var match$2 = match$1._0.txt; + let match$2 = match$1._0.txt; switch (match$2.TAG | 0) { case /* Lident */0 : is_fake_let = match$2._0 === "*opt*" && !spat_sexp_list.tl ? true : false; @@ -69661,12 +69661,12 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop } else { is_fake_let = false; } - var check$1 = is_fake_let ? check_strict : check; - var spatl = Stdlib__List.map((function (param) { - var spat = param.pvb_pat; - var match = spat.ppat_desc; - var match$1 = param.pvb_expr.pexp_desc; - var sty; + let check$1 = is_fake_let ? check_strict : check; + let spatl = Stdlib__List.map((function (param) { + let spat = param.pvb_pat; + let match = spat.ppat_desc; + let match$1 = param.pvb_expr.pexp_desc; + let sty; if (typeof match === "number") { return spat; } @@ -69686,25 +69686,25 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop if (!principal.contents) { return spat; } - var init = spat.ppat_loc; + let init = spat.ppat_loc; return constraint_({ loc_start: init.loc_start, loc_end: init.loc_end, loc_ghost: true }, undefined, spat, sty); }), spat_sexp_list); - var nvs = Stdlib__List.map((function (param) { + let nvs = Stdlib__List.map((function (param) { return newvar(undefined, undefined); }), spatl); - var match$3 = type_pattern_list(env, spatl, scope, nvs, allow); - var unpacks = match$3[3]; - var new_env = match$3[1]; - var pat_list = match$3[0]; - var is_recursive = rec_flag === /* Recursive */1; + let match$3 = type_pattern_list(env, spatl, scope, nvs, allow); + let unpacks = match$3[3]; + let new_env = match$3[1]; + let pat_list = match$3[0]; + let is_recursive = rec_flag === /* Recursive */1; if (is_recursive) { Stdlib__List.iter2((function (pat, binding) { - var match = pat.pat_type.desc; - var pat$1; + let match = pat.pat_type.desc; + let pat$1; pat$1 = typeof match === "number" || match.TAG !== /* Tpoly */10 ? pat : ({ pat_desc: pat.pat_desc, pat_loc: pat.pat_loc, @@ -69726,7 +69726,7 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop } }), pat_list); - var pat_list$1 = principal.contents ? (end_def(undefined), Stdlib__List.map((function (pat) { + let pat_list$1 = principal.contents ? (end_def(undefined), Stdlib__List.map((function (pat) { iter_pattern((function (pat) { generalize_structure$1(current_level.contents, pat.pat_type); }), pat); @@ -69742,35 +69742,35 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop Stdlib__List.iter((function (f) { Curry._1(f, undefined); }), match$3[2]); - var exp_env = is_recursive ? new_env : env; - var current_slot = { + let exp_env = is_recursive ? new_env : env; + let current_slot = { contents: undefined }; - var rec_needed = { + let rec_needed = { contents: false }; - var warn_unused = is_active(Curry._1(check$1, "")) || is_active(Curry._1(check_strict, "")) || is_recursive && is_active(/* Unused_rec_flag */15); - var pat_slot_list = Stdlib__List.map((function (pat) { + let warn_unused = is_active(Curry._1(check$1, "")) || is_active(Curry._1(check_strict, "")) || is_recursive && is_active(/* Unused_rec_flag */15); + let pat_slot_list = Stdlib__List.map((function (pat) { if (!warn_unused) { return [ pat, undefined ]; } - var some_used = { + let some_used = { contents: false }; - var slot = { + let slot = { contents: /* [] */0 }; Stdlib__List.iter((function (param) { - var id = param[0]; - var vd = find_value({ + let id = param[0]; + let vd = find_value({ TAG: /* Pident */0, _0: id }, new_env); - var name = id.name; - var used = { + let name = id.name; + let used = { contents: false }; if (!(name === "" || Caml_string.get(name, 0) === /* '_' */95 || Caml_string.get(name, 0) === /* '#' */35)) { @@ -69781,8 +69781,8 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop }); } - var callback = function (param) { - var slot$1 = current_slot.contents; + let callback = function (param) { + let slot$1 = current_slot.contents; if (slot$1 !== undefined) { slot$1.contents = { hd: [ @@ -69800,20 +69800,20 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop some_used.contents = true; } }; - var key_1 = vd.val_loc; - var key = [ + let key_1 = vd.val_loc; + let key = [ name, key_1 ]; try { - var old = Stdlib__Hashtbl.find(value_declarations, key); + let old = Stdlib__Hashtbl.find(value_declarations, key); return Stdlib__Hashtbl.replace(value_declarations, key, (function (param) { Curry._1(old, undefined); Curry._1(callback, undefined); })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__Hashtbl.add(value_declarations, key, callback); } @@ -69825,14 +69825,14 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop slot ]; }), pat_list$1); - var exp_list = Stdlib__List.map2((function (param, param$1) { - var pat = param$1[0]; - var sexp = param.pvb_expr; - var sexp$1 = rec_flag === /* Recursive */1 ? wrap_unpacks(sexp, unpacks) : sexp; + let exp_list = Stdlib__List.map2((function (param, param$1) { + let pat = param$1[0]; + let sexp = param.pvb_expr; + let sexp$1 = rec_flag === /* Recursive */1 ? wrap_unpacks(sexp, unpacks) : sexp; if (is_recursive) { current_slot.contents = param$1[1]; } - var match = pat.pat_type.desc; + let match = pat.pat_type.desc; if (typeof match === "number") { return type_expect(undefined, exp_env, sexp$1, pat.pat_type); } @@ -69843,13 +69843,13 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop if (principal.contents) { begin_def(undefined); } - var match$1 = instance_poly(true, true, match._1, match._0); - var ty$p = match$1[1]; + let match$1 = instance_poly(true, true, match._1, match._0); + let ty$p = match$1[1]; if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, ty$p); } - var exp = type_expect(undefined, exp_env, sexp$1, ty$p); + let exp = type_expect(undefined, exp_env, sexp$1, ty$p); end_def(undefined); check_univars(env, true, "definition", exp, pat.pat_type, match$1[0]); return { @@ -69891,8 +69891,8 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop }, pat.pat_type); }), pat); }), pat_list$1); - var l = Stdlib__List.combine(pat_list$1, exp_list); - var l$1 = Stdlib__List.map2((function (param, pvb) { + let l = Stdlib__List.combine(pat_list$1, exp_list); + let l$1 = Stdlib__List.map2((function (param, pvb) { return { vb_pat: param[0], vb_expr: param[1], @@ -69909,7 +69909,7 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop function type_binding(env, rec_flag, spat_sexp_list, scope) { reset_type_variables(undefined); - var match = type_let((function (s) { + let match = type_let((function (s) { return { TAG: /* Unused_value_declaration */16, _0: s @@ -69927,7 +69927,7 @@ function type_binding(env, rec_flag, spat_sexp_list, scope) { } function type_let$1(env, rec_flag, spat_sexp_list, scope) { - var match = type_let(undefined, undefined, env, rec_flag, spat_sexp_list, scope, false); + let match = type_let(undefined, undefined, env, rec_flag, spat_sexp_list, scope, false); return [ match[0], match[1] @@ -69937,7 +69937,7 @@ function type_let$1(env, rec_flag, spat_sexp_list, scope) { function type_expression(env, sexp) { reset_type_variables(undefined); begin_def(undefined); - var exp = type_exp(env, sexp); + let exp = type_exp(env, sexp); end_def(undefined); if (is_nonexpansive(exp)) { iter_generalize$1({ @@ -69946,11 +69946,11 @@ function type_expression(env, sexp) { } else { generalize_expansive$1(env, exp.exp_type); } - var lid = sexp.pexp_desc; + let lid = sexp.pexp_desc; if (lid.TAG !== /* Pexp_ident */0) { return exp; } - var match = lookup_value$1(lid._0.txt, env); + let match = lookup_value$1(lid._0.txt, env); return { exp_desc: exp.exp_desc, exp_loc: exp.exp_loc, @@ -69969,7 +69969,7 @@ register_error_of_exn(function (param) { return ; } } - var env = param._2; + let env = param._2; return error_of_printer(param._1, (function (param, param$1) { return wrap_printing_env(env, (function (param$2) { if (typeof param$1 === "number") { @@ -70251,7 +70251,7 @@ register_error_of_exn(function (param) { _1: "@[The constructor %a@ expects %i argument(s),@ but is applied here to %i argument(s)@]" }), longident, param$1._0, param$1._1, param$1._2); case /* Label_mismatch */2 : - var lid = param$1._0; + let lid = param$1._0; return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -70308,7 +70308,7 @@ register_error_of_exn(function (param) { }); })); case /* Or_pattern_type_clash */4 : - var id = param$1._0; + let id = param$1._0; return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -70391,10 +70391,10 @@ register_error_of_exn(function (param) { }); })); case /* Apply_non_function */8 : - var typ = param$1._0; + let typ = param$1._0; reset(undefined); mark_loops(typ); - var match = repr(typ).desc; + let match = repr(typ).desc; if (typeof match !== "number" && match.TAG === /* Tarrow */1) { Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { @@ -70567,8 +70567,8 @@ register_error_of_exn(function (param) { _1: "@[@[<2>This expression has type@ %a@]@ %s@]" }), type_expr$1, typ, "This is not a function; it cannot be applied."); case /* Apply_wrong_label */9 : - var ty = param$1._1; - var print_label = function (ppf, l) { + let ty = param$1._1; + let print_label = function (ppf, l) { if (l === "") { return Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -70680,7 +70680,7 @@ register_error_of_exn(function (param) { _1: "The record field label %s is defined several times" }), param$1._0); case /* Label_missing */11 : - var print_labels = function (ppf) { + let print_labels = function (ppf) { return function (param) { return Stdlib__List.iter((function (lbl) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -70749,10 +70749,10 @@ register_error_of_exn(function (param) { _1: "The record field %a is not mutable" }), longident, param$1._0); case /* Wrong_name */13 : - var lid$1 = param$1._4; - var p = param$1._3; - var kind = param$1._2; - var ty$1 = param$1._1; + let lid$1 = param$1._4; + let p = param$1._3; + let kind = param$1._2; + let ty$1 = param$1._1; reset(undefined); mark_loops(ty$1); Curry._3(Stdlib__Format.fprintf(param)(/* Format */{ @@ -70864,12 +70864,12 @@ register_error_of_exn(function (param) { }))(env, lid$1); } case /* Name_type_mismatch */14 : - var lid$2 = param$1._1; - var kind$1 = param$1._0; - var name = kind$1 === "record" ? "field" : "constructor"; - var param$3 = param$1._2; - var tpl = param$1._3; - var txt1 = function (ppf) { + let lid$2 = param$1._1; + let kind$1 = param$1._0; + let name = kind$1 === "record" ? "field" : "constructor"; + let param$3 = param$1._2; + let tpl = param$1._3; + let txt1 = function (ppf) { Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -70911,7 +70911,7 @@ register_error_of_exn(function (param) { _1: "The %s %a@ belongs to the %s type" }), name, longident, lid$2, kind$1); }; - var txt2 = function (ppf) { + let txt2 = function (ppf) { Curry._4(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -70953,7 +70953,7 @@ register_error_of_exn(function (param) { _1: "The %s %a@ belongs to one of the following %s types:" }), name, longident, lid$2, kind$1); }; - var txt3 = function (ppf) { + let txt3 = function (ppf) { Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -70979,8 +70979,8 @@ register_error_of_exn(function (param) { _1: "but a %s was expected belonging to the %s type" }), name, kind$1); }; - var tp0$p = param$3[1]; - var tp0 = param$3[0]; + let tp0$p = param$3[1]; + let tp0 = param$3[0]; return wrap_printing_env(env, (function (param$4) { reset(undefined); Stdlib__List.iter((function (param) { @@ -71067,8 +71067,8 @@ register_error_of_exn(function (param) { return type_path_expansion(tp0, param, param$1); }), tp0$p); } - var match = tpl.hd; - var tp = match[0]; + let match = tpl.hd; + let tp = match[0]; return Curry._6(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -71150,7 +71150,7 @@ register_error_of_exn(function (param) { _1: "%s" }), param$1._0); case /* Undefined_method */16 : - var ty$2 = param$1._0; + let ty$2 = param$1._0; reset(undefined); mark_loops(ty$2); return Curry._3(Stdlib__Format.fprintf(param)(/* Format */{ @@ -71292,7 +71292,7 @@ register_error_of_exn(function (param) { _1: "Unbound instance variable %s" }), param$1._0); case /* Instance_variable_not_mutable */22 : - var v = param$1._1; + let v = param$1._1; if (param$1._0) { return Curry._1(Stdlib__Format.fprintf(param)(/* Format */{ _0: { @@ -71329,14 +71329,14 @@ register_error_of_exn(function (param) { }), v); } case /* Not_subtype */23 : - var tr1 = param$1._0; - var txt1$1 = "is not a subtype of"; - var tr2 = param$1._1; + let tr1 = param$1._0; + let txt1$1 = "is not a subtype of"; + let tr2 = param$1._1; return wrap_printing_env(env, (function (param$4) { reset(undefined); - var tr1$1 = Stdlib__List.map(prepare_expansion, tr1); - var tr2$1 = Stdlib__List.map(prepare_expansion, tr2); - var partial_arg = Caml_obj.caml_equal(tr2$1, /* [] */0); + let tr1$1 = Stdlib__List.map(prepare_expansion, tr1); + let tr2$1 = Stdlib__List.map(prepare_expansion, tr2); + let partial_arg = Caml_obj.caml_equal(tr2$1, /* [] */0); Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -71370,8 +71370,8 @@ register_error_of_exn(function (param) { _1: "@]" }); } - var mis = mismatch(true, tr2$1); - var partial_arg$1 = mis === undefined; + let mis = mismatch(true, tr2$1); + let partial_arg$1 = mis === undefined; Curry._3(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Alpha */15, @@ -71409,14 +71409,14 @@ register_error_of_exn(function (param) { _1: "The instance variable %s is overridden several times" }), param$1._0); case /* Coercion_failure */25 : - var ty$p = param$1._1; - var ty$3 = param$1._0; + let ty$p = param$1._1; + let ty$3 = param$1._0; report_unification_error(param, env, undefined, param$1._2, (function (ppf) { - var match = prepare_expansion([ + let match = prepare_expansion([ ty$3, ty$p ]); - var ty$4 = match[0]; + let ty$4 = match[0]; Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -71518,7 +71518,7 @@ register_error_of_exn(function (param) { return ; } case /* Too_many_arguments */26 : - var ty$4 = param$1._1; + let ty$4 = param$1._1; reset(undefined); mark_loops(ty$4); if (param$1._0) { @@ -71599,8 +71599,8 @@ register_error_of_exn(function (param) { }), type_expr$1, ty$4); } case /* Abstract_wrong_label */27 : - var ty$5 = param$1._1; - var label_mark = function (l) { + let ty$5 = param$1._1; + let label_mark = function (l) { if (l === "") { return "but its first argument is not labelled"; } else { @@ -71690,7 +71690,7 @@ register_error_of_exn(function (param) { _1: "@[@[<2>This function should have type@ %a@]@,%s@]" }), type_expr$1, ty$5, label_mark(param$1._0)); case /* Scoping_let_module */28 : - var ty$6 = param$1._1; + let ty$6 = param$1._1; reset(undefined); mark_loops(ty$6); Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ @@ -71789,7 +71789,7 @@ register_error_of_exn(function (param) { _1: "The type %a@ is not a variant type" }), longident, param$1._0); case /* Less_general */31 : - var kind$2 = param$1._0; + let kind$2 = param$1._0; return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -71918,25 +71918,25 @@ register_error_of_exn(function (param) { add_delayed_check_forward.contents = add_delayed_check; -var $$Error$8 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typedecl.Error"); +let $$Error$8 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typedecl.Error"); function enter_type$1(env, sdecl, id) { - var match = sdecl.ptype_manifest; - var decl_type_params = Stdlib__List.map((function (param) { + let match = sdecl.ptype_manifest; + let decl_type_params = Stdlib__List.map((function (param) { return newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); }), sdecl.ptype_params); - var decl_type_arity = Stdlib__List.length(sdecl.ptype_params); - var decl_type_private = sdecl.ptype_private; - var decl_type_manifest = match !== undefined ? newvar(undefined, undefined) : undefined; - var decl_type_variance = Stdlib__List.map((function (param) { + let decl_type_arity = Stdlib__List.length(sdecl.ptype_params); + let decl_type_private = sdecl.ptype_private; + let decl_type_manifest = match !== undefined ? newvar(undefined, undefined) : undefined; + let decl_type_variance = Stdlib__List.map((function (param) { return Types_Variance.full; }), sdecl.ptype_params); - var decl_type_loc = sdecl.ptype_loc; - var decl_type_attributes = sdecl.ptype_attributes; - var decl = { + let decl_type_loc = sdecl.ptype_loc; + let decl_type_attributes = sdecl.ptype_attributes; + let decl = { type_params: decl_type_params, type_arity: decl_type_arity, type_kind: /* Type_abstract */0, @@ -71951,12 +71951,12 @@ function enter_type$1(env, sdecl, id) { } function is_fixed_type(sd) { - var sty = sd.ptype_manifest; + let sty = sd.ptype_manifest; if (sty !== undefined && Caml_obj.caml_equal(sd.ptype_kind, /* Ptype_abstract */0) && sd.ptype_private === /* Private */0) { - var _sty = sty; + let _sty = sty; while(true) { - var sty$1 = _sty; - var match = sty$1.ptyp_desc; + let sty$1 = _sty; + let match = sty$1.ptyp_desc; if (typeof match === "number") { return false; } @@ -71988,8 +71988,8 @@ function is_fixed_type(sd) { } function set_fixed_row(env, loc, p, decl) { - var t = decl.type_manifest; - var tm; + let t = decl.type_manifest; + let tm; if (t !== undefined) { tm = expand_head(env, t); } else { @@ -72002,8 +72002,8 @@ function set_fixed_row(env, loc, p, decl) { ] }); } - var row = tm.desc; - var rv; + let row = tm.desc; + let rv; if (typeof row === "number") { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -72019,7 +72019,7 @@ function set_fixed_row(env, loc, p, decl) { rv = flatten_fields(row._0)[1]; break; case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); tm.desc = { TAG: /* Tvariant */8, _0: { @@ -72063,9 +72063,9 @@ function set_fixed_row(env, loc, p, decl) { }; } -var compare$7 = Caml.caml_string_compare; +let compare$7 = Caml.caml_string_compare; -var funarg$5 = { +let funarg$5 = { compare: compare$7 }; @@ -72078,8 +72078,8 @@ function height$10(param) { } function create$11(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -72089,13 +72089,13 @@ function create$11(l, v, r) { } function bal$10(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$10(ll) >= height$10(lr)) { return create$11(ll, lv, create$11(lr, v, r)); } @@ -72121,9 +72121,9 @@ function bal$10(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$10(rr) >= height$10(rl)) { return create$11(create$11(l, v, rl), rv, rr); } @@ -72150,22 +72150,22 @@ function add$12(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$5.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$5.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$12(x, l); + let ll = add$12(x, l); if (l === ll) { return t; } else { return bal$10(ll, v, r); } } - var rr = add$12(x, r); + let rr = add$12(x, r); if (r === rr) { return t; } else { @@ -72175,11 +72175,11 @@ function add$12(x, t) { function mem$6(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$5.compare, x, param.v); + let c = Curry._2(funarg$5.compare, x, param.v); if (c === 0) { return true; } @@ -72189,8 +72189,8 @@ function mem$6(x, _param) { } function make_params(env, params) { - var make_param = function (param) { - var sty = param[0]; + let make_param = function (param) { + let sty = param[0]; try { return [ transl_type_param(env, sty), @@ -72198,7 +72198,7 @@ function make_params(env, params) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Already_bound) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -72214,18 +72214,18 @@ function make_params(env, params) { function make_constructor(env, type_path, type_params, sargs, sret_type) { if (sret_type !== undefined) { - var z = narrow(undefined); + let z = narrow(undefined); reset_type_variables(undefined); - var targs = Stdlib__List.map((function (param) { + let targs = Stdlib__List.map((function (param) { return transl_simple_type(env, false, param); }), sargs); - var args = Stdlib__List.map((function (cty) { + let args = Stdlib__List.map((function (cty) { return cty.ctyp_type; }), targs); - var tret_type = transl_simple_type(env, false, sret_type); - var ret_type = tret_type.ctyp_type; - var match = repr(ret_type).desc; - var exit = 0; + let tret_type = transl_simple_type(env, false, sret_type); + let ret_type = tret_type.ctyp_type; + let match = repr(ret_type).desc; + let exit = 0; if (typeof match === "number" || !(match.TAG === /* Tconstr */3 && same(type_path, match._0))) { exit = 1; } @@ -72248,10 +72248,10 @@ function make_constructor(env, type_path, type_params, sargs, sret_type) { ret_type ]; } - var targs$1 = Stdlib__List.map((function (param) { + let targs$1 = Stdlib__List.map((function (param) { return transl_simple_type(env, true, param); }), sargs); - var args$1 = Stdlib__List.map((function (cty) { + let args$1 = Stdlib__List.map((function (cty) { return cty.ctyp_type; }), targs$1); return [ @@ -72264,7 +72264,7 @@ function make_constructor(env, type_path, type_params, sargs, sret_type) { function generalize_decl(decl) { Stdlib__List.iter(generalize, decl.type_params); - var v = decl.type_kind; + let v = decl.type_kind; if (typeof v === "number") { v === /* Type_abstract */0; } else if (v.TAG === /* Type_record */0) { @@ -72279,7 +72279,7 @@ function generalize_decl(decl) { may(generalize, c.cd_res); }), v._0); } - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty !== undefined) { return iter_generalize$1({ contents: /* [] */0 @@ -72290,13 +72290,13 @@ function generalize_decl(decl) { function check_constraints_rec(env, loc, visited, _ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (Curry._2(mem$3, ty$1, visited.contents)) { return ; } visited.contents = Curry._2(add$3, ty$1, visited.contents); - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match === "number") { return iter_type_expr((function (param) { return check_constraints_rec(env, loc, visited, param); @@ -72304,17 +72304,17 @@ function check_constraints_rec(env, loc, visited, _ty) { } switch (match.TAG | 0) { case /* Tconstr */3 : - var args = match._1; - var path = match._0; - var args$p = Stdlib__List.map((function (param) { + let args = match._1; + let path = match._0; + let args$p = Stdlib__List.map((function (param) { return newvar(undefined, undefined); }), args); - var ty$p = newconstr(path, args$p); + let ty$p = newconstr(path, args$p); try { enforce_constraints(env, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -72352,7 +72352,7 @@ function check_constraints_rec(env, loc, visited, _ty) { return check_constraints_rec(env, loc, visited, param); }), args); case /* Tpoly */10 : - var match$1 = instance_poly(undefined, false, match._1, match._0); + let match$1 = instance_poly(undefined, false, match._1, match._0); _ty = match$1[1]; continue ; default: @@ -72363,7 +72363,7 @@ function check_constraints_rec(env, loc, visited, _ty) { }; } -var funarg$6 = { +let funarg$6 = { compare: Stdlib__String.compare }; @@ -72376,8 +72376,8 @@ function height$11(param) { } function create$12(l, x, d, r) { - var hl = height$11(l); - var hr = height$11(r); + let hl = height$11(l); + let hr = height$11(r); return /* Node */{ l: l, v: x, @@ -72388,14 +72388,14 @@ function create$12(l, x, d, r) { } function bal$11(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$11(ll) >= height$11(lr)) { return create$12(ll, lv, ld, create$12(lr, x, d, r)); } @@ -72422,10 +72422,10 @@ function bal$11(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$11(rr) >= height$11(rl)) { return create$12(create$12(l, x, d, rl), rv, rd, rr); } @@ -72453,11 +72453,11 @@ function add$13(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$6.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$6.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -72472,14 +72472,14 @@ function add$13(x, data, m) { } } if (c < 0) { - var ll = add$13(x, data, l); + let ll = add$13(x, data, l); if (l === ll) { return m; } else { return bal$11(ll, v, d, r); } } - var rr = add$13(x, data, r); + let rr = add$13(x, data, r); if (r === rr) { return m; } else { @@ -72489,9 +72489,9 @@ function add$13(x, data, m) { function find$6(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$6.compare, x, param.v); + let c = Curry._2(funarg$6.compare, x, param.v); if (c === 0) { return param.d; } @@ -72505,15 +72505,15 @@ function find$6(x, _param) { } function check_coherence(env, loc, id, decl) { - var match = decl.type_kind; + let match = decl.type_kind; if (typeof match === "number" && !match) { return ; } - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty === undefined) { return ; } - var match$1 = repr(ty).desc; + let match$1 = repr(ty).desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -72526,11 +72526,11 @@ function check_coherence(env, loc, id, decl) { }); } if (match$1.TAG === /* Tconstr */3) { - var args = match$1._1; - var path = match$1._0; + let args = match$1._1; + let path = match$1._0; try { - var decl$p = find_type_full(path, env)[0]; - var err = Stdlib__List.length(args) !== Stdlib__List.length(decl.type_params) ? ({ + let decl$p = find_type_full(path, env)[0]; + let err = Stdlib__List.length(args) !== Stdlib__List.length(decl.type_params) ? ({ hd: /* Arity */0, tl: /* [] */0 }) : ( @@ -72553,7 +72553,7 @@ function check_coherence(env, loc, id, decl) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -72580,14 +72580,14 @@ function check_coherence(env, loc, id, decl) { } function check_well_founded(env, loc, path, to_check, ty) { - var visited = { + let visited = { contents: /* Empty */0 }; - var check = function (ty0, exp_nodes, ty) { - var ty$1 = repr(ty); + let check = function (ty0, exp_nodes, ty) { + let ty$1 = repr(ty); if (Curry._2(mem$3, ty$1, exp_nodes)) { - var match = ty0.desc; - var tmp; + let match = ty0.desc; + let tmp; tmp = typeof match === "number" || match.TAG !== /* Tconstr */3 ? false : same(match._0, path); if (tmp) { throw new Caml_js_exceptions.MelangeError($$Error$8, { @@ -72609,9 +72609,9 @@ function check_well_founded(env, loc, path, to_check, ty) { } }); } - var match$1; + let match$1; try { - var prev = Curry._2(find$1, ty$1, visited.contents); + let prev = Curry._2(find$1, ty$1, visited.contents); match$1 = Curry._2(subset$1, exp_nodes, prev) ? [ true, exp_nodes @@ -72621,7 +72621,7 @@ function check_well_founded(env, loc, path, to_check, ty) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { match$1 = [ false, @@ -72631,14 +72631,14 @@ function check_well_founded(env, loc, path, to_check, ty) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var exp_nodes$1 = match$1[1]; - var snap = snapshot(undefined); + let exp_nodes$1 = match$1[1]; + let snap = snapshot(undefined); if (match$1[0]) { return ; } try { visited.contents = Curry._3(add$4, ty$1, exp_nodes$1, visited.contents); - var match$2 = ty$1.desc; + let match$2 = ty$1.desc; if (typeof match$2 === "number") { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand @@ -72646,8 +72646,8 @@ function check_well_founded(env, loc, path, to_check, ty) { } if (match$2.TAG === /* Tconstr */3) { if (!Curry._1(is_empty$2, exp_nodes$1) || Curry._1(to_check, match$2._0)) { - var ty$p = try_expand_once_opt(env, ty$1); - var ty0$1 = Curry._1(is_empty$2, exp_nodes$1) ? ty$1 : ty0; + let ty$p = try_expand_once_opt(env, ty$1); + let ty0$1 = Curry._1(is_empty$2, exp_nodes$1) ? ty$1 : ty0; return check(ty0$1, Curry._2(add$3, ty$1, exp_nodes$1), ty$p); } throw new Caml_js_exceptions.MelangeError(Cannot_expand, { @@ -72659,12 +72659,12 @@ function check_well_founded(env, loc, path, to_check, ty) { }); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Cannot_expand) { - var tmp$1 = true; + let tmp$1 = true; if (!(recursive_types.contents && is_contractive(env, ty$1))) { - var match$3 = ty$1.desc; - var tmp$2; + let match$3 = ty$1.desc; + let tmp$2; if (typeof match$3 === "number") { tmp$2 = false; } else { @@ -72679,7 +72679,7 @@ function check_well_founded(env, loc, path, to_check, ty) { } tmp$1 = tmp$2; } - var nodes = tmp$1 ? /* Empty */0 : exp_nodes$1; + let nodes = tmp$1 ? /* Empty */0 : exp_nodes$1; return iter_type_expr((function (param) { return check(ty0, nodes, param); }), ty$1); @@ -72696,12 +72696,12 @@ function check_well_founded(env, loc, path, to_check, ty) { } function check_well_founded_decl(env, loc, path, decl, to_check) { - var it_it_type_expr = function (param) { + let it_it_type_expr = function (param) { return function (param) { return check_well_founded(env, loc, path, to_check, param); }; }; - var it = { + let it = { it_signature: it_signature, it_signature_item: it_signature_item, it_value_description: it_value_description, @@ -72725,13 +72725,13 @@ function check_recursion(env, loc, path, decl, to_check) { if (Caml_obj.caml_equal(decl.type_params, /* [] */0)) { return ; } - var visited = { + let visited = { contents: /* [] */0 }; - var check_regular = function (cpath, args, prev_exp, _ty) { + let check_regular = function (cpath, args, prev_exp, _ty) { while(true) { - var ty = _ty; - var ty$1 = repr(ty); + let ty = _ty; + let ty$1 = repr(ty); if (Stdlib__List.memq(ty$1, visited.contents)) { return ; } @@ -72739,7 +72739,7 @@ function check_recursion(env, loc, path, decl, to_check) { hd: ty$1, tl: visited.contents }; - var match = ty$1.desc; + let match = ty$1.desc; if (typeof match === "number") { return iter_type_expr((function (param) { return check_regular(cpath, args, prev_exp, param); @@ -72747,8 +72747,8 @@ function check_recursion(env, loc, path, decl, to_check) { } switch (match.TAG | 0) { case /* Tconstr */3 : - var args$p = match._1; - var path$p = match._0; + let args$p = match._1; + let path$p = match._0; if (same(path, path$p)) { if (!equal$5(env, false, args, args$p)) { throw new Caml_js_exceptions.MelangeError($$Error$8, { @@ -72765,16 +72765,16 @@ function check_recursion(env, loc, path, decl, to_check) { } else if (Curry._1(to_check, path$p) && !Stdlib__List.mem(path$p, prev_exp)) { try { - var match$1 = find_type_expansion(path$p, env); - var params0 = match$1[0]; - var match$2 = instance_parameterized_type(undefined, params0, match$1[1]); + let match$1 = find_type_expansion(path$p, env); + let params0 = match$1[0]; + let match$2 = instance_parameterized_type(undefined, params0, match$1[1]); try { Stdlib__List.iter2((function (param, param$1) { return unify$2(env, param, param$1); }), match$2[0], args$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -72794,7 +72794,7 @@ function check_recursion(env, loc, path, decl, to_check) { }, match$2[1]); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } @@ -72805,7 +72805,7 @@ function check_recursion(env, loc, path, decl, to_check) { return check_regular(cpath, args, prev_exp, param); }), args$p); case /* Tpoly */10 : - var match$3 = instance_poly(true, false, match._1, match._0); + let match$3 = instance_poly(true, false, match._1, match._0); _ty = match$3[1]; continue ; default: @@ -72816,7 +72816,7 @@ function check_recursion(env, loc, path, decl, to_check) { }; }; may((function (body) { - var match = instance_parameterized_type(true, decl.type_params, body); + let match = instance_parameterized_type(true, decl.type_params, body); check_regular(path, match[0], /* [] */0, match[1]); }), decl.type_manifest); } @@ -72826,7 +72826,7 @@ function get_variance(ty, visited) { return Curry._2(find$1, ty, visited.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Types_Variance.$$null; } @@ -72835,30 +72835,30 @@ function get_variance(ty, visited) { } function compute_variance(env, visited, vari, ty) { - var compute_variance_rec = function (_vari, _ty) { + let compute_variance_rec = function (_vari, _ty) { while(true) { - var ty = _ty; - var vari = _vari; - var ty$1 = repr(ty); - var vari$p = get_variance(ty$1, visited); + let ty = _ty; + let vari = _vari; + let ty$1 = repr(ty); + let vari$p = get_variance(ty$1, visited); if (Curry._2(Types_Variance.subset, vari, vari$p)) { return ; } - var vari$1 = Curry._2(Types_Variance.union, vari, vari$p); + let vari$1 = Curry._2(Types_Variance.union, vari, vari$p); visited.contents = Curry._3(add$4, ty$1, vari$1, visited.contents); - var compute_same = (function(vari$1){ + let compute_same = (function(vari$1){ return function compute_same(param) { return compute_variance_rec(vari$1, param); } }(vari$1)); - var tl = ty$1.desc; + let tl = ty$1.desc; if (typeof tl === "number") { return ; } switch (tl.TAG | 0) { case /* Tarrow */1 : - var v = Curry._1(Types_Variance.conjugate, vari$1); - var v1 = Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v) ? Curry._3(Types_Variance.set, /* May_weak */2, true, v) : v; + let v = Curry._1(Types_Variance.conjugate, vari$1); + let v1 = Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v) ? Curry._3(Types_Variance.set, /* May_weak */2, true, v) : v; compute_variance_rec(v1, tl._1); _ty = tl._2; _vari = vari$1; @@ -72866,29 +72866,29 @@ function compute_variance(env, visited, vari, ty) { case /* Ttuple */2 : return Stdlib__List.iter(compute_same, tl._0); case /* Tconstr */3 : - var tl$1 = tl._1; + let tl$1 = tl._1; if (Caml_obj.caml_equal(tl$1, /* [] */0)) { return ; } try { - var decl = find_type_full(tl._0, env)[0]; + let decl = find_type_full(tl._0, env)[0]; return Stdlib__List.iter2((function(vari$1){ return function (ty, v) { - var strict = Curry._2(Types_Variance.mem, /* Inv */6, vari$1) && Curry._2(Types_Variance.mem, /* Inj */3, v) || (Curry._2(Types_Variance.mem, /* Pos */4, vari$1) || Curry._2(Types_Variance.mem, /* Neg */5, vari$1)) && Curry._2(Types_Variance.mem, /* Inv */6, v); + let strict = Curry._2(Types_Variance.mem, /* Inv */6, vari$1) && Curry._2(Types_Variance.mem, /* Inj */3, v) || (Curry._2(Types_Variance.mem, /* Pos */4, vari$1) || Curry._2(Types_Variance.mem, /* Neg */5, vari$1)) && Curry._2(Types_Variance.mem, /* Inv */6, v); if (strict) { return compute_variance_rec(Types_Variance.full, ty); } - var p1 = Curry._2(Types_Variance.inter, v, vari$1); - var n1 = Curry._2(Types_Variance.inter, v, Curry._1(Types_Variance.conjugate, vari$1)); - var v1 = Curry._2(Types_Variance.union, Curry._2(Types_Variance.inter, Types_Variance.covariant, Curry._2(Types_Variance.union, p1, Curry._1(Types_Variance.conjugate, p1))), Curry._2(Types_Variance.inter, Curry._1(Types_Variance.conjugate, Types_Variance.covariant), Curry._2(Types_Variance.union, n1, Curry._1(Types_Variance.conjugate, n1)))); - var weak = Curry._2(Types_Variance.mem, /* May_weak */2, vari$1) && (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) || (Curry._2(Types_Variance.mem, /* May_pos */0, vari$1) || Curry._2(Types_Variance.mem, /* May_neg */1, vari$1)) && Curry._2(Types_Variance.mem, /* May_weak */2, v); - var v2 = Curry._3(Types_Variance.set, /* May_weak */2, weak, v1); + let p1 = Curry._2(Types_Variance.inter, v, vari$1); + let n1 = Curry._2(Types_Variance.inter, v, Curry._1(Types_Variance.conjugate, vari$1)); + let v1 = Curry._2(Types_Variance.union, Curry._2(Types_Variance.inter, Types_Variance.covariant, Curry._2(Types_Variance.union, p1, Curry._1(Types_Variance.conjugate, p1))), Curry._2(Types_Variance.inter, Curry._1(Types_Variance.conjugate, Types_Variance.covariant), Curry._2(Types_Variance.union, n1, Curry._1(Types_Variance.conjugate, n1)))); + let weak = Curry._2(Types_Variance.mem, /* May_weak */2, vari$1) && (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) || (Curry._2(Types_Variance.mem, /* May_pos */0, vari$1) || Curry._2(Types_Variance.mem, /* May_neg */1, vari$1)) && Curry._2(Types_Variance.mem, /* May_weak */2, v); + let v2 = Curry._3(Types_Variance.set, /* May_weak */2, weak, v1); compute_variance_rec(v2, ty); } }(vari$1)), tl$1, decl.type_variance); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__List.iter((function (param) { return compute_variance_rec(Types_Variance.may_inv, param); @@ -72902,22 +72902,22 @@ function compute_variance(env, visited, vari, ty) { _vari = vari$1; continue ; case /* Tvariant */8 : - var row = row_repr_aux(/* [] */0, tl._0); + let row = row_repr_aux(/* [] */0, tl._0); Stdlib__List.iter((function(vari$1){ return function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return ; } if (match.TAG === /* Rpresent */0) { - var ty = match._0; + let ty = match._0; if (ty !== undefined) { return compute_variance_rec(vari$1, ty); } else { return ; } } - var upper = Stdlib__List.fold_left((function (s, f) { + let upper = Stdlib__List.fold_left((function (s, f) { return Curry._3(Types_Variance.set, f, true, s); }), Types_Variance.$$null, { hd: /* May_pos */0, @@ -72929,7 +72929,7 @@ function compute_variance(env, visited, vari, ty) { } } }); - var v = Curry._2(Types_Variance.inter, vari$1, upper); + let v = Curry._2(Types_Variance.inter, vari$1, upper); Stdlib__List.iter((function (param) { return compute_variance_rec(v, param); }), match._1); @@ -72945,7 +72945,7 @@ function compute_variance(env, visited, vari, ty) { _vari = vari$1; continue ; case /* Tpackage */11 : - var v$1 = Curry._2(Types_Variance.mem, /* Pos */4, vari$1) || Curry._2(Types_Variance.mem, /* Neg */5, vari$1) ? Types_Variance.full : Types_Variance.may_inv; + let v$1 = Curry._2(Types_Variance.mem, /* Pos */4, vari$1) || Curry._2(Types_Variance.mem, /* Neg */5, vari$1) ? Types_Variance.full : Types_Variance.may_inv; return Stdlib__List.iter((function(v$1){ return function (param) { return compute_variance_rec(v$1, param); @@ -72964,11 +72964,11 @@ function make(p, n, i) { } function compute_variance_type(env, check, param, decl, tyl) { - var loc = param[1]; - var required = Stdlib__List.map((function (param) { - var i = param[2]; - var n = param[1]; - var c = param[0]; + let loc = param[1]; + let required = Stdlib__List.map((function (param) { + let i = param[2]; + let n = param[1]; + let c = param[0]; if (c || n) { return [ c, @@ -72983,27 +72983,27 @@ function compute_variance_type(env, check, param, decl, tyl) { ]; } }), param[0]); - var params = Stdlib__List.map(repr, decl.type_params); - var tvl = { + let params = Stdlib__List.map(repr, decl.type_params); + let tvl = { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { compute_variance(env, tvl, param[0] ? Types_Variance.full : Types_Variance.covariant, param[1]); }), tyl); if (check) { - var pos = { + let pos = { contents: 0 }; Stdlib__List.iter2((function (ty, param) { - var i = param[2]; - var n = param[1]; - var c = param[0]; + let i = param[2]; + let n = param[1]; + let c = param[0]; pos.contents = pos.contents + 1 | 0; - var $$var = get_variance(ty, tvl); - var match = Curry._1(Types_Variance.get_upper, $$var); - var cn = match[1]; - var co = match[0]; - var ij = Curry._2(Types_Variance.mem, /* Inj */3, $$var); + let $$var = get_variance(ty, tvl); + let match = Curry._1(Types_Variance.get_upper, $$var); + let cn = match[1]; + let co = match[0]; + let ij = Curry._2(Types_Variance.mem, /* Inj */3, $$var); if (!(is_Tvar(ty) && (co && !c || cn && !n || !ij && i))) { return ; } @@ -73026,40 +73026,40 @@ function compute_variance_type(env, check, param, decl, tyl) { } }); }), params, required); - var args = newty2(100000000, { + let args = newty2(100000000, { TAG: /* Ttuple */2, _0: params }); - var fvl = free_variables$1(undefined, args); - var fvl$1 = Stdlib__List.filter((function (v) { + let fvl = free_variables$1(undefined, args); + let fvl$1 = Stdlib__List.filter((function (v) { return !Stdlib__List.memq(v, params); }), fvl); if (!Caml_obj.caml_equal(fvl$1, /* [] */0)) { - var tvl2 = { + let tvl2 = { contents: /* Empty */0 }; Stdlib__List.iter2((function (ty, param) { if (is_Tvar(ty)) { return ; } - var v = param[0] ? ( + let v = param[0] ? ( param[1] ? Types_Variance.full : Types_Variance.covariant ) : Curry._1(Types_Variance.conjugate, Types_Variance.covariant); compute_variance(env, tvl2, v, ty); }), params, required); - var visited = { + let visited = { contents: /* Empty */0 }; - var check$1 = function (ty) { - var ty$1 = repr(ty); + let check$1 = function (ty) { + let ty$1 = repr(ty); if (Curry._2(mem$3, ty$1, visited.contents)) { return ; } - var visited$p = Curry._2(add$3, ty$1, visited.contents); + let visited$p = Curry._2(add$3, ty$1, visited.contents); visited.contents = visited$p; - var v1 = get_variance(ty$1, tvl); - var snap = snapshot(undefined); - var v2 = Curry._3(fold$3, (function (t, vt, v) { + let v1 = get_variance(ty$1, tvl); + let snap = snapshot(undefined); + let v2 = Curry._3(fold$3, (function (t, vt, v) { if (equal$5(env, false, { hd: ty$1, tl: /* [] */0 @@ -73073,19 +73073,19 @@ function compute_variance_type(env, check, param, decl, tyl) { } }), tvl2.contents, Types_Variance.$$null); backtrack(snap); - var match = Curry._1(Types_Variance.get_upper, v1); - var n1 = match[1]; - var c1 = match[0]; - var match$1 = Curry._1(Types_Variance.get_lower, v2); - var n2 = match$1[1]; - var c2 = match$1[0]; + let match = Curry._1(Types_Variance.get_upper, v1); + let n1 = match[1]; + let c1 = match[0]; + let match$1 = Curry._1(Types_Variance.get_lower, v2); + let n2 = match$1[1]; + let c2 = match$1[0]; if (!(c1 && !c2 || n1 && !n2)) { return ; } if (!Stdlib__List.memq(ty$1, fvl$1)) { return iter_type_expr(check$1, ty$1); } - var code = match$1[3] ? ( + let code = match$1[3] ? ( c2 || n2 ? -1 : -3 ) : -2; throw new Caml_js_exceptions.MelangeError($$Error$8, { @@ -73114,21 +73114,21 @@ function compute_variance_type(env, check, param, decl, tyl) { } return Stdlib__List.map2((function (ty, param) { - var v = get_variance(ty, tvl); - var tr = decl.type_private; - var concr = Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0); - var match = tr === /* Private */0 || !is_Tvar(ty) ? [ + let v = get_variance(ty, tvl); + let tr = decl.type_private; + let concr = Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0); + let match = tr === /* Private */0 || !is_Tvar(ty) ? [ param[0], param[1] ] : [ false, false ]; - var n = match[1]; - var p = match[0]; - var i = concr || param[2] && tr === /* Private */0; - var v$1 = Curry._2(Types_Variance.union, v, make(p, n, i)); - var v$2 = concr ? ( + let n = match[1]; + let p = match[0]; + let i = concr || param[2] && tr === /* Private */0; + let v$1 = Curry._2(Types_Variance.union, v, make(p, n, i)); + let v$2 = concr ? ( Curry._2(Types_Variance.mem, /* Pos */4, v$1) && Curry._2(Types_Variance.mem, /* Neg */5, v$1) ? Types_Variance.full : ( is_Tvar(ty) ? v$1 : Curry._2(Types_Variance.union, v$1, p ? ( n ? Types_Variance.full : Types_Variance.covariant @@ -73153,7 +73153,7 @@ function add_false(param) { } function constrained(env, vars, ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number" || match.TAG !== /* Tvar */0) { return true; } else { @@ -73164,9 +73164,9 @@ function constrained(env, vars, ty) { } function compute_variance_gadt(env, check, rloc, decl, param) { - var ret_type_opt = param[1]; - var tl = param[0]; - var loc = rloc[1]; + let ret_type_opt = param[1]; + let tl = param[0]; + let loc = rloc[1]; if (ret_type_opt === undefined) { return compute_variance_type(env, check, rloc, { type_params: decl.type_params, @@ -73180,8 +73180,8 @@ function compute_variance_gadt(env, check, rloc, decl, param) { type_attributes: decl.type_attributes }, add_false(tl)); } - var match = repr(ret_type_opt); - var match$1 = match.desc; + let match = repr(ret_type_opt); + let match$1 = match.desc; if (typeof match$1 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -73193,15 +73193,15 @@ function compute_variance_gadt(env, check, rloc, decl, param) { }); } if (match$1.TAG === /* Tconstr */3) { - var tyl = Stdlib__List.map(repr, match$1._1); - var fvl = Stdlib__List.map((function (param) { + let tyl = Stdlib__List.map(repr, match$1._1); + let fvl = Stdlib__List.map((function (param) { return free_variables$1(undefined, param); }), tyl); Stdlib__List.fold_left2((function (param, ty, param$1) { - var fv2 = param[1]; + let fv2 = param[1]; if (fv2) { - var fv2$1 = fv2.tl; - var fv1 = param[0]; + let fv2$1 = fv2.tl; + let fv1 = param[0]; if ((param$1[0] || param$1[1]) && constrained(env, Stdlib.$at(fv1, fv2$1), ty)) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -73274,15 +73274,15 @@ function compute_variance_decl(env, check, decl, rloc) { return make(!param[1], !param[0], Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0) || param[2]); }), rloc[0]); } - var ty = decl.type_manifest; - var mn = ty !== undefined ? ({ + let ty = decl.type_manifest; + let mn = ty !== undefined ? ({ hd: [ false, ty ], tl: /* [] */0 }) : /* [] */0; - var tll = decl.type_kind; + let tll = decl.type_kind; if (typeof tll === "number") { return compute_variance_type(env, check, rloc, decl, mn); } @@ -73294,7 +73294,7 @@ function compute_variance_decl(env, check, decl, rloc) { ]; }), tll._0))); } - var tll$1 = tll._0; + let tll$1 = tll._0; if (Stdlib__List.for_all((function (c) { return c.cd_res === undefined; }), tll$1)) { @@ -73302,7 +73302,7 @@ function compute_variance_decl(env, check, decl, rloc) { return c.cd_args; }), tll$1))))); } - var mn$1 = Stdlib__List.map((function (param) { + let mn$1 = Stdlib__List.map((function (param) { return [ { hd: param[1], @@ -73311,17 +73311,17 @@ function compute_variance_decl(env, check, decl, rloc) { undefined ]; }), mn); - var tll$2 = Stdlib.$at(mn$1, Stdlib__List.map((function (c) { + let tll$2 = Stdlib.$at(mn$1, Stdlib__List.map((function (c) { return [ c.cd_args, c.cd_res ]; }), tll$1)); - var match = Stdlib__List.map((function (param) { + let match = Stdlib__List.map((function (param) { return compute_variance_gadt(env, check, rloc, decl, param); }), tll$2); if (match) { - var varl = Stdlib__List.fold_left((function (param, param$1) { + let varl = Stdlib__List.fold_left((function (param, param$1) { return Stdlib__List.map2(Types_Variance.union, param, param$1); }), match.hd, match.tl); return Stdlib__List.map((function (v) { @@ -73343,7 +73343,7 @@ function compute_variance_decl(env, check, decl, rloc) { } function is_sharp(id) { - var s = id.name; + let s = id.name; if (s.length !== 0) { return Caml_string.get(s, 0) === /* '#' */35; } else { @@ -73353,9 +73353,9 @@ function is_sharp(id) { function compute_variance_fixpoint(env, decls, required, _variances) { while(true) { - var variances = _variances; - var new_decls = Stdlib__List.map2((function (param, variance) { - var decl = param[1]; + let variances = _variances; + let new_decls = Stdlib__List.map2((function (param, variance) { + let decl = param[1]; return [ param[0], { @@ -73371,18 +73371,18 @@ function compute_variance_fixpoint(env, decls, required, _variances) { } ]; }), decls, variances); - var new_env = Stdlib__List.fold_right((function (param, env) { + let new_env = Stdlib__List.fold_right((function (param, env) { return add_type$1(true, param[0], param[1], env); }), new_decls, env); - var new_variances = Stdlib__List.map2((function(new_env){ + let new_variances = Stdlib__List.map2((function(new_env){ return function (param) { - var decl = param[1]; + let decl = param[1]; return function (param) { return compute_variance_decl(new_env, false, decl, param); }; } }(new_env)), new_decls, required); - var new_variances$1 = Stdlib__List.map2((function (param, param$1) { + let new_variances$1 = Stdlib__List.map2((function (param, param$1) { return Stdlib__List.map2(Types_Variance.union, param, param$1); }), new_variances, variances); if (Caml_obj.caml_notequal(new_variances$1, variances)) { @@ -73438,9 +73438,9 @@ function add_injectivity(param) { } function compute_variance_decls(env, cldecls) { - var match = Stdlib__List.fold_right((function (param, param$1) { - var ci = param[5]; - var variance = Stdlib__List.map((function (prim) { + let match = Stdlib__List.fold_right((function (param, param$1) { + let ci = param[5]; + let variance = Stdlib__List.map((function (prim) { return prim[1]; }), ci.ci_params); return [ @@ -73463,15 +73463,15 @@ function compute_variance_decls(env, cldecls) { /* [] */0, /* [] */0 ]); - var decls = match[0]; - var variances = Stdlib__List.map(init_variance, decls); - var match$1 = compute_variance_fixpoint(env, decls, match[1], variances); + let decls = match[0]; + let variances = Stdlib__List.map(init_variance, decls); + let match$1 = compute_variance_fixpoint(env, decls, match[1], variances); return Stdlib__List.map2((function (param, param$1) { - var cltydef = param$1[4]; - var clty = param$1[3]; - var cl_abbr = param$1[2]; - var decl = param[1]; - var variance = decl.type_variance; + let cltydef = param$1[4]; + let clty = param$1[3]; + let cl_abbr = param$1[2]; + let decl = param[1]; + let variance = decl.type_variance; return [ decl, { @@ -73507,16 +73507,16 @@ function compute_variance_decls(env, cldecls) { } function check_duplicates(sdecl_list) { - var labels = Stdlib__Hashtbl.create(undefined, 7); - var constrs = Stdlib__Hashtbl.create(undefined, 7); + let labels = Stdlib__Hashtbl.create(undefined, 7); + let constrs = Stdlib__Hashtbl.create(undefined, 7); Stdlib__List.iter((function (sdecl) { - var cl = sdecl.ptype_kind; + let cl = sdecl.ptype_kind; if (typeof cl === "number") { return ; } else if (cl.TAG === /* Ptype_variant */0) { return Stdlib__List.iter((function (pcd) { try { - var name$p = Stdlib__Hashtbl.find(constrs, pcd.pcd_name.txt); + let name$p = Stdlib__Hashtbl.find(constrs, pcd.pcd_name.txt); return prerr_warning(pcd.pcd_loc, { TAG: /* Duplicate_definitions */14, _0: "constructor", @@ -73526,7 +73526,7 @@ function check_duplicates(sdecl_list) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__Hashtbl.add(constrs, pcd.pcd_name.txt, sdecl.ptype_name.txt); } @@ -73535,9 +73535,9 @@ function check_duplicates(sdecl_list) { }), cl._0); } else { return Stdlib__List.iter((function (param) { - var cname = param.pld_name; + let cname = param.pld_name; try { - var name$p = Stdlib__Hashtbl.find(labels, cname.txt); + let name$p = Stdlib__Hashtbl.find(labels, cname.txt); return prerr_warning(param.pld_loc, { TAG: /* Duplicate_definitions */14, _0: "label", @@ -73547,7 +73547,7 @@ function check_duplicates(sdecl_list) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__Hashtbl.add(labels, cname.txt, sdecl.ptype_name.txt); } @@ -73559,7 +73559,7 @@ function check_duplicates(sdecl_list) { } function name_recursion(sdecl, id, decl) { - var match = decl.type_kind; + let match = decl.type_kind; if (typeof match !== "number") { return decl; } @@ -73569,27 +73569,27 @@ function name_recursion(sdecl, id, decl) { if (decl.type_private) { return decl; } - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty === undefined) { return decl; } if (!is_fixed_type(sdecl)) { return decl; } - var ty$1 = repr(ty); - var ty$p = newty2(ty$1.level, ty$1.desc); + let ty$1 = repr(ty); + let ty$p = newty2(ty$1.level, ty$1.desc); if (!deep_occur(ty$1, ty$p)) { return decl; } - var td_0 = { + let td_0 = { TAG: /* Pident */0, _0: id }; - var td_1 = decl.type_params; - var td_2 = { + let td_1 = decl.type_params; + let td_2 = { contents: /* Mnil */0 }; - var td = { + let td = { TAG: /* Tconstr */3, _0: td_0, _1: td_1, @@ -73610,11 +73610,11 @@ function name_recursion(sdecl, id, decl) { } function transl_type_decl(env, rec_flag, sdecl_list) { - var fixed_types = Stdlib__List.filter(is_fixed_type, sdecl_list); - var sdecl_list$1 = Stdlib.$at(Stdlib__List.map((function (sdecl) { - var ptype_name_txt = sdecl.ptype_name.txt + "#row"; - var ptype_name_loc = sdecl.ptype_name.loc; - var ptype_name = { + let fixed_types = Stdlib__List.filter(is_fixed_type, sdecl_list); + let sdecl_list$1 = Stdlib.$at(Stdlib__List.map((function (sdecl) { + let ptype_name_txt = sdecl.ptype_name.txt + "#row"; + let ptype_name_loc = sdecl.ptype_name.loc; + let ptype_name = { txt: ptype_name_txt, loc: ptype_name_loc }; @@ -73629,20 +73629,20 @@ function transl_type_decl(env, rec_flag, sdecl_list) { ptype_loc: sdecl.ptype_loc }; }), fixed_types), sdecl_list); - var id_list = Stdlib__List.map((function (sdecl) { + let id_list = Stdlib__List.map((function (sdecl) { return create(sdecl.ptype_name.txt); }), sdecl_list$1); init_def(currentstamp.contents); begin_def(undefined); - var temp_env = rec_flag ? Stdlib__List.fold_left2(enter_type$1, env, sdecl_list$1, id_list) : env; - var current_slot = { + let temp_env = rec_flag ? Stdlib__List.fold_left2(enter_type$1, env, sdecl_list$1, id_list) : env; + let current_slot = { contents: undefined }; - var warn_unused = is_active({ + let warn_unused = is_active({ TAG: /* Unused_type_declaration */18, _0: "" }); - var id_slots = function (id) { + let id_slots = function (id) { if (!rec_flag) { return [ id, @@ -73655,16 +73655,16 @@ function transl_type_decl(env, rec_flag, sdecl_list) { undefined ]; } - var slot = { + let slot = { contents: /* [] */0 }; - var td = find_type_full({ + let td = find_type_full({ TAG: /* Pident */0, _0: id }, temp_env)[0]; - var name = id.name; + let name = id.name; set_type_used_callback(name, td, (function (old_callback) { - var slot$1 = current_slot.contents; + let slot$1 = current_slot.contents; if (slot$1 !== undefined) { slot$1.contents = { hd: [ @@ -73686,24 +73686,24 @@ function transl_type_decl(env, rec_flag, sdecl_list) { slot ]; }; - var transl_declaration = function (name_sdecl, param) { + let transl_declaration = function (name_sdecl, param) { current_slot.contents = param[1]; - var id = param[0]; + let id = param[0]; reset_type_variables(undefined); begin_def(undefined); - var tparams = make_params(temp_env, name_sdecl.ptype_params); - var params = Stdlib__List.map((function (param) { + let tparams = make_params(temp_env, name_sdecl.ptype_params); + let params = Stdlib__List.map((function (param) { return param[0].ctyp_type; }), tparams); - var cstrs = Stdlib__List.map((function (param) { + let cstrs = Stdlib__List.map((function (param) { return [ transl_simple_type(temp_env, false, param[0]), transl_simple_type(temp_env, false, param[1]), param[2] ]; }), name_sdecl.ptype_cstrs); - var scstrs = name_sdecl.ptype_kind; - var match; + let scstrs = name_sdecl.ptype_kind; + let match; if (typeof scstrs === "number") { match = scstrs === /* Ptype_abstract */0 ? [ /* Ttype_abstract */0, @@ -73713,15 +73713,15 @@ function transl_type_decl(env, rec_flag, sdecl_list) { /* Type_open */1 ]; } else if (scstrs.TAG === /* Ptype_variant */0) { - var scstrs$1 = scstrs._0; + let scstrs$1 = scstrs._0; if (Caml_obj.caml_equal(scstrs$1, /* [] */0)) { ill_formed_ast(name_sdecl.ptype_loc, "Variant types cannot be empty."); } - var all_constrs = { + let all_constrs = { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { - var name = param.pcd_name.txt; + let name = param.pcd_name.txt; if (Curry._2(mem$6, name, all_constrs.contents)) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -73743,18 +73743,18 @@ function transl_type_decl(env, rec_flag, sdecl_list) { _2: /* Too_many_constructors */1 }); } - var make_cstr = function (scstr) { - var name = create(scstr.pcd_name.txt); - var match = make_constructor(temp_env, { + let make_cstr = function (scstr) { + let name = create(scstr.pcd_name.txt); + let match = make_constructor(temp_env, { TAG: /* Pident */0, _0: id }, params, scstr.pcd_args, scstr.pcd_res); - var tcstr_cd_name = scstr.pcd_name; - var tcstr_cd_args = match[0]; - var tcstr_cd_res = match[1]; - var tcstr_cd_loc = scstr.pcd_loc; - var tcstr_cd_attributes = scstr.pcd_attributes; - var tcstr = { + let tcstr_cd_name = scstr.pcd_name; + let tcstr_cd_args = match[0]; + let tcstr_cd_res = match[1]; + let tcstr_cd_loc = scstr.pcd_loc; + let tcstr_cd_attributes = scstr.pcd_attributes; + let tcstr = { cd_id: name, cd_name: tcstr_cd_name, cd_args: tcstr_cd_args, @@ -73762,11 +73762,11 @@ function transl_type_decl(env, rec_flag, sdecl_list) { cd_loc: tcstr_cd_loc, cd_attributes: tcstr_cd_attributes }; - var cstr_cd_args = match[2]; - var cstr_cd_res = match[3]; - var cstr_cd_loc = scstr.pcd_loc; - var cstr_cd_attributes = scstr.pcd_attributes; - var cstr = { + let cstr_cd_args = match[2]; + let cstr_cd_res = match[3]; + let cstr_cd_loc = scstr.pcd_loc; + let cstr_cd_attributes = scstr.pcd_attributes; + let cstr = { cd_id: name, cd_args: cstr_cd_args, cd_res: cstr_cd_res, @@ -73778,7 +73778,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { cstr ]; }; - var match$1 = Stdlib__List.split(Stdlib__List.map(make_cstr, scstrs$1)); + let match$1 = Stdlib__List.split(Stdlib__List.map(make_cstr, scstrs$1)); match = [ { TAG: /* Ttype_variant */0, @@ -73790,15 +73790,15 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } ]; } else { - var lbls = scstrs._0; + let lbls = scstrs._0; if (Caml_obj.caml_equal(lbls, /* [] */0)) { ill_formed_ast(name_sdecl.ptype_loc, "Records cannot be empty."); } - var all_labels = { + let all_labels = { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { - var name = param.pld_name.txt; + let name = param.pld_name.txt; if (Curry._2(mem$6, name, all_labels.contents)) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -73811,10 +73811,10 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } all_labels.contents = Curry._2(add$12, name, all_labels.contents); }), lbls); - var lbls$1 = Stdlib__List.map((function (param) { - var name = param.pld_name; - var arg = force_poly(param.pld_type); - var cty = transl_simple_type(temp_env, true, arg); + let lbls$1 = Stdlib__List.map((function (param) { + let name = param.pld_name; + let arg = force_poly(param.pld_type); + let cty = transl_simple_type(temp_env, true, arg); return { ld_id: create(name.txt), ld_name: name, @@ -73824,10 +73824,10 @@ function transl_type_decl(env, rec_flag, sdecl_list) { ld_attributes: param.pld_attributes }; }), lbls); - var lbls$p = Stdlib__List.map((function (ld) { - var ty = ld.ld_type.ctyp_type; - var match = ty.desc; - var ty$1; + let lbls$p = Stdlib__List.map((function (ld) { + let ty = ld.ld_type.ctyp_type; + let match = ty.desc; + let ty$1; ty$1 = typeof match === "number" || !(match.TAG === /* Tpoly */10 && !match._1) ? ty : match._0; return { ld_id: ld.ld_id, @@ -73837,10 +73837,10 @@ function transl_type_decl(env, rec_flag, sdecl_list) { ld_attributes: ld.ld_attributes }; }), lbls$1); - var rep = Stdlib__List.for_all((function (l) { - var ty = l.ld_type; - var match = repr(expand_head_opt(temp_env, ty)); - var match$1 = match.desc; + let rep = Stdlib__List.for_all((function (l) { + let ty = l.ld_type; + let match = repr(expand_head_opt(temp_env, ty)); + let match$1 = match.desc; if (typeof match$1 === "number" || match$1.TAG !== /* Tconstr */3) { return false; } else { @@ -73859,11 +73859,11 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } ]; } - var sty = name_sdecl.ptype_manifest; - var match$2; + let sty = name_sdecl.ptype_manifest; + let match$2; if (sty !== undefined) { - var no_row = !is_fixed_type(name_sdecl); - var cty = transl_simple_type(temp_env, no_row, sty); + let no_row = !is_fixed_type(name_sdecl); + let cty = transl_simple_type(temp_env, no_row, sty); match$2 = [ cty, cty.ctyp_type @@ -73874,16 +73874,16 @@ function transl_type_decl(env, rec_flag, sdecl_list) { undefined ]; } - var man = match$2[1]; - var decl_type_arity = Stdlib__List.length(params); - var decl_type_kind = match[1]; - var decl_type_private = name_sdecl.ptype_private; - var decl_type_variance = Stdlib__List.map((function (param) { + let man = match$2[1]; + let decl_type_arity = Stdlib__List.length(params); + let decl_type_kind = match[1]; + let decl_type_private = name_sdecl.ptype_private; + let decl_type_variance = Stdlib__List.map((function (param) { return Types_Variance.full; }), params); - var decl_type_loc = name_sdecl.ptype_loc; - var decl_type_attributes = name_sdecl.ptype_attributes; - var decl = { + let decl_type_loc = name_sdecl.ptype_loc; + let decl_type_attributes = name_sdecl.ptype_attributes; + let decl = { type_params: params, type_arity: decl_type_arity, type_kind: decl_type_kind, @@ -73895,13 +73895,13 @@ function transl_type_decl(env, rec_flag, sdecl_list) { type_attributes: decl_type_attributes }; Stdlib__List.iter((function (param) { - var ty = param[0].ctyp_type; - var ty$p = param[1].ctyp_type; + let ty = param[0].ctyp_type; + let ty$p = param[1].ctyp_type; try { return unify$2(temp_env, ty, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -73918,7 +73918,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }), cstrs); end_def(undefined); if (is_fixed_type(name_sdecl)) { - var match$3; + let match$3; try { match$3 = lookup_type$1({ TAG: /* Lident */0, @@ -73926,7 +73926,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }, temp_env); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -73964,8 +73964,8 @@ function transl_type_decl(env, rec_flag, sdecl_list) { typ_attributes: name_sdecl.ptype_attributes }; }; - var tdecls = Stdlib__List.map2(transl_declaration, sdecl_list$1, Stdlib__List.map(id_slots, id_list)); - var decls = Stdlib__List.map((function (tdecl) { + let tdecls = Stdlib__List.map2(transl_declaration, sdecl_list$1, Stdlib__List.map(id_slots, id_list)); + let decls = Stdlib__List.map((function (tdecl) { return [ tdecl.typ_id, tdecl.typ_type @@ -73973,29 +73973,29 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }), tdecls); current_slot.contents = undefined; check_duplicates(sdecl_list$1); - var newenv = Stdlib__List.fold_right((function (param, env) { + let newenv = Stdlib__List.fold_right((function (param, env) { return add_type$1(true, param[0], param[1], env); }), decls, env); if (rec_flag) { Stdlib__List.iter2((function (id, sdecl) { - var loc = sdecl.ptype_loc; - var path = { + let loc = sdecl.ptype_loc; + let path = { TAG: /* Pident */0, _0: id }; - var decl = find_type_full(path, temp_env)[0]; - var ty = decl.type_manifest; + let decl = find_type_full(path, temp_env)[0]; + let ty = decl.type_manifest; if (ty === undefined) { return ; } - var params = Stdlib__List.map((function (param) { + let params = Stdlib__List.map((function (param) { return newvar(undefined, undefined); }), decl.type_params); try { return unify$2(newenv, newconstr(path, params), ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74015,31 +74015,31 @@ function transl_type_decl(env, rec_flag, sdecl_list) { Stdlib__List.iter((function (param) { generalize_decl(param[1]); }), decls); - var id_loc_list = Stdlib__List.map2((function (id, sdecl) { + let id_loc_list = Stdlib__List.map2((function (id, sdecl) { return [ id, sdecl.ptype_loc ]; }), id_list, sdecl_list$1); Stdlib__List.iter((function (param) { - var id = param[0]; - var loc = Stdlib__List.assoc(id, id_loc_list); - var path = { + let id = param[0]; + let loc = Stdlib__List.assoc(id, id_loc_list); + let path = { TAG: /* Pident */0, _0: id }; - var decl = param[1]; + let decl = param[1]; if (decl.type_manifest === undefined) { return ; } - var args = Stdlib__List.map((function (param) { + let args = Stdlib__List.map((function (param) { return newvar(undefined, undefined); }), decl.type_params); check_well_founded(newenv, loc, path, (function (param) { return same(path, param); }), newconstr(path, args)); }), decls); - var to_check = function (param) { + let to_check = function (param) { switch (param.TAG | 0) { case /* Pident */0 : return Stdlib__List.mem_assoc(param._0, id_loc_list); @@ -74050,23 +74050,23 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } }; Stdlib__List.iter((function (param) { - var id = param[0]; + let id = param[0]; check_well_founded_decl(newenv, Stdlib__List.assoc(id, id_loc_list), { TAG: /* Pident */0, _0: id }, param[1], to_check); }), decls); Stdlib__List.iter((function (param) { - var decl = param.typ_type; - var id = param.typ_id; + let decl = param.typ_type; + let id = param.typ_id; return check_recursion(newenv, Stdlib__List.assoc(id, id_loc_list), { TAG: /* Pident */0, _0: id }, decl, to_check); }), tdecls); Stdlib__List.iter2((function (sdecl, tdecl) { - var decl = tdecl.typ_type; - var ty = closed_type_decl(decl); + let decl = tdecl.typ_type; + let ty = closed_type_decl(decl); if (ty === undefined) { return ; } @@ -74081,15 +74081,15 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }); }), sdecl_list$1, tdecls); Stdlib__List.iter2((function (param, param$1) { - var decl = param$1[1]; - var visited = { + let decl = param$1[1]; + let visited = { contents: /* Empty */0 }; - var l = decl.type_kind; + let l = decl.type_kind; if (typeof l === "number") { l === /* Type_abstract */0; } else if (l.TAG === /* Type_record */0) { - var find_pl = function (param) { + let find_pl = function (param) { if (typeof param === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -74112,12 +74112,12 @@ function transl_type_decl(env, rec_flag, sdecl_list) { ] }); }; - var pl = find_pl(param.ptype_kind); - var get_loc = function (name, _param) { + let pl = find_pl(param.ptype_kind); + let get_loc = function (name, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var pld = param.hd; + let pld = param.hd; if (name === pld.pld_name.txt) { return pld.pld_type.ptyp_loc; } @@ -74138,7 +74138,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { check_constraints_rec(newenv, get_loc(param.ld_id.name, pl), visited, param.ld_type); }), l._0); } else { - var find_pl$1 = function (param) { + let find_pl$1 = function (param) { if (typeof param === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -74161,19 +74161,19 @@ function transl_type_decl(env, rec_flag, sdecl_list) { ] }); }; - var pl$1 = find_pl$1(param.ptype_kind); - var foldf = function (acc, x) { + let pl$1 = find_pl$1(param.ptype_kind); + let foldf = function (acc, x) { return Curry._3(add$13, x.pcd_name.txt, x, acc); }; - var pl_index = Stdlib__List.fold_left(foldf, /* Empty */0, pl$1); + let pl_index = Stdlib__List.fold_left(foldf, /* Empty */0, pl$1); Stdlib__List.iter((function (param) { - var ret_type = param.cd_res; - var match; + let ret_type = param.cd_res; + let match; try { match = Curry._2(find$6, param.cd_id.name, pl_index); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -74186,7 +74186,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var sret_type = match.pcd_res; + let sret_type = match.pcd_res; Stdlib__List.iter2((function (sty, ty) { check_constraints_rec(newenv, sty.ptyp_loc, visited, ty); }), match.pcd_args, param.cd_args); @@ -74196,12 +74196,12 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }), l._0); } - var ty = decl.type_manifest; + let ty = decl.type_manifest; if (ty === undefined) { return ; } - var sty = param.ptype_manifest; - var sty$1; + let sty = param.ptype_manifest; + let sty$1; if (sty !== undefined) { sty$1 = sty; } else { @@ -74216,14 +74216,14 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } return check_constraints_rec(newenv, sty$1.ptyp_loc, visited, ty); }), sdecl_list$1, decls); - var decls$1 = Stdlib__List.map2((function (sdecl, param) { - var id = param[0]; + let decls$1 = Stdlib__List.map2((function (sdecl, param) { + let id = param[0]; return [ id, name_recursion(sdecl, id, param[1]) ]; }), sdecl_list$1, decls); - var required = Stdlib__List.map((function (sdecl) { + let required = Stdlib__List.map((function (sdecl) { return [ add_injectivity(Stdlib__List.map((function (prim) { return prim[1]; @@ -74231,13 +74231,13 @@ function transl_type_decl(env, rec_flag, sdecl_list) { sdecl.ptype_loc ]; }), sdecl_list$1); - var match = compute_variance_fixpoint(env, decls$1, required, Stdlib__List.map(init_variance, decls$1)); - var final_env = match[1]; - var final_decls = match[0]; + let match = compute_variance_fixpoint(env, decls$1, required, Stdlib__List.map(init_variance, decls$1)); + let final_env = match[1]; + let final_decls = match[0]; Stdlib__List.iter2((function (param, param$1) { return check_coherence(final_env, param.ptype_loc, param$1[0], param$1[1]); }), sdecl_list$1, final_decls); - var final_decls$1 = Stdlib__List.map2((function (tdecl, param) { + let final_decls$1 = Stdlib__List.map2((function (tdecl, param) { return { typ_id: tdecl.typ_id, typ_name: tdecl.typ_name, @@ -74258,11 +74258,11 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } function transl_extension_constructor(env, check_open, type_path, type_params, typext_params, priv, sext) { - var id = create(sext.pext_name.txt); - var lid = sext.pext_kind; - var match; + let id = create(sext.pext_name.txt); + let lid = sext.pext_kind; + let match; if (lid.TAG === /* Pext_decl */0) { - var match$1 = make_constructor(env, type_path, typext_params, lid._0, lid._1); + let match$1 = make_constructor(env, type_path, typext_params, lid._0, lid._1); match = [ match$1[2], match$1[3], @@ -74273,17 +74273,17 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t } ]; } else { - var lid$1 = lid._0; - var cdescr = find_constructor(env, sext.pext_loc, lid$1.txt); - var usage = cdescr.cstr_private === /* Private */0 || priv === /* Public */1 ? /* Positive */0 : /* Privatize */2; + let lid$1 = lid._0; + let cdescr = find_constructor(env, sext.pext_loc, lid$1.txt); + let usage = cdescr.cstr_private === /* Private */0 || priv === /* Public */1 ? /* Positive */0 : /* Privatize */2; mark_constructor(usage, env, last$1(lid$1.txt), cdescr); - var match$2 = instance_constructor(undefined, cdescr); - var args = match$2[0]; - var match$3; + let match$2 = instance_constructor(undefined, cdescr); + let args = match$2[0]; + let match$3; if (cdescr.cstr_generalized) { - var params = instance_list(env, type_params); - var res = newconstr(type_path, params); - var ret_type = newconstr(type_path, params); + let params = instance_list(env, type_params); + let res = newconstr(type_path, params); + let ret_type = newconstr(type_path, params); match$3 = [ res, ret_type @@ -74298,7 +74298,7 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t unify$2(env, match$2[1], match$3[0]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74314,19 +74314,19 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } if (!cdescr.cstr_generalized) { - var vars = free_variables$1(undefined, newty2(100000000, { + let vars = free_variables$1(undefined, newty2(100000000, { TAG: /* Ttuple */2, _0: args })); Stdlib__List.iter((function (ty) { - var match = ty.desc; + let match = ty.desc; if (typeof match === "number") { return ; } if (match.TAG !== /* Tvar */0) { return ; } - var match$1 = match._0; + let match$1 = match._0; if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { ty.desc = { TAG: /* Tvar */0, @@ -74337,8 +74337,8 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t }), typext_params); } - var match$4 = cdescr.cstr_res.desc; - var match$5; + let match$4 = cdescr.cstr_res.desc; + let match$5; if (typeof match$4 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -74350,8 +74350,8 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t }); } if (match$4.TAG === /* Tconstr */3) { - var p = match$4._0; - var decl = find_type_full(p, env)[0]; + let p = match$4._0; + let decl = find_type_full(p, env)[0]; match$5 = [ p, decl.type_params @@ -74366,9 +74366,9 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t ] }); } - var cstr_type_params = match$5[1]; - var cstr_type_path = match$5[0]; - var cstr_types_0 = newty2(100000000, { + let cstr_type_params = match$5[1]; + let cstr_type_path = match$5[0]; + let cstr_types_0 = newty2(100000000, { TAG: /* Tconstr */3, _0: cstr_type_path, _1: cstr_type_params, @@ -74376,11 +74376,11 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t contents: /* Mnil */0 } }); - var cstr_types = { + let cstr_types = { hd: cstr_types_0, tl: cstr_type_params }; - var ext_types_0 = newty2(100000000, { + let ext_types_0 = newty2(100000000, { TAG: /* Tconstr */3, _0: type_path, _1: type_params, @@ -74388,7 +74388,7 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t contents: /* Mnil */0 } }); - var ext_types = { + let ext_types = { hd: ext_types_0, tl: type_params }; @@ -74404,7 +74404,7 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t } }); } - var match$6 = cdescr.cstr_private; + let match$6 = cdescr.cstr_private; if (!match$6 && priv) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74415,8 +74415,8 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t } }); } - var match$7 = cdescr.cstr_tag; - var path; + let match$7 = cdescr.cstr_tag; + let path; switch (match$7.TAG | 0) { case /* Cstr_constant */0 : case /* Cstr_block */1 : @@ -74443,11 +74443,11 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t } ]; } - var ext_ext_args = match[0]; - var ext_ext_ret_type = match[1]; - var ext_ext_loc = sext.pext_loc; - var ext_ext_attributes = sext.pext_attributes; - var ext = { + let ext_ext_args = match[0]; + let ext_ext_ret_type = match[1]; + let ext_ext_loc = sext.pext_loc; + let ext_ext_attributes = sext.pext_attributes; + let ext = { ext_type_path: type_path, ext_type_params: typext_params, ext_args: ext_ext_args, @@ -74469,14 +74469,14 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t function transl_type_extension(check_open, env, loc, styext) { reset_type_variables(undefined); begin_def(undefined); - var match = find_type(env, loc, styext.ptyext_path.txt); - var type_decl = match[1]; - var type_path = match[0]; - var match$1 = type_decl.type_kind; + let match = find_type(env, loc, styext.ptyext_path.txt); + let type_decl = match[1]; + let type_path = match[0]; + let match$1 = type_decl.type_kind; if (typeof match$1 === "number") { if (!match$1 && check_open) { try { - var match$2 = Stdlib__List.find((function (param) { + let match$2 = Stdlib__List.find((function (param) { if (param.pext_kind.TAG === /* Pext_decl */0) { return true; } else { @@ -74493,7 +74493,7 @@ function transl_type_extension(check_open, env, loc, styext) { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -74511,15 +74511,15 @@ function transl_type_extension(check_open, env, loc, styext) { } }); } - var type_variance = Stdlib__List.map((function (v) { - var match = Curry._1(Types_Variance.get_upper, v); + let type_variance = Stdlib__List.map((function (v) { + let match = Curry._1(Types_Variance.get_upper, v); return [ !match[1], !match[0], false ]; }), type_decl.type_variance); - var err = type_decl.type_arity !== Stdlib__List.length(styext.ptyext_params) ? ({ + let err = type_decl.type_arity !== Stdlib__List.length(styext.ptyext_params) ? ({ hd: /* Arity */0, tl: /* [] */0 }) : ( @@ -74551,16 +74551,16 @@ function transl_type_extension(check_open, env, loc, styext) { } }); } - var ttype_params = make_params(env, styext.ptyext_params); - var type_params = Stdlib__List.map((function (param) { + let ttype_params = make_params(env, styext.ptyext_params); + let type_params = Stdlib__List.map((function (param) { return param[0].ctyp_type; }), ttype_params); Stdlib__List.iter2((function (param, param$1) { return unify_var(env, param, param$1); }), instance_list(env, type_decl.type_params), type_params); - var partial_arg = styext.ptyext_private; - var partial_arg$1 = type_decl.type_params; - var constructors = Stdlib__List.map((function (param) { + let partial_arg = styext.ptyext_private; + let partial_arg$1 = type_decl.type_params; + let constructors = Stdlib__List.map((function (param) { return transl_extension_constructor(env, check_open, type_path, partial_arg$1, type_params, partial_arg, param); }), styext.ptyext_constructors); end_def(undefined); @@ -74570,7 +74570,7 @@ function transl_type_extension(check_open, env, loc, styext) { may(generalize, ext.ext_type.ext_ret_type); }), constructors); Stdlib__List.iter((function (ext) { - var ty = closed_extension_constructor(ext.ext_type); + let ty = closed_extension_constructor(ext.ext_type); if (ty === undefined) { return ; } @@ -74590,13 +74590,13 @@ function transl_type_extension(check_open, env, loc, styext) { loc ]); }), constructors); - var newenv = Stdlib__List.fold_left((function (env, ext) { + let newenv = Stdlib__List.fold_left((function (env, ext) { return add_extension(true, ext.ext_id, ext.ext_type, env); }), env, constructors); - var tyext_tyext_txt = styext.ptyext_path; - var tyext_tyext_private = styext.ptyext_private; - var tyext_tyext_attributes = styext.ptyext_attributes; - var tyext = { + let tyext_tyext_txt = styext.ptyext_path; + let tyext_tyext_private = styext.ptyext_private; + let tyext_tyext_attributes = styext.ptyext_attributes; + let tyext = { tyext_path: type_path, tyext_txt: tyext_tyext_txt, tyext_params: ttype_params, @@ -74613,11 +74613,11 @@ function transl_type_extension(check_open, env, loc, styext) { function transl_exception(env, sext) { reset_type_variables(undefined); begin_def(undefined); - var ext = transl_extension_constructor(env, false, path_exn, /* [] */0, /* [] */0, /* Public */1, sext); + let ext = transl_extension_constructor(env, false, path_exn, /* [] */0, /* [] */0, /* Public */1, sext); end_def(undefined); Stdlib__List.iter(generalize, ext.ext_type.ext_args); may(generalize, ext.ext_type.ext_ret_type); - var ty = closed_extension_constructor(ext.ext_type); + let ty = closed_extension_constructor(ext.ext_type); if (ty !== undefined) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74629,7 +74629,7 @@ function transl_exception(env, sext) { } }); } - var newenv = add_extension(true, ext.ext_id, ext.ext_type, env); + let newenv = add_extension(true, ext.ext_id, ext.ext_type, env); return [ ext, newenv @@ -74637,36 +74637,36 @@ function transl_exception(env, sext) { } function customize_arity(arity, pval_attributes) { - var cur_arity = { + let cur_arity = { contents: arity }; Stdlib__List.iter((function (x) { if (x[0].txt !== "internal.arity") { return ; } - var match = x[1]; + let match = x[1]; switch (match.TAG | 0) { case /* PStr */0 : - var match$1 = match._0; + let match$1 = match._0; if (!match$1) { return ; } - var match$2 = match$1.hd.pstr_desc; + let match$2 = match$1.hd.pstr_desc; if (match$2.TAG !== /* Pstr_eval */0) { return ; } - var match$3 = match$2._0.pexp_desc; + let match$3 = match$2._0.pexp_desc; if (match$3.TAG !== /* Pexp_constant */1) { return ; } - var i = match$3._0; + let i = match$3._0; if (i.TAG !== /* Const_int */0) { return ; } if (match$1.tl) { return ; } - var i$1 = i._0; + let i$1 = i._0; if (i$1 < cur_arity.contents) { cur_arity.contents = i$1; return ; @@ -74683,14 +74683,14 @@ function customize_arity(arity, pval_attributes) { } function transl_value_decl(env, loc, valdecl) { - var cty = transl_type_scheme(env, valdecl.pval_type); - var ty = cty.ctyp_type; - var decl = valdecl.pval_prim; - var v; + let cty = transl_type_scheme(env, valdecl.pval_type); + let ty = cty.ctyp_type; + let decl = valdecl.pval_prim; + let v; if (decl) { - var arity$1 = customize_arity(arity(ty), valdecl.pval_attributes); - var prim = parse_declaration(arity$1, decl); - var prim_native_name = prim.prim_native_name; + let arity$1 = customize_arity(arity(ty), valdecl.pval_attributes); + let prim = parse_declaration(arity$1, decl); + let prim_native_name = prim.prim_native_name; if (arity$1 === 0 && !(prim_native_name.length > 3 && prim_native_name[0] === "B" && prim_native_name[1] === "S" && prim_native_name[2] === ":") && (prim.prim_name.length === 0 || Caml_string.get(prim.prim_name, 0) !== /* '%' */37 && Caml_string.get(prim.prim_name, 0) !== /* '#' */35)) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74722,18 +74722,18 @@ function transl_value_decl(env, loc, valdecl) { val_attributes: valdecl.pval_attributes }; } - var match = enter_value((function (s) { + let match = enter_value((function (s) { return { TAG: /* Unused_value_declaration */16, _0: s }; }))(valdecl.pval_name.txt, v, env); - var desc_val_id = match[0]; - var desc_val_name = valdecl.pval_name; - var desc_val_prim = valdecl.pval_prim; - var desc_val_loc = valdecl.pval_loc; - var desc_val_attributes = valdecl.pval_attributes; - var desc = { + let desc_val_id = match[0]; + let desc_val_name = valdecl.pval_name; + let desc_val_prim = valdecl.pval_prim; + let desc_val_loc = valdecl.pval_loc; + let desc_val_attributes = valdecl.pval_attributes; + let desc = { val_id: desc_val_id, val_name: desc_val_name, val_desc: cty, @@ -74752,24 +74752,24 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { mark_type_used(env, id.name, orig_decl); reset_type_variables(undefined); begin_def(undefined); - var tparams = make_params(env, sdecl.ptype_params); - var params = Stdlib__List.map((function (param) { + let tparams = make_params(env, sdecl.ptype_params); + let params = Stdlib__List.map((function (param) { return param[0].ctyp_type; }), tparams); - var orig_decl$1 = instance_declaration(orig_decl); - var arity_ok = Stdlib__List.length(params) === orig_decl$1.type_arity; + let orig_decl$1 = instance_declaration(orig_decl); + let arity_ok = Stdlib__List.length(params) === orig_decl$1.type_arity; if (arity_ok) { Stdlib__List.iter2((function (param, param$1) { return unify_var(env, param, param$1); }), params, orig_decl$1.type_params); } - var constraints = Stdlib__List.map((function (param) { - var loc = param[2]; + let constraints = Stdlib__List.map((function (param) { + let loc = param[2]; try { - var cty = transl_simple_type(env, false, param[0]); - var cty$p = transl_simple_type(env, false, param[1]); - var ty = cty.ctyp_type; - var ty$p = cty$p.ctyp_type; + let cty = transl_simple_type(env, false, param[0]); + let cty$p = transl_simple_type(env, false, param[1]); + let ty = cty.ctyp_type; + let ty$p = cty$p.ctyp_type; unify$2(env, ty, ty$p); return [ cty, @@ -74778,7 +74778,7 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74793,11 +74793,11 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), sdecl.ptype_cstrs); - var no_row = !is_fixed_type(sdecl); - var sty = sdecl.ptype_manifest; - var match; + let no_row = !is_fixed_type(sdecl); + let sty = sdecl.ptype_manifest; + let match; if (sty !== undefined) { - var cty = transl_simple_type(env, no_row, sty); + let cty = transl_simple_type(env, no_row, sty); match = [ cty, cty.ctyp_type @@ -74808,8 +74808,8 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { undefined ]; } - var man = match[1]; - var priv = sdecl.ptype_private === /* Private */0 ? /* Private */0 : ( + let man = match[1]; + let priv = sdecl.ptype_private === /* Private */0 ? /* Private */0 : ( arity_ok && Caml_obj.caml_notequal(orig_decl$1.type_kind, /* Type_abstract */0) ? orig_decl$1.type_private : sdecl.ptype_private ); if (arity_ok && Caml_obj.caml_notequal(orig_decl$1.type_kind, /* Type_abstract */0) && sdecl.ptype_private === /* Private */0) { @@ -74818,11 +74818,11 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { _0: "spurious use of private" }); } - var decl_type_arity = Stdlib__List.length(params); - var decl_type_kind = arity_ok && man !== undefined ? orig_decl$1.type_kind : /* Type_abstract */0; - var decl_type_loc = sdecl.ptype_loc; - var decl_type_attributes = sdecl.ptype_attributes; - var decl = { + let decl_type_arity = Stdlib__List.length(params); + let decl_type_kind = arity_ok && man !== undefined ? orig_decl$1.type_kind : /* Type_abstract */0; + let decl_type_loc = sdecl.ptype_loc; + let decl_type_attributes = sdecl.ptype_attributes; + let decl = { type_params: params, type_arity: decl_type_arity, type_kind: decl_type_kind, @@ -74836,7 +74836,7 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { if (row_path !== undefined) { set_fixed_row(env, sdecl.ptype_loc, row_path, decl); } - var ty = closed_type_decl(decl); + let ty = closed_type_decl(decl); if (ty !== undefined) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, @@ -74848,22 +74848,22 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { } }); } - var decl$1 = name_recursion(sdecl, id, decl); - var decl_type_params = decl$1.type_params; - var decl_type_arity$1 = decl$1.type_arity; - var decl_type_kind$1 = decl$1.type_kind; - var decl_type_private = decl$1.type_private; - var decl_type_manifest = decl$1.type_manifest; - var decl_type_variance = compute_variance_decl(env, false, decl$1, [ + let decl$1 = name_recursion(sdecl, id, decl); + let decl_type_params = decl$1.type_params; + let decl_type_arity$1 = decl$1.type_arity; + let decl_type_kind$1 = decl$1.type_kind; + let decl_type_private = decl$1.type_private; + let decl_type_manifest = decl$1.type_manifest; + let decl_type_variance = compute_variance_decl(env, false, decl$1, [ add_injectivity(Stdlib__List.map((function (prim) { return prim[1]; }), sdecl.ptype_params)), sdecl.ptype_loc ]); - var decl_type_newtype_level = decl$1.type_newtype_level; - var decl_type_loc$1 = decl$1.type_loc; - var decl_type_attributes$1 = decl$1.type_attributes; - var decl$2 = { + let decl_type_newtype_level = decl$1.type_newtype_level; + let decl_type_loc$1 = decl$1.type_loc; + let decl_type_attributes$1 = decl$1.type_attributes; + let decl$2 = { type_params: decl_type_params, type_arity: decl_type_arity$1, type_kind: decl_type_kind$1, @@ -74891,7 +74891,7 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { } function abstract_type_decl(arity) { - var make_params = function (n) { + let make_params = function (n) { if (n <= 0) { return /* [] */0; } else { @@ -74902,9 +74902,9 @@ function abstract_type_decl(arity) { } }; begin_def(undefined); - var decl_type_params = make_params(arity); - var decl_type_variance = replicate_list(Types_Variance.full, arity); - var decl = { + let decl_type_params = make_params(arity); + let decl_type_variance = replicate_list(Types_Variance.full, arity); + let decl = { type_params: decl_type_params, type_arity: arity, type_kind: /* Type_abstract */0, @@ -74931,10 +74931,10 @@ function approx_type_decl(env, sdecl_list) { function explain_unbound(ppf, tv, tl, typ, kwd, lab) { try { - var ti = Stdlib__List.find((function (ti) { + let ti = Stdlib__List.find((function (ti) { return deep_occur(tv, Curry._1(typ, ti)); }), tl); - var ty0 = newty2(100000000, { + let ty0 = newty2(100000000, { TAG: /* Tobject */4, _0: tv, _1: { @@ -75024,7 +75024,7 @@ function explain_unbound(ppf, tv, tl, typ, kwd, lab) { }), kwd, Curry._1(lab, ti), type_expr$1, Curry._1(typ, ti), type_expr$1, tv); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -75240,7 +75240,7 @@ function report_error$5(ppf, param) { _1: "The type abbreviation %s is cyclic" }), param._0); case /* Cycle_in_def */3 : - var ty = param._1; + let ty = param._1; reset(undefined); mark_loops(ty); return Curry._3(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -75290,7 +75290,7 @@ function report_error$5(ppf, param) { _1: "@[The definition of %s contains a cycle:@ %a@]" }), param._0, type_expr$1, ty); case /* Definition_mismatch */4 : - var ty$1 = param._0; + let ty$1 = param._0; reset(undefined); mark_loops(ty$1); return Curry._6(Stdlib__Format.fprintf(ppf)(/* Format */{ @@ -75368,8 +75368,8 @@ function report_error$5(ppf, param) { return report_type_mismatch("the original", "this", "definition", param); }), param._1); case /* Constraint_failed */5 : - var ty$p = param._1; - var ty$2 = param._0; + let ty$p = param._1; + let ty$2 = param._0; reset(undefined); mark_loops(ty$2); mark_loops(ty$p); @@ -75516,8 +75516,8 @@ function report_error$5(ppf, param) { }); })); case /* Parameters_differ */8 : - var ty$p$1 = param._2; - var ty$3 = param._1; + let ty$p$1 = param._2; + let ty$3 = param._1; reset(undefined); mark_loops(ty$3); mark_loops(ty$p$1); @@ -75593,7 +75593,7 @@ function report_error$5(ppf, param) { _1: "@[In the definition of %s, type@ %a@ should be@ %a@]" }), name(undefined, param._0), type_expr$1, ty$3, type_expr$1, ty$p$1); case /* Unbound_type_var */9 : - var decl = param._1; + let decl = param._1; Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String_literal */11, @@ -75602,12 +75602,12 @@ function report_error$5(ppf, param) { }, _1: "A type variable is unbound in this type declaration" }); - var ty$4 = repr(param._0); - var match = decl.type_kind; - var match$1 = decl.type_manifest; + let ty$4 = repr(param._0); + let match = decl.type_kind; + let match$1 = decl.type_manifest; if (typeof match === "number") { if (match === /* Type_abstract */0 && match$1 !== undefined) { - var trivial = function (ty$5) { + let trivial = function (ty$5) { explain_unbound(ppf, ty$4, { hd: ty$5, tl: /* [] */0 @@ -75617,13 +75617,13 @@ function report_error$5(ppf, param) { return ""; })); }; - var row = repr(match$1).desc; + let row = repr(match$1).desc; if (typeof row === "number") { return trivial(match$1); } switch (row.TAG | 0) { case /* Tobject */4 : - var match$2 = flatten_fields(row._0); + let match$2 = flatten_fields(row._0); if (match$2[1] === ty$4) { return trivial(match$1); } else { @@ -75634,12 +75634,12 @@ function report_error$5(ppf, param) { })); } case /* Tvariant */8 : - var row$1 = row_repr_aux(/* [] */0, row._0); + let row$1 = row_repr_aux(/* [] */0, row._0); if (row$1.row_more === ty$4) { return trivial(match$1); } else { return explain_unbound(ppf, ty$4, row$1.row_fields, (function (param) { - var match = row_field_repr_aux(/* [] */0, param[1]); + let match = row_field_repr_aux(/* [] */0, param[1]); if (typeof match === "number") { return newty2(100000000, { TAG: /* Ttuple */2, @@ -75647,7 +75647,7 @@ function report_error$5(ppf, param) { }); } if (match.TAG === /* Rpresent */0) { - var t = match._0; + let t = match._0; if (t !== undefined) { return t; } else { @@ -75657,7 +75657,7 @@ function report_error$5(ppf, param) { }); } } - var match$1 = match._1; + let match$1 = match._1; if (match$1 && !match$1.tl) { return match$1.hd; } else { @@ -75852,7 +75852,7 @@ function report_error$5(ppf, param) { return report_type_mismatch("the type", "this extension", "definition", param); }), param._1); case /* Rebind_wrong_type */13 : - var lid = param._0; + let lid = param._0; return report_unification_error(ppf, param._1, undefined, param._2, (function (ppf) { Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -76037,10 +76037,10 @@ function report_error$5(ppf, param) { _1: "@[%s@ %a@ %s@]" }), "The constructor", longident, param._0, "is private"); case /* Bad_variance */16 : - var n = param._0; - var variance = function (param) { - var n = param[1]; - var inj = param[2] ? "injective " : ""; + let n = param._0; + let variance = function (param) { + let n = param[1]; + let inj = param[2] ? "injective " : ""; if (param[0]) { if (n) { return inj + "invariant"; @@ -76055,9 +76055,9 @@ function report_error$5(ppf, param) { return inj; } }; - var suffix = function (n) { - var teen = (n % 100 / 10 | 0) === 1; - var match = n % 10; + let suffix = function (n) { + let teen = (n % 100 / 10 | 0) === 1; + let match = n % 10; switch (match) { case 1 : if (teen) { @@ -76376,9 +76376,9 @@ register_error_of_exn(function (param) { }); -var $$Error$9 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typeclass.Error"); +let $$Error$9 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typeclass.Error"); -var Error_forward$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typeclass.Error_forward"); +let Error_forward$2 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typeclass.Error_forward"); function ctyp(desc, typ, env, loc) { return { @@ -76390,14 +76390,14 @@ function ctyp(desc, typ, env, loc) { }; } -var unbound_class = { +let unbound_class = { TAG: /* Pident */0, _0: create("") }; function scrape_class_type(_cty) { while(true) { - var cty = _cty; + let cty = _cty; switch (cty.TAG | 0) { case /* Cty_constr */0 : _cty = cty._2; @@ -76412,14 +76412,14 @@ function scrape_class_type(_cty) { function generalize_class_type(gen, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : Stdlib__List.iter(gen, param._1); _param = param._2; continue ; case /* Cty_signature */1 : - var match = param._0; + let match = param._0; Curry._1(gen, match.csig_self); Curry._2(Meths.iter, (function (param, param$1) { Curry._1(gen, param$1[2]); @@ -76437,9 +76437,9 @@ function generalize_class_type(gen, _param) { } function virtual_methods(sign) { - var match = flatten_fields(object_fields(sign.csig_self)); + let match = flatten_fields(object_fields(sign.csig_self)); return Stdlib__List.fold_left((function (virt, param) { - var lab = param[0]; + let lab = param[0]; if (lab === dummy_method || Curry._2(mem$2, lab, sign.csig_concr)) { return virt; } else { @@ -76453,7 +76453,7 @@ function virtual_methods(sign) { function constructor_type(constr, _cty) { while(true) { - var cty = _cty; + let cty = _cty; switch (cty.TAG | 0) { case /* Cty_constr */0 : _cty = cty._2; @@ -76461,10 +76461,10 @@ function constructor_type(constr, _cty) { case /* Cty_signature */1 : return constr; case /* Cty_arrow */2 : - var desc_0 = cty._0; - var desc_1 = cty._1; - var desc_2 = constructor_type(constr, cty._2); - var desc = { + let desc_0 = cty._0; + let desc_1 = cty._1; + let desc_2 = constructor_type(constr, cty._2); + let desc = { TAG: /* Tarrow */1, _0: desc_0, _1: desc_1, @@ -76479,7 +76479,7 @@ function constructor_type(constr, _cty) { function class_body(_cty) { while(true) { - var cty = _cty; + let cty = _cty; switch (cty.TAG | 0) { case /* Cty_constr */0 : case /* Cty_signature */1 : @@ -76493,8 +76493,8 @@ function class_body(_cty) { } function extract_constraints(cty) { - var sign = signature_of_class_type(cty); - var match = flatten_fields(object_fields(sign.csig_self)); + let sign = signature_of_class_type(cty); + let match = flatten_fields(object_fields(sign.csig_self)); return [ Curry._3(Meths.fold, (function (lab, param, vars) { return { @@ -76503,7 +76503,7 @@ function extract_constraints(cty) { }; }), sign.csig_vars, /* [] */0), Stdlib__List.fold_left((function (meths, param) { - var lab = param[0]; + let lab = param[0]; if (lab === dummy_method) { return meths; } else { @@ -76540,14 +76540,14 @@ function abbreviate_class_type(path, params, cty) { function closed_class$1(cty) { if (Stdlib__List.for_all(closed_schema, cty.cty_params)) { - var _param = cty.cty_type; + let _param = cty.cty_type; while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : return Stdlib__List.for_all(closed_schema, param._1); case /* Cty_signature */1 : - var sign = param._0; + let sign = param._0; if (closed_schema(sign.csig_self)) { return Curry._3(Meths.fold, (function (param, param$1, cc) { if (closed_schema(param$1[2])) { @@ -76575,7 +76575,7 @@ function closed_class$1(cty) { function limited_generalize$1(rv, _param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Cty_constr */0 : Stdlib__List.iter((function (param) { @@ -76584,7 +76584,7 @@ function limited_generalize$1(rv, _param) { _param = param._2; continue ; case /* Cty_signature */1 : - var sign = param._0; + let sign = param._0; limited_generalize(rv, sign.csig_self); Curry._2(Meths.iter, (function (param, param$1) { limited_generalize(rv, param$1[2]); @@ -76616,13 +76616,13 @@ function rc(node) { } function enter_met_env(check, loc, lab, kind, ty, val_env, met_env, par_env) { - var match = enter_value(undefined)(lab, { + let match = enter_value(undefined)(lab, { val_type: ty, val_kind: /* Val_unbound */1, val_loc: loc, val_attributes: /* [] */0 }, val_env); - var id = match[0]; + let id = match[0]; return [ id, match[1], @@ -76642,10 +76642,10 @@ function enter_met_env(check, loc, lab, kind, ty, val_env, met_env, par_env) { } function enter_val(cl_num, vars, inh, lab, mut, virt, ty, val_env, met_env, par_env, loc) { - var match; + let match; try { - var match$1 = Curry._2(Meths.find, lab, vars.contents); - var virt$p = match$1[2]; + let match$1 = Curry._2(Meths.find, lab, vars.contents); + let virt$p = match$1[2]; if (match$1[1] !== mut) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -76665,7 +76665,7 @@ function enter_val(cl_num, vars, inh, lab, mut, virt, ty, val_env, met_env, par_ ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -76688,8 +76688,8 @@ function enter_val(cl_num, vars, inh, lab, mut, virt, ty, val_env, met_env, par_ throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var id = match[0]; - var result = id !== undefined ? [ + let id = match[0]; + let result = id !== undefined ? [ id, val_env, met_env, @@ -76719,26 +76719,26 @@ function concr_vals(vars) { } function inheritance(self_type, env, ovf, concr_meths, warn_vals, loc, parent) { - var cl_sig = scrape_class_type(parent); + let cl_sig = scrape_class_type(parent); switch (cl_sig.TAG | 0) { case /* Cty_signature */1 : - var cl_sig$1 = cl_sig._0; + let cl_sig$1 = cl_sig._0; try { unify$2(env, self_type, cl_sig$1.csig_self); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var trace = exn._1; - var exit = 0; + let trace = exn._1; + let exit = 0; if (trace) { - var match = trace.tl; + let match = trace.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { - var match$3 = match$2.hd[0].desc; + let match$3 = match$2.hd[0].desc; if (typeof match$3 === "number") { exit = 1; } else { @@ -76784,12 +76784,12 @@ function inheritance(self_type, env, ovf, concr_meths, warn_vals, loc, parent) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var over_meths = Curry._2(inter$1, cl_sig$1.csig_concr, concr_meths); - var concr_vals$1 = concr_vals(cl_sig$1.csig_vars); - var over_vals = Curry._2(inter$1, concr_vals$1, warn_vals); + let over_meths = Curry._2(inter$1, cl_sig$1.csig_concr, concr_meths); + let concr_vals$1 = concr_vals(cl_sig$1.csig_vars); + let over_vals = Curry._2(inter$1, concr_vals$1, warn_vals); if (ovf !== undefined) { if (ovf) { - var cname; + let cname; switch (parent.TAG | 0) { case /* Cty_constr */0 : cname = name(undefined, parent._0); @@ -76833,8 +76833,8 @@ function inheritance(self_type, env, ovf, concr_meths, warn_vals, loc, parent) { } } - var concr_meths$1 = Curry._2(union$2, cl_sig$1.csig_concr, concr_meths); - var warn_vals$1 = Curry._2(union$2, concr_vals$1, warn_vals); + let concr_meths$1 = Curry._2(union$2, cl_sig$1.csig_concr, concr_meths); + let warn_vals$1 = Curry._2(union$2, concr_vals$1, warn_vals); return [ cl_sig$1, concr_meths$1, @@ -76856,15 +76856,15 @@ function inheritance(self_type, env, ovf, concr_meths, warn_vals, loc, parent) { } function virtual_method(val_env, meths, self_type, lab, priv, sty, loc) { - var match = filter_self_method(val_env, lab, priv, meths, self_type); - var sty$1 = force_poly(sty); - var cty = transl_simple_type(val_env, false, sty$1); - var ty = cty.ctyp_type; + let match = filter_self_method(val_env, lab, priv, meths, self_type); + let sty$1 = force_poly(sty); + let cty = transl_simple_type(val_env, false, sty$1); + let ty = cty.ctyp_type; try { unify$2(val_env, ty, match[1]); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -76883,19 +76883,19 @@ function virtual_method(val_env, meths, self_type, lab, priv, sty, loc) { return cty; } -var delayed_meth_specs = { +let delayed_meth_specs = { contents: /* [] */0 }; function declare_method(val_env, meths, self_type, lab, priv, sty, loc) { - var match = filter_self_method(val_env, lab, priv, meths, self_type); - var ty$p = match[1]; - var unif = function (ty) { + let match = filter_self_method(val_env, lab, priv, meths, self_type); + let ty$p = match[1]; + let unif = function (ty) { try { return unify$2(val_env, ty, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -76912,17 +76912,17 @@ function declare_method(val_env, meths, self_type, lab, priv, sty, loc) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var sty$1 = force_poly(sty); - var match$1 = sty$1.ptyp_desc; + let sty$1 = force_poly(sty); + let match$1 = sty$1.ptyp_desc; if (typeof match$1 !== "number" && match$1.TAG === /* Ptyp_poly */8 && !match$1._0 && priv) { - var sty$p = match$1._1; - var returned_cty = ctyp(/* Ttyp_any */0, newty2(current_level.contents, /* Tnil */0), val_env, loc); + let sty$p = match$1._1; + let returned_cty = ctyp(/* Ttyp_any */0, newty2(current_level.contents, /* Tnil */0), val_env, loc); delayed_meth_specs.contents = { hd: { LAZY_DONE: false, VAL: (function () { - var cty = transl_simple_type_univars(val_env, sty$p); - var ty = cty.ctyp_type; + let cty = transl_simple_type_univars(val_env, sty$p); + let ty = cty.ctyp_type; unif(ty); returned_cty.ctyp_desc = { TAG: /* Ttyp_poly */8, @@ -76936,22 +76936,22 @@ function declare_method(val_env, meths, self_type, lab, priv, sty, loc) { }; return returned_cty; } - var cty = transl_simple_type(val_env, false, sty$1); - var ty = cty.ctyp_type; + let cty = transl_simple_type(val_env, false, sty$1); + let ty = cty.ctyp_type; unif(ty); return cty; } function type_constraint(val_env, sty, sty$p, loc) { - var cty = transl_simple_type(val_env, false, sty); - var ty = cty.ctyp_type; - var cty$p = transl_simple_type(val_env, false, sty$p); - var ty$p = cty$p.ctyp_type; + let cty = transl_simple_type(val_env, false, sty); + let ty = cty.ctyp_type; + let cty$p = transl_simple_type(val_env, false, sty$p); + let ty$p = cty$p.ctyp_type; try { unify$2(val_env, ty, ty$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -76982,15 +76982,15 @@ function make_method(loc, cl_num, expr) { } function add_val(env, loc, lab, param, val_sig) { - var virt = param[1]; - var virt$1; + let virt = param[1]; + let virt$1; try { - var match = Curry._2(Meths.find, lab, val_sig); - var virt$p = match[1]; + let match = Curry._2(Meths.find, lab, val_sig); + let virt$p = match[1]; virt$1 = virt$p === /* Concrete */1 ? virt$p : virt; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { virt$1 = virt; } else { @@ -77005,20 +77005,20 @@ function add_val(env, loc, lab, param, val_sig) { } function class_signature$1(env, param) { - var sty = param.pcsig_self; - var meths = { + let sty = param.pcsig_self; + let meths = { contents: /* Empty */0 }; - var self_cty = transl_simple_type(env, false, sty); - var self_cty$1 = { + let self_cty = transl_simple_type(env, false, sty); + let self_cty$1 = { ctyp_desc: self_cty.ctyp_desc, ctyp_type: expand_head(env, self_cty.ctyp_type), ctyp_env: self_cty.ctyp_env, ctyp_loc: self_cty.ctyp_loc, ctyp_attributes: self_cty.ctyp_attributes }; - var self_type = self_cty$1.ctyp_type; - var dummy_obj = newvar(undefined, undefined); + let self_type = self_cty$1.ctyp_type; + let dummy_obj = newvar(undefined, undefined); unify$2(env, filter_method(env, dummy_method, /* Private */0, dummy_obj), newty2(current_level.contents, { TAG: /* Ttuple */2, _0: /* [] */0 @@ -77027,7 +77027,7 @@ function class_signature$1(env, param) { unify$2(env, self_type, dummy_obj); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77042,26 +77042,26 @@ function class_signature$1(env, param) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } warning_enter_scope(undefined); - var match = Stdlib__List.fold_left((function (param, param$1) { - var inher = param[3]; - var concr_meths = param[2]; - var val_sig = param[1]; - var fields = param[0]; - var loc = param$1.pctf_loc; - var mkctf = function (desc) { + let match = Stdlib__List.fold_left((function (param, param$1) { + let inher = param[3]; + let concr_meths = param[2]; + let val_sig = param[1]; + let fields = param[0]; + let loc = param$1.pctf_loc; + let mkctf = function (desc) { return { ctf_desc: desc, ctf_loc: loc, ctf_attributes: param$1.pctf_attributes }; }; - var sparent = param$1.pctf_desc; + let sparent = param$1.pctf_desc; switch (sparent.TAG | 0) { case /* Pctf_inherit */0 : - var sparent$1 = sparent._0; - var parent = class_type$3(env, sparent$1); - var match = parent.cltyp_type; - var inher$1; + let sparent$1 = sparent._0; + let parent = class_type$3(env, sparent$1); + let match = parent.cltyp_type; + let inher$1; switch (match.TAG | 0) { case /* Cty_constr */0 : inher$1 = { @@ -77078,9 +77078,9 @@ function class_signature$1(env, param) { break; } - var match$1 = inheritance(self_type, env, undefined, concr_meths, /* Empty */0, sparent$1.pcty_loc, parent.cltyp_type); - var partial_arg = sparent$1.pcty_loc; - var val_sig$1 = Curry._3(Meths.fold, (function (param, param$1, param$2) { + let match$1 = inheritance(self_type, env, undefined, concr_meths, /* Empty */0, sparent$1.pcty_loc, parent.cltyp_type); + let partial_arg = sparent$1.pcty_loc; + let val_sig$1 = Curry._3(Meths.fold, (function (param, param$1, param$2) { return add_val(env, partial_arg, param, param$1, param$2); }), match$1[0].csig_vars, val_sig); return [ @@ -77096,12 +77096,12 @@ function class_signature$1(env, param) { inher$1 ]; case /* Pctf_val */1 : - var match$2 = sparent._0; - var virt = match$2[2]; - var mut = match$2[1]; - var lab = match$2[0]; - var cty = transl_simple_type(env, false, match$2[3]); - var ty = cty.ctyp_type; + let match$2 = sparent._0; + let virt = match$2[2]; + let mut = match$2[1]; + let lab = match$2[0]; + let cty = transl_simple_type(env, false, match$2[3]); + let ty = cty.ctyp_type; return [ { hd: mkctf({ @@ -77124,12 +77124,12 @@ function class_signature$1(env, param) { inher ]; case /* Pctf_method */2 : - var match$3 = sparent._0; - var virt$1 = match$3[2]; - var priv = match$3[1]; - var lab$1 = match$3[0]; - var cty$1 = declare_method(env, meths, self_type, lab$1, priv, match$3[3], param$1.pctf_loc); - var concr_meths$1 = virt$1 ? Curry._2(add$2, lab$1, concr_meths) : concr_meths; + let match$3 = sparent._0; + let virt$1 = match$3[2]; + let priv = match$3[1]; + let lab$1 = match$3[0]; + let cty$1 = declare_method(env, meths, self_type, lab$1, priv, match$3[3], param$1.pctf_loc); + let concr_meths$1 = virt$1 ? Curry._2(add$2, lab$1, concr_meths) : concr_meths; return [ { hd: mkctf({ @@ -77148,8 +77148,8 @@ function class_signature$1(env, param) { inher ]; case /* Pctf_constraint */3 : - var match$4 = sparent._0; - var match$5 = type_constraint(env, match$4[0], match$4[1], param$1.pctf_loc); + let match$4 = sparent._0; + let match$5 = type_constraint(env, match$4[0], match$4[1], param$1.pctf_loc); return [ { hd: mkctf({ @@ -77166,7 +77166,7 @@ function class_signature$1(env, param) { inher ]; case /* Pctf_attribute */4 : - var x = sparent._0; + let x = sparent._0; warning_attribute({ hd: x, tl: /* [] */0 @@ -77197,10 +77197,10 @@ function class_signature$1(env, param) { /* [] */0 ], param.pcsig_fields); warning_leave_scope(undefined); - var cty_csig_vars = match[1]; - var cty_csig_concr = match[2]; - var cty_csig_inher = match[3]; - var cty = { + let cty_csig_vars = match[1]; + let cty_csig_concr = match[2]; + let cty_csig_inher = match[3]; + let cty = { csig_self: self_type, csig_vars: cty_csig_vars, csig_concr: cty_csig_concr, @@ -77214,7 +77214,7 @@ function class_signature$1(env, param) { } function class_type$3(env, scty) { - var cltyp = function (desc, typ) { + let cltyp = function (desc, typ) { return { cltyp_desc: desc, cltyp_type: typ, @@ -77223,14 +77223,14 @@ function class_type$3(env, scty) { cltyp_attributes: scty.pcty_attributes }; }; - var pcsig = scty.pcty_desc; + let pcsig = scty.pcty_desc; switch (pcsig.TAG | 0) { case /* Pcty_constr */0 : - var styl = pcsig._1; - var lid = pcsig._0; - var match = find_class_type(env, scty.pcty_loc, lid.txt); - var decl = match[1]; - var path = match[0]; + let styl = pcsig._1; + let lid = pcsig._0; + let match = find_class_type(env, scty.pcty_loc, lid.txt); + let decl = match[1]; + let path = match[0]; if (same(decl.clty_path, unbound_class)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77242,8 +77242,8 @@ function class_type$3(env, scty) { } }); } - var match$1 = instance_class(decl.clty_params, decl.clty_type); - var params = match$1[0]; + let match$1 = instance_class(decl.clty_params, decl.clty_type); + let params = match$1[0]; if (Stdlib__List.length(params) !== Stdlib__List.length(styl)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77257,14 +77257,14 @@ function class_type$3(env, scty) { } }); } - var ctys = Stdlib__List.map2((function (sty, ty) { - var cty$p = transl_simple_type(env, false, sty); - var ty$p = cty$p.ctyp_type; + let ctys = Stdlib__List.map2((function (sty, ty) { + let cty$p = transl_simple_type(env, false, sty); + let ty$p = cty$p.ctyp_type; try { unify$2(env, ty$p, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77280,8 +77280,8 @@ function class_type$3(env, scty) { } return cty$p; }), styl, params); - var typ_2 = match$1[1]; - var typ = { + let typ_2 = match$1[1]; + let typ = { TAG: /* Cty_constr */0, _0: path, _1: params, @@ -77294,8 +77294,8 @@ function class_type$3(env, scty) { _2: ctys }, typ); case /* Pcty_signature */1 : - var clsig = class_signature$1(env, pcsig._0); - var typ$1 = { + let clsig = class_signature$1(env, pcsig._0); + let typ$1 = { TAG: /* Cty_signature */1, _0: clsig.csig_type }; @@ -77304,12 +77304,12 @@ function class_type$3(env, scty) { _0: clsig }, typ$1); case /* Pcty_arrow */2 : - var l = pcsig._0; - var cty = transl_simple_type(env, false, pcsig._1); - var ty = cty.ctyp_type; - var clty = class_type$3(env, pcsig._2); - var typ_2$1 = clty.cltyp_type; - var typ$2 = { + let l = pcsig._0; + let cty = transl_simple_type(env, false, pcsig._1); + let ty = cty.ctyp_type; + let clty = class_type$3(env, pcsig._2); + let typ_2$1 = clty.cltyp_type; + let typ$2 = { TAG: /* Cty_arrow */2, _0: l, _1: ty, @@ -77332,41 +77332,41 @@ function class_type$3(env, scty) { function class_type$4(env, scty) { delayed_meth_specs.contents = /* [] */0; - var cty = class_type$3(env, scty); + let cty = class_type$3(env, scty); Stdlib__List.iter(CamlinternalLazy.force, Stdlib__List.rev(delayed_meth_specs.contents)); delayed_meth_specs.contents = /* [] */0; return cty; } function class_structure(cl_num, $$final, val_env, met_env, loc, param) { - var spat = param.pcstr_self; - var init = spat.ppat_loc; - var self_loc_loc_start = init.loc_start; - var self_loc_loc_end = init.loc_end; - var self_loc = { + let spat = param.pcstr_self; + let init = spat.ppat_loc; + let self_loc_loc_start = init.loc_start; + let self_loc_loc_end = init.loc_end; + let self_loc = { loc_start: self_loc_loc_start, loc_end: self_loc_loc_end, loc_ghost: true }; - var self_type = newvar(undefined, undefined); + let self_type = newvar(undefined, undefined); unify$2(val_env, filter_method(val_env, dummy_method, /* Private */0, self_type), newty2(current_level.contents, { TAG: /* Ttuple */2, _0: /* [] */0 })); - var private_self = $$final ? newvar(undefined, undefined) : self_type; - var match = type_self_pattern(cl_num, private_self, val_env, met_env, met_env, spat); - var val_env$1 = match[3]; - var vars = match[2]; - var meths = match[1]; - var pat = match[0]; - var public_self = pat.pat_type; - var ty; + let private_self = $$final ? newvar(undefined, undefined) : self_type; + let match = type_self_pattern(cl_num, private_self, val_env, met_env, met_env, spat); + let val_env$1 = match[3]; + let vars = match[2]; + let meths = match[1]; + let pat = match[0]; + let public_self = pat.pat_type; + let ty; if ($$final) { - var desc_0 = newvar(undefined, undefined); - var desc_1 = { + let desc_0 = newvar(undefined, undefined); + let desc_1 = { contents: undefined }; - var desc = { + let desc = { TAG: /* Tobject */4, _0: desc_0, _1: desc_1 @@ -77379,7 +77379,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { unify$2(val_env$1, public_self, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77393,12 +77393,12 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var get_methods = function (ty) { + let get_methods = function (ty) { return flatten_fields(object_fields(expand_head(val_env$1, ty)))[0]; }; if ($$final) { Stdlib__List.iter((function (param) { - var k = Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0) ? /* Public */1 : /* Private */0; + let k = Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0) ? /* Public */1 : /* Private */0; try { return unify$2(val_env$1, param[2], filter_method(val_env$1, param[0], k, self_type)); } @@ -77415,33 +77415,33 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { }), get_methods(public_self)); } warning_enter_scope(undefined); - var match$1 = Stdlib__List.fold_left((function (param, param$1) { - var local_vals = param[8]; - var local_meths = param[7]; - var inher = param[6]; - var warn_vals = param[5]; - var concr_meths = param[4]; - var fields = param[3]; - var par_env = param[2]; - var met_env = param[1]; - var val_env = param[0]; - var loc = param$1.pcf_loc; - var mkcf = function (desc) { + let match$1 = Stdlib__List.fold_left((function (param, param$1) { + let local_vals = param[8]; + let local_meths = param[7]; + let inher = param[6]; + let warn_vals = param[5]; + let concr_meths = param[4]; + let fields = param[3]; + let par_env = param[2]; + let met_env = param[1]; + let val_env = param[0]; + let loc = param$1.pcf_loc; + let mkcf = function (desc) { return { cf_desc: desc, cf_loc: loc, cf_attributes: param$1.pcf_attributes }; }; - var expr = param$1.pcf_desc; + let expr = param$1.pcf_desc; switch (expr.TAG | 0) { case /* Pcf_inherit */0 : - var $$super = expr._2; - var sparent = expr._1; - var ovf = expr._0; - var parent = class_expr(cl_num, val_env, par_env, sparent); - var match = parent.cl_type; - var inher$1; + let $$super = expr._2; + let sparent = expr._1; + let ovf = expr._0; + let parent = class_expr(cl_num, val_env, par_env, sparent); + let match = parent.cl_type; + let inher$1; switch (match.TAG | 0) { case /* Cty_constr */0 : inher$1 = { @@ -77458,10 +77458,10 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { break; } - var match$1 = inheritance(self_type, val_env, ovf, concr_meths, warn_vals, sparent.pcl_loc, parent.cl_type); - var cl_sig = match$1[0]; - var match$2 = Curry._3(Meths.fold, (function (lab, info, param) { - var match = enter_val(cl_num, vars, true, lab, info[0], info[1], info[2], param[0], param[1], param[2], sparent.pcl_loc); + let match$1 = inheritance(self_type, val_env, ovf, concr_meths, warn_vals, sparent.pcl_loc, parent.cl_type); + let cl_sig = match$1[0]; + let match$2 = Curry._3(Meths.fold, (function (lab, info, param) { + let match = enter_val(cl_num, vars, true, lab, info[0], info[1], info[2], param[0], param[1], param[2], sparent.pcl_loc); return [ match[1], match[2], @@ -77480,11 +77480,11 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { par_env, /* [] */0 ]); - var inh_vars = match$2[3]; - var par_env$1 = match$2[2]; - var met_env$1 = match$2[1]; - var val_env$1 = match$2[0]; - var inh_meths = Curry._3(fold$1, (function (lab, rem) { + let inh_vars = match$2[3]; + let par_env$1 = match$2[2]; + let met_env$1 = match$2[1]; + let val_env$1 = match$2[0]; + let inh_meths = Curry._3(fold$1, (function (lab, rem) { return { hd: [ lab, @@ -77493,9 +77493,9 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { tl: rem }; }), cl_sig.csig_concr, /* [] */0); - var match$3; + let match$3; if ($$super !== undefined) { - var match$4 = enter_met_env((function (s) { + let match$4 = enter_met_env((function (s) { return { TAG: /* Unused_ancestor */20, _0: s @@ -77544,23 +77544,23 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; case /* Pcf_val */1 : - var match$5 = expr._0; - var styp = match$5[2]; - var mut = match$5[1]; - var lab = match$5[0]; + let match$5 = expr._0; + let styp = match$5[2]; + let mut = match$5[1]; + let lab = match$5[0]; if (styp.TAG === /* Cfk_virtual */0) { if (principal.contents) { begin_def(undefined); } - var cty = transl_simple_type(val_env, false, styp._0); - var ty = cty.ctyp_type; + let cty = transl_simple_type(val_env, false, styp._0); + let ty = cty.ctyp_type; if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, ty); } - var match$6 = enter_val(cl_num, vars, false, lab.txt, mut, /* Virtual */0, ty, val_env, met_env, par_env, loc); - var met_env$p = match$6[2]; - var id = match$6[0]; + let match$6 = enter_val(cl_num, vars, false, lab.txt, mut, /* Virtual */0, ty, val_env, met_env, par_env, loc); + let met_env$p = match$6[2]; + let id = match$6[0]; return [ match$6[1], met_env$p, @@ -77591,7 +77591,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; } - var ovf$1 = styp._0; + let ovf$1 = styp._0; if (Curry._2(mem$2, lab.txt, local_vals)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77630,14 +77630,14 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { if (principal.contents) { begin_def(undefined); } - var exp; + let exp; try { exp = type_exp(val_env, styp._1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var match$7 = exn._1; + let match$7 = exn._1; if (match$7) { if (match$7.tl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); @@ -77660,9 +77660,9 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { end_def(undefined); generalize_structure$1(current_level.contents, exp.exp_type); } - var match$8 = enter_val(cl_num, vars, false, lab.txt, mut, /* Concrete */1, exp.exp_type, val_env, met_env, par_env, loc); - var met_env$p$1 = match$8[2]; - var id$1 = match$8[0]; + let match$8 = enter_val(cl_num, vars, false, lab.txt, mut, /* Concrete */1, exp.exp_type, val_env, met_env, par_env, loc); + let met_env$p$1 = match$8[2]; + let id$1 = match$8[0]; return [ match$8[1], met_env$p$1, @@ -77694,12 +77694,12 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { Curry._2(add$2, lab.txt, local_vals) ]; case /* Pcf_method */2 : - var match$9 = expr._0; - var sty = match$9[2]; - var priv = match$9[1]; - var lab$1 = match$9[0]; + let match$9 = expr._0; + let sty = match$9[2]; + let priv = match$9[1]; + let lab$1 = match$9[0]; if (sty.TAG === /* Cfk_virtual */0) { - var cty$1 = virtual_method(val_env, meths, self_type, lab$1.txt, priv, sty._0, loc); + let cty$1 = virtual_method(val_env, meths, self_type, lab$1.txt, priv, sty._0, loc); return [ val_env, met_env, @@ -77728,10 +77728,10 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; } - var expr$1 = sty._1; - var ovf$2 = sty._0; - var match$10 = expr$1.pexp_desc; - var expr$2; + let expr$1 = sty._1; + let ovf$2 = sty._0; + let match$10 = expr$1.pexp_desc; + let expr$2; expr$2 = match$10.TAG === /* Pexp_poly */28 ? expr$1 : Curry._4(Ast_helper_Exp.poly, expr$1.pexp_loc, undefined, expr$1, undefined); if (Curry._2(mem$2, lab$1.txt, local_meths)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { @@ -77768,20 +77768,20 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } }); } - var match$11 = filter_self_method(val_env, lab$1.txt, priv, meths, self_type); - var ty$1 = match$11[1]; + let match$11 = filter_self_method(val_env, lab$1.txt, priv, meths, self_type); + let ty$1 = match$11[1]; try { - var match$12 = expr$2.pexp_desc; + let match$12 = expr$2.pexp_desc; if (match$12.TAG === /* Pexp_poly */28) { - var sty$1 = match$12._1; - var sbody = match$12._0; + let sty$1 = match$12._1; + let sbody = match$12._0; if (sty$1 !== undefined) { - var sty$2 = force_poly(sty$1); - var cty$p = transl_simple_type(val_env, false, sty$2); - var ty$p = cty$p.ctyp_type; + let sty$2 = force_poly(sty$1); + let cty$p = transl_simple_type(val_env, false, sty$2); + let ty$p = cty$p.ctyp_type; unify$2(val_env, ty$p, ty$1); } - var match$13 = repr(ty$1).desc; + let match$13 = repr(ty$1).desc; if (typeof match$13 === "number") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -77794,7 +77794,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } switch (match$13.TAG | 0) { case /* Tvar */0 : - var ty$p$1 = newvar(undefined, undefined); + let ty$p$1 = newvar(undefined, undefined); unify$2(val_env, newty2(current_level.contents, { TAG: /* Tpoly */10, _0: ty$p$1, @@ -77803,8 +77803,8 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { unify$2(val_env, type_approx(val_env, sbody), ty$p$1); break; case /* Tpoly */10 : - var match$14 = instance_poly(undefined, false, match$13._1, match$13._0); - var ty2 = type_approx(val_env, sbody); + let match$14 = instance_poly(undefined, false, match$13._1, match$13._0); + let ty2 = type_approx(val_env, sbody); unify$2(val_env, ty2, match$14[1]); break; default: @@ -77829,7 +77829,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -77845,12 +77845,12 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var meth_expr = make_method(self_loc, cl_num, expr$2); - var vars_local = vars.contents; - var field = { + let meth_expr = make_method(self_loc, cl_num, expr$2); + let vars_local = vars.contents; + let field = { LAZY_DONE: false, VAL: (function () { - var meth_type = newty2(100000000, { + let meth_type = newty2(100000000, { TAG: /* Tarrow */1, _0: "", _1: self_type, @@ -77859,7 +77859,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { }); raise_nongen_level(undefined); vars.contents = vars_local; - var texp = type_expect(undefined, met_env, meth_expr, meth_type); + let texp = type_expect(undefined, met_env, meth_expr, meth_type); end_def(undefined); return mkcf({ TAG: /* Tcf_method */2, @@ -77888,10 +77888,10 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; case /* Pcf_constraint */3 : - var match$15 = expr._0; - var match$16 = type_constraint(val_env, match$15[0], match$15[1], loc); - var cty$p$1 = match$16[1]; - var cty$2 = match$16[0]; + let match$15 = expr._0; + let match$16 = type_constraint(val_env, match$15[0], match$15[1], loc); + let cty$p$1 = match$16[1]; + let cty$2 = match$16[0]; return [ val_env, met_env, @@ -77916,23 +77916,23 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; case /* Pcf_initializer */4 : - var expr$3 = make_method(self_loc, cl_num, expr._0); - var vars_local$1 = vars.contents; - var field$1 = { + let expr$3 = make_method(self_loc, cl_num, expr._0); + let vars_local$1 = vars.contents; + let field$1 = { LAZY_DONE: false, VAL: (function () { raise_nongen_level(undefined); - var desc_2 = instance_def(type_unit); - var desc = { + let desc_2 = instance_def(type_unit); + let desc = { TAG: /* Tarrow */1, _0: "", _1: self_type, _2: desc_2, _3: /* Cok */0 }; - var meth_type = newty2(current_level.contents, desc); + let meth_type = newty2(current_level.contents, desc); vars.contents = vars_local$1; - var texp = type_expect(undefined, met_env, expr$3, meth_type); + let texp = type_expect(undefined, met_env, expr$3, meth_type); end_def(undefined); return mkcf({ TAG: /* Tcf_initializer */4, @@ -77955,7 +77955,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_vals ]; case /* Pcf_attribute */5 : - var x = expr._0; + let x = expr._0; warning_attribute({ hd: x, tl: /* [] */0 @@ -78000,36 +78000,36 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { /* Empty */0, /* Empty */0 ], param.pcstr_fields); - var inher = match$1[6]; - var concr_meths = match$1[4]; + let inher = match$1[6]; + let concr_meths = match$1[4]; warning_leave_scope(undefined); unify$2(val_env$1, self_type, newvar(undefined, undefined)); - var sign_csig_vars = Curry._2(Meths.map, (function (param) { + let sign_csig_vars = Curry._2(Meths.map, (function (param) { return [ param[1], param[2], param[3] ]; }), vars.contents); - var sign = { + let sign = { csig_self: public_self, csig_vars: sign_csig_vars, csig_concr: concr_meths, csig_inher: inher }; - var methods = get_methods(self_type); - var priv_meths = Stdlib__List.filter((function (param) { + let methods = get_methods(self_type); + let priv_meths = Stdlib__List.filter((function (param) { return Caml_obj.caml_notequal(field_kind_repr(param[1]), /* Fpresent */0); }), methods); if ($$final) { close_object(self_type); - var mets = virtual_methods({ + let mets = virtual_methods({ csig_self: self_type, csig_vars: sign_csig_vars, csig_concr: concr_meths, csig_inher: inher }); - var vals = Curry._3(Meths.fold, (function (name, param, l) { + let vals = Curry._3(Meths.fold, (function (name, param, l) { if (param[1] === /* Virtual */0) { return { hd: name, @@ -78053,11 +78053,11 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } }); } - var self_methods = Stdlib__List.fold_right((function (param, rem) { - var kind = param[1]; - var lab = param[0]; + let self_methods = Stdlib__List.fold_right((function (param, rem) { + let kind = param[1]; + let lab = param[0]; if (lab === dummy_method) { - var r = field_kind_repr(kind); + let r = field_kind_repr(kind); if (typeof r === "number") { return rem; } else { @@ -78065,9 +78065,9 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { return rem; } } - var desc_1 = copy_kind(kind); - var desc_2 = param[2]; - var desc = { + let desc_1 = copy_kind(kind); + let desc_2 = param[2]; + let desc = { TAG: /* Tfield */5, _0: lab, _1: desc_1, @@ -78087,7 +78087,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { unify$2(val_env$1, public_self, self_type); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78107,26 +78107,26 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { generalize_spine(param[2]); }), methods); } - var fields = Stdlib__List.map(CamlinternalLazy.force, Stdlib__List.rev(match$1[3])); + let fields = Stdlib__List.map(CamlinternalLazy.force, Stdlib__List.rev(match$1[3])); if (principal.contents) { Stdlib__List.iter((function (param) { unify$2(val_env$1, param[2], newvar(undefined, undefined)); }), methods); } - var meths$1 = Curry._2(map, (function (param) { + let meths$1 = Curry._2(map, (function (param) { return param[0]; }), meths.contents); - var pub_meths$p = Stdlib__List.filter((function (param) { + let pub_meths$p = Stdlib__List.filter((function (param) { return Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0); }), get_methods(public_self)); - var names = function (param) { + let names = function (param) { return Stdlib__List.map((function (param) { return param[0]; }), param); }; - var l1 = names(priv_meths); - var l2 = names(pub_meths$p); - var added = Stdlib__List.filter((function (x) { + let l1 = names(priv_meths); + let l2 = names(pub_meths$p); + let added = Stdlib__List.filter((function (x) { return Stdlib__List.mem(x, l1); }), l2); if (Caml_obj.caml_notequal(added, /* [] */0)) { @@ -78135,7 +78135,7 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { _0: added }); } - var sign$1 = $$final ? sign : ({ + let sign$1 = $$final ? sign : ({ csig_self: expand_head(val_env$1, public_self), csig_vars: sign_csig_vars, csig_concr: concr_meths, @@ -78154,14 +78154,14 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { function class_expr(cl_num, val_env, met_env, _scl) { while(true) { - var scl = _scl; - var cl_str = scl.pcl_desc; + let scl = _scl; + let cl_str = scl.pcl_desc; switch (cl_str.TAG | 0) { case /* Pcl_constr */0 : - var lid = cl_str._0; - var match = find_class$1(val_env, scl.pcl_loc, lid.txt); - var decl = match[1]; - var path = match[0]; + let lid = cl_str._0; + let match = find_class$1(val_env, scl.pcl_loc, lid.txt); + let decl = match[1]; + let path = match[0]; if (same(decl.cty_path, unbound_class)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78173,13 +78173,13 @@ function class_expr(cl_num, val_env, met_env, _scl) { } }); } - var tyl = Stdlib__List.map((function (sty) { + let tyl = Stdlib__List.map((function (sty) { return transl_simple_type(val_env, false, sty); }), cl_str._1); - var match$1 = instance_class(decl.cty_params, decl.cty_type); - var clty = match$1[1]; - var params = match$1[0]; - var clty$p = abbreviate_class_type(path, params, clty); + let match$1 = instance_class(decl.cty_params, decl.cty_type); + let clty = match$1[1]; + let params = match$1[0]; + let clty$p = abbreviate_class_type(path, params, clty); if (Stdlib__List.length(params) !== Stdlib__List.length(tyl)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78194,12 +78194,12 @@ function class_expr(cl_num, val_env, met_env, _scl) { }); } Stdlib__List.iter2((function (cty$p, ty) { - var ty$p = cty$p.ctyp_type; + let ty$p = cty$p.ctyp_type; try { return unify$2(val_env, ty$p, ty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78214,7 +78214,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }), tyl, params); - var cl = rc({ + let cl = rc({ cl_desc: { TAG: /* Tcl_ident */0, _0: path, @@ -78226,7 +78226,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { cl_env: val_env, cl_attributes: scl.pcl_attributes }); - var match$2 = extract_constraints(clty); + let match$2 = extract_constraints(clty); return rc({ cl_desc: { TAG: /* Tcl_constraint */5, @@ -78242,7 +78242,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { cl_attributes: /* [] */0 }); case /* Pcl_structure */1 : - var match$3 = class_structure(cl_num, false, val_env, met_env, scl.pcl_loc, cl_str._0); + let match$3 = class_structure(cl_num, false, val_env, met_env, scl.pcl_loc, cl_str._0); return rc({ cl_desc: { TAG: /* Tcl_structure */1, @@ -78257,11 +78257,11 @@ function class_expr(cl_num, val_env, met_env, _scl) { cl_attributes: scl.pcl_attributes }); case /* Pcl_fun */2 : - var $$default = cl_str._1; - var l = cl_str._0; + let $$default = cl_str._1; + let l = cl_str._0; if ($$default !== undefined) { - var loc = $$default.pexp_loc; - var scases_0 = Curry._3(Ast_helper_Exp.$$case, construct(loc, undefined, { + let loc = $$default.pexp_loc; + let scases_0 = Curry._3(Ast_helper_Exp.$$case, construct(loc, undefined, { txt: { TAG: /* Ldot */1, _0: { @@ -78281,7 +78281,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { }, loc: none })); - var scases_1 = { + let scases_1 = { hd: Curry._3(Ast_helper_Exp.$$case, construct(loc, undefined, { txt: { TAG: /* Ldot */1, @@ -78295,18 +78295,18 @@ function class_expr(cl_num, val_env, met_env, _scl) { }, undefined), undefined, $$default), tl: /* [] */0 }; - var scases = { + let scases = { hd: scases_0, tl: scases_1 }; - var smatch = Curry._4(Ast_helper_Exp.match_, loc, undefined, Curry._3(Ast_helper_Exp.ident, loc, undefined, { + let smatch = Curry._4(Ast_helper_Exp.match_, loc, undefined, Curry._3(Ast_helper_Exp.ident, loc, undefined, { txt: { TAG: /* Lident */0, _0: "*opt*" }, loc: none }), scases); - var sfun = fun_$1(scl.pcl_loc, undefined, l, undefined, $$var$1(loc, undefined, { + let sfun = fun_$1(scl.pcl_loc, undefined, l, undefined, $$var$1(loc, undefined, { txt: "*opt*", loc: none }), let_$1(scl.pcl_loc, undefined, /* Nonrecursive */0, { @@ -78319,23 +78319,23 @@ function class_expr(cl_num, val_env, met_env, _scl) { if (principal.contents) { begin_def(undefined); } - var match$4 = type_class_arg_pattern(cl_num, val_env, met_env, l, cl_str._2); - var val_env$p = match$4[2]; - var pat = match$4[0]; + let match$4 = type_class_arg_pattern(cl_num, val_env, met_env, l, cl_str._2); + let val_env$p = match$4[2]; + let pat = match$4[0]; if (principal.contents) { end_def(undefined); iter_pattern((function (param) { generalize_structure$1(current_level.contents, param.pat_type); }), pat); } - var pv = Stdlib__List.map((function(val_env$p){ + let pv = Stdlib__List.map((function(val_env$p){ return function (param) { - var id = param[0]; - var path = { + let id = param[0]; + let path = { TAG: /* Pident */0, _0: param[2] }; - var vd = find_value(path, val_env$p); + let vd = find_value(path, val_env$p); return [ id, param[1], @@ -78361,7 +78361,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { ]; } }(val_env$p)), match$4[1]); - var not_function = function (param) { + let not_function = function (param) { switch (param.TAG | 0) { case /* Cty_constr */0 : case /* Cty_signature */1 : @@ -78371,7 +78371,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { } }; - var partial = check_partial$1(undefined, val_env, pat.pat_type)(pat.pat_loc, { + let partial = check_partial$1(undefined, val_env, pat.pat_type)(pat.pat_loc, { hd: { c_lhs: pat, c_guard: undefined, @@ -78393,7 +78393,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { tl: /* [] */0 }); raise_nongen_level(undefined); - var cl$1 = class_expr(cl_num, val_env$p, match$4[3], cl_str._3); + let cl$1 = class_expr(cl_num, val_env$p, match$4[3], cl_str._3); end_def(undefined); if (is_optional(l) && not_function(cl$1.cl_type)) { prerr_warning(pat.pat_loc, /* Unerasable_optional_argument */8); @@ -78418,29 +78418,29 @@ function class_expr(cl_num, val_env, met_env, _scl) { cl_attributes: scl.pcl_attributes }); case /* Pcl_apply */3 : - var sargs = cl_str._1; + let sargs = cl_str._1; if (Caml_obj.caml_equal(sargs, /* [] */0)) { ill_formed_ast(scl.pcl_loc, "Function application with no argument."); } if (principal.contents) { begin_def(undefined); } - var cl$2 = class_expr(cl_num, val_env, met_env, cl_str._0); + let cl$2 = class_expr(cl_num, val_env, met_env, cl_str._0); if (principal.contents) { end_def(undefined); generalize_class_type(generalize_structure$2, cl$2.cl_type); } - var nonopt_labels = function (_ls, _ty_fun) { + let nonopt_labels = function (_ls, _ty_fun) { while(true) { - var ty_fun = _ty_fun; - var ls = _ls; + let ty_fun = _ty_fun; + let ls = _ls; switch (ty_fun.TAG | 0) { case /* Cty_constr */0 : case /* Cty_signature */1 : return ls; case /* Cty_arrow */2 : - var ty_res = ty_fun._2; - var l = ty_fun._0; + let ty_res = ty_fun._2; + let l = ty_fun._0; if (is_optional(l)) { _ty_fun = ty_res; continue ; @@ -78455,44 +78455,44 @@ function class_expr(cl_num, val_env, met_env, _scl) { } }; }; - var ignore_labels = true; + let ignore_labels = true; if (!classic.contents) { - var labels = nonopt_labels(/* [] */0, cl$2.cl_type); + let labels = nonopt_labels(/* [] */0, cl$2.cl_type); ignore_labels = Stdlib__List.length(labels) === Stdlib__List.length(sargs) && Stdlib__List.for_all((function (param) { return param[0] === ""; }), sargs) && Stdlib__List.exists((function (l) { return l !== ""; }), labels) && (prerr_warning(cl$2.cl_loc, /* Labels_omitted */3), true); } - var type_args = (function(cl$2,ignore_labels){ + let type_args = (function(cl$2,ignore_labels){ return function type_args(_args, _omitted, _ty_fun, _ty_fun0, _sargs, _more_sargs) { while(true) { - var more_sargs = _more_sargs; - var sargs = _sargs; - var ty_fun0 = _ty_fun0; - var ty_fun = _ty_fun; - var omitted = _omitted; - var args = _args; + let more_sargs = _more_sargs; + let sargs = _sargs; + let ty_fun0 = _ty_fun0; + let ty_fun = _ty_fun; + let omitted = _omitted; + let args = _args; switch (ty_fun.TAG | 0) { case /* Cty_constr */0 : case /* Cty_signature */1 : break; case /* Cty_arrow */2 : - var ty = ty_fun._1; - var l = ty_fun._0; + let ty = ty_fun._1; + let l = ty_fun._0; switch (ty_fun0.TAG | 0) { case /* Cty_constr */0 : case /* Cty_signature */1 : break; case /* Cty_arrow */2 : if (Caml_obj.caml_notequal(sargs, /* [] */0) || Caml_obj.caml_notequal(more_sargs, /* [] */0)) { - var ty0 = ty_fun0._1; - var name = label_name(l); - var optional = is_optional(l) ? /* Optional */1 : /* Required */0; - var match; + let ty0 = ty_fun0._1; + let name = label_name(l); + let optional = is_optional(l) ? /* Optional */1 : /* Required */0; + let match; if (ignore_labels && !is_optional(l)) { if (sargs) { - var match$1 = sargs.hd; + let match$1 = sargs.hd; throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, _1: match$1[1].pexp_loc, @@ -78504,9 +78504,9 @@ function class_expr(cl_num, val_env, met_env, _scl) { }); } if (more_sargs) { - var match$2 = more_sargs.hd; - var sarg0 = match$2[1]; - var l$p = match$2[0]; + let match$2 = more_sargs.hd; + let sarg0 = match$2[1]; + let l$p = match$2[0]; if (l !== l$p && l$p !== "") { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78535,9 +78535,9 @@ function class_expr(cl_num, val_env, met_env, _scl) { } } else { try { - var match$3; + let match$3; try { - var match$4 = extract_label_aux(/* [] */0, name, sargs); + let match$4 = extract_label_aux(/* [] */0, name, sargs); match$3 = [ match$4[0], match$4[1], @@ -78546,9 +78546,9 @@ function class_expr(cl_num, val_env, met_env, _scl) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var match$5 = extract_label_aux(/* [] */0, name, more_sargs); + let match$5 = extract_label_aux(/* [] */0, name, more_sargs); match$3 = [ match$5[0], match$5[1], @@ -78559,21 +78559,21 @@ function class_expr(cl_num, val_env, met_env, _scl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var sarg0$1 = match$3[1]; - var l$p$1 = match$3[0]; + let sarg0$1 = match$3[1]; + let l$p$1 = match$3[0]; if (optional === /* Required */0 && is_optional(l$p$1)) { prerr_warning(sarg0$1.pexp_loc, { TAG: /* Nonoptional_label */26, _0: l }); } - var tmp; + let tmp; if (optional === /* Required */0 || is_optional(l$p$1)) { tmp = type_argument(val_env, sarg0$1, ty, ty0); } else { - var ty$p = extract_option_type(val_env, ty); - var ty0$p = extract_option_type(val_env, ty0); - var arg = type_argument(val_env, sarg0$1, ty$p, ty0$p); + let ty$p = extract_option_type(val_env, ty); + let ty0$p = extract_option_type(val_env, ty0); + let arg = type_argument(val_env, sarg0$1, ty$p, ty0$p); tmp = option_some(arg); } match = [ @@ -78583,7 +78583,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { ]; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { match = [ sargs, @@ -78595,8 +78595,8 @@ function class_expr(cl_num, val_env, met_env, _scl) { } } } - var arg$1 = match[2]; - var omitted$1 = arg$1 === undefined ? ({ + let arg$1 = match[2]; + let omitted$1 = arg$1 === undefined ? ({ hd: [ l, ty0 @@ -78624,7 +78624,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { break; } - var match$6 = Stdlib.$at(sargs, more_sargs); + let match$6 = Stdlib.$at(sargs, more_sargs); if (!match$6) { return [ Stdlib__List.rev(args), @@ -78639,7 +78639,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { ]; } if (Caml_obj.caml_notequal(omitted, /* [] */0)) { - var match$7 = match$6.hd; + let match$7 = match$6.hd; throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, _1: match$7[1].pexp_loc, @@ -78662,9 +78662,9 @@ function class_expr(cl_num, val_env, met_env, _scl) { }; } }(cl$2,ignore_labels)); - var match$5 = instance_class(/* [] */0, cl$2.cl_type); - var ty_fun0 = match$5[1]; - var match$6 = ignore_labels ? type_args(/* [] */0, /* [] */0, cl$2.cl_type, ty_fun0, /* [] */0, sargs) : type_args(/* [] */0, /* [] */0, cl$2.cl_type, ty_fun0, sargs, /* [] */0); + let match$5 = instance_class(/* [] */0, cl$2.cl_type); + let ty_fun0 = match$5[1]; + let match$6 = ignore_labels ? type_args(/* [] */0, /* [] */0, cl$2.cl_type, ty_fun0, /* [] */0, sargs) : type_args(/* [] */0, /* [] */0, cl$2.cl_type, ty_fun0, sargs, /* [] */0); return rc({ cl_desc: { TAG: /* Tcl_apply */3, @@ -78677,15 +78677,15 @@ function class_expr(cl_num, val_env, met_env, _scl) { cl_attributes: scl.pcl_attributes }); case /* Pcl_let */4 : - var rec_flag = cl_str._0; - var match$7; + let rec_flag = cl_str._0; + let match$7; try { match$7 = type_let$1(val_env, rec_flag, cl_str._1, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { - var match$8 = exn._1; + let match$8 = exn._1; if (match$8) { if (match$8.tl) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); @@ -78704,18 +78704,18 @@ function class_expr(cl_num, val_env, met_env, _scl) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var val_env$1 = match$7[1]; - var defs = match$7[0]; - var match$9 = Stdlib__List.fold_right((function(val_env$1){ + let val_env$1 = match$7[1]; + let defs = match$7[0]; + let match$9 = Stdlib__List.fold_right((function(val_env$1){ return function (param, param$1) { - var id = param[0]; - var path = { + let id = param[0]; + let path = { TAG: /* Pident */0, _0: id }; - var vd = find_value(path, val_env$1); + let vd = find_value(path, val_env$1); begin_def(undefined); - var expr_exp_desc = { + let expr_exp_desc = { TAG: /* Texp_ident */0, _0: path, _1: { @@ -78727,8 +78727,8 @@ function class_expr(cl_num, val_env, met_env, _scl) { }, _2: vd }; - var expr_exp_type = instance(undefined, val_env$1, vd.val_type); - var expr = { + let expr_exp_type = instance(undefined, val_env$1, vd.val_type); + let expr = { exp_desc: expr_exp_desc, exp_loc: none, exp_extra: /* [] */0, @@ -78740,20 +78740,20 @@ function class_expr(cl_num, val_env, met_env, _scl) { iter_generalize$1({ contents: /* [] */0 }, expr_exp_type); - var desc_val_type = expr_exp_type; - var desc_val_kind = { + let desc_val_type = expr_exp_type; + let desc_val_kind = { TAG: /* Val_ivar */1, _0: /* Immutable */0, _1: cl_num }; - var desc_val_loc = vd.val_loc; - var desc = { + let desc_val_loc = vd.val_loc; + let desc = { val_type: desc_val_type, val_kind: desc_val_kind, val_loc: desc_val_loc, val_attributes: /* [] */0 }; - var id$p = create(id.name); + let id$p = create(id.name); return [ { hd: [ @@ -78770,7 +78770,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { /* [] */0, met_env ]); - var cl$3 = class_expr(cl_num, val_env$1, match$9[1], cl_str._2); + let cl$3 = class_expr(cl_num, val_env$1, match$9[1], cl_str._2); return rc({ cl_desc: { TAG: /* Tcl_let */4, @@ -78786,16 +78786,16 @@ function class_expr(cl_num, val_env, met_env, _scl) { }); case /* Pcl_constraint */5 : begin_class_def(undefined); - var context = narrow(undefined); - var cl$4 = class_expr(cl_num, val_env, met_env, cl_str._0); + let context = narrow(undefined); + let cl$4 = class_expr(cl_num, val_env, met_env, cl_str._0); widen(context); - var context$1 = narrow(undefined); - var clty$1 = class_type$4(val_env, cl_str._1); + let context$1 = narrow(undefined); + let clty$1 = class_type$4(val_env, cl_str._1); widen(context$1); end_def(undefined); limited_generalize$1(row_variable(repr(signature_of_class_type(cl$4.cl_type).csig_self)), cl$4.cl_type); limited_generalize$1(row_variable(repr(signature_of_class_type(clty$1.cltyp_type).csig_self)), clty$1.cltyp_type); - var error = class_types(val_env, cl$4.cl_type, clty$1.cltyp_type); + let error = class_types(val_env, cl$4.cl_type, clty$1.cltyp_type); if (error) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78807,7 +78807,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { } }); } - var match$10 = extract_constraints(clty$1.cltyp_type); + let match$10 = extract_constraints(clty$1.cltyp_type); return rc({ cl_desc: { TAG: /* Tcl_constraint */5, @@ -78832,21 +78832,21 @@ function class_expr(cl_num, val_env, met_env, _scl) { }; } -var var_option = type_option(newty2(100000000, { +let var_option = type_option(newty2(100000000, { TAG: /* Tvar */0, _0: undefined })); function approx_declaration(_cl) { while(true) { - var cl = _cl; - var match = cl.pcl_desc; + let cl = _cl; + let match = cl.pcl_desc; switch (match.TAG | 0) { case /* Pcl_fun */2 : - var l = match._0; - var arg = is_optional(l) ? instance_def(var_option) : newvar(undefined, undefined); - var desc_2 = approx_declaration(match._3); - var desc = { + let l = match._0; + let arg = is_optional(l) ? instance_def(var_option) : newvar(undefined, undefined); + let desc_2 = approx_declaration(match._3); + let desc = { TAG: /* Tarrow */1, _0: l, _1: arg, @@ -78867,14 +78867,14 @@ function approx_declaration(_cl) { } function approx_description(ct) { - var match = ct.pcty_desc; + let match = ct.pcty_desc; if (match.TAG !== /* Pcty_arrow */2) { return newvar(undefined, undefined); } - var l = match._0; - var arg = is_optional(l) ? instance_def(var_option) : newvar(undefined, undefined); - var desc_2 = approx_description(match._2); - var desc = { + let l = match._0; + let arg = is_optional(l) ? instance_def(var_option) : newvar(undefined, undefined); + let desc_2 = approx_description(match._2); + let desc = { TAG: /* Tarrow */1, _0: l, _1: arg, @@ -78885,15 +78885,15 @@ function approx_description(ct) { } function temp_abbrev(loc, env, id, arity) { - var params = /* [] */0; - for(var _i = 1; _i <= arity; ++_i){ + let params = /* [] */0; + for(let _i = 1; _i <= arity; ++_i){ params = { hd: newvar(undefined, undefined), tl: params }; } - var ty = newobj(newvar(undefined, undefined)); - var env$1 = add_type$1(true, id, { + let ty = newobj(newvar(undefined, undefined)); + let env$1 = add_type$1(true, id, { type_params: params, type_arity: arity, type_kind: /* Type_abstract */0, @@ -78945,7 +78945,7 @@ function merge_type_decls(param, param$1) { } function type_classes(define_class, approx, kind, env, cls) { - var cls$1 = Stdlib__List.map((function (cl) { + let cls$1 = Stdlib__List.map((function (cl) { return [ cl, create(cl.pci_name.txt), @@ -78956,21 +78956,21 @@ function type_classes(define_class, approx, kind, env, cls) { }), cls); init_def(currentstamp.contents); begin_class_def(undefined); - var match = Stdlib__List.fold_left((function (param, param$1) { - var cl_id = param$1[4]; - var obj_id = param$1[3]; - var ty_id = param$1[2]; - var id = param$1[1]; - var cl = param$1[0]; - var arity = Stdlib__List.length(cl.pci_params); - var match = temp_abbrev(cl.pci_loc, param[1], obj_id, arity); - var match$1 = temp_abbrev(cl.pci_loc, match[2], cl_id, arity); - var env = match$1[2]; - var constr_type = Curry._1(approx, cl.pci_expr); + let match = Stdlib__List.fold_left((function (param, param$1) { + let cl_id = param$1[4]; + let obj_id = param$1[3]; + let ty_id = param$1[2]; + let id = param$1[1]; + let cl = param$1[0]; + let arity = Stdlib__List.length(cl.pci_params); + let match = temp_abbrev(cl.pci_loc, param[1], obj_id, arity); + let match$1 = temp_abbrev(cl.pci_loc, match[2], cl_id, arity); + let env = match$1[2]; + let constr_type = Curry._1(approx, cl.pci_expr); if (principal.contents) { generalize_spine(constr_type); } - var dummy_cty = { + let dummy_cty = { TAG: /* Cty_signature */1, _0: { csig_self: newvar(undefined, undefined), @@ -78979,8 +78979,8 @@ function type_classes(define_class, approx, kind, env, cls) { csig_inher: /* [] */0 } }; - var match$2 = cl.pci_virt; - var dummy_class = { + let match$2 = cl.pci_virt; + let dummy_class = { cty_params: /* [] */0, cty_type: dummy_cty, cty_path: unbound_class, @@ -78989,7 +78989,7 @@ function type_classes(define_class, approx, kind, env, cls) { cty_loc: none, cty_attributes: /* [] */0 }; - var env$1 = add_cltype(ty_id, { + let env$1 = add_cltype(ty_id, { clty_params: /* [] */0, clty_type: dummy_cty, clty_path: unbound_class, @@ -79020,22 +79020,22 @@ function type_classes(define_class, approx, kind, env, cls) { /* [] */0, env ], cls$1); - var match$1 = Stdlib__List.fold_right((function (param, param$1) { - var env = param$1[1]; - var constr_type = param[9]; - var cl_ty = param[8]; - var cl_params = param[7]; - var cl_id = param[6]; - var obj_ty = param[5]; - var obj_params = param[4]; - var obj_id = param[3]; - var ty_id = param[2]; - var id = param[1]; - var cl = param[0]; + let match$1 = Stdlib__List.fold_right((function (param, param$1) { + let env = param$1[1]; + let constr_type = param[9]; + let cl_ty = param[8]; + let cl_params = param[7]; + let cl_id = param[6]; + let obj_ty = param[5]; + let obj_params = param[4]; + let obj_id = param[3]; + let ty_id = param[2]; + let id = param[1]; + let cl = param[0]; reset_type_variables(undefined); begin_class_def(undefined); - var make_param = function (param) { - var sty = param[0]; + let make_param = function (param) { + let sty = param[0]; try { return [ transl_type_param(env, sty), @@ -79043,7 +79043,7 @@ function type_classes(define_class, approx, kind, env, cls) { ]; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Already_bound) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79055,14 +79055,14 @@ function type_classes(define_class, approx, kind, env, cls) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var ci_params = Stdlib__List.map(make_param, cl.pci_params); - var params = Stdlib__List.map((function (param) { + let ci_params = Stdlib__List.map(make_param, cl.pci_params); + let params = Stdlib__List.map((function (param) { return param[0].ctyp_type; }), ci_params); - var coercion_locs = { + let coercion_locs = { contents: /* [] */0 }; - var match; + let match; try { self_coercion.contents = { hd: [ @@ -79074,7 +79074,7 @@ function type_classes(define_class, approx, kind, env, cls) { ], tl: self_coercion.contents }; - var res = Curry._2(kind, env, cl.pci_expr); + let res = Curry._2(kind, env, cl.pci_expr); self_coercion.contents = Stdlib__List.tl(self_coercion.contents); match = res; } @@ -79082,10 +79082,10 @@ function type_classes(define_class, approx, kind, env, cls) { self_coercion.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var typ = match[1]; + let typ = match[1]; end_def(undefined); - var sty = repr(signature_of_class_type(typ).csig_self); - var match$1 = flatten_fields(object_fields(sty)); + let sty = repr(signature_of_class_type(typ).csig_self); + let match$1 = flatten_fields(object_fields(sty)); Stdlib__List.iter((function (param) { if (param[0] === dummy_method) { return iter_generalize$1({ @@ -79094,19 +79094,19 @@ function type_classes(define_class, approx, kind, env, cls) { } }), match$1[0]); - var rv = row_variable(sty); + let rv = row_variable(sty); Stdlib__List.iter((function (param) { return limited_generalize(rv, param); }), params); limited_generalize$1(rv, typ); - var match$2 = instance_class(params, typ); - var obj_type = match$2[1]; - var obj_params$p = match$2[0]; - var constr = newconstr({ + let match$2 = instance_class(params, typ); + let obj_type = match$2[1]; + let obj_params$p = match$2[0]; + let constr = newconstr({ TAG: /* Pident */0, _0: obj_id }, obj_params); - var ty = repr(signature_of_class_type(obj_type).csig_self); + let ty = repr(signature_of_class_type(obj_type).csig_self); hide_private_methods(ty); close_object(ty); try { @@ -79115,7 +79115,7 @@ function type_classes(define_class, approx, kind, env, cls) { }), obj_params, obj_params$p); } catch (raw_exn){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn$1.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79138,7 +79138,7 @@ function type_classes(define_class, approx, kind, env, cls) { unify$2(env, ty, constr); } catch (raw_exn$1){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$2.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79154,9 +79154,9 @@ function type_classes(define_class, approx, kind, env, cls) { } throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); } - var match$3 = instance_class(params, typ); - var cl_params$p = match$3[0]; - var ty$1 = repr(signature_of_class_type(match$3[1]).csig_self); + let match$3 = instance_class(params, typ); + let cl_params$p = match$3[0]; + let ty$1 = repr(signature_of_class_type(match$3[1]).csig_self); hide_private_methods(ty$1); set_object_name(obj_id, row_variable(ty$1), cl_params, ty$1); try { @@ -79165,7 +79165,7 @@ function type_classes(define_class, approx, kind, env, cls) { }), cl_params, cl_params$p); } catch (raw_exn$2){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$3.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79191,9 +79191,9 @@ function type_classes(define_class, approx, kind, env, cls) { unify$2(env, ty$1, cl_ty); } catch (raw_exn$3){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$4.MEL_EXN_ID === Unify) { - var constr$1 = newconstr({ + let constr$1 = newconstr({ TAG: /* Pident */0, _0: cl_id }, params); @@ -79215,7 +79215,7 @@ function type_classes(define_class, approx, kind, env, cls) { unify$2(env, constructor_type(constr, obj_type), instance(undefined, env, constr_type)); } catch (raw_exn$4){ - var exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$5.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79230,17 +79230,17 @@ function type_classes(define_class, approx, kind, env, cls) { } throw new Caml_js_exceptions.MelangeError(exn$5.MEL_EXN_ID, exn$5); } - var cty_variance = Stdlib__List.map((function (param) { + let cty_variance = Stdlib__List.map((function (param) { return Types_Variance.full; }), params); - var cltydef_clty_type = class_body(typ); - var cltydef_clty_path = { + let cltydef_clty_type = class_body(typ); + let cltydef_clty_path = { TAG: /* Pident */0, _0: obj_id }; - var cltydef_clty_loc = cl.pci_loc; - var cltydef_clty_attributes = cl.pci_attributes; - var cltydef = { + let cltydef_clty_loc = cl.pci_loc; + let cltydef_clty_attributes = cl.pci_attributes; + let cltydef = { clty_params: params, clty_type: cltydef_clty_type, clty_path: cltydef_clty_path, @@ -79248,8 +79248,8 @@ function type_classes(define_class, approx, kind, env, cls) { clty_loc: cltydef_clty_loc, clty_attributes: cltydef_clty_attributes }; - var match$4 = cl.pci_virt; - var clty = { + let match$4 = cl.pci_virt; + let clty = { cty_params: params, cty_type: typ, cty_path: { @@ -79262,11 +79262,11 @@ function type_classes(define_class, approx, kind, env, cls) { cty_attributes: cl.pci_attributes }; param[10].cty_type = typ; - var env$1 = add_cltype(ty_id, cltydef, define_class ? add_class(id, clty, env) : env); + let env$1 = add_cltype(ty_id, cltydef, define_class ? add_class(id, clty, env) : env); if (cl.pci_virt === /* Concrete */1) { - var sign = signature_of_class_type(typ); - var mets = virtual_methods(sign); - var vals = Curry._3(Meths.fold, (function (name, param, l) { + let sign = signature_of_class_type(typ); + let mets = virtual_methods(sign); + let vals = Curry._3(Meths.fold, (function (name, param, l) { if (param[1] === /* Virtual */0) { return { hd: name, @@ -79292,22 +79292,22 @@ function type_classes(define_class, approx, kind, env, cls) { } } - var arity = class_type_arity(typ); - var match$5 = flatten_fields(object_fields(expand_head(env$1, obj_ty))); - var pub_meths = Stdlib__List.map((function (param) { + let arity = class_type_arity(typ); + let match$5 = flatten_fields(object_fields(expand_head(env$1, obj_ty))); + let pub_meths = Stdlib__List.map((function (param) { return param[0]; }), match$5[0]); - var match$6 = instance_class(params, typ); - var typ$p = match$6[1]; - var params$p = match$6[0]; - var cltydef_clty_type$1 = class_body(typ$p); - var cltydef_clty_path$1 = { + let match$6 = instance_class(params, typ); + let typ$p = match$6[1]; + let params$p = match$6[0]; + let cltydef_clty_type$1 = class_body(typ$p); + let cltydef_clty_path$1 = { TAG: /* Pident */0, _0: obj_id }; - var cltydef_clty_loc$1 = cl.pci_loc; - var cltydef_clty_attributes$1 = cl.pci_attributes; - var cltydef$1 = { + let cltydef_clty_loc$1 = cl.pci_loc; + let cltydef_clty_attributes$1 = cl.pci_attributes; + let cltydef$1 = { clty_params: params$p, clty_type: cltydef_clty_type$1, clty_path: cltydef_clty_path$1, @@ -79315,8 +79315,8 @@ function type_classes(define_class, approx, kind, env, cls) { clty_loc: cltydef_clty_loc$1, clty_attributes: cltydef_clty_attributes$1 }; - var match$7 = cl.pci_virt; - var clty$1 = { + let match$7 = cl.pci_virt; + let clty$1 = { cty_params: params$p, cty_type: typ$p, cty_path: { @@ -79328,13 +79328,13 @@ function type_classes(define_class, approx, kind, env, cls) { cty_loc: cl.pci_loc, cty_attributes: cl.pci_attributes }; - var obj_abbr_type_arity = Stdlib__List.length(obj_params); - var obj_abbr_type_manifest = obj_ty; - var obj_abbr_type_variance = Stdlib__List.map((function (param) { + let obj_abbr_type_arity = Stdlib__List.length(obj_params); + let obj_abbr_type_manifest = obj_ty; + let obj_abbr_type_variance = Stdlib__List.map((function (param) { return Types_Variance.full; }), obj_params); - var obj_abbr_type_loc = cl.pci_loc; - var obj_abbr = { + let obj_abbr_type_loc = cl.pci_loc; + let obj_abbr = { type_params: obj_params, type_arity: obj_abbr_type_arity, type_kind: /* Type_abstract */0, @@ -79345,18 +79345,18 @@ function type_classes(define_class, approx, kind, env, cls) { type_loc: obj_abbr_type_loc, type_attributes: /* [] */0 }; - var match$8 = instance_parameterized_type(undefined, params, repr(signature_of_class_type(typ).csig_self)); - var cl_ty$1 = match$8[1]; - var cl_params$1 = match$8[0]; + let match$8 = instance_parameterized_type(undefined, params, repr(signature_of_class_type(typ).csig_self)); + let cl_ty$1 = match$8[1]; + let cl_params$1 = match$8[0]; hide_private_methods(cl_ty$1); set_object_name(obj_id, row_variable(cl_ty$1), cl_params$1, cl_ty$1); - var cl_abbr_type_arity = Stdlib__List.length(cl_params$1); - var cl_abbr_type_manifest = cl_ty$1; - var cl_abbr_type_variance = Stdlib__List.map((function (param) { + let cl_abbr_type_arity = Stdlib__List.length(cl_params$1); + let cl_abbr_type_manifest = cl_ty$1; + let cl_abbr_type_variance = Stdlib__List.map((function (param) { return Types_Variance.full; }), cl_params$1); - var cl_abbr_type_loc = cl.pci_loc; - var cl_abbr = { + let cl_abbr_type_loc = cl.pci_loc; + let cl_abbr = { type_params: cl_params$1, type_arity: cl_abbr_type_arity, type_kind: /* Type_abstract */0, @@ -79393,24 +79393,24 @@ function type_classes(define_class, approx, kind, env, cls) { /* [] */0, match[1] ]); - var env$1 = match$1[1]; + let env$1 = match$1[1]; end_def(undefined); - var res = Stdlib__List.rev_map((function (param) { - var expr = param[13]; - var cl_abbr = param[8]; - var cl_id = param[7]; - var obj_abbr = param[6]; - var obj_id = param[5]; - var cltydef = param[4]; - var ty_id = param[3]; - var clty = param[2]; - var id = param[1]; - var cl = param[0]; + let res = Stdlib__List.rev_map((function (param) { + let expr = param[13]; + let cl_abbr = param[8]; + let cl_id = param[7]; + let obj_abbr = param[6]; + let obj_id = param[5]; + let cltydef = param[4]; + let ty_id = param[3]; + let clty = param[2]; + let id = param[1]; + let cl = param[0]; try { collapse_conj_params(env$1, clty.cty_params); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -79445,9 +79445,9 @@ function type_classes(define_class, approx, kind, env, cls) { } }); } - var reason = closed_class(clty.cty_params, signature_of_class_type(clty.cty_type)); + let reason = closed_class(clty.cty_params, signature_of_class_type(clty.cty_type)); if (reason !== undefined) { - var printer = define_class ? (function (ppf) { + let printer = define_class ? (function (ppf) { class_declaration$1(id, ppf, clty); }) : (function (ppf) { cltype_declaration$1(id, ppf, cltydef); @@ -79493,25 +79493,25 @@ function type_classes(define_class, approx, kind, env, cls) { } ]; }), match$1[0]); - var decls = Stdlib__List.fold_right(extract_type_decls, res, /* [] */0); - var decls$1 = compute_variance_decls(env$1, decls); - var res$1 = Stdlib__List.map2(merge_type_decls, res, decls$1); - var env$2 = Stdlib__List.fold_left((function (param, param$1) { + let decls = Stdlib__List.fold_right(extract_type_decls, res, /* [] */0); + let decls$1 = compute_variance_decls(env$1, decls); + let res$1 = Stdlib__List.map2(merge_type_decls, res, decls$1); + let env$2 = Stdlib__List.fold_left((function (param, param$1) { return add_type$1(true, param$1[5], type_declaration(identity, param$1[6]), add_type$1(true, param$1[7], type_declaration(identity, param$1[8]), add_cltype(param$1[3], cltype_declaration(identity, param$1[4]), define_class ? add_class(param$1[0], class_declaration(identity, param$1[2]), param) : param))); }), env$1, res$1); - var res$2 = Stdlib__List.map((function (param) { - var coercion_locs = param[11]; - var cl_abbr = param[8]; - var obj_abbr = param[6]; + let res$2 = Stdlib__List.map((function (param) { + let coercion_locs = param[11]; + let cl_abbr = param[8]; + let obj_abbr = param[6]; if (coercion_locs) { - var loc = coercion_locs.hd; - var match = cl_abbr.type_manifest; - var match$1 = obj_abbr.type_manifest; - var match$2; + let loc = coercion_locs.hd; + let match = cl_abbr.type_manifest; + let match$1 = obj_abbr.type_manifest; + let match$2; if (match !== undefined) { if (match$1 !== undefined) { - var match$3 = instance_parameterized_type(undefined, cl_abbr.type_params, match); - var match$4 = instance_parameterized_type(undefined, obj_abbr.type_params, match$1); + let match$3 = instance_parameterized_type(undefined, cl_abbr.type_params, match); + let match$4 = instance_parameterized_type(undefined, obj_abbr.type_params, match$1); Stdlib__List.iter2((function (param, param$1) { return unify$2(env$2, param, param$1); }), match$3[0], match$4[0]); @@ -79539,13 +79539,13 @@ function type_classes(define_class, approx, kind, env, cls) { ] }); } - var obj_ty = match$2[1]; - var cl_ty = match$2[0]; + let obj_ty = match$2[1]; + let cl_ty = match$2[0]; try { subtype(env$2, cl_ty, obj_ty)(undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Subtype) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -79594,13 +79594,13 @@ function type_classes(define_class, approx, kind, env, cls) { ]; } -var class_num = { +let class_num = { contents: 0 }; function class_declaration$2(env, sexpr) { class_num.contents = class_num.contents + 1 | 0; - var expr = class_expr(String(class_num.contents), env, env, sexpr); + let expr = class_expr(String(class_num.contents), env, env, sexpr); return [ expr, expr.cl_type @@ -79608,7 +79608,7 @@ function class_declaration$2(env, sexpr) { } function class_description(env, sexpr) { - var expr = class_type$4(env, sexpr); + let expr = class_type$4(env, sexpr); return [ expr, expr.cltyp_type @@ -79624,7 +79624,7 @@ function class_descriptions(env, cls) { } function class_type_declarations$2(env, cls) { - var match = type_classes(false, approx_description, class_description, env, cls); + let match = type_classes(false, approx_description, class_description, env, cls); return [ Stdlib__List.map((function (param) { return [ @@ -79644,21 +79644,21 @@ function class_type_declarations$2(env, cls) { function unify_parents_struct(env, ty, st) { Stdlib__List.iter((function (param) { - var match = param.cf_desc; + let match = param.cf_desc; if (match.TAG === /* Tcf_inherit */0) { - var _cl = match._1; + let _cl = match._1; while(true) { - var cl = _cl; - var st = cl.cl_desc; + let cl = _cl; + let st = cl.cl_desc; switch (st.TAG | 0) { case /* Tcl_ident */0 : try { - var decl = find_class(st._0, env); - var match$1 = find_cltype_for_path(env, decl.cty_path); + let decl = find_class(st._0, env); + let match$1 = find_cltype_for_path(env, decl.cty_path); return unify$2(env, ty, instance(undefined, env, match$1[1])); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -79691,13 +79691,13 @@ function unify_parents_struct(env, ty, st) { function type_object$1(env, loc, s) { class_num.contents = class_num.contents + 1 | 0; - var match = class_structure(String(class_num.contents), true, env, env, loc, s); - var sign = match[1]; - var desc = match[0]; - var sty = expand_head(env, sign.csig_self); + let match = class_structure(String(class_num.contents), true, env, env, loc, s); + let sign = match[1]; + let desc = match[0]; + let sty = expand_head(env, sign.csig_self); hide_private_methods(sty); - var match$1 = flatten_fields(object_fields(sty)); - var meths = Stdlib__List.map((function (param) { + let match$1 = flatten_fields(object_fields(sty)); + let meths = Stdlib__List.map((function (param) { return param[0]; }), match$1[0]); unify_parents_struct(env, sign.csig_self, desc); @@ -79711,8 +79711,8 @@ function type_object$1(env, loc, s) { type_object.contents = type_object$1; function approx_class(sdecl) { - var self$p = mk(undefined, undefined, /* Ptyp_any */0); - var clty$p = signature$1(sdecl.pci_expr.pcty_loc, undefined, { + let self$p = mk(undefined, undefined, /* Ptyp_any */0); + let clty$p = signature$1(sdecl.pci_expr.pcty_loc, undefined, { pcsig_self: self$p, pcsig_fields: /* [] */0 }); @@ -79738,7 +79738,7 @@ register_error_of_exn(function (param) { return ; } } - var env = param._2; + let env = param._2; return error_of_printer(param._1, (function (param, param$1) { return wrap_printing_env(env, (function (param$2) { if (typeof param$1 === "number") { @@ -79785,8 +79785,8 @@ register_error_of_exn(function (param) { }); })); case /* Field_type_mismatch */1 : - var m = param$1._1; - var k = param$1._0; + let m = param$1._1; + let k = param$1._0; return report_unification_error(param, env, undefined, param$1._2, (function (ppf) { Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -79876,7 +79876,7 @@ register_error_of_exn(function (param) { _1: "This class expression is not a class function, it cannot be applied" }); case /* Apply_wrong_label */4 : - var mark_label = function (l) { + let mark_label = function (l) { if (l === "") { return "out label"; } else { @@ -79907,7 +79907,7 @@ register_error_of_exn(function (param) { _1: "This argument cannot be applied with%s" }), mark_label(param$1._0)); case /* Pattern_type_clash */5 : - var ty = param$1._0; + let ty = param$1._0; reset(undefined); mark_loops(ty); return Curry._3(Stdlib__Format.fprintf(param)(/* Format */{ @@ -80041,9 +80041,9 @@ register_error_of_exn(function (param) { _1: "@[The class type@ %a@ is not yet completely defined@]" }), longident, param$1._0); case /* Abbrev_type_clash */8 : - var expected = param$1._2; - var actual = param$1._1; - var abbrev = param$1._0; + let expected = param$1._2; + let actual = param$1._1; + let abbrev = param$1._0; reset_and_mark_loops_list({ hd: abbrev, tl: { @@ -80139,7 +80139,7 @@ register_error_of_exn(function (param) { _1: "@[The abbreviation@ %a@ expands to type@ %a@ but is used with type@ %a@]" }), type_expr$1, abbrev, type_expr$1, actual, type_expr$1, expected); case /* Constructor_type_mismatch */9 : - var c = param$1._0; + let c = param$1._0; return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -80168,11 +80168,11 @@ register_error_of_exn(function (param) { }); })); case /* Virtual_class */10 : - var vals = param$1._3; - var mets = param$1._2; - var imm = param$1._1; - var cl = param$1._0; - var print_mets = function (ppf, mets) { + let vals = param$1._3; + let mets = param$1._2; + let imm = param$1._1; + let cl = param$1._0; + let print_mets = function (ppf, mets) { Stdlib__List.iter((function (met) { Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -80193,10 +80193,10 @@ register_error_of_exn(function (param) { }), met); }), mets); }; - var missings = mets ? ( + let missings = mets ? ( vals ? "methods and variables" : "methods" ) : "variables"; - var print_msg = function (ppf) { + let print_msg = function (ppf) { if (imm) { return Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -80390,8 +80390,8 @@ register_error_of_exn(function (param) { }); })); case /* Bad_parameters */13 : - var cstrs = param$1._2; - var params = param$1._1; + let cstrs = param$1._2; + let params = param$1._1; reset_and_mark_loops_list({ hd: params, tl: { @@ -80490,8 +80490,8 @@ register_error_of_exn(function (param) { _1: "Unbound instance variable %s" }), param$1._0); case /* Unbound_type_var */16 : - var print_common = function (ppf, kind, ty0, real, lab, ty) { - var ty1 = real ? ty0 : newty2(100000000, { + let print_common = function (ppf, kind, ty0, real, lab, ty) { + let ty1 = real ? ty0 : newty2(100000000, { TAG: /* Tobject */4, _0: ty0, _1: { @@ -80583,7 +80583,7 @@ register_error_of_exn(function (param) { _1: "The %s %s@ has type@;<1 2>%a@ where@ %a@ is unbound" }), kind, lab, type_expr$1, ty, type_expr$1, ty0); }; - var print_reason = function (ppf, param) { + let print_reason = function (ppf, param) { if (param.TAG === /* CC_Method */0) { return print_common(ppf, "method", param._0, param._1, param._2, param._3); } else { @@ -80736,7 +80736,7 @@ register_error_of_exn(function (param) { _1: "@[@[Self type should not occur in the non-generic type@;<1 2>%a@]@,It would escape the scope of its class@]" }), type_scheme, param$1._0); case /* Non_generalizable_class */18 : - var id = param$1._0; + let id = param$1._0; return Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -80851,7 +80851,7 @@ register_error_of_exn(function (param) { _1: "@[The type of self cannot be coerced to@ the type of the current class:@ %a.@.Some occurrences are contravariant@]" }), type_scheme, param$1._0); case /* Non_collapsable_conjunction */20 : - var id$1 = param$1._0; + let id$1 = param$1._0; Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -80945,7 +80945,7 @@ register_error_of_exn(function (param) { }); })); case /* Mutability_mismatch */22 : - var match = param$1._1 === /* Immutable */0 ? [ + let match = param$1._1 === /* Immutable */0 ? [ "mutable", "immutable" ] : [ @@ -81147,9 +81147,9 @@ register_error_of_exn(function (param) { }), param._3); }); -var $$Error$10 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Error"); +let $$Error$10 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Error"); -var Error_forward$3 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Error_forward"); +let Error_forward$3 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Error_forward"); function fst3(param) { return param[0]; @@ -81188,7 +81188,7 @@ function path_concat(head, p) { } function extract_sig(env, loc, mty) { - var sg = scrape_alias(env, undefined, mty); + let sg = scrape_alias(env, undefined, mty); if (sg.TAG === /* Mty_signature */1) { return sg._0; } @@ -81201,7 +81201,7 @@ function extract_sig(env, loc, mty) { } function extract_sig_open(env, loc, mty) { - var sg = scrape_alias(env, undefined, mty); + let sg = scrape_alias(env, undefined, mty); if (sg.TAG === /* Mty_signature */1) { return sg._0; } @@ -81217,9 +81217,9 @@ function extract_sig_open(env, loc, mty) { } function type_open_(toplevel, ovf, env, loc, lid) { - var match = find_module$1(env, lid.loc, lid.txt); - var path = match[0]; - var sg = extract_sig_open(env, lid.loc, match[1].md_type); + let match = find_module$1(env, lid.loc, lid.txt); + let path = match[0]; + let sg = extract_sig_open(env, lid.loc, match[1].md_type); return [ path, open_signature$1(loc, toplevel, ovf, path, sg, env) @@ -81227,13 +81227,13 @@ function type_open_(toplevel, ovf, env, loc, lid) { } function type_open$1(toplevel, env, sod) { - var match = type_open_(toplevel, sod.popen_override, env, sod.popen_loc, sod.popen_lid); - var path = match[0]; - var od_open_txt = sod.popen_lid; - var od_open_override = sod.popen_override; - var od_open_loc = sod.popen_loc; - var od_open_attributes = sod.popen_attributes; - var od = { + let match = type_open_(toplevel, sod.popen_override, env, sod.popen_loc, sod.popen_lid); + let path = match[0]; + let od_open_txt = sod.popen_lid; + let od_open_override = sod.popen_override; + let od_open_loc = sod.popen_loc; + let od_open_attributes = sod.popen_attributes; + let od = { open_path: path, open_txt: od_open_txt, open_override: od_open_override, @@ -81247,7 +81247,7 @@ function type_open$1(toplevel, env, sod) { ]; } -var type_module_type_of_fwd = { +let type_module_type_of_fwd = { contents: (function (env, m) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -81262,12 +81262,12 @@ var type_module_type_of_fwd = { function add_rec_types(_env, _param) { while(true) { - var param = _param; - var env = _env; + let param = _param; + let env = _env; if (!param) { return env; } - var match = param.hd; + let match = param.hd; if (match.TAG !== /* Sig_type */1) { return env; } @@ -81281,9 +81281,9 @@ function add_rec_types(_env, _param) { } function check_type_decl(env, loc, id, row_id, newdecl, decl, rs, rem) { - var env$1 = add_type$1(true, id, newdecl, env); - var env$2 = row_id !== undefined ? add_type$1(true, row_id, newdecl, env$1) : env$1; - var env$3 = rs === /* Trec_not */0 ? env$2 : add_rec_types(env$2, rem); + let env$1 = add_type$1(true, id, newdecl, env); + let env$2 = row_id !== undefined ? add_type$1(true, row_id, newdecl, env$1) : env$1; + let env$3 = rs === /* Trec_not */0 ? env$2 : add_rec_types(env$2, rem); type_declarations$3(env$3, id, newdecl, decl); check_coherence(env$3, loc, id, newdecl); } @@ -81295,7 +81295,7 @@ function update_rec_next(rs, rem) { if (!rem) { return rem; } - var match = rem.hd; + let match = rem.hd; switch (match.TAG | 0) { case /* Sig_type */1 : if (match._2 >= 2) { @@ -81331,14 +81331,14 @@ function update_rec_next(rs, rem) { } function merge_constraint(initial_env, loc, sg, constr) { - var lid; + let lid; switch (constr.TAG | 0) { case /* Pwith_type */0 : case /* Pwith_module */1 : lid = constr._0; break; case /* Pwith_typesubst */2 : - var s = constr._0.ptype_name; + let s = constr._0.ptype_name; lid = { txt: { TAG: /* Lident */0, @@ -81348,7 +81348,7 @@ function merge_constraint(initial_env, loc, sg, constr) { }; break; case /* Pwith_modsubst */3 : - var s$1 = constr._0; + let s$1 = constr._0; lid = { txt: { TAG: /* Lident */0, @@ -81359,40 +81359,40 @@ function merge_constraint(initial_env, loc, sg, constr) { break; } - var real_id = { + let real_id = { contents: undefined }; - var merge = function (env, _sg, namelist, _row_id) { + let merge = function (env, _sg, namelist, _row_id) { while(true) { - var row_id = _row_id; - var sg = _sg; + let row_id = _row_id; + let sg = _sg; if (sg) { - var item = sg.hd; + let item = sg.hd; switch (item.TAG | 0) { case /* Sig_type */1 : if (namelist && !namelist.tl) { - var s = namelist.hd; - var rem = sg.tl; - var rs = item._2; - var decl = item._1; - var id = item._0; - var exit = 0; + let s = namelist.hd; + let rem = sg.tl; + let rs = item._2; + let decl = item._1; + let id = item._0; + let exit = 0; switch (constr.TAG | 0) { case /* Pwith_type */0 : - var sdecl = constr._1; - var exit$1 = 0; - var match = sdecl.ptype_kind; + let sdecl = constr._1; + let exit$1 = 0; + let match = sdecl.ptype_kind; if (typeof match === "number" && !match) { if (id.name === s && is_fixed_type(sdecl)) { - var decl_row_type_params = Stdlib__List.map((function (param) { + let decl_row_type_params = Stdlib__List.map((function (param) { return newty2(100000000, { TAG: /* Tvar */0, _0: undefined }); }), sdecl.ptype_params); - var decl_row_type_arity = Stdlib__List.length(sdecl.ptype_params); - var decl_row_type_variance = Stdlib__List.map((function (param) { - var match; + let decl_row_type_arity = Stdlib__List.length(sdecl.ptype_params); + let decl_row_type_variance = Stdlib__List.map((function (param) { + let match; switch (param[1]) { case /* Covariant */0 : match = [ @@ -81414,13 +81414,13 @@ function merge_constraint(initial_env, loc, sg, constr) { break; } - var p = !match[1]; - var n = !match[0]; - var i = false; + let p = !match[1]; + let n = !match[0]; + let i = false; return Curry._3(Types_Variance.set, /* May_pos */0, p, Curry._3(Types_Variance.set, /* May_neg */1, n, Curry._3(Types_Variance.set, /* May_weak */2, n, Curry._3(Types_Variance.set, /* Inj */3, i, Types_Variance.$$null)))); }), sdecl.ptype_params); - var decl_row_type_loc = sdecl.ptype_loc; - var decl_row = { + let decl_row_type_loc = sdecl.ptype_loc; + let decl_row = { type_params: decl_row_type_params, type_arity: decl_row_type_arity, type_kind: /* Type_abstract */0, @@ -81431,19 +81431,19 @@ function merge_constraint(initial_env, loc, sg, constr) { type_loc: decl_row_type_loc, type_attributes: /* [] */0 }; - var id_row = create(s + "#row"); - var initial_env$1 = add_type$1(true, id_row, decl_row, initial_env); - var tdecl = transl_with_constraint(initial_env$1, id, { + let id_row = create(s + "#row"); + let initial_env$1 = add_type$1(true, id_row, decl_row, initial_env); + let tdecl = transl_with_constraint(initial_env$1, id, { TAG: /* Pident */0, _0: id_row }, decl, sdecl); - var newdecl = tdecl.typ_type; + let newdecl = tdecl.typ_type; check_type_decl(env, sdecl.ptype_loc, id, row_id, newdecl, decl, rs, rem); - var decl_row_type_params$1 = newdecl.type_params; - var decl_row_type_arity$1 = decl_row_type_arity; - var decl_row_type_variance$1 = decl_row_type_variance; - var decl_row_type_loc$1 = decl_row_type_loc; - var decl_row$1 = { + let decl_row_type_params$1 = newdecl.type_params; + let decl_row_type_arity$1 = decl_row_type_arity; + let decl_row_type_variance$1 = decl_row_type_variance; + let decl_row_type_loc$1 = decl_row_type_loc; + let decl_row$1 = { type_params: decl_row_type_params$1, type_arity: decl_row_type_arity$1, type_kind: /* Type_abstract */0, @@ -81454,7 +81454,7 @@ function merge_constraint(initial_env, loc, sg, constr) { type_loc: decl_row_type_loc$1, type_attributes: /* [] */0 }; - var rs$p = rs === /* Trec_first */1 ? /* Trec_not */0 : rs; + let rs$p = rs === /* Trec_first */1 ? /* Trec_not */0 : rs; return [ [ { @@ -81492,8 +81492,8 @@ function merge_constraint(initial_env, loc, sg, constr) { } if (exit$1 === 3) { if (id.name === s) { - var tdecl$1 = transl_with_constraint(initial_env, id, undefined, decl, sdecl); - var newdecl$1 = tdecl$1.typ_type; + let tdecl$1 = transl_with_constraint(initial_env, id, undefined, decl, sdecl); + let newdecl$1 = tdecl$1.typ_type; check_type_decl(env, sdecl.ptype_loc, id, row_id, newdecl$1, decl, rs, rem); return [ [ @@ -81536,10 +81536,10 @@ function merge_constraint(initial_env, loc, sg, constr) { continue ; } if (constr.TAG !== /* Pwith_type */0) { - var sdecl$1 = constr._0; + let sdecl$1 = constr._0; if (id.name === s) { - var tdecl$2 = transl_with_constraint(initial_env, id, undefined, decl, sdecl$1); - var newdecl$2 = tdecl$2.typ_type; + let tdecl$2 = transl_with_constraint(initial_env, id, undefined, decl, sdecl$1); + let newdecl$2 = tdecl$2.typ_type; check_type_decl(env, sdecl$1.ptype_loc, id, row_id, newdecl$2, decl, rs, rem); real_id.contents = id; return [ @@ -81566,31 +81566,31 @@ function merge_constraint(initial_env, loc, sg, constr) { break; case /* Sig_module */3 : if (namelist) { - var s$1 = namelist.hd; - var rem$1 = sg.tl; - var rs$1 = item._2; - var md = item._1; - var id$1 = item._0; - var exit$2 = 0; + let s$1 = namelist.hd; + let rem$1 = sg.tl; + let rs$1 = item._2; + let md = item._1; + let id$1 = item._0; + let exit$2 = 0; if (namelist.tl) { exit$2 = 2; } else { switch (constr.TAG | 0) { case /* Pwith_module */1 : - var lid$p = constr._1; + let lid$p = constr._1; if (id$1.name === s$1) { - var match$1 = find_module$1(initial_env, loc, lid$p.txt); - var md$p = match$1[1]; - var path = match$1[0]; - var md$p$p_md_type = remove_aliases$1(env, md$p.md_type); - var md$p$p_md_attributes = md$p.md_attributes; - var md$p$p_md_loc = md$p.md_loc; - var md$p$p = { + let match$1 = find_module$1(initial_env, loc, lid$p.txt); + let md$p = match$1[1]; + let path = match$1[0]; + let md$p$p_md_type = remove_aliases$1(env, md$p.md_type); + let md$p$p_md_attributes = md$p.md_attributes; + let md$p$p_md_loc = md$p.md_loc; + let md$p$p = { md_type: md$p$p_md_type, md_attributes: md$p$p_md_attributes, md_loc: md$p$p_md_loc }; - var newmd = strengthen_decl(env, md$p$p, path); + let newmd = strengthen_decl(env, md$p$p, path); modtypes$1(env, newmd.md_type, md.md_type); return [ [ @@ -81623,11 +81623,11 @@ function merge_constraint(initial_env, loc, sg, constr) { exit$2 = 2; break; case /* Pwith_modsubst */3 : - var lid$p$1 = constr._1; + let lid$p$1 = constr._1; if (id$1.name === s$1) { - var match$2 = find_module$1(initial_env, loc, lid$p$1.txt); - var path$1 = match$2[0]; - var newmd$1 = strengthen_decl(env, match$2[1], path$1); + let match$2 = find_module$1(initial_env, loc, lid$p$1.txt); + let path$1 = match$2[0]; + let newmd$1 = strengthen_decl(env, match$2[1], path$1); modtypes$1(env, newmd$1.md_type, md.md_type); real_id.contents = id$1; return [ @@ -81652,8 +81652,8 @@ function merge_constraint(initial_env, loc, sg, constr) { } } if (exit$2 === 2 && id$1.name === s$1) { - var match$3 = merge(env, extract_sig(env, loc, md.md_type), namelist.tl, undefined); - var match$4 = match$3[0]; + let match$3 = merge(env, extract_sig(env, loc, md.md_type), namelist.tl, undefined); + let match$4 = match$3[0]; return [ [ path_concat(id$1, match$4[0]), @@ -81684,7 +81684,7 @@ function merge_constraint(initial_env, loc, sg, constr) { default: } - var match$5 = merge(add_item(item, env), sg.tl, namelist, row_id); + let match$5 = merge(add_item(item, env), sg.tl, namelist, row_id); return [ match$5[0], { @@ -81705,10 +81705,10 @@ function merge_constraint(initial_env, loc, sg, constr) { }; }; try { - var names = flat(/* [] */0, lid.txt); - var match = merge(initial_env, sg, names, undefined); - var sg$1 = match[1]; - var sg$2; + let names = flat(/* [] */0, lid.txt); + let match = merge(initial_env, sg, names, undefined); + let sg$1 = match[1]; + let sg$2; if (names && !names.tl) { switch (constr.TAG | 0) { case /* Pwith_type */0 : @@ -81716,9 +81716,9 @@ function merge_constraint(initial_env, loc, sg, constr) { sg$2 = sg$1; break; case /* Pwith_typesubst */2 : - var sdecl = constr._0; - var id = real_id.contents; - var id$1; + let sdecl = constr._0; + let id = real_id.contents; + let id$1; if (id !== undefined) { id$1 = id; } else { @@ -81731,28 +81731,28 @@ function merge_constraint(initial_env, loc, sg, constr) { ] }); } - var lid$1; + let lid$1; try { - var match$1 = sdecl.ptype_manifest; + let match$1 = sdecl.ptype_manifest; if (match$1 !== undefined) { - var match$2 = match$1.ptyp_desc; + let match$2 = match$1.ptyp_desc; if (typeof match$2 === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } if (match$2.TAG === /* Ptyp_constr */3) { - var stl = match$2._1; + let stl = match$2._1; if (Stdlib__List.length(stl) === Stdlib__List.length(sdecl.ptype_params)) { Stdlib__List.iter2((function (x, param) { - var sx = x.ptyp_desc; + let sx = x.ptyp_desc; if (typeof sx === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } if (sx.TAG === /* Ptyp_var */0) { - var sy = param[0].ptyp_desc; + let sy = param[0].ptyp_desc; if (typeof sy === "number") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit @@ -81793,7 +81793,7 @@ function merge_constraint(initial_env, loc, sg, constr) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -81804,12 +81804,12 @@ function merge_constraint(initial_env, loc, sg, constr) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var match$3; + let match$3; try { match$3 = lookup_type$1(lid$1.txt, initial_env); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -81822,12 +81822,12 @@ function merge_constraint(initial_env, loc, sg, constr) { } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var sub = add_type(id$1, match$3[0], identity); + let sub = add_type(id$1, match$3[0], identity); sg$2 = signature$2(sub, sg$1); break; case /* Pwith_modsubst */3 : - var id$2 = real_id.contents; - var id$3; + let id$2 = real_id.contents; + let id$3; if (id$2 !== undefined) { id$3 = id$2; } else { @@ -81840,8 +81840,8 @@ function merge_constraint(initial_env, loc, sg, constr) { ] }); } - var path = lookup_module$1(undefined, initial_env, loc, constr._1.txt); - var sub$1 = add_module(id$3, path, identity); + let path = lookup_module$1(undefined, initial_env, loc, constr._1.txt); + let sub$1 = add_module(id$3, path, identity); sg$2 = signature$2(sub$1, sg$1); break; @@ -81855,7 +81855,7 @@ function merge_constraint(initial_env, loc, sg, constr) { ]; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -81887,7 +81887,7 @@ function map_rec_type(rec_flag, fn, decls, rem) { if (!decls) { return rem; } - var first = rec_flag ? /* Trec_first */1 : /* Trec_not */0; + let first = rec_flag ? /* Trec_first */1 : /* Trec_not */0; return { hd: Curry._2(fn, first, decls.hd), tl: map_end(Curry._1(fn, /* Trec_next */2), decls.tl, rem) @@ -81898,7 +81898,7 @@ function map_rec_type_with_row_types(rec_flag, fn, decls, rem) { if (!decls) { return rem; } - var d1 = decls.hd; + let d1 = decls.hd; if (is_row_name(d1.typ_id.name)) { return { hd: Curry._2(fn, /* Trec_not */0, d1), @@ -81910,7 +81910,7 @@ function map_rec_type_with_row_types(rec_flag, fn, decls, rem) { } function rec_flag_of_ptype_declarations(tds) { - var is_nonrec = Stdlib__List.exists((function (td) { + let is_nonrec = Stdlib__List.exists((function (td) { return Stdlib__List.exists((function (param) { return param[0].txt === "nonrec"; }), td.ptype_attributes); @@ -81935,11 +81935,11 @@ function map_ext(fn, exts, rem) { function approx_modtype(env, _smty) { while(true) { - var smty = _smty; - var lid = smty.pmty_desc; + let smty = _smty; + let lid = smty.pmty_desc; switch (lid.TAG | 0) { case /* Pmty_ident */0 : - var match = find_modtype$1(env, smty.pmty_loc, lid._0.txt); + let match = find_modtype$1(env, smty.pmty_loc, lid._0.txt); return { TAG: /* Mty_ident */0, _0: match[0] @@ -81950,14 +81950,14 @@ function approx_modtype(env, _smty) { _0: approx_sig(env, lid._0) }; case /* Pmty_functor */2 : - var arg = may_map((function (param) { + let arg = may_map((function (param) { return approx_modtype(env, param); }), lid._1); - var match$1 = enter_module(true, lid._0.txt, arg !== undefined ? arg : ({ + let match$1 = enter_module(true, lid._0.txt, arg !== undefined ? arg : ({ TAG: /* Mty_signature */1, _0: /* [] */0 }), env); - var res = approx_modtype(match$1[1], lid._2); + let res = approx_modtype(match$1[1], lid._2); return { TAG: /* Mty_functor */2, _0: match$1[0], @@ -81975,7 +81975,7 @@ function approx_modtype(env, _smty) { _1: error_of_extension(lid._0) }); case /* Pmty_alias */6 : - var path = lookup_module$1(undefined, env, smty.pmty_loc, lid._0.txt); + let path = lookup_module$1(undefined, env, smty.pmty_loc, lid._0.txt); return { TAG: /* Mty_alias */3, _0: path @@ -81995,19 +81995,19 @@ function approx_module_declaration(env, pmd) { function approx_sig(_env, _ssg) { while(true) { - var ssg = _ssg; - var env = _env; + let ssg = _ssg; + let env = _env; if (!ssg) { return /* [] */0; } - var srem = ssg.tl; - var sdecls = ssg.hd.psig_desc; + let srem = ssg.tl; + let sdecls = ssg.hd.psig_desc; switch (sdecls.TAG | 0) { case /* Psig_type */1 : - var sdecls$1 = sdecls._0; - var rec_flag = rec_flag_of_ptype_declarations(sdecls$1); - var decls = approx_type_decl(env, sdecls$1); - var rem = approx_sig(env, srem); + let sdecls$1 = sdecls._0; + let rec_flag = rec_flag_of_ptype_declarations(sdecls$1); + let decls = approx_type_decl(env, sdecls$1); + let rem = approx_sig(env, srem); return map_rec_type(rec_flag, (function (rs, param) { return { TAG: /* Sig_type */1, @@ -82017,9 +82017,9 @@ function approx_sig(_env, _ssg) { }; }), decls, rem); case /* Psig_module */4 : - var pmd = sdecls._0; - var md = approx_module_declaration(env, pmd); - var match = enter_module_declaration(undefined, pmd.pmd_name.txt, md, env); + let pmd = sdecls._0; + let md = approx_module_declaration(env, pmd); + let match = enter_module_declaration(undefined, pmd.pmd_name.txt, md, env); return { hd: { TAG: /* Sig_module */3, @@ -82030,7 +82030,7 @@ function approx_sig(_env, _ssg) { tl: approx_sig(match[1], srem) }; case /* Psig_recmodule */5 : - var decls$1 = Stdlib__List.map((function(env){ + let decls$1 = Stdlib__List.map((function(env){ return function (pmd) { return [ create(pmd.pmd_name.txt), @@ -82038,7 +82038,7 @@ function approx_sig(_env, _ssg) { ]; } }(env)), sdecls._0); - var newenv = Stdlib__List.fold_left((function (env, param) { + let newenv = Stdlib__List.fold_left((function (env, param) { return add_module_declaration(undefined, param[0], param[1], env); }), env, decls$1); return map_rec((function (rs, param) { @@ -82050,9 +82050,9 @@ function approx_sig(_env, _ssg) { }; }), decls$1, approx_sig(newenv, srem)); case /* Psig_modtype */6 : - var d = sdecls._0; - var info = approx_modtype_info(env, d); - var match$1 = enter_modtype(d.pmtd_name.txt, info, env); + let d = sdecls._0; + let info = approx_modtype_info(env, d); + let match$1 = enter_modtype(d.pmtd_name.txt, info, env); return { hd: { TAG: /* Sig_modtype */4, @@ -82062,15 +82062,15 @@ function approx_sig(_env, _ssg) { tl: approx_sig(match$1[1], srem) }; case /* Psig_open */7 : - var match$2 = type_open$1(undefined, env, sdecls._0); + let match$2 = type_open$1(undefined, env, sdecls._0); _ssg = srem; _env = match$2[1]; continue ; case /* Psig_include */8 : - var smty = sdecls._0.pincl_mod; - var mty = approx_modtype(env, smty); - var sg = signature$2(identity, extract_sig(env, smty.pmty_loc, mty)); - var newenv$1 = add_signature(sg, env); + let smty = sdecls._0.pincl_mod; + let mty = approx_modtype(env, smty); + let sg = signature$2(identity, extract_sig(env, smty.pmty_loc, mty)); + let newenv$1 = add_signature(sg, env); return Stdlib.$at(sg, approx_sig(newenv$1, srem)); case /* Psig_class */9 : case /* Psig_class_type */10 : @@ -82079,8 +82079,8 @@ function approx_sig(_env, _ssg) { _ssg = srem; continue ; } - var decls$2 = approx_class_declarations(env, sdecls._0); - var rem$1 = approx_sig(env, srem); + let decls$2 = approx_class_declarations(env, sdecls._0); + let rem$1 = approx_sig(env, srem); return Stdlib__List.flatten(map_rec((function (rs, param) { return { hd: { @@ -82125,13 +82125,13 @@ function approx_modtype_info(env, sinfo) { } function check_recmod_typedecls(env, sdecls, decls) { - var recmod_ids = Stdlib__List.map(fst3, decls); + let recmod_ids = Stdlib__List.map(fst3, decls); Stdlib__List.iter2((function (pmd, param) { - var mty = param[2].mty_type; + let mty = param[2].mty_type; Stdlib__List.iter((function (path) { - var loc = pmd.pmd_type.pmty_loc; - var decl = find_type_full(path, env)[0]; - var to_check = function (path) { + let loc = pmd.pmd_type.pmty_loc; + let decl = find_type_full(path, env)[0]; + let to_check = function (path) { return Stdlib__List.exists((function (id) { return isfree(id, path); }), recmod_ids); @@ -82145,9 +82145,9 @@ function check_recmod_typedecls(env, sdecls, decls) { }), sdecls, decls); } -var compare$8 = Caml.caml_string_compare; +let compare$8 = Caml.caml_string_compare; -var funarg$7 = { +let funarg$7 = { compare: compare$8 }; @@ -82160,8 +82160,8 @@ function height$12(param) { } function create$13(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -82171,13 +82171,13 @@ function create$13(l, v, r) { } function bal$12(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height$12(ll) >= height$12(lr)) { return create$13(ll, lv, create$13(lr, v, r)); } @@ -82203,9 +82203,9 @@ function bal$12(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height$12(rr) >= height$12(rl)) { return create$13(create$13(l, v, rl), rv, rr); } @@ -82232,22 +82232,22 @@ function add$14(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg$7.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg$7.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add$14(x, l); + let ll = add$14(x, l); if (l === ll) { return t; } else { return bal$12(ll, v, r); } } - var rr = add$14(x, r); + let rr = add$14(x, r); if (r === rr) { return t; } else { @@ -82257,11 +82257,11 @@ function add$14(x, t) { function mem$7(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$7.compare, x, param.v); + let c = Curry._2(funarg$7.compare, x, param.v); if (c === 0) { return true; } @@ -82305,14 +82305,14 @@ function check_sig_item(type_names, module_names, modtype_names, loc, param) { function remove_duplicates(val_ids, ext_ids, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var f = param.hd; + let f = param.hd; switch (f.TAG | 0) { case /* Sig_value */0 : - var id = f._0; + let id = f._0; if (Stdlib__List.exists((function(id){ return function (param) { return equal(id, param); @@ -82323,14 +82323,14 @@ function remove_duplicates(val_ids, ext_ids, _param) { } break; case /* Sig_typext */2 : - var id$1 = f._0; - var exit = 0; + let id$1 = f._0; + let exit = 0; if (f._2) { exit = 2; } else { - var match = param.tl; + let match = param.tl; if (match) { - var match$1 = match.hd; + let match$1 = match.hd; if (match$1.TAG === /* Sig_typext */2 && match$1._2 === 1) { if (Stdlib__List.exists((function(id$1){ return function (param) { @@ -82377,11 +82377,11 @@ function remove_duplicates(val_ids, ext_ids, _param) { function get_values(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var f = param.hd; + let f = param.hd; if (f.TAG === /* Sig_value */0) { return { hd: f._0, @@ -82395,11 +82395,11 @@ function get_values(_param) { function get_extension_constructors(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var f = param.hd; + let f = param.hd; if (f.TAG === /* Sig_typext */2) { return { hd: f._0, @@ -82420,7 +82420,7 @@ function transl_module_alias(loc, env, lid) { } function mkmty$1(desc, typ, env, loc, attrs) { - var mty = { + let mty = { mty_desc: desc, mty_type: typ, mty_env: env, @@ -82435,7 +82435,7 @@ function mkmty$1(desc, typ, env, loc, attrs) { } function mksig$1(desc, env, loc) { - var sg = { + let sg = { sig_desc: desc, sig_env: env, sig_loc: loc @@ -82448,12 +82448,12 @@ function mksig$1(desc, env, loc) { } function transl_modtype$1(env, smty) { - var loc = smty.pmty_loc; - var lid = smty.pmty_desc; + let loc = smty.pmty_loc; + let lid = smty.pmty_desc; switch (lid.TAG | 0) { case /* Pmty_ident */0 : - var lid$1 = lid._0; - var path = transl_modtype_longident$1(loc, env, lid$1.txt); + let lid$1 = lid._0; + let path = transl_modtype_longident$1(loc, env, lid$1.txt); return mkmty$1({ TAG: /* Tmty_ident */0, _0: path, @@ -82463,7 +82463,7 @@ function transl_modtype$1(env, smty) { _0: path }, env, loc, smty.pmty_attributes); case /* Pmty_signature */1 : - var sg = transl_signature(env, lid._0); + let sg = transl_signature(env, lid._0); return mkmty$1({ TAG: /* Tmty_signature */1, _0: sg @@ -82472,20 +82472,20 @@ function transl_modtype$1(env, smty) { _0: sg.sig_type }, env, loc, smty.pmty_attributes); case /* Pmty_functor */2 : - var param = lid._0; - var arg = may_map((function (param) { + let param = lid._0; + let arg = may_map((function (param) { return transl_modtype$1(env, param); }), lid._1); - var ty_arg = may_map((function (m) { + let ty_arg = may_map((function (m) { return m.mty_type; }), arg); - var match = enter_module(true, param.txt, ty_arg !== undefined ? ty_arg : ({ + let match = enter_module(true, param.txt, ty_arg !== undefined ? ty_arg : ({ TAG: /* Mty_signature */1, _0: /* [] */0 }), env); - var id = match[0]; + let id = match[0]; init_def(currentstamp.contents); - var res = transl_modtype$1(match[1], lid._2); + let res = transl_modtype$1(match[1], lid._2); return mkmty$1({ TAG: /* Tmty_functor */2, _0: id, @@ -82499,11 +82499,11 @@ function transl_modtype$1(env, smty) { _2: res.mty_type }, env, loc, smty.pmty_attributes); case /* Pmty_with */3 : - var sbody = lid._0; - var body = transl_modtype$1(env, sbody); - var init_sg = extract_sig(env, sbody.pmty_loc, body.mty_type); - var match$1 = Stdlib__List.fold_left((function (param, sdecl) { - var match = merge_constraint(env, smty.pmty_loc, param[1], sdecl); + let sbody = lid._0; + let body = transl_modtype$1(env, sbody); + let init_sg = extract_sig(env, sbody.pmty_loc, body.mty_type); + let match$1 = Stdlib__List.fold_left((function (param, sdecl) { + let match = merge_constraint(env, smty.pmty_loc, param[1], sdecl); return [ { hd: match[0], @@ -82524,7 +82524,7 @@ function transl_modtype$1(env, smty) { _0: match$1[1] }), env, loc, smty.pmty_attributes); case /* Pmty_typeof */4 : - var match$2 = Curry._2(type_module_type_of_fwd.contents, env, lid._0); + let match$2 = Curry._2(type_module_type_of_fwd.contents, env, lid._0); return mkmty$1({ TAG: /* Tmty_typeof */4, _0: match$2[0] @@ -82535,8 +82535,8 @@ function transl_modtype$1(env, smty) { _1: error_of_extension(lid._0) }); case /* Pmty_alias */6 : - var lid$2 = lid._0; - var path$1 = transl_module_alias(loc, env, lid$2.txt); + let lid$2 = lid._0; + let path$1 = transl_module_alias(loc, env, lid$2.txt); return mkmty$1({ TAG: /* Tmty_alias */5, _0: path$1, @@ -82550,16 +82550,16 @@ function transl_modtype$1(env, smty) { } function transl_signature(env, sg) { - var type_names = { + let type_names = { contents: /* Empty */0 }; - var module_names = { + let module_names = { contents: /* Empty */0 }; - var modtype_names = { + let modtype_names = { contents: /* Empty */0 }; - var transl_sig = function (env, sg) { + let transl_sig = function (env, sg) { init_def(currentstamp.contents); if (!sg) { return [ @@ -82568,17 +82568,17 @@ function transl_signature(env, sg) { env ]; } - var srem = sg.tl; - var item = sg.hd; - var loc = item.psig_loc; - var sdesc = item.psig_desc; + let srem = sg.tl; + let item = sg.hd; + let loc = item.psig_loc; + let sdesc = item.psig_desc; switch (sdesc.TAG | 0) { case /* Psig_value */0 : - var match = transl_value_decl(env, item.psig_loc, sdesc._0); - var tdesc = match[0]; - var match$1 = transl_sig(match[1], srem); - var rem = match$1[1]; - var partial_arg = tdesc.val_id; + let match = transl_value_decl(env, item.psig_loc, sdesc._0); + let tdesc = match[0]; + let match$1 = transl_sig(match[1], srem); + let rem = match$1[1]; + let partial_arg = tdesc.val_id; return [ { hd: mksig$1({ @@ -82600,14 +82600,14 @@ function transl_signature(env, sg) { match$1[2] ]; case /* Psig_type */1 : - var sdecls = sdesc._0; - var rec_flag = rec_flag_of_ptype_declarations(sdecls); + let sdecls = sdesc._0; + let rec_flag = rec_flag_of_ptype_declarations(sdecls); Stdlib__List.iter((function (decl) { check_name("type", type_names, decl.ptype_name); }), sdecls); - var match$2 = transl_type_decl(env, rec_flag, sdecls); - var decls = match$2[0]; - var match$3 = transl_sig(match$2[1], srem); + let match$2 = transl_type_decl(env, rec_flag, sdecls); + let decls = match$2[0]; + let match$3 = transl_sig(match$2[1], srem); return [ { hd: mksig$1({ @@ -82627,12 +82627,12 @@ function transl_signature(env, sg) { match$3[2] ]; case /* Psig_typext */2 : - var match$4 = transl_type_extension(false, env, item.psig_loc, sdesc._0); - var tyext = match$4[0]; - var match$5 = transl_sig(match$4[1], srem); - var rem$1 = match$5[1]; - var constructors = Stdlib__List.filter((function (ext) { - var partial_arg = ext.ext_id; + let match$4 = transl_type_extension(false, env, item.psig_loc, sdesc._0); + let tyext = match$4[0]; + let match$5 = transl_sig(match$4[1], srem); + let rem$1 = match$5[1]; + let constructors = Stdlib__List.filter((function (ext) { + let partial_arg = ext.ext_id; return !Stdlib__List.exists((function (param) { return equal(partial_arg, param); }), get_extension_constructors(rem$1)); @@ -82656,12 +82656,12 @@ function transl_signature(env, sg) { match$5[2] ]; case /* Psig_exception */3 : - var match$6 = transl_exception(env, sdesc._0); - var ext = match$6[0]; - var match$7 = transl_sig(match$6[1], srem); - var rem$2 = match$7[1]; - var partial_arg$1 = ext.ext_id; - var shadowed = Stdlib__List.exists((function (param) { + let match$6 = transl_exception(env, sdesc._0); + let ext = match$6[0]; + let match$7 = transl_sig(match$6[1], srem); + let rem$2 = match$7[1]; + let partial_arg$1 = ext.ext_id; + let shadowed = Stdlib__List.exists((function (param) { return equal(partial_arg$1, param); }), get_extension_constructors(rem$2)); return [ @@ -82684,20 +82684,20 @@ function transl_signature(env, sg) { match$7[2] ]; case /* Psig_module */4 : - var pmd = sdesc._0; + let pmd = sdesc._0; check_name("module", module_names, pmd.pmd_name); - var tmty = transl_modtype$1(env, pmd.pmd_type); - var md_md_type = tmty.mty_type; - var md_md_attributes = pmd.pmd_attributes; - var md_md_loc = pmd.pmd_loc; - var md = { + let tmty = transl_modtype$1(env, pmd.pmd_type); + let md_md_type = tmty.mty_type; + let md_md_attributes = pmd.pmd_attributes; + let md_md_loc = pmd.pmd_loc; + let md = { md_type: md_md_type, md_attributes: md_md_attributes, md_loc: md_md_loc }; - var match$8 = enter_module_declaration(undefined, pmd.pmd_name.txt, md, env); - var id = match$8[0]; - var match$9 = transl_sig(match$8[1], srem); + let match$8 = enter_module_declaration(undefined, pmd.pmd_name.txt, md, env); + let id = match$8[0]; + let match$9 = transl_sig(match$8[1], srem); return [ { hd: mksig$1({ @@ -82724,13 +82724,13 @@ function transl_signature(env, sg) { match$9[2] ]; case /* Psig_recmodule */5 : - var sdecls$1 = sdesc._0; + let sdecls$1 = sdesc._0; Stdlib__List.iter((function (pmd) { check_name("module", module_names, pmd.pmd_name); }), sdecls$1); - var match$10 = transl_recmodule_modtypes(item.psig_loc, env, sdecls$1); - var decls$1 = match$10[0]; - var match$11 = transl_sig(match$10[1], srem); + let match$10 = transl_recmodule_modtypes(item.psig_loc, env, sdecls$1); + let decls$1 = match$10[0]; + let match$11 = transl_sig(match$10[1], srem); return [ { hd: mksig$1({ @@ -82740,10 +82740,10 @@ function transl_signature(env, sg) { tl: match$11[0] }, map_rec((function (rs, md) { - var d_md_type = md.md_type.mty_type; - var d_md_attributes = md.md_attributes; - var d_md_loc = md.md_loc; - var d = { + let d_md_type = md.md_type.mty_type; + let d_md_attributes = md.md_attributes; + let d_md_loc = md.md_loc; + let d = { md_type: d_md_type, md_attributes: d_md_attributes, md_loc: d_md_loc @@ -82758,8 +82758,8 @@ function transl_signature(env, sg) { match$11[2] ]; case /* Psig_modtype */6 : - var match$12 = transl_modtype_decl(modtype_names, env, item.psig_loc, sdesc._0); - var match$13 = transl_sig(match$12[0], srem); + let match$12 = transl_modtype_decl(modtype_names, env, item.psig_loc, sdesc._0); + let match$13 = transl_sig(match$12[0], srem); return [ { hd: mksig$1({ @@ -82775,8 +82775,8 @@ function transl_signature(env, sg) { match$13[2] ]; case /* Psig_open */7 : - var match$14 = type_open$1(undefined, env, sdesc._0); - var match$15 = transl_sig(match$14[1], srem); + let match$14 = type_open$1(undefined, env, sdesc._0); + let match$15 = transl_sig(match$14[1], srem); return [ { hd: mksig$1({ @@ -82789,26 +82789,26 @@ function transl_signature(env, sg) { match$15[2] ]; case /* Psig_include */8 : - var sincl = sdesc._0; - var smty = sincl.pincl_mod; - var tmty$1 = transl_modtype$1(env, smty); - var mty = tmty$1.mty_type; - var sg$1 = signature$2(identity, extract_sig(env, smty.pmty_loc, mty)); - var partial_arg$2 = item.psig_loc; + let sincl = sdesc._0; + let smty = sincl.pincl_mod; + let tmty$1 = transl_modtype$1(env, smty); + let mty = tmty$1.mty_type; + let sg$1 = signature$2(identity, extract_sig(env, smty.pmty_loc, mty)); + let partial_arg$2 = item.psig_loc; Stdlib__List.iter((function (param) { return check_sig_item(type_names, module_names, modtype_names, partial_arg$2, param); }), sg$1); - var newenv = add_signature(sg$1, env); - var incl_incl_loc = sincl.pincl_loc; - var incl_incl_attributes = sincl.pincl_attributes; - var incl = { + let newenv = add_signature(sg$1, env); + let incl_incl_loc = sincl.pincl_loc; + let incl_incl_attributes = sincl.pincl_attributes; + let incl = { incl_mod: tmty$1, incl_type: sg$1, incl_loc: incl_incl_loc, incl_attributes: incl_incl_attributes }; - var match$16 = transl_sig(newenv, srem); - var rem$3 = match$16[1]; + let match$16 = transl_sig(newenv, srem); + let rem$3 = match$16[1]; return [ { hd: mksig$1({ @@ -82821,13 +82821,13 @@ function transl_signature(env, sg) { match$16[2] ]; case /* Psig_class */9 : - var cl = sdesc._0; + let cl = sdesc._0; Stdlib__List.iter((function (param) { check_name("type", type_names, param.pci_name); }), cl); - var match$17 = class_descriptions(env, cl); - var classes = match$17[0]; - var match$18 = transl_sig(match$17[1], srem); + let match$17 = class_descriptions(env, cl); + let classes = match$17[0]; + let match$18 = transl_sig(match$17[1], srem); return [ { hd: mksig$1({ @@ -82879,13 +82879,13 @@ function transl_signature(env, sg) { match$18[2] ]; case /* Psig_class_type */10 : - var cl$1 = sdesc._0; + let cl$1 = sdesc._0; Stdlib__List.iter((function (param) { check_name("type", type_names, param.pci_name); }), cl$1); - var match$19 = class_type_declarations$2(env, cl$1); - var classes$1 = match$19[0]; - var match$20 = transl_sig(match$19[1], srem); + let match$19 = class_type_declarations$2(env, cl$1); + let classes$1 = match$19[0]; + let match$20 = transl_sig(match$19[1], srem); return [ { hd: mksig$1({ @@ -82929,12 +82929,12 @@ function transl_signature(env, sg) { match$20[2] ]; case /* Psig_attribute */11 : - var x = sdesc._0; + let x = sdesc._0; warning_attribute({ hd: x, tl: /* [] */0 }); - var match$21 = transl_sig(env, srem); + let match$21 = transl_sig(env, srem); return [ { hd: mksig$1({ @@ -82954,13 +82954,13 @@ function transl_signature(env, sg) { } }; - var previous_saved_types = saved_types.contents; + let previous_saved_types = saved_types.contents; warning_enter_scope(undefined); - var match = transl_sig(in_signature(env), sg); - var sg_sig_items = match[0]; - var sg_sig_type = match[1]; - var sg_sig_final_env = match[2]; - var sg$1 = { + let match = transl_sig(in_signature(env), sg); + let sg_sig_items = match[0]; + let sg_sig_type = match[1]; + let sg_sig_final_env = match[2]; + let sg$1 = { sig_items: sg_sig_items, sig_type: sg_sig_type, sig_final_env: sg_sig_final_env @@ -82977,24 +82977,24 @@ function transl_signature(env, sg) { } function transl_modtype_decl(modtype_names, env, loc, param) { - var pmtd_loc = param.pmtd_loc; - var pmtd_attributes = param.pmtd_attributes; - var pmtd_name = param.pmtd_name; + let pmtd_loc = param.pmtd_loc; + let pmtd_attributes = param.pmtd_attributes; + let pmtd_name = param.pmtd_name; check_name("module type", modtype_names, pmtd_name); - var tmty = may_map((function (param) { + let tmty = may_map((function (param) { return transl_modtype$1(env, param); }), param.pmtd_type); - var decl_mtd_type = may_map((function (t) { + let decl_mtd_type = may_map((function (t) { return t.mty_type; }), tmty); - var decl = { + let decl = { mtd_type: decl_mtd_type, mtd_attributes: pmtd_attributes, mtd_loc: pmtd_loc }; - var match = enter_modtype(pmtd_name.txt, decl, env); - var id = match[0]; - var mtd = { + let match = enter_modtype(pmtd_name.txt, decl, env); + let id = match[0]; + let mtd = { mtd_id: id, mtd_name: pmtd_name, mtd_type: tmty, @@ -83013,17 +83013,17 @@ function transl_modtype_decl(modtype_names, env, loc, param) { } function transl_recmodule_modtypes(loc, env, sdecls) { - var make_env = function (curr) { + let make_env = function (curr) { return Stdlib__List.fold_left((function (env, param) { return add_module$1(true, param[0], param[2], env); }), env, curr); }; - var make_env2 = function (curr) { + let make_env2 = function (curr) { return Stdlib__List.fold_left((function (env, param) { return add_module$1(true, param[0], param[2].mty_type, env); }), env, curr); }; - var transition = function (env_c, curr) { + let transition = function (env_c, curr) { return Stdlib__List.map2((function (pmd, param) { return [ param[0], @@ -83032,11 +83032,11 @@ function transl_recmodule_modtypes(loc, env, sdecls) { ]; }), sdecls, curr); }; - var ids = Stdlib__List.map((function (x) { + let ids = Stdlib__List.map((function (x) { return create(x.pmd_name.txt); }), sdecls); - var approx_env = Stdlib__List.fold_left((function (env, id) { - var dummy = { + let approx_env = Stdlib__List.fold_left((function (env, id) { + let dummy = { TAG: /* Mty_ident */0, _0: { TAG: /* Pident */0, @@ -83045,21 +83045,21 @@ function transl_recmodule_modtypes(loc, env, sdecls) { }; return add_module$1(true, id, dummy, env); }), env, ids); - var init = Stdlib__List.map2((function (id, pmd) { + let init = Stdlib__List.map2((function (id, pmd) { return [ id, pmd.pmd_name, approx_modtype(approx_env, pmd.pmd_type) ]; }), ids, sdecls); - var env0 = make_env(init); - var dcl1 = transition(env0, init); - var env1 = make_env2(dcl1); + let env0 = make_env(init); + let dcl1 = transition(env0, init); + let env1 = make_env2(dcl1); check_recmod_typedecls(env1, sdecls, dcl1); - var dcl2 = transition(env1, dcl1); - var env2 = make_env2(dcl2); + let dcl2 = transition(env1, dcl1); + let env2 = make_env2(dcl2); check_recmod_typedecls(env2, sdecls, dcl2); - var dcl2$1 = Stdlib__List.map2((function (pmd, param) { + let dcl2$1 = Stdlib__List.map2((function (pmd, param) { return { md_id: param[0], md_name: param[1], @@ -83075,7 +83075,7 @@ function transl_recmodule_modtypes(loc, env, sdecls) { } function simplify_signature(sg) { - var aux = function (param) { + let aux = function (param) { if (!param) { return [ /* [] */0, @@ -83083,12 +83083,12 @@ function simplify_signature(sg) { /* Empty */0 ]; } - var component = param.hd; + let component = param.hd; switch (component.TAG | 0) { case /* Sig_value */0 : - var k = aux(param.tl); - var val_names = k[1]; - var name = component._0.name; + let k = aux(param.tl); + let val_names = k[1]; + let name = component._0.name; if (Curry._2(mem$7, name, val_names)) { return k; } else { @@ -83102,11 +83102,11 @@ function simplify_signature(sg) { ]; } case /* Sig_typext */2 : - var k$1 = aux(param.tl); - var ext_names = k$1[2]; - var val_names$1 = k$1[1]; - var sg = k$1[0]; - var name$1 = component._0.name; + let k$1 = aux(param.tl); + let ext_names = k$1[2]; + let val_names$1 = k$1[1]; + let sg = k$1[0]; + let name$1 = component._0.name; if (!Curry._2(mem$7, name$1, ext_names)) { return [ { @@ -83123,7 +83123,7 @@ function simplify_signature(sg) { if (!sg) { return k$1; } - var match = sg.hd; + let match = sg.hd; if (match.TAG === /* Sig_typext */2 && match._2 === 1) { return [ { @@ -83142,7 +83142,7 @@ function simplify_signature(sg) { return k$1; } default: - var match$1 = aux(param.tl); + let match$1 = aux(param.tl); return [ { hd: component, @@ -83156,12 +83156,12 @@ function simplify_signature(sg) { return aux(sg)[0]; } -var Not_a_path = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Not_a_path"); +let Not_a_path = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Not_a_path"); function path_of_module(_mexp) { while(true) { - var mexp = _mexp; - var match = mexp.mod_desc; + let mexp = _mexp; + let match = mexp.mod_desc; switch (match.TAG | 0) { case /* Tmod_ident */0 : return match._0; @@ -83192,7 +83192,7 @@ function path_of_module$1(mexp) { return path_of_module(mexp); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Not_a_path) { return ; } @@ -83202,7 +83202,7 @@ function path_of_module$1(mexp) { function closed_modtype(_param) { while(true) { - var param = _param; + let param = _param; switch (param.TAG | 0) { case /* Mty_signature */1 : return Stdlib__List.for_all(closed_signature_item, param._0); @@ -83243,8 +83243,8 @@ function anchor_submodule(name, anchor) { function enrich_type_decls(anchor, decls, oldenv, newenv) { if (anchor !== undefined) { return Stdlib__List.fold_left((function (e, info) { - var id = info.typ_id; - var info$p = enrich_typedecl(oldenv, { + let id = info.typ_id; + let info$p = enrich_typedecl(oldenv, { TAG: /* Pdot */1, _0: anchor, _1: id.name, @@ -83271,38 +83271,38 @@ function enrich_module_type(anchor, name, mty, env) { } function check_recmodule_inclusion(env, bindings) { - var subst_and_strengthen = function (env, s, id, mty) { + let subst_and_strengthen = function (env, s, id, mty) { return strengthen$1(env, modtype(s, mty), module_path(s, { TAG: /* Pident */0, _0: id })); }; - var _first_time = true; - var _n = Stdlib__List.length(bindings); - var _env = env; - var _s = identity; + let _first_time = true; + let _n = Stdlib__List.length(bindings); + let _env = env; + let _s = identity; while(true) { - var s = _s; - var env$1 = _env; - var n = _n; - var first_time = _first_time; + let s = _s; + let env$1 = _env; + let n = _n; + let first_time = _first_time; if (n > 0) { - var bindings1 = Stdlib__List.map((function (param) { - var id = param[0]; + let bindings1 = Stdlib__List.map((function (param) { + let id = param[0]; return [ id, rename(id), param[4] ]; }), bindings); - var env$p = Stdlib__List.fold_left((function(first_time,s){ + let env$p = Stdlib__List.fold_left((function(first_time,s){ return function (env, param) { - var mty_actual = param[2]; - var mty_actual$p = first_time ? mty_actual : subst_and_strengthen(env, s, param[0], mty_actual); + let mty_actual = param[2]; + let mty_actual$p = first_time ? mty_actual : subst_and_strengthen(env, s, param[0], mty_actual); return add_module$1(false, param[1], mty_actual$p, env); } }(first_time,s)), env$1, bindings1); - var s$p = Stdlib__List.fold_left((function (s, param) { + let s$p = Stdlib__List.fold_left((function (s, param) { return add_module(param[0], { TAG: /* Pident */0, _0: param[1] @@ -83314,19 +83314,19 @@ function check_recmodule_inclusion(env, bindings) { _first_time = false; continue ; } - var check_inclusion = (function(env$1,s){ + let check_inclusion = (function(env$1,s){ return function check_inclusion(param) { - var modl = param[3]; - var mty_decl = param[2]; - var id = param[0]; - var mty_decl$p = modtype(s, mty_decl.mty_type); - var mty_actual$p = subst_and_strengthen(env$1, s, id, param[4]); - var coercion; + let modl = param[3]; + let mty_decl = param[2]; + let id = param[0]; + let mty_decl$p = modtype(s, mty_decl.mty_type); + let mty_actual$p = subst_and_strengthen(env$1, s, id, param[4]); + let coercion; try { coercion = modtypes$1(env$1, mty_actual$p, mty_decl$p); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -83340,7 +83340,7 @@ function check_recmodule_inclusion(env, bindings) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var modl$p_mod_desc = { + let modl$p_mod_desc = { TAG: /* Tmod_constraint */4, _0: modl, _1: mty_decl.mty_type, @@ -83349,9 +83349,9 @@ function check_recmodule_inclusion(env, bindings) { }, _3: coercion }; - var modl$p_mod_loc = modl.mod_loc; - var modl$p_mod_type = mty_decl.mty_type; - var modl$p = { + let modl$p_mod_loc = modl.mod_loc; + let modl$p_mod_type = mty_decl.mty_type; + let modl$p = { mod_desc: modl$p_mod_desc, mod_loc: modl$p_mod_loc, mod_type: modl$p_mod_type, @@ -83375,22 +83375,22 @@ function package_constraints(env, loc, mty, constrs) { if (Caml_obj.caml_equal(constrs, /* [] */0)) { return mty; } - var sg = extract_sig(env, loc, mty); - var sg$p = Stdlib__List.map((function (item) { + let sg = extract_sig(env, loc, mty); + let sg$p = Stdlib__List.map((function (item) { switch (item.TAG | 0) { case /* Sig_type */1 : - var td = item._1; + let td = item._1; if (td.type_params) { return item; } - var id = item._0; + let id = item._0; if (!Stdlib__List.mem_assoc({ hd: id.name, tl: /* [] */0 }, constrs)) { return item; } - var ty = Stdlib__List.assoc({ + let ty = Stdlib__List.assoc({ hd: id.name, tl: /* [] */0 }, constrs); @@ -83411,18 +83411,18 @@ function package_constraints(env, loc, mty, constrs) { _2: item._2 }; case /* Sig_module */3 : - var md = item._1; - var id$1 = item._0; - var aux = function (_param) { + let md = item._1; + let id$1 = item._0; + let aux = function (_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return /* [] */0; } - var match = param.hd; - var match$1 = match[0]; + let match = param.hd; + let match$1 = match[0]; if (match$1) { - var l = match$1.tl; + let l = match$1.tl; if (l) { if (match$1.hd === id$1.name) { return { @@ -83443,10 +83443,10 @@ function package_constraints(env, loc, mty, constrs) { continue ; }; }; - var md_md_type = package_constraints(env, loc, md.md_type, aux(constrs)); - var md_md_attributes = md.md_attributes; - var md_md_loc = md.md_loc; - var md$1 = { + let md_md_type = package_constraints(env, loc, md.md_type, aux(constrs)); + let md_md_attributes = md.md_attributes; + let md_md_loc = md.md_loc; + let md$1 = { md_type: md_md_type, md_attributes: md_md_attributes, md_loc: md_md_loc @@ -83469,8 +83469,8 @@ function package_constraints(env, loc, mty, constrs) { function modtype_of_package(env, loc, p, nl, tl) { try { - var mty = find_modtype(p, env).mtd_type; - var exit = 0; + let mty = find_modtype(p, env).mtd_type; + let exit = 0; if (mty !== undefined) { if (Caml_obj.caml_notequal(nl, /* [] */0)) { return package_constraints(env, loc, mty, Stdlib__List.combine(Stdlib__List.map(flatten, nl), tl)); @@ -83496,9 +83496,9 @@ function modtype_of_package(env, loc, p, nl, tl) { } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var error = { + let error = { TAG: /* Unbound_modtype */22, _0: lid_of_path(undefined, p) }; @@ -83514,20 +83514,20 @@ function modtype_of_package(env, loc, p, nl, tl) { } function package_subtype$1(env, p1, nl1, tl1, p2, nl2, tl2) { - var mkmty = function (p, nl, tl) { - var ntl = Stdlib__List.filter((function (param) { + let mkmty = function (p, nl, tl) { + let ntl = Stdlib__List.filter((function (param) { return Caml_obj.caml_equal(free_variables$1(undefined, param[1]), /* [] */0); }), Stdlib__List.combine(nl, tl)); - var match = Stdlib__List.split(ntl); + let match = Stdlib__List.split(ntl); return modtype_of_package(env, none, p, match[0], match[1]); }; - var mty1 = mkmty(p1, nl1, tl1); - var mty2 = mkmty(p2, nl2, tl2); + let mty1 = mkmty(p1, nl1, tl1); + let mty2 = mkmty(p2, nl2, tl2); try { return Caml_obj.caml_equal(modtypes$1(env, mty1, mty2), /* Tcoerce_none */0); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { return false; } @@ -83538,12 +83538,12 @@ function package_subtype$1(env, p1, nl1, tl1, p2, nl2, tl2) { package_subtype.contents = package_subtype$1; function wrap_constraint(env, arg, mty, explicit) { - var coercion; + let coercion; try { coercion = modtypes$1(env, arg.mod_type, mty); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -83573,40 +83573,40 @@ function wrap_constraint(env, arg, mty, explicit) { } function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { - var alias = aliasOpt !== undefined ? aliasOpt : false; - var lid = smod.pmod_desc; + let alias = aliasOpt !== undefined ? aliasOpt : false; + let lid = smod.pmod_desc; switch (lid.TAG | 0) { case /* Pmod_ident */0 : - var lid$1 = lid._0; - var path = lookup_module$1(!alias, env, smod.pmod_loc, lid$1.txt); - var md_mod_desc = { + let lid$1 = lid._0; + let path = lookup_module$1(!alias, env, smod.pmod_loc, lid$1.txt); + let md_mod_desc = { TAG: /* Tmod_ident */0, _0: path, _1: lid$1 }; - var md_mod_loc = smod.pmod_loc; - var md_mod_type = { + let md_mod_loc = smod.pmod_loc; + let md_mod_type = { TAG: /* Mty_alias */3, _0: path }; - var md_mod_attributes = smod.pmod_attributes; - var md = { + let md_mod_attributes = smod.pmod_attributes; + let md = { mod_desc: md_mod_desc, mod_loc: md_mod_loc, mod_type: md_mod_type, mod_env: env, mod_attributes: md_mod_attributes }; - var node; + let node; if (alias && !is_functor_arg(path, env)) { add_required_global(head(path)); node = md; } else { - var p1 = find_module(false, path, env).md_type; - var exit = 0; + let p1 = find_module(false, path, env).md_type; + let exit = 0; if (p1.TAG === /* Mty_alias */3 && !alias) { - var p1$1 = normalize_path$1(smod.pmod_loc, env, p1._0); - var mty = expand_module_alias(env, /* [] */0, p1$1); + let p1$1 = normalize_path$1(smod.pmod_loc, env, p1._0); + let mty = expand_module_alias(env, /* [] */0, p1$1); node = { mod_desc: { TAG: /* Tmod_constraint */4, @@ -83628,7 +83628,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { exit = 1; } if (exit === 1) { - var mty$1 = sttn ? strengthen$1(env, p1, path) : p1; + let mty$1 = sttn ? strengthen$1(env, p1, path) : p1; node = { mod_desc: md_mod_desc, mod_loc: md_mod_loc, @@ -83645,19 +83645,19 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { }); return node; case /* Pmod_structure */1 : - var match = type_structure(undefined, funct_body, anchor, env, lid._0, smod.pmod_loc); - var sg = match[1]; - var node_mod_desc = { + let match = type_structure(undefined, funct_body, anchor, env, lid._0, smod.pmod_loc); + let sg = match[1]; + let node_mod_desc = { TAG: /* Tmod_structure */1, _0: match[0] }; - var node_mod_loc = smod.pmod_loc; - var node_mod_type = { + let node_mod_loc = smod.pmod_loc; + let node_mod_type = { TAG: /* Mty_signature */1, _0: sg }; - var node_mod_attributes = smod.pmod_attributes; - var node$1 = { + let node_mod_attributes = smod.pmod_attributes; + let node$1 = { mod_desc: node_mod_desc, mod_loc: node_mod_loc, mod_type: node_mod_type, @@ -83668,7 +83668,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { TAG: /* Ti_mod */3, _0: node$1 }); - var sg$p = simplify_signature(sg); + let sg$p = simplify_signature(sg); if (Stdlib__List.length(sg$p) === Stdlib__List.length(sg)) { return node$1; } else { @@ -83678,14 +83678,14 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { }, /* Tmodtype_implicit */0); } case /* Pmod_functor */2 : - var name = lid._0; - var mty$2 = may_map((function (param) { + let name = lid._0; + let mty$2 = may_map((function (param) { return transl_modtype$1(env, param); }), lid._1); - var ty_arg = may_map((function (m) { + let ty_arg = may_map((function (m) { return m.mty_type; }), mty$2); - var match$1 = ty_arg !== undefined ? [ + let match$1 = ty_arg !== undefined ? [ enter_module(true, name.txt, ty_arg, env), true ] : [ @@ -83695,25 +83695,25 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { ], false ]; - var match$2 = match$1[0]; - var id = match$2[0]; - var body = type_module$1(undefined, sttn, match$1[1], undefined, match$2[1], lid._2); - var node_mod_desc$1 = { + let match$2 = match$1[0]; + let id = match$2[0]; + let body = type_module$1(undefined, sttn, match$1[1], undefined, match$2[1], lid._2); + let node_mod_desc$1 = { TAG: /* Tmod_functor */2, _0: id, _1: name, _2: mty$2, _3: body }; - var node_mod_loc$1 = smod.pmod_loc; - var node_mod_type$1 = { + let node_mod_loc$1 = smod.pmod_loc; + let node_mod_type$1 = { TAG: /* Mty_functor */2, _0: id, _1: ty_arg, _2: body.mod_type }; - var node_mod_attributes$1 = smod.pmod_attributes; - var node$2 = { + let node_mod_attributes$1 = smod.pmod_attributes; + let node$2 = { mod_desc: node_mod_desc$1, mod_loc: node_mod_loc$1, mod_type: node_mod_type$1, @@ -83726,18 +83726,18 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { }); return node$2; case /* Pmod_apply */3 : - var sarg = lid._1; - var sfunct = lid._0; - var arg = type_module$1(undefined, true, funct_body, undefined, env, sarg); - var path$1 = path_of_module$1(arg); - var funct = type_module$1(undefined, sttn && path$1 !== undefined, funct_body, undefined, env, sfunct); - var mty_functor = scrape_alias(env, undefined, funct.mod_type); + let sarg = lid._1; + let sfunct = lid._0; + let arg = type_module$1(undefined, true, funct_body, undefined, env, sarg); + let path$1 = path_of_module$1(arg); + let funct = type_module$1(undefined, sttn && path$1 !== undefined, funct_body, undefined, env, sfunct); + let mty_functor = scrape_alias(env, undefined, funct.mod_type); if (mty_functor.TAG === /* Mty_functor */2) { - var mty_res = mty_functor._2; - var mty_param = mty_functor._1; - var param = mty_functor._0; - var generative = mty_param === undefined; - var mty_param$1 = mty_param !== undefined ? mty_param : ({ + let mty_res = mty_functor._2; + let mty_param = mty_functor._1; + let param = mty_functor._0; + let generative = mty_param === undefined; + let mty_param$1 = mty_param !== undefined ? mty_param : ({ TAG: /* Mty_signature */1, _0: /* [] */0 }); @@ -83763,12 +83763,12 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { } } - var coercion; + let coercion; try { coercion = modtypes$1(env, arg.mod_type, mty_param$1); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$5) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -83782,7 +83782,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var mty_appl; + let mty_appl; if (path$1 !== undefined) { mty_appl = modtype(add_module(param, path$1, identity), mty_res); } else if (generative) { @@ -83792,7 +83792,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { mty_appl = nondep_supertype(add_module$1(true, param, arg.mod_type, env), param, mty_res); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -83807,15 +83807,15 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } } - var node_mod_desc$2 = { + let node_mod_desc$2 = { TAG: /* Tmod_apply */3, _0: funct, _1: arg, _2: coercion }; - var node_mod_loc$2 = smod.pmod_loc; - var node_mod_attributes$2 = smod.pmod_attributes; - var node$3 = { + let node_mod_loc$2 = smod.pmod_loc; + let node_mod_attributes$2 = smod.pmod_attributes; + let node$3 = { mod_desc: node_mod_desc$2, mod_loc: node_mod_loc$2, mod_type: mty_appl, @@ -83838,17 +83838,17 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { } }); case /* Pmod_constraint */4 : - var arg$1 = type_module$1(alias, true, funct_body, anchor, env, lid._0); - var mty$3 = transl_modtype$1(env, lid._1); - var init = wrap_constraint(env, arg$1, mty$3.mty_type, /* Tmodtype_explicit */{ + let arg$1 = type_module$1(alias, true, funct_body, anchor, env, lid._0); + let mty$3 = transl_modtype$1(env, lid._1); + let init = wrap_constraint(env, arg$1, mty$3.mty_type, /* Tmodtype_explicit */{ _0: mty$3 }); - var node_mod_desc$3 = init.mod_desc; - var node_mod_loc$3 = smod.pmod_loc; - var node_mod_type$2 = init.mod_type; - var node_mod_env = init.mod_env; - var node_mod_attributes$3 = smod.pmod_attributes; - var node$4 = { + let node_mod_desc$3 = init.mod_desc; + let node_mod_loc$3 = smod.pmod_loc; + let node_mod_type$2 = init.mod_type; + let node_mod_env = init.mod_env; + let node_mod_attributes$3 = smod.pmod_attributes; + let node$4 = { mod_desc: node_mod_desc$3, mod_loc: node_mod_loc$3, mod_type: node_mod_type$2, @@ -83864,15 +83864,15 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { if (principal.contents) { begin_def(undefined); } - var exp = type_exp(env, lid._0); + let exp = type_exp(env, lid._0); if (principal.contents) { end_def(undefined); generalize_structure$1(current_level.contents, exp.exp_type); } - var match$3 = expand_head(env, exp.exp_type); - var mty$4; - var exit$1 = 0; - var match$4 = match$3.desc; + let match$3 = expand_head(env, exp.exp_type); + let mty$4; + let exit$1 = 0; + let match$4 = match$3.desc; if (typeof match$4 === "number") { exit$1 = 1; } else { @@ -83885,7 +83885,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { _3: /* Cannot_infer_signature */3 }); case /* Tpackage */11 : - var tl = match$4._2; + let tl = match$4._2; if (Stdlib__List.exists((function (t) { return Caml_obj.caml_notequal(free_variables$1(undefined, t), /* [] */0); }), tl)) { @@ -83930,14 +83930,14 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { _3: /* Not_allowed_in_functor_body */1 }); } - var node_mod_desc$4 = { + let node_mod_desc$4 = { TAG: /* Tmod_unpack */5, _0: exp, _1: mty$4 }; - var node_mod_loc$4 = smod.pmod_loc; - var node_mod_attributes$4 = smod.pmod_attributes; - var node$5 = { + let node_mod_loc$4 = smod.pmod_loc; + let node_mod_attributes$4 = smod.pmod_attributes; + let node$5 = { mod_desc: node_mod_desc$4, mod_loc: node_mod_loc$4, mod_type: mty$4, @@ -83959,22 +83959,22 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { } function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { - var toplevel = toplevelOpt !== undefined ? toplevelOpt : false; - var type_names = { + let toplevel = toplevelOpt !== undefined ? toplevelOpt : false; + let type_names = { contents: /* Empty */0 }; - var module_names = { + let module_names = { contents: /* Empty */0 }; - var modtype_names = { + let modtype_names = { contents: /* Empty */0 }; - var type_str_item = function (env, srem, param) { - var loc = param.pstr_loc; - var desc = param.pstr_desc; + let type_str_item = function (env, srem, param) { + let loc = param.pstr_loc; + let desc = param.pstr_desc; switch (desc.TAG | 0) { case /* Pstr_eval */0 : - var expr = type_expression(env, desc._0); + let expr = type_expression(env, desc._0); return [ { TAG: /* Tstr_eval */0, @@ -83985,8 +83985,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { env ]; case /* Pstr_value */1 : - var rec_flag = desc._0; - var scope$1; + let rec_flag = desc._0; + let scope$1; if (rec_flag) { scope$1 = { TAG: /* Idef */1, @@ -83997,7 +83997,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { } }; } else { - var start = srem ? srem.hd.pstr_loc.loc_start : loc.loc_end; + let start = srem ? srem.hd.pstr_loc.loc_start : loc.loc_end; scope$1 = { TAG: /* Idef */1, _0: { @@ -84007,9 +84007,9 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { } }; } - var match = type_binding(env, rec_flag, desc._1, scope$1); - var newenv = match[1]; - var defs = match[0]; + let match = type_binding(env, rec_flag, desc._1, scope$1); + let newenv = match[1]; + let defs = match[0]; return [ { TAG: /* Tstr_value */1, @@ -84029,8 +84029,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { newenv ]; case /* Pstr_primitive */2 : - var match$1 = transl_value_decl(env, loc, desc._0); - var desc$1 = match$1[0]; + let match$1 = transl_value_decl(env, loc, desc._0); + let desc$1 = match$1[0]; return [ { TAG: /* Tstr_primitive */2, @@ -84047,13 +84047,13 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$1[1] ]; case /* Pstr_type */3 : - var sdecls = desc._0; - var rec_flag$1 = rec_flag_of_ptype_declarations(sdecls); + let sdecls = desc._0; + let rec_flag$1 = rec_flag_of_ptype_declarations(sdecls); Stdlib__List.iter((function (decl) { check_name("type", type_names, decl.ptype_name); }), sdecls); - var match$2 = transl_type_decl(env, rec_flag$1, sdecls); - var decls = match$2[0]; + let match$2 = transl_type_decl(env, rec_flag$1, sdecls); + let decls = match$2[0]; return [ { TAG: /* Tstr_type */3, @@ -84070,8 +84070,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { enrich_type_decls(anchor, decls, env, match$2[1]) ]; case /* Pstr_typext */4 : - var match$3 = transl_type_extension(true, env, loc, desc._0); - var tyext = match$3[0]; + let match$3 = transl_type_extension(true, env, loc, desc._0); + let tyext = match$3[0]; return [ { TAG: /* Tstr_typext */4, @@ -84088,8 +84088,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$3[1] ]; case /* Pstr_exception */5 : - var match$4 = transl_exception(env, desc._0); - var ext = match$4[0]; + let match$4 = transl_exception(env, desc._0); + let ext = match$4[0]; return [ { TAG: /* Tstr_exception */5, @@ -84107,20 +84107,20 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$4[1] ]; case /* Pstr_module */6 : - var match$5 = desc._0; - var pmb_loc = match$5.pmb_loc; - var attrs = match$5.pmb_attributes; - var name = match$5.pmb_name; + let match$5 = desc._0; + let pmb_loc = match$5.pmb_loc; + let attrs = match$5.pmb_attributes; + let name = match$5.pmb_name; check_name("module", module_names, name); - var modl = type_module$1(true, true, funct_body, anchor_submodule(name.txt, anchor), env, match$5.pmb_expr); - var md_md_type = enrich_module_type(anchor, name.txt, modl.mod_type, env); - var md = { + let modl = type_module$1(true, true, funct_body, anchor_submodule(name.txt, anchor), env, match$5.pmb_expr); + let md_md_type = enrich_module_type(anchor, name.txt, modl.mod_type, env); + let md = { md_type: md_md_type, md_attributes: attrs, md_loc: pmb_loc }; - var match$6 = enter_module_declaration(undefined, name.txt, md, env); - var id = match$6[0]; + let match$6 = enter_module_declaration(undefined, name.txt, md, env); + let id = match$6[0]; return [ { TAG: /* Tstr_module */6, @@ -84148,8 +84148,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$6[1] ]; case /* Pstr_recmodule */7 : - var sbind = Stdlib__List.map((function (mb) { - var match = mb.pmb_expr.pmod_desc; + let sbind = Stdlib__List.map((function (mb) { + let match = mb.pmb_expr.pmod_desc; if (match.TAG === /* Pmod_constraint */4) { return [ mb.pmb_name, @@ -84169,7 +84169,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { Stdlib__List.iter((function (param) { check_name("module", module_names, param[0]); }), sbind); - var match$7 = transl_recmodule_modtypes(loc, env, Stdlib__List.map((function (param) { + let match$7 = transl_recmodule_modtypes(loc, env, Stdlib__List.map((function (param) { return { pmd_name: param[0], pmd_type: param[1], @@ -84177,15 +84177,15 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { pmd_loc: param[4] }; }), sbind)); - var newenv$1 = match$7[1]; - var decls$1 = match$7[0]; - var bindings1 = Stdlib__List.map2((function (param, param$1) { - var id = param.md_id; - var modl = type_module$1(undefined, true, funct_body, { + let newenv$1 = match$7[1]; + let decls$1 = match$7[0]; + let bindings1 = Stdlib__List.map2((function (param, param$1) { + let id = param.md_id; + let modl = type_module$1(undefined, true, funct_body, { TAG: /* Pident */0, _0: id }, newenv$1, param$1[2]); - var mty$p = enrich_module_type(anchor, id.name, modl.mod_type, newenv$1); + let mty$p = enrich_module_type(anchor, id.name, modl.mod_type, newenv$1); return [ id, param$1[0], @@ -84196,18 +84196,18 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { param$1[4] ]; }), decls$1, sbind); - var newenv$2 = Stdlib__List.fold_left((function (env, md) { - var mdecl_md_type = md.md_type.mty_type; - var mdecl_md_attributes = md.md_attributes; - var mdecl_md_loc = md.md_loc; - var mdecl = { + let newenv$2 = Stdlib__List.fold_left((function (env, md) { + let mdecl_md_type = md.md_type.mty_type; + let mdecl_md_attributes = md.md_attributes; + let mdecl_md_loc = md.md_loc; + let mdecl = { md_type: mdecl_md_type, md_attributes: mdecl_md_attributes, md_loc: mdecl_md_loc }; return add_module_declaration(undefined, md.md_id, mdecl, env); }), env, decls$1); - var bindings2 = check_recmodule_inclusion(newenv$2, bindings1); + let bindings2 = check_recmodule_inclusion(newenv$2, bindings1); return [ { TAG: /* Tstr_recmodule */7, @@ -84228,7 +84228,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { newenv$2 ]; case /* Pstr_modtype */8 : - var match$8 = transl_modtype_decl(modtype_names, env, loc, desc._0); + let match$8 = transl_modtype_decl(modtype_names, env, loc, desc._0); return [ { TAG: /* Tstr_modtype */8, @@ -84241,7 +84241,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$8[0] ]; case /* Pstr_open */9 : - var match$9 = type_open$1(toplevel, env, desc._0); + let match$9 = type_open$1(toplevel, env, desc._0); return [ { TAG: /* Tstr_open */9, @@ -84251,17 +84251,17 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$9[1] ]; case /* Pstr_class */10 : - var cl = desc._0; + let cl = desc._0; Stdlib__List.iter((function (param) { check_name("type", type_names, param.pci_name); }), cl); - var match$10 = class_declarations$2(env, cl); - var classes = match$10[0]; + let match$10 = class_declarations$2(env, cl); + let classes = match$10[0]; return [ { TAG: /* Tstr_class */10, _0: Stdlib__List.map((function (param) { - var vf = param[2].cty_new === undefined ? /* Virtual */0 : /* Concrete */1; + let vf = param[2].cty_new === undefined ? /* Virtual */0 : /* Concrete */1; return [ param[11], param[10], @@ -84307,12 +84307,12 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$10[1] ]; case /* Pstr_class_type */11 : - var cl$1 = desc._0; + let cl$1 = desc._0; Stdlib__List.iter((function (param) { check_name("type", type_names, param.pci_name); }), cl$1); - var match$11 = class_type_declarations$2(env, cl$1); - var classes$1 = match$11[0]; + let match$11 = class_type_declarations$2(env, cl$1); + let classes$1 = match$11[0]; return [ { TAG: /* Tstr_class_type */11, @@ -84354,25 +84354,25 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { match$11[1] ]; case /* Pstr_include */12 : - var sincl = desc._0; - var smodl = sincl.pincl_mod; - var modl$1 = type_module$1(undefined, true, funct_body, undefined, env, smodl); - var sg = signature$2(identity, extract_sig_open(env, smodl.pmod_loc, modl$1.mod_type)); - var match$12 = modl$1.mod_desc; - var sg$1; + let sincl = desc._0; + let smodl = sincl.pincl_mod; + let modl$1 = type_module$1(undefined, true, funct_body, undefined, env, smodl); + let sg = signature$2(identity, extract_sig_open(env, smodl.pmod_loc, modl$1.mod_type)); + let match$12 = modl$1.mod_desc; + let sg$1; if (match$12.TAG === /* Tmod_ident */0) { - var p = match$12._0; + let p = match$12._0; if (is_functor_arg(p, env)) { sg$1 = sg; } else { add_required_global(head(p)); - var pos = { + let pos = { contents: 0 }; sg$1 = Stdlib__List.map((function (it) { switch (it.TAG | 0) { case /* Sig_value */0 : - var match = it._1.val_kind; + let match = it._1.val_kind; if (typeof match === "number" && !match) { pos.contents = pos.contents + 1 | 0; return it; @@ -84380,9 +84380,9 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { return it; } case /* Sig_module */3 : - var md = it._1; - var id = it._0; - var n = pos.contents; + let md = it._1; + let id = it._0; + let n = pos.contents; pos.contents = pos.contents + 1 | 0; return { TAG: /* Sig_module */3, @@ -84417,10 +84417,10 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { Stdlib__List.iter((function (param) { return check_sig_item(type_names, module_names, modtype_names, loc, param); }), sg$1); - var new_env = add_signature(sg$1, env); - var incl_incl_loc = sincl.pincl_loc; - var incl_incl_attributes = sincl.pincl_attributes; - var incl = { + let new_env = add_signature(sg$1, env); + let incl_incl_loc = sincl.pincl_loc; + let incl_incl_attributes = sincl.pincl_attributes; + let incl = { incl_mod: modl$1, incl_type: sg$1, incl_loc: incl_incl_loc, @@ -84435,7 +84435,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { new_env ]; case /* Pstr_attribute */13 : - var x = desc._0; + let x = desc._0; warning_attribute({ hd: x, tl: /* [] */0 @@ -84456,7 +84456,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { } }; - var type_struct = function (env, sstr) { + let type_struct = function (env, sstr) { init_def(currentstamp.contents); if (!sstr) { return [ @@ -84465,13 +84465,13 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { env ]; } - var srem = sstr.tl; - var pstr = sstr.hd; - var previous_saved_types = saved_types.contents; - var match = type_str_item(env, srem, pstr); - var str_str_desc = match[0]; - var str_str_loc = pstr.pstr_loc; - var str = { + let srem = sstr.tl; + let pstr = sstr.hd; + let previous_saved_types = saved_types.contents; + let match = type_str_item(env, srem, pstr); + let str_str_desc = match[0]; + let str_str_loc = pstr.pstr_loc; + let str = { str_desc: str_str_desc, str_loc: str_str_loc, str_env: env @@ -84483,7 +84483,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { }, tl: previous_saved_types }; - var match$1 = type_struct(match[2], srem); + let match$1 = type_struct(match[2], srem); return [ { hd: str, @@ -84495,7 +84495,7 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { }; if (annotations.contents) { Stdlib__List.iter((function (param) { - var loc = param.pstr_loc; + let loc = param.pstr_loc; if (annotations.contents) { phrases.contents = { hd: loc, @@ -84506,13 +84506,13 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { }), sstr); } - var previous_saved_types = saved_types.contents; + let previous_saved_types = saved_types.contents; warning_enter_scope(undefined); - var match = type_struct(env, sstr); - var final_env = match[2]; - var sg = match[1]; - var str_str_items = match[0]; - var str = { + let match = type_struct(env, sstr); + let final_env = match[2]; + let sg = match[1]; + let str_str_items = match[0]; + let str = { str_items: str_str_items, str_type: sg, str_final_env: final_env @@ -84547,9 +84547,9 @@ function normalize_signature(env) { case /* Sig_value */0 : return normalize_type(env, param._1.val_type); case /* Sig_module */3 : - var _param = param._1.md_type; + let _param = param._1.md_type; while(true) { - var param$1 = _param; + let param$1 = _param; switch (param$1.TAG | 0) { case /* Mty_signature */1 : return normalize_signature(env)(param$1._0); @@ -84570,20 +84570,20 @@ function normalize_signature(env) { } function type_module_type_of(env, smod) { - var lid = smod.pmod_desc; - var tmty; + let lid = smod.pmod_desc; + let tmty; if (lid.TAG === /* Pmod_ident */0) { - var lid$1 = lid._0; - var match = find_module$1(env, smod.pmod_loc, lid$1.txt); - var node_mod_desc = { + let lid$1 = lid._0; + let match = find_module$1(env, smod.pmod_loc, lid$1.txt); + let node_mod_desc = { TAG: /* Tmod_ident */0, _0: match[0], _1: lid$1 }; - var node_mod_loc = smod.pmod_loc; - var node_mod_type = match[1].md_type; - var node_mod_attributes = smod.pmod_attributes; - var node = { + let node_mod_loc = smod.pmod_loc; + let node_mod_type = match[1].md_type; + let node_mod_attributes = smod.pmod_attributes; + let node = { mod_desc: node_mod_desc, mod_loc: node_mod_loc, mod_type: node_mod_type, @@ -84598,8 +84598,8 @@ function type_module_type_of(env, smod) { } else { tmty = type_module$2(env, smod); } - var mty = tmty.mod_type; - var mty$1 = remove_aliases$1(env, mty); + let mty = tmty.mod_type; + let mty$1 = remove_aliases$1(env, mty); if (!closed_modtype(mty$1)) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -84618,22 +84618,22 @@ function type_module_type_of(env, smod) { } function type_package$1(env, m, p, nl, tl) { - var lv = current_level.contents; + let lv = current_level.contents; begin_def(undefined); set_current_time(lv); - var context = narrow(undefined); - var modl = type_module$2(env, m); + let context = narrow(undefined); + let modl = type_module$2(env, m); init_def(currentstamp.contents); widen(context); - var match = modl.mod_desc; - var match$1; + let match = modl.mod_desc; + let match$1; if (match.TAG === /* Tmod_ident */0) { match$1 = [ match._0, env ]; } else { - var match$2 = enter_module(true, "%M", modl.mod_type, env); + let match$2 = enter_module(true, "%M", modl.mod_type, env); match$1 = [ { TAG: /* Pident */0, @@ -84642,9 +84642,9 @@ function type_package$1(env, m, p, nl, tl) { match$2[1] ]; } - var env$1 = match$1[1]; - var mp = match$1[0]; - var mkpath = function (mp, param) { + let env$1 = match$1[1]; + let mp = match$1[0]; + let mkpath = function (mp, param) { switch (param.TAG | 0) { case /* Lident */0 : return { @@ -84672,7 +84672,7 @@ function type_package$1(env, m, p, nl, tl) { } }; - var tl$p = Stdlib__List.map((function (name) { + let tl$p = Stdlib__List.map((function (name) { return newty2(100000000, { TAG: /* Tconstr */3, _0: mkpath(mp, name), @@ -84692,13 +84692,13 @@ function type_package$1(env, m, p, nl, tl) { /* [] */0 ]; } - var mty = modtype_of_package(env$1, modl.mod_loc, p, nl, tl$p); + let mty = modtype_of_package(env$1, modl.mod_loc, p, nl, tl$p); Stdlib__List.iter2((function (n, ty) { try { return unify$2(env$1, ty, newvar(undefined, undefined)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -84740,11 +84740,11 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ delayed_checks.contents = /* [] */0; required_globals.contents = /* [] */0; Curry._2(newrecord$1.structure, newrecord$1, ast); - var match = type_structure$1(initial_env, ast, in_file(sourcefile)); - var finalenv = match[2]; - var sg = match[1]; - var str = match[0]; - var simple_sg = simplify_signature(sg); + let match = type_structure$1(initial_env, ast, in_file(sourcefile)); + let finalenv = match[2]; + let sg = match[1]; + let str = match[0]; + let simple_sg = simplify_signature(sg); if (print_types.contents) { wrap_printing_env(initial_env, (function (param) { Curry._2(Stdlib__Format.fprintf(Stdlib__Format.std_formatter)(/* Format */{ @@ -84766,15 +84766,15 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ simple_sg ]; } - var sourceintf = chop_extension_if_any(sourcefile) + interface_suffix.contents; - var mli_status = assume_no_mli.contents; + let sourceintf = chop_extension_if_any(sourcefile) + interface_suffix.contents; + let mli_status = assume_no_mli.contents; if (mli_status === /* Mli_na */0 && Caml_external_polyfill.resolve("caml_sys_file_exists")(sourceintf) || mli_status === /* Mli_exists */1) { - var intf_file; + let intf_file; try { intf_file = find_in_path_uncap(load_path.contents, modulename + ".cmi"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, @@ -84788,8 +84788,8 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var dclsig = read_signature(modulename, intf_file); - var coercion = compunit(initial_env, sourcefile, sg, intf_file, dclsig); + let dclsig = read_signature(modulename, intf_file); + let coercion = compunit(initial_env, sourcefile, sg, intf_file, dclsig); force_delayed_checks(undefined); save_cmt(outputprefix + ".cmt", modulename, { TAG: /* Implementation */1, @@ -84803,11 +84803,11 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ ]; } Stdlib__List.iter((function (param) { - var match = param.str_desc; + let match = param.str_desc; switch (match.TAG | 0) { case /* Tstr_value */1 : return Stdlib__List.iter((function (param) { - var exp = param.vb_expr; + let exp = param.vb_expr; if (closed_schema(exp.exp_type)) { return ; } @@ -84822,7 +84822,7 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ }); }), match._1); case /* Tstr_module */6 : - var md = match._0.mb_expr; + let md = match._0.mb_expr; if (closed_modtype(md.mod_type)) { return ; } @@ -84840,10 +84840,10 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ } }), str.str_items); normalize_signature(finalenv)(simple_sg); - var coercion$1 = compunit(initial_env, sourcefile, sg, "(inferred signature)", simple_sg); + let coercion$1 = compunit(initial_env, sourcefile, sg, "(inferred signature)", simple_sg); force_delayed_checks(undefined); if (!dont_write_files.contents) { - var sg$1 = save_signature(simple_sg, modulename, outputprefix + ".cmi"); + let sg$1 = save_signature(simple_sg, modulename, outputprefix + ".cmi"); save_cmt(outputprefix + ".cmt", modulename, { TAG: /* Implementation */1, _0: str @@ -84866,7 +84866,7 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ } function type_implementation(sourcefile, outputprefix, modulename, initial_env, ast) { - var match = type_implementation_more(sourcefile, outputprefix, modulename, initial_env, ast); + let match = type_implementation_more(sourcefile, outputprefix, modulename, initial_env, ast); return [ match[0], match[1] @@ -84881,7 +84881,7 @@ register_error_of_exn(function (param) { return ; } } - var env = param._2; + let env = param._2; return error_of_printer(param._1, (function (param, param$1) { return wrap_printing_env(env, (function (param$2) { if (typeof param$1 === "number") { @@ -85341,7 +85341,7 @@ register_error_of_exn(function (param) { _1: "@[The type of this expression,@ %a,@ contains type variables that cannot be generalized@]" }), type_scheme, param$1._0); case /* Non_generalizable_class */8 : - var id = param$1._0; + let id = param$1._0; return Curry._2(Stdlib__Format.fprintf(param)(/* Format */{ _0: { TAG: /* Formatting_gen */18, @@ -85632,11 +85632,11 @@ register_error_of_exn(function (param) { }), param._3); }); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -85671,257 +85671,257 @@ nopervasives = true; assume_no_mli.contents = /* Mli_non_exists */2; -var modulename = "Test"; +let modulename = "Test"; -var x = type_implementation(modulename, modulename, modulename, empty, wrap$1(implementation, Stdlib__Lexing.from_string(undefined, "\ntype int\nexternal ( ~- ) : int -> int = \"%negint\"\nexternal ( ~+ ) : int -> int = \"%identity\"\nexternal succ : int -> int = \"%succint\"\nexternal pred : int -> int = \"%predint\"\nexternal ( + ) : int -> int -> int = \"%addint\"\nexternal ( - ) : int -> int -> int = \"%subint\"\nexternal ( * ) : int -> int -> int = \"%mulint\"\nexternal ( / ) : int -> int -> int = \"%divint\"\nexternal ( mod ) : int -> int -> int = \"%modint\"\n let f x y = x + y"))); +let x = type_implementation(modulename, modulename, modulename, empty, wrap$1(implementation, Stdlib__Lexing.from_string(undefined, "\ntype int\nexternal ( ~- ) : int -> int = \"%negint\"\nexternal ( ~+ ) : int -> int = \"%identity\"\nexternal succ : int -> int = \"%succint\"\nexternal pred : int -> int = \"%predint\"\nexternal ( + ) : int -> int -> int = \"%addint\"\nexternal ( - ) : int -> int -> int = \"%subint\"\nexternal ( * ) : int -> int -> int = \"%mulint\"\nexternal ( / ) : int -> int -> int = \"%divint\"\nexternal ( mod ) : int -> int -> int = \"%modint\"\n let f x y = x + y"))); -var match$1 = x[0].str_items; +let match$1 = x[0].str_items; if (match$1) { - var match$2 = match$1.hd; - var match$3 = match$2.str_desc; + let match$2 = match$1.hd; + let match$3 = match$2.str_desc; if (match$3.TAG === /* Tstr_type */3) { - var match$4 = match$3._0; + let match$4 = match$3._0; if (match$4) { - var match$5 = match$4.hd; - var match$6 = match$5.typ_id; + let match$5 = match$4.hd; + let match$6 = match$5.typ_id; if (match$6.name === "int") { - var match$7 = match$6.flags; + let match$7 = match$6.flags; if (match$7 !== 0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$8 = match$5.typ_name; + let match$8 = match$5.typ_name; if (match$8.txt === "int") { - var match$9 = match$8.loc; - var match$10 = match$9.loc_start; + let match$9 = match$8.loc; + let match$10 = match$9.loc_start; if (match$10.pos_fname === "" && !(match$10.pos_lnum !== 2 || match$10.pos_bol !== 1 || match$10.pos_cnum !== 6)) { - var match$11 = match$9.loc_end; + let match$11 = match$9.loc_end; if (match$11.pos_fname === "" && !(match$11.pos_lnum !== 2 || match$11.pos_bol !== 1 || match$11.pos_cnum !== 9 || match$9.loc_ghost || match$5.typ_params)) { - var match$12 = match$5.typ_type; + let match$12 = match$5.typ_type; if (match$12.type_params || match$12.type_arity !== 0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$13 = match$12.type_kind; + let match$13 = match$12.type_kind; if (typeof match$13 === "number" && !(match$13 || !(match$12.type_private && !(match$12.type_manifest !== undefined || match$12.type_variance || match$12.type_newtype_level !== undefined)))) { - var match$14 = match$12.type_loc; - var match$15 = match$14.loc_start; + let match$14 = match$12.type_loc; + let match$15 = match$14.loc_start; if (match$15.pos_fname === "" && !(match$15.pos_lnum !== 2 || match$15.pos_bol !== 1 || match$15.pos_cnum !== 1)) { - var match$16 = match$14.loc_end; + let match$16 = match$14.loc_end; if (match$16.pos_fname === "" && !(match$16.pos_lnum !== 2 || match$16.pos_bol !== 1 || match$16.pos_cnum !== 9 || match$14.loc_ghost || match$12.type_attributes || match$5.typ_cstrs)) { - var match$17 = match$5.typ_kind; + let match$17 = match$5.typ_kind; if (typeof match$17 === "number" && !(match$17 || !(match$5.typ_private && match$5.typ_manifest === undefined))) { - var match$18 = match$5.typ_loc; - var match$19 = match$18.loc_start; + let match$18 = match$5.typ_loc; + let match$19 = match$18.loc_start; if (match$19.pos_fname === "" && !(match$19.pos_lnum !== 2 || match$19.pos_bol !== 1 || match$19.pos_cnum !== 1)) { - var match$20 = match$18.loc_end; + let match$20 = match$18.loc_end; if (match$20.pos_fname === "" && !(match$20.pos_lnum !== 2 || match$20.pos_bol !== 1 || match$20.pos_cnum !== 9 || match$18.loc_ghost || match$5.typ_attributes || match$4.tl)) { - var match$21 = match$2.str_loc; - var match$22 = match$21.loc_start; + let match$21 = match$2.str_loc; + let match$22 = match$21.loc_start; if (match$22.pos_fname === "" && !(match$22.pos_lnum !== 2 || match$22.pos_bol !== 1 || match$22.pos_cnum !== 1)) { - var match$23 = match$21.loc_end; + let match$23 = match$21.loc_end; if (match$23.pos_fname === "" && !(match$23.pos_lnum !== 2 || match$23.pos_bol !== 1 || match$23.pos_cnum !== 9 || match$21.loc_ghost)) { - var match$24 = match$1.tl; + let match$24 = match$1.tl; if (match$24) { - var match$25 = match$24.hd.str_desc; + let match$25 = match$24.hd.str_desc; if (match$25.TAG === /* Tstr_primitive */2) { - var match$26 = match$25._0; - var match$27 = match$26.val_id; + let match$26 = match$25._0; + let match$27 = match$26.val_id; if (match$27.name === "~-") { - var match$28 = match$27.flags; + let match$28 = match$27.flags; if (match$28 !== 0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$29 = match$26.val_name; + let match$29 = match$26.val_name; if (match$29.txt === "~-") { - var match$30 = match$29.loc; - var match$31 = match$30.loc_start; + let match$30 = match$29.loc; + let match$31 = match$30.loc_start; if (match$31.pos_fname === "" && !(match$31.pos_lnum !== 3 || match$31.pos_bol !== 10 || match$31.pos_cnum !== 19)) { - var match$32 = match$30.loc_end; + let match$32 = match$30.loc_end; if (match$32.pos_fname === "" && !(match$32.pos_lnum !== 3 || match$32.pos_bol !== 10 || match$32.pos_cnum !== 25 || match$30.loc_ghost)) { - var match$33 = match$26.val_desc; - var match$34 = match$33.ctyp_desc; + let match$33 = match$26.val_desc; + let match$34 = match$33.ctyp_desc; if (typeof match$34 === "number" || !(match$34.TAG === /* Ttyp_arrow */1 && match$34._0 === "")) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$35 = match$34._1; - var match$36 = match$35.ctyp_desc; + let match$35 = match$34._1; + let match$36 = match$35.ctyp_desc; if (typeof match$36 === "number" || match$36.TAG !== /* Ttyp_constr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$37 = match$36._0; + let match$37 = match$36._0; switch (match$37.TAG | 0) { case /* Pident */0 : - var match$38 = match$37._0; + let match$38 = match$37._0; if (match$38.name === "int") { - var match$39 = match$38.flags; + let match$39 = match$38.flags; if (match$39 !== 0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$40 = match$36._1; - var match$41 = match$40.txt; + let match$40 = match$36._1; + let match$41 = match$40.txt; switch (match$41.TAG | 0) { case /* Lident */0 : if (match$41._0 === "int") { - var match$42 = match$40.loc; - var match$43 = match$42.loc_start; + let match$42 = match$40.loc; + let match$43 = match$42.loc_start; if (match$43.pos_fname === "" && !(match$43.pos_lnum !== 3 || match$43.pos_bol !== 10 || match$43.pos_cnum !== 28)) { - var match$44 = match$42.loc_end; + let match$44 = match$42.loc_end; if (match$44.pos_fname === "" && !(match$44.pos_lnum !== 3 || match$44.pos_bol !== 10 || match$44.pos_cnum !== 31 || match$42.loc_ghost || match$36._2)) { - var match$45 = match$35.ctyp_type; - var match$46 = match$45.desc; + let match$45 = match$35.ctyp_type; + let match$46 = match$45.desc; if (typeof match$46 === "number" || match$46.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$47 = match$46._0; + let match$47 = match$46._0; switch (match$47.TAG | 0) { case /* Pident */0 : - var match$48 = match$47._0; + let match$48 = match$47._0; if (match$48.name === "int") { - var match$49 = match$48.flags; + let match$49 = match$48.flags; if (match$49 !== 0 || match$46._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$50 = match$46._2.contents; + let match$50 = match$46._2.contents; if (typeof match$50 === "number") { - var match$51 = match$35.ctyp_loc; - var match$52 = match$51.loc_start; + let match$51 = match$35.ctyp_loc; + let match$52 = match$51.loc_start; if (match$52.pos_fname === "" && !(match$52.pos_lnum !== 3 || match$52.pos_bol !== 10 || match$52.pos_cnum !== 28)) { - var match$53 = match$51.loc_end; + let match$53 = match$51.loc_end; if (match$53.pos_fname === "" && !(match$53.pos_lnum !== 3 || match$53.pos_bol !== 10 || match$53.pos_cnum !== 31 || match$51.loc_ghost || match$35.ctyp_attributes)) { - var match$54 = match$34._2; - var match$55 = match$54.ctyp_desc; + let match$54 = match$34._2; + let match$55 = match$54.ctyp_desc; if (typeof match$55 === "number" || match$55.TAG !== /* Ttyp_constr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$56 = match$55._0; + let match$56 = match$55._0; switch (match$56.TAG | 0) { case /* Pident */0 : - var match$57 = match$56._0; + let match$57 = match$56._0; if (match$57.name === "int") { - var match$58 = match$57.flags; + let match$58 = match$57.flags; if (match$58 !== 0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$59 = match$55._1; - var match$60 = match$59.txt; + let match$59 = match$55._1; + let match$60 = match$59.txt; switch (match$60.TAG | 0) { case /* Lident */0 : if (match$60._0 === "int") { - var match$61 = match$59.loc; - var match$62 = match$61.loc_start; + let match$61 = match$59.loc; + let match$62 = match$61.loc_start; if (match$62.pos_fname === "" && !(match$62.pos_lnum !== 3 || match$62.pos_bol !== 10 || match$62.pos_cnum !== 35)) { - var match$63 = match$61.loc_end; + let match$63 = match$61.loc_end; if (match$63.pos_fname === "" && !(match$63.pos_lnum !== 3 || match$63.pos_bol !== 10 || match$63.pos_cnum !== 38 || match$61.loc_ghost || match$55._2)) { - var match$64 = match$54.ctyp_type; - var match$65 = match$64.desc; + let match$64 = match$54.ctyp_type; + let match$65 = match$64.desc; if (typeof match$65 === "number" || match$65.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$66 = match$65._0; + let match$66 = match$65._0; switch (match$66.TAG | 0) { case /* Pident */0 : - var match$67 = match$66._0; + let match$67 = match$66._0; if (match$67.name === "int") { - var match$68 = match$67.flags; + let match$68 = match$67.flags; if (match$68 !== 0 || match$65._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$69 = match$65._2.contents; + let match$69 = match$65._2.contents; if (typeof match$69 === "number") { - var match$70 = match$54.ctyp_loc; - var match$71 = match$70.loc_start; + let match$70 = match$54.ctyp_loc; + let match$71 = match$70.loc_start; if (match$71.pos_fname === "" && !(match$71.pos_lnum !== 3 || match$71.pos_bol !== 10 || match$71.pos_cnum !== 35)) { - var match$72 = match$70.loc_end; + let match$72 = match$70.loc_end; if (match$72.pos_fname === "" && !(match$72.pos_lnum !== 3 || match$72.pos_bol !== 10 || match$72.pos_cnum !== 38 || match$70.loc_ghost || match$54.ctyp_attributes)) { - var match$73 = match$33.ctyp_type; - var match$74 = match$73.desc; + let match$73 = match$33.ctyp_type; + let match$74 = match$73.desc; if (typeof match$74 === "number" || !(match$74.TAG === /* Tarrow */1 && match$74._0 === "")) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$75 = match$74._1.desc; + let match$75 = match$74._1.desc; if (typeof match$75 === "number" || match$75.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$76 = match$75._0; + let match$76 = match$75._0; switch (match$76.TAG | 0) { case /* Pident */0 : - var match$77 = match$76._0; + let match$77 = match$76._0; if (match$77.name === "int") { - var match$78 = match$77.flags; + let match$78 = match$77.flags; if (match$78 !== 0 || match$75._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$79 = match$75._2.contents; + let match$79 = match$75._2.contents; if (typeof match$79 === "number") { - var match$80 = match$74._2.desc; + let match$80 = match$74._2.desc; if (typeof match$80 === "number" || match$80.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$81 = match$80._0; + let match$81 = match$80._0; switch (match$81.TAG | 0) { case /* Pident */0 : - var match$82 = match$81._0; + let match$82 = match$81._0; if (match$82.name === "int") { - var match$83 = match$82.flags; + let match$83 = match$82.flags; if (match$83 !== 0 || match$80._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$84 = match$80._2.contents; + let match$84 = match$80._2.contents; if (typeof match$84 === "number") { - var match$85 = match$74._3; + let match$85 = match$74._3; if (typeof match$85 === "number" && !match$85) { - var match$86 = match$33.ctyp_loc; - var match$87 = match$86.loc_start; + let match$86 = match$33.ctyp_loc; + let match$87 = match$86.loc_start; if (match$87.pos_fname === "" && !(match$87.pos_lnum !== 3 || match$87.pos_bol !== 10 || match$87.pos_cnum !== 28)) { - var match$88 = match$86.loc_end; + let match$88 = match$86.loc_end; if (match$88.pos_fname === "" && !(match$88.pos_lnum !== 3 || match$88.pos_bol !== 10 || match$88.pos_cnum !== 38 || match$86.loc_ghost || match$33.ctyp_attributes)) { - var match$89 = match$26.val_val; - var match$90 = match$89.val_type.desc; + let match$89 = match$26.val_val; + let match$90 = match$89.val_type.desc; if (typeof match$90 === "number" || !(match$90.TAG === /* Tarrow */1 && match$90._0 === "")) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$91 = match$90._1.desc; + let match$91 = match$90._1.desc; if (typeof match$91 === "number" || match$91.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$92 = match$91._0; + let match$92 = match$91._0; switch (match$92.TAG | 0) { case /* Pident */0 : - var match$93 = match$92._0; + let match$93 = match$92._0; if (match$93.name === "int") { - var match$94 = match$93.flags; + let match$94 = match$93.flags; if (match$94 !== 0 || match$91._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$95 = match$91._2.contents; + let match$95 = match$91._2.contents; if (typeof match$95 === "number") { - var match$96 = match$90._2.desc; + let match$96 = match$90._2.desc; if (typeof match$96 === "number" || match$96.TAG !== /* Tconstr */3) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$97 = match$96._0; + let match$97 = match$96._0; switch (match$97.TAG | 0) { case /* Pident */0 : - var match$98 = match$97._0; + let match$98 = match$97._0; if (match$98.name === "int") { - var match$99 = match$98.flags; + let match$99 = match$98.flags; if (match$99 !== 0 || match$96._1) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$100 = match$96._2.contents; + let match$100 = match$96._2.contents; if (typeof match$100 === "number") { - var match$101 = match$90._3; + let match$101 = match$90._3; if (typeof match$101 === "number" && !match$101) { - var match$102 = match$89.val_kind; + let match$102 = match$89.val_kind; if (typeof match$102 === "number" || match$102.TAG !== /* Val_prim */0) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52029, characters 12-19", true, false); } else { - var match$103 = match$102._0; + let match$103 = match$102._0; if (match$103.prim_name === "%negint" && !(match$103.prim_arity !== 1 || !(match$103.prim_alloc && match$103.prim_native_name === "" && !match$103.prim_native_float))) { - var match$104 = match$89.val_loc; - var match$105 = match$104.loc_start; + let match$104 = match$89.val_loc; + let match$105 = match$104.loc_start; if (match$105.pos_fname === "" && !(match$105.pos_lnum !== 3 || match$105.pos_bol !== 10 || match$105.pos_cnum !== 10)) { - var match$106 = match$104.loc_end; + let match$106 = match$104.loc_end; if (match$106.pos_fname === "" && !(match$106.pos_lnum !== 3 || match$106.pos_bol !== 10 || match$106.pos_cnum !== 50 || match$104.loc_ghost || match$89.val_attributes)) { eq("File \"jscomp/test/ocaml_typedtree_test.ml\", line 52028, characters 14-21", true, true); } else { diff --git a/jscomp/test/dist/jscomp/test/of_string_test.js b/jscomp/test/dist/jscomp/test/of_string_test.js index ab579b219b..fc911ed82a 100644 --- a/jscomp/test/dist/jscomp/test/of_string_test.js +++ b/jscomp/test/dist/jscomp/test/of_string_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var suites_0 = [ +let suites_0 = [ "string_of_float_1", (function (param) { return { @@ -15,7 +15,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "string_of_int", (function (param) { @@ -41,7 +41,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/offset.js b/jscomp/test/dist/jscomp/test/offset.js index fad5ae40d3..a4572af075 100644 --- a/jscomp/test/dist/jscomp/test/offset.js +++ b/jscomp/test/dist/jscomp/test/offset.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); -var Stdlib__String = require("melange/string.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); +let Stdlib__String = require("melange/string.js"); -var funarg = { +let funarg = { compare: Stdlib__String.compare }; @@ -23,8 +23,8 @@ function height(param) { } function create(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -34,13 +34,13 @@ function create(l, v, r) { } function bal(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -66,9 +66,9 @@ function bal(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -95,22 +95,22 @@ function add(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add(x, l); + let ll = add(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = add(x, r); + let rr = add(x, r); if (r === rr) { return t; } else { @@ -150,8 +150,8 @@ function join(l, v, r) { if (!r) { return add_max_element(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, join(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -163,9 +163,9 @@ function join(l, v, r) { function min_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return param.v; } @@ -180,11 +180,11 @@ function min_elt(_param) { function min_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return Caml_option.some(param.v); } @@ -195,7 +195,7 @@ function min_elt_opt(_param) { function max_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return param.v; @@ -211,7 +211,7 @@ function max_elt(_param) { function max_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -225,7 +225,7 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_elt(l), param.v, param.r); } else { @@ -258,10 +258,10 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -270,14 +270,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, match$1[0]), match$1[1], @@ -295,11 +295,11 @@ function is_empty(param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -312,10 +312,10 @@ function remove(x, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (l) { if (r) { @@ -328,14 +328,14 @@ function remove(x, t) { } } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return t; } else { @@ -350,21 +350,21 @@ function union(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add(v2, s1); } - var match = split(v1, s2); + let match = split(v1, s2); return join(union(s1.l, match[0]), v1, union(s1.r, match[2])); } if (h1 === 1) { return add(v1, s2); } - var match$1 = split(v2, s1); + let match$1 = split(v2, s1); return join(union(match$1[0], s2.l), v2, union(match$1[2], s2.r)); } @@ -375,11 +375,11 @@ function inter(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return join(inter(l1, l2), v1, inter(r1, match[2])); } else { @@ -396,19 +396,19 @@ function split_bis(x, param) { }) }; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return /* Found */0; } if (c < 0) { - var match = split_bis(x, l); + let match = split_bis(x, l); if (!match) { return /* Found */0; } - var rl = match._1; + let rl = match._1; return /* NotFound */{ _0: match._0, _1: (function (param) { @@ -416,7 +416,7 @@ function split_bis(x, param) { }) }; } - var match$1 = split_bis(x, r); + let match$1 = split_bis(x, r); if (match$1) { return /* NotFound */{ _0: join(l, v, match$1._0), @@ -429,8 +429,8 @@ function split_bis(x, param) { function disjoint(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } @@ -440,7 +440,7 @@ function disjoint(_s1, _s2) { if (s1 === s2) { return false; } - var match = split_bis(s1.v, s2); + let match = split_bis(s1.v, s2); if (!match) { return false; } @@ -460,11 +460,11 @@ function diff(s1, s2) { if (!s2) { return s1; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return concat(diff(l1, l2), diff(r1, match[2])); } else { @@ -474,8 +474,8 @@ function diff(s1, s2) { function cons_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -490,11 +490,11 @@ function cons_enum(_s, _e) { } function compare(s1, s2) { - var _e1 = cons_enum(s1, /* End */0); - var _e2 = cons_enum(s2, /* End */0); + let _e1 = cons_enum(s1, /* End */0); + let _e2 = cons_enum(s2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -505,7 +505,7 @@ function compare(s1, s2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } @@ -521,20 +521,20 @@ function equal(s1, s2) { function subset(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2.r; - var l2 = s2.l; - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var c = Curry._2(funarg.compare, v1, s2.v); + let r2 = s2.r; + let l2 = s2.l; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let c = Curry._2(funarg.compare, v1, s2.v); if (c === 0) { if (!subset(l1, l2)) { return false; @@ -570,7 +570,7 @@ function subset(_s1, _s2) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -583,8 +583,8 @@ function iter(f, _param) { function fold(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -596,7 +596,7 @@ function fold(f, _s, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -613,7 +613,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -632,12 +632,12 @@ function filter(p, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter(p, l); - var pv = Curry._1(p, v); - var r$p = filter(p, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter(p, l); + let pv = Curry._1(p, v); + let r$p = filter(p, r); if (pv) { if (l === l$p && r === r$p) { return t; @@ -656,14 +656,14 @@ function partition(p, param) { /* Empty */0 ]; } - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pv = Curry._1(p, v); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pv = Curry._1(p, v); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pv) { return [ join(lt, v, rt), @@ -687,8 +687,8 @@ function cardinal(param) { function elements_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -707,10 +707,10 @@ function elements(s) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; - var c = Curry._2(funarg.compare, x, v); + let v = param.v; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return v; } @@ -725,19 +725,19 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -758,21 +758,21 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -789,19 +789,19 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -822,21 +822,21 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -853,12 +853,12 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; - var c = Curry._2(funarg.compare, x, v); + let v = param.v; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return Caml_option.some(v); } @@ -879,12 +879,12 @@ function map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = map(f, l); - var v$p = Curry._1(f, v); - var r$p = map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = map(f, l); + let v$p = Curry._1(f, v); + let r$p = map(f, r); if (l === l$p && v === v$p && r === r$p) { return t; } else { @@ -896,12 +896,12 @@ function filter_map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter_map(f, l); - var v$p = Curry._1(f, v); - var r$p = filter_map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter_map(f, l); + let v$p = Curry._1(f, v); + let r$p = filter_map(f, r); if (v$p === undefined) { if (l$p) { if (r$p) { @@ -913,7 +913,7 @@ function filter_map(f, t) { return r$p; } } - var v$p$1 = Caml_option.valFromOption(v$p); + let v$p$1 = Caml_option.valFromOption(v$p); if (l === l$p && v === v$p$1 && r === r$p) { return t; } else { @@ -925,27 +925,27 @@ function of_list(l) { if (!l) { return /* Empty */0; } - var match = l.tl; - var x0 = l.hd; + let match = l.tl; + let x0 = l.hd; if (!match) { return singleton(x0); } - var match$1 = match.tl; - var x1 = match.hd; + let match$1 = match.tl; + let x1 = match.hd; if (!match$1) { return add(x1, singleton(x0)); } - var match$2 = match$1.tl; - var x2 = match$1.hd; + let match$2 = match$1.tl; + let x2 = match$1.hd; if (!match$2) { return add(x2, add(x1, singleton(x0))); } - var match$3 = match$2.tl; - var x3 = match$2.hd; + let match$3 = match$2.tl; + let x3 = match$2.hd; if (match$3) { if (match$3.tl) { - var l$1 = Stdlib__List.sort_uniq(funarg.compare, l); - var sub = function (n, l) { + let l$1 = Stdlib__List.sort_uniq(funarg.compare, l); + let sub = function (n, l) { switch (n) { case 0 : return [ @@ -967,7 +967,7 @@ function of_list(l) { break; case 2 : if (l) { - var match = l.tl; + let match = l.tl; if (match) { return [ /* Node */{ @@ -989,9 +989,9 @@ function of_list(l) { break; case 3 : if (l) { - var match$1 = l.tl; + let match$1 = l.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return [ /* Node */{ @@ -1021,11 +1021,11 @@ function of_list(l) { default: } - var nl = n / 2 | 0; - var match$3 = sub(nl, l); - var l$1 = match$3[1]; + let nl = n / 2 | 0; + let match$3 = sub(nl, l); + let l$1 = match$3[1]; if (l$1) { - var match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); + let match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); return [ create(match$3[0], l$1.hd, match$4[0]), match$4[1] @@ -1063,7 +1063,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._1, c._2); + let partial_arg = cons_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1073,7 +1073,7 @@ function seq_of_enum_(c, param) { } function to_seq(c) { - var partial_arg = cons_enum(c, /* End */0); + let partial_arg = cons_enum(c, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1081,8 +1081,8 @@ function to_seq(c) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1100,7 +1100,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._1, c._2); + let partial_arg = snoc_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1110,23 +1110,23 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, s) { - var aux = function (low, _s, _c) { + let aux = function (low, _s, _c) { while(true) { - var c = _c; - var s = _s; + let c = _c; + let s = _s; if (!s) { return c; } - var r = s.r; - var v = s.v; - var n = Curry._2(funarg.compare, v, low); + let r = s.r; + let v = s.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1147,13 +1147,13 @@ function to_seq_from(low, s) { continue ; }; }; - var partial_arg = aux(low, s, /* End */0); + let partial_arg = aux(low, s, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var $$Set = { +let $$Set = { empty: /* Empty */0, add: add, singleton: singleton, @@ -1199,12 +1199,12 @@ var $$Set = { of_seq: of_seq }; -var M = { +let M = { x: 1, $$Set: $$Set }; -var x = 1; +let x = 1; exports.M = M; exports.x = x; diff --git a/jscomp/test/dist/jscomp/test/oo_js_test_date.js b/jscomp/test/dist/jscomp/test/oo_js_test_date.js index 25d765ddcc..93f1532cbb 100644 --- a/jscomp/test/dist/jscomp/test/oo_js_test_date.js +++ b/jscomp/test/dist/jscomp/test/oo_js_test_date.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var d = new Date(2016, 2); +let d = new Date(2016, 2); function d2(param) { return function (param$1, param$2) { - var prim1 = 2; + let prim1 = 2; return new Date(param, prim1, param$1); }; } -var d3 = d2(2016)(1, undefined); +let d3 = d2(2016)(1, undefined); -var suites_0 = [ +let suites_0 = [ "getMonth", (function (param) { return { @@ -25,7 +25,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "getYear", (function (param) { @@ -47,7 +47,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/opr_3576_test.js b/jscomp/test/dist/jscomp/test/opr_3576_test.js index 27eab588f2..0312e432ce 100644 --- a/jscomp/test/dist/jscomp/test/opr_3576_test.js +++ b/jscomp/test/dist/jscomp/test/opr_3576_test.js @@ -1,21 +1,21 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = [ +let shared = [ "m1", "m2" ]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -23,35 +23,35 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var object_tables = /* Cons */{ +let object_tables = /* Cons */{ key: undefined, data: undefined, next: undefined }; -var object_tables$1 = /* Cons */{ +let object_tables$1 = /* Cons */{ key: undefined, data: undefined, next: undefined }; function a_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "m2", "m1" ]); - var m2 = ids[0]; - var m1 = ids[1]; + let m2 = ids[0]; + let m1 = ids[1]; CamlinternalOO.set_methods($$class, [ m1, (function (self$1) { if (!object_tables$1.key) { - var $$class = CamlinternalOO.create_table(["m3"]); - var m3 = CamlinternalOO.get_method_label($$class, "m3"); + let $$class = CamlinternalOO.create_table(["m3"]); + let m3 = CamlinternalOO.get_method_label($$class, "m3"); CamlinternalOO.set_method($$class, m3, (function (self$2) { return 3; })); - var env_init = function (env) { + let env_init = function (env) { return CamlinternalOO.create_object_opt(undefined, $$class); }; CamlinternalOO.init_class($$class); @@ -62,16 +62,16 @@ function a_init($$class) { m2, (function (self$1) { if (!object_tables.key) { - var $$class = CamlinternalOO.create_table(["m4"]); - var env = CamlinternalOO.new_variable($$class, ""); - var m4 = CamlinternalOO.get_method_label($$class, "m4"); + let $$class = CamlinternalOO.create_table(["m4"]); + let env = CamlinternalOO.new_variable($$class, ""); + let m4 = CamlinternalOO.get_method_label($$class, "m4"); CamlinternalOO.set_method($$class, m4, (function (self$3) { - var env$1 = self$3[env]; - var tmp = env$1[1]; + let env$1 = self$3[env]; + let tmp = env$1[1]; return Curry._1(tmp[0][env$1[0]], tmp); })); - var env_init = function (env$1) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let env_init = function (env$1) { + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[env] = env$1; return self; }; @@ -89,42 +89,42 @@ function a_init($$class) { }; } -var a = CamlinternalOO.make_class(shared, a_init); +let a = CamlinternalOO.make_class(shared, a_init); function b_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "m2", "m1", "a_text" ]); - var a_text = ids[2]; - var inh = CamlinternalOO.inherits($$class, 0, 0, shared, a, true); - var obj_init = inh[0]; + let a_text = ids[2]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared, a, true); + let obj_init = inh[0]; CamlinternalOO.set_method($$class, a_text, (function (self$4, param) { })); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var b = CamlinternalOO.make_class([ +let b = CamlinternalOO.make_class([ "a_text", "m1", "m2" ], b_init); -var tmp = Curry._1(a[0], undefined); +let tmp = Curry._1(a[0], undefined); Caml_oo_curry.js1(24357, 1, tmp); -var tmp$1 = Curry._1(b[0], undefined); +let tmp$1 = Curry._1(b[0], undefined); -var tmp$2 = Caml_oo_curry.js1(24357, 2, tmp$1); +let tmp$2 = Caml_oo_curry.js1(24357, 2, tmp$1); -var tmp$3 = Caml_oo_curry.js1(24359, 3, tmp$2); +let tmp$3 = Caml_oo_curry.js1(24359, 3, tmp$2); eq("File \"jscomp/test/opr_3576_test.ml\", line 22, characters 6-13", Caml_oo_curry.js1(24358, 4, tmp$3), 3); diff --git a/jscomp/test/dist/jscomp/test/opr_4560_test.js b/jscomp/test/dist/jscomp/test/opr_4560_test.js index 00cbd03d18..20c25cb2b6 100644 --- a/jscomp/test/dist/jscomp/test/opr_4560_test.js +++ b/jscomp/test/dist/jscomp/test/opr_4560_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var shared = ["b"]; +let shared = ["b"]; -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -20,48 +20,48 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var object_tables = /* Cons */{ +let object_tables = /* Cons */{ key: undefined, data: undefined, next: undefined }; -var object_tables$1 = /* Cons */{ +let object_tables$1 = /* Cons */{ key: undefined, data: undefined, next: undefined }; function c1_init($$class) { - var b = CamlinternalOO.get_method_label($$class, "b"); + let b = CamlinternalOO.get_method_label($$class, "b"); CamlinternalOO.set_method($$class, b, (function (self$1) { if (!object_tables.key) { - var $$class = CamlinternalOO.create_table([ + let $$class = CamlinternalOO.create_table([ "c", "h" ]); - var env = CamlinternalOO.new_variable($$class, ""); - var ids = CamlinternalOO.get_method_labels($$class, [ + let env = CamlinternalOO.new_variable($$class, ""); + let ids = CamlinternalOO.get_method_labels($$class, [ "h", "c" ]); - var h = ids[0]; - var c = ids[1]; + let h = ids[0]; + let c = ids[1]; CamlinternalOO.set_methods($$class, [ c, (function (self$2) { - var env$1 = self$2[env]; + let env$1 = self$2[env]; if (!object_tables$1.key) { - var $$class = CamlinternalOO.create_table(["d"]); - var env$2 = CamlinternalOO.new_variable($$class, ""); - var d = CamlinternalOO.get_method_label($$class, "d"); + let $$class = CamlinternalOO.create_table(["d"]); + let env$2 = CamlinternalOO.new_variable($$class, ""); + let d = CamlinternalOO.get_method_label($$class, "d"); CamlinternalOO.set_method($$class, d, (function (self$3) { - var env$3 = self$3[env$2]; - var tmp = env$3[1]; + let env$3 = self$3[env$2]; + let tmp = env$3[1]; return Curry._1(tmp[0][env$3[0]], tmp); })); - var env_init = function (env$3) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let env_init = function (env$3) { + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[env$2] = env$3; return self; }; @@ -78,8 +78,8 @@ function c1_init($$class) { return 33; }) ]); - var env_init = function (env$1) { - var self = CamlinternalOO.create_object_opt(undefined, $$class); + let env_init = function (env$1) { + let self = CamlinternalOO.create_object_opt(undefined, $$class); self[env] = env$1; return self; }; @@ -96,50 +96,50 @@ function c1_init($$class) { }; } -var c1 = CamlinternalOO.make_class(shared, c1_init); +let c1 = CamlinternalOO.make_class(shared, c1_init); function c2_init($$class) { - var ids = CamlinternalOO.get_method_labels($$class, [ + let ids = CamlinternalOO.get_method_labels($$class, [ "b", "a" ]); - var a = ids[1]; - var inh = CamlinternalOO.inherits($$class, 0, 0, shared, c1, true); - var obj_init = inh[0]; + let a = ids[1]; + let inh = CamlinternalOO.inherits($$class, 0, 0, shared, c1, true); + let obj_init = inh[0]; CamlinternalOO.set_method($$class, a, (function (self$4) { })); return function (env, self) { - var self$1 = CamlinternalOO.create_object_opt(self, $$class); + let self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); return CamlinternalOO.run_initializers_opt(self, self$1, $$class); }; } -var c2 = CamlinternalOO.make_class([ +let c2 = CamlinternalOO.make_class([ "a", "b" ], c2_init); -var tmp = Curry._1(c2[0], undefined); +let tmp = Curry._1(c2[0], undefined); Caml_oo_curry.js1(98, 1, tmp); -var tmp$1 = Curry._1(c1[0], undefined); +let tmp$1 = Curry._1(c1[0], undefined); -var tmp$2 = Caml_oo_curry.js1(98, 2, tmp$1); +let tmp$2 = Caml_oo_curry.js1(98, 2, tmp$1); -var tmp$3 = Caml_oo_curry.js1(99, 3, tmp$2); +let tmp$3 = Caml_oo_curry.js1(99, 3, tmp$2); -var tmp$4 = Caml_oo_curry.js1(100, 4, tmp$3); +let tmp$4 = Caml_oo_curry.js1(100, 4, tmp$3); -var e = Caml_oo_curry.js1(104, 5, tmp$4); +let e = Caml_oo_curry.js1(104, 5, tmp$4); eq("File \"jscomp/test/opr_4560_test.ml\", line 26, characters 3-10", e, 33); Mt.from_pair_suites("jscomp/test/opr_4560_test.ml", suites.contents); -var magic = 33; +let magic = 33; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/option_encoding_test.js b/jscomp/test/dist/jscomp/test/option_encoding_test.js index a8d03d9cd2..4d35251309 100644 --- a/jscomp/test/dist/jscomp/test/option_encoding_test.js +++ b/jscomp/test/dist/jscomp/test/option_encoding_test.js @@ -2,14 +2,14 @@ 'use strict'; -var N = {}; +let N = {}; -var u = [ +let u = [ undefined, 3 ]; -var h; +let h; exports.N = N; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/option_repr_test.js b/jscomp/test/dist/jscomp/test/option_repr_test.js index 99944a46ea..57aa34eaac 100644 --- a/jscomp/test/dist/jscomp/test/option_repr_test.js +++ b/jscomp/test/dist/jscomp/test/option_repr_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Belt__Belt_List = require("melange.belt/belt_List.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Belt__Belt_List = require("melange.belt/belt_List.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -23,7 +23,7 @@ function b(loc, v) { } function f0(x) { - var match = x[1]; + let match = x[1]; if (match !== undefined && match) { return 1; } else { @@ -40,7 +40,7 @@ function f1(u) { } function f2(x, y, zOpt, param) { - var z = zOpt !== undefined ? zOpt : 3; + let z = zOpt !== undefined ? zOpt : 3; console.log(x); if (y !== undefined) { return y + z | 0; @@ -73,16 +73,16 @@ function f6(a) { return Caml_option.some(a) !== undefined; } -var f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some(undefined)))); +let f10 = Caml_option.some(Caml_option.some(Caml_option.some(Caml_option.some(undefined)))); -var f11 = Caml_option.some(f10); +let f11 = Caml_option.some(f10); -var randomized = { +let randomized = { contents: false }; function create(randomOpt, param) { - var random = randomOpt !== undefined ? randomOpt : randomized.contents; + let random = randomOpt !== undefined ? randomOpt : randomized.contents; if (random) { return 2; } else { @@ -90,25 +90,25 @@ function create(randomOpt, param) { } } -var ff = create(false, undefined); +let ff = create(false, undefined); function f13(xOpt, yOpt, param) { - var x = xOpt !== undefined ? xOpt : 3; - var y = yOpt !== undefined ? yOpt : 4; + let x = xOpt !== undefined ? xOpt : 3; + let y = yOpt !== undefined ? yOpt : 4; return x + y | 0; } -var a = f13(2, undefined, undefined); +let a = f13(2, undefined, undefined); function f12(x) { return x; } -var length_8_id = Belt__Belt_List.makeBy(8, (function (x) { +let length_8_id = Belt__Belt_List.makeBy(8, (function (x) { return x; })); -var length_10_id = Belt__Belt_List.makeBy(10, (function (x) { +let length_10_id = Belt__Belt_List.makeBy(10, (function (x) { return x; })); @@ -175,9 +175,9 @@ function all_true(xs) { })); } -var xs_0 = gtx(Caml_option.some(null), Caml_option.some(undefined)); +let xs_0 = gtx(Caml_option.some(null), Caml_option.some(undefined)); -var xs = { +let xs = { hd: xs_0, tl: /* [] */0 }; @@ -186,9 +186,9 @@ b("File \"jscomp/test/option_repr_test.ml\", line 121, characters 5-12", Belt__B return x; }))); -var xs_0$1 = ltx(Caml_option.some(undefined), 3); +let xs_0$1 = ltx(Caml_option.some(undefined), 3); -var xs_1 = { +let xs_1 = { hd: ltx(Caml_option.some(undefined), Caml_option.some(Caml_option.some(undefined))), tl: { hd: ltx(Caml_option.some(undefined), "3"), @@ -222,7 +222,7 @@ var xs_1 = { } }; -var xs$1 = { +let xs$1 = { hd: xs_0$1, tl: xs_1 }; @@ -231,9 +231,9 @@ b("File \"jscomp/test/option_repr_test.ml\", line 127, characters 5-12", Belt__B return x; }))); -var xs_0$2 = eqx(undefined, undefined); +let xs_0$2 = eqx(undefined, undefined); -var xs_1$1 = { +let xs_1$1 = { hd: neqx(undefined, null), tl: { hd: eqx(Caml_option.some(undefined), Caml_option.some(undefined)), @@ -247,7 +247,7 @@ var xs_1$1 = { } }; -var xs$2 = { +let xs$2 = { hd: xs_0$2, tl: xs_1$1 }; @@ -264,20 +264,20 @@ function v0(x) { return x; } -var N0 = { +let N0 = { v: v, v0: v0 }; Mt.from_pair_suites("Option_repr_test", suites.contents); -var f7; +let f7; -var f8 = Caml_option.some(undefined); +let f8 = Caml_option.some(undefined); -var f9 = Caml_option.some(Caml_option.some(undefined)); +let f9 = Caml_option.some(Caml_option.some(undefined)); -var none_arg; +let none_arg; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/optional_ffi_test.js b/jscomp/test/dist/jscomp/test/optional_ffi_test.js index 595220df0f..c6fe83e276 100644 --- a/jscomp/test/dist/jscomp/test/optional_ffi_test.js +++ b/jscomp/test/dist/jscomp/test/optional_ffi_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -37,9 +37,9 @@ function hey(x, y) { } ; -var u = hey(undefined, 3); +let u = hey(undefined, 3); -var z = hey(5, 3); +let z = hey(5, 3); eq("File \"jscomp/test/optional_ffi_test.ml\", line 23, characters 5-12", [ [ @@ -52,7 +52,7 @@ eq("File \"jscomp/test/optional_ffi_test.ml\", line 23, characters 5-12", [ ] ]); -var counter = { +let counter = { contents: 0 }; @@ -69,7 +69,7 @@ function bug_to_fix2(f, x) { return hey(Caml_option.option_get(f(x)), 3); } -var counter2 = { +let counter2 = { contents: 0 }; @@ -78,36 +78,36 @@ function side_effect2(x) { return x.contents; } -var v = bug_to_fix(side_effect, counter); +let v = bug_to_fix(side_effect, counter); -var pair_0 = [ +let pair_0 = [ v, counter.contents ]; -var pair_1 = [ +let pair_1 = [ 4, 1 ]; -var pair = [ +let pair = [ pair_0, pair_1 ]; -var v2 = bug_to_fix2(side_effect2, counter2); +let v2 = bug_to_fix2(side_effect2, counter2); -var pair2_0 = [ +let pair2_0 = [ v2, counter.contents ]; -var pair2_1 = [ +let pair2_1 = [ 4, 1 ]; -var pair2 = [ +let pair2 = [ pair2_0, pair2_1 ]; @@ -122,9 +122,9 @@ function heystr(x, y) { } ; -var pair_1$1 = heystr("name", "4"); +let pair_1$1 = heystr("name", "4"); -var pair$1 = [ +let pair$1 = [ "name4", pair_1$1 ]; diff --git a/jscomp/test/dist/jscomp/test/optional_regression_test.js b/jscomp/test/dist/jscomp/test/optional_regression_test.js index e097805908..90e5b168c1 100644 --- a/jscomp/test/dist/jscomp/test/optional_regression_test.js +++ b/jscomp/test/dist/jscomp/test/optional_regression_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,7 +18,7 @@ function eq(loc, x, y) { function make(s, b, i) { return function (param) { - var tmp = {}; + let tmp = {}; if (s !== undefined) { tmp.s = Caml_option.valFromOption(s); } @@ -32,7 +32,7 @@ function make(s, b, i) { }; } -var hh = { +let hh = { s: "", b: false, i: 0 diff --git a/jscomp/test/dist/jscomp/test/parser_api.js b/jscomp/test/dist/jscomp/test/parser_api.js index 936657da12..44fc7ec31a 100644 --- a/jscomp/test/dist/jscomp/test/parser_api.js +++ b/jscomp/test/dist/jscomp/test/parser_api.js @@ -1,47 +1,47 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int32 = require("melange.js/caml_int32.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Arg = require("melange/arg.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__Lexing = require("melange/lexing.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Parsing = require("melange/parsing.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); - -var standard_library_default = "/Users/chenglou/Github/bucklescript/vendor/ocaml/lib/ocaml"; - -var standard_library; +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Arg = require("melange/arg.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__Lexing = require("melange/lexing.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Parsing = require("melange/parsing.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); + +let standard_library_default = "/Users/chenglou/Github/bucklescript/vendor/ocaml/lib/ocaml"; + +let standard_library; try { standard_library = Caml_sys.caml_sys_getenv("BSLIB"); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { standard_library = standard_library_default; } else { @@ -49,73 +49,73 @@ catch (raw_exn){ } } -var standard_runtime = "/Users/chenglou/Github/bucklescript/vendor/ocaml/bin/ocamlrun"; +let standard_runtime = "/Users/chenglou/Github/bucklescript/vendor/ocaml/bin/ocamlrun"; -var ccomp_type = "cc"; +let ccomp_type = "cc"; -var bytecomp_c_compiler = "gcc -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O "; +let bytecomp_c_compiler = "gcc -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O "; -var bytecomp_c_libraries = "-lcurses -lpthread"; +let bytecomp_c_libraries = "-lcurses -lpthread"; -var native_c_compiler = "gcc -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT"; +let native_c_compiler = "gcc -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT"; -var native_c_libraries = ""; +let native_c_libraries = ""; -var native_pack_linker = "ld -r -arch x86_64 -o "; +let native_pack_linker = "ld -r -arch x86_64 -o "; -var ranlib = "ranlib"; +let ranlib = "ranlib"; -var cc_profile = "-pg"; +let cc_profile = "-pg"; -var exec_magic_number = "Caml1999X011"; +let exec_magic_number = "Caml1999X011"; -var cmi_magic_number = "Caml1999I017"; +let cmi_magic_number = "Caml1999I017"; -var cmo_magic_number = "Caml1999O010"; +let cmo_magic_number = "Caml1999O010"; -var cma_magic_number = "Caml1999A011"; +let cma_magic_number = "Caml1999A011"; -var cmx_magic_number = "Caml1999Y014"; +let cmx_magic_number = "Caml1999Y014"; -var cmxa_magic_number = "Caml1999Z013"; +let cmxa_magic_number = "Caml1999Z013"; -var ast_impl_magic_number = "Caml1999M016"; +let ast_impl_magic_number = "Caml1999M016"; -var ast_intf_magic_number = "Caml1999N015"; +let ast_intf_magic_number = "Caml1999N015"; -var cmxs_magic_number = "Caml2007D002"; +let cmxs_magic_number = "Caml2007D002"; -var cmt_magic_number = "Caml2012T004"; +let cmt_magic_number = "Caml2012T004"; -var load_path = { +let load_path = { contents: /* [] */0 }; -var interface_suffix = { +let interface_suffix = { contents: ".mli" }; -var architecture = "amd64"; +let architecture = "amd64"; -var model = "default"; +let model = "default"; -var system = "macosx"; +let system = "macosx"; -var asm = "clang -arch x86_64 -c"; +let asm = "clang -arch x86_64 -c"; -var ext_obj = ".o"; +let ext_obj = ".o"; -var ext_asm = ".s"; +let ext_asm = ".s"; -var ext_lib = ".a"; +let ext_lib = ".a"; -var ext_dll = ".so"; +let ext_dll = ".so"; -var host = "x86_64-apple-darwin18.2.0"; +let host = "x86_64-apple-darwin18.2.0"; -var target = "x86_64-apple-darwin18.2.0"; +let target = "x86_64-apple-darwin18.2.0"; -var default_executable_name; +let default_executable_name; switch (Stdlib__Sys.os_type) { case "Unix" : @@ -130,7 +130,7 @@ switch (Stdlib__Sys.os_type) { } function print_config(oc) { - var p = function (name, valu) { + let p = function (name, valu) { Curry._2(Stdlib__Printf.fprintf(oc, /* Format */{ _0: { TAG: /* String */2, @@ -152,7 +152,7 @@ function print_config(oc) { _1: "%s: %s\n" }), name, valu); }; - var p_bool = function (name, valu) { + let p_bool = function (name, valu) { Curry._2(Stdlib__Printf.fprintf(oc, /* Format */{ _0: { TAG: /* String */2, @@ -214,7 +214,7 @@ function print_config(oc) { Caml_io.caml_ml_flush(oc); } -var Config = { +let Config = { version: Stdlib__Sys.ocaml_version, standard_library: standard_library, standard_runtime: standard_runtime, @@ -263,319 +263,319 @@ var Config = { print_config: print_config }; -var objfiles = { +let objfiles = { contents: /* [] */0 }; -var ccobjs = { +let ccobjs = { contents: /* [] */0 }; -var dllibs = { +let dllibs = { contents: /* [] */0 }; -var compile_only = { +let compile_only = { contents: false }; -var output_name = { +let output_name = { contents: undefined }; -var include_dirs = { +let include_dirs = { contents: /* [] */0 }; -var no_std_include = { +let no_std_include = { contents: false }; -var print_types = { +let print_types = { contents: false }; -var make_archive = { +let make_archive = { contents: false }; -var debug = { +let debug = { contents: false }; -var fast = { +let fast = { contents: false }; -var link_everything = { +let link_everything = { contents: false }; -var custom_runtime = { +let custom_runtime = { contents: false }; -var no_check_prims = { +let no_check_prims = { contents: false }; -var bytecode_compatible_32 = { +let bytecode_compatible_32 = { contents: false }; -var output_c_object = { +let output_c_object = { contents: false }; -var output_complete_object = { +let output_complete_object = { contents: false }; -var all_ccopts = { +let all_ccopts = { contents: /* [] */0 }; -var classic = { +let classic = { contents: false }; -var nopervasives = { +let nopervasives = { contents: false }; -var preprocessor = { +let preprocessor = { contents: undefined }; -var all_ppx = { +let all_ppx = { contents: /* [] */0 }; -var annotations = { +let annotations = { contents: false }; -var binary_annotations = { +let binary_annotations = { contents: false }; -var use_threads = { +let use_threads = { contents: false }; -var use_vmthreads = { +let use_vmthreads = { contents: false }; -var noassert = { +let noassert = { contents: false }; -var verbose = { +let verbose = { contents: false }; -var noprompt = { +let noprompt = { contents: false }; -var nopromptcont = { +let nopromptcont = { contents: false }; -var init_file = { +let init_file = { contents: undefined }; -var noinit = { +let noinit = { contents: false }; -var open_modules = { +let open_modules = { contents: /* [] */0 }; -var use_prims = { +let use_prims = { contents: "" }; -var use_runtime = { +let use_runtime = { contents: "" }; -var principal = { +let principal = { contents: false }; -var real_paths = { +let real_paths = { contents: true }; -var recursive_types = { +let recursive_types = { contents: false }; -var strict_sequence = { +let strict_sequence = { contents: false }; -var strict_formats = { +let strict_formats = { contents: false }; -var applicative_functors = { +let applicative_functors = { contents: true }; -var make_runtime = { +let make_runtime = { contents: false }; -var gprofile = { +let gprofile = { contents: false }; -var c_compiler = { +let c_compiler = { contents: undefined }; -var no_auto_link = { +let no_auto_link = { contents: false }; -var dllpaths = { +let dllpaths = { contents: /* [] */0 }; -var make_package = { +let make_package = { contents: false }; -var for_package = { +let for_package = { contents: undefined }; -var error_size = { +let error_size = { contents: 500 }; -var float_const_prop = { +let float_const_prop = { contents: true }; -var transparent_modules = { +let transparent_modules = { contents: false }; -var dump_source = { +let dump_source = { contents: false }; -var dump_parsetree = { +let dump_parsetree = { contents: false }; -var dump_typedtree = { +let dump_typedtree = { contents: false }; -var dump_rawlambda = { +let dump_rawlambda = { contents: false }; -var dump_lambda = { +let dump_lambda = { contents: false }; -var dump_clambda = { +let dump_clambda = { contents: false }; -var dump_instr = { +let dump_instr = { contents: false }; -var keep_asm_file = { +let keep_asm_file = { contents: false }; -var optimize_for_speed = { +let optimize_for_speed = { contents: true }; -var opaque = { +let opaque = { contents: false }; -var dump_cmm = { +let dump_cmm = { contents: false }; -var dump_selection = { +let dump_selection = { contents: false }; -var dump_cse = { +let dump_cse = { contents: false }; -var dump_live = { +let dump_live = { contents: false }; -var dump_spill = { +let dump_spill = { contents: false }; -var dump_split = { +let dump_split = { contents: false }; -var dump_interf = { +let dump_interf = { contents: false }; -var dump_prefer = { +let dump_prefer = { contents: false }; -var dump_regalloc = { +let dump_regalloc = { contents: false }; -var dump_reload = { +let dump_reload = { contents: false }; -var dump_scheduling = { +let dump_scheduling = { contents: false }; -var dump_linear = { +let dump_linear = { contents: false }; -var keep_startup_file = { +let keep_startup_file = { contents: false }; -var dump_combine = { +let dump_combine = { contents: false }; -var native_code = { +let native_code = { contents: false }; -var inline_threshold = { +let inline_threshold = { contents: 10 }; -var force_slash = { +let force_slash = { contents: false }; -var dont_write_files = { +let dont_write_files = { contents: false }; @@ -598,43 +598,43 @@ function std_include_dir(param) { } } -var shared = { +let shared = { contents: false }; -var dlcode = { +let dlcode = { contents: true }; -var runtime_variant = { +let runtime_variant = { contents: "" }; -var keep_docs = { +let keep_docs = { contents: false }; -var keep_locs = { +let keep_locs = { contents: false }; -var unsafe_string = { +let unsafe_string = { contents: true }; -var no_implicit_current_dir = { +let no_implicit_current_dir = { contents: false }; -var assume_no_mli = { +let assume_no_mli = { contents: /* Mli_na */0 }; -var record_event_when_debug = { +let record_event_when_debug = { contents: true }; -var bs_vscode; +let bs_vscode; try { Caml_sys.caml_sys_getenv("BS_VSCODE"); @@ -644,15 +644,15 @@ catch (exn$1){ bs_vscode = false; } -var dont_record_crc_unit = { +let dont_record_crc_unit = { contents: undefined }; -var bs_only = { +let bs_only = { contents: false }; -var no_assert_false = { +let no_assert_false = { contents: false }; @@ -669,11 +669,11 @@ function parse_color_setting(param) { } } -var color = { +let color = { contents: undefined }; -var Clflags = { +let Clflags = { objfiles: objfiles, ccobjs: ccobjs, dllibs: dllibs, @@ -772,7 +772,7 @@ var Clflags = { color: color }; -var Fatal_error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Misc.Fatal_error"); +let Fatal_error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Misc.Fatal_error"); function fatal_error(msg) { Stdlib.prerr_string(">> Fatal error: "); @@ -783,7 +783,7 @@ function fatal_error(msg) { } function try_finally(work, cleanup) { - var result; + let result; try { result = Curry._1(work, undefined); } @@ -810,7 +810,7 @@ function map_left_right(f, param) { if (!param) { return /* [] */0; } - var res = Curry._1(f, param.hd); + let res = Curry._1(f, param.hd); return { hd: res, tl: map_left_right(f, param.tl) @@ -819,8 +819,8 @@ function map_left_right(f, param) { function for_all2(pred, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -855,8 +855,8 @@ function list_remove(x, param) { if (!param) { return /* [] */0; } - var tl = param.tl; - var hd = param.hd; + let tl = param.tl; + let hd = param.hd; if (Caml_obj.caml_equal(hd, x)) { return tl; } else { @@ -869,14 +869,14 @@ function list_remove(x, param) { function split_last(param) { if (param) { - var x = param.hd; + let x = param.hd; if (!param.tl) { return [ /* [] */0, x ]; } - var match = split_last(param.tl); + let match = split_last(param.tl); return [ { hd: x, @@ -897,8 +897,8 @@ function split_last(param) { function samelist(pred, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { if (l2) { return false; @@ -934,11 +934,11 @@ function may_map(f, param) { function find_in_path(path, name) { if (Curry._1(Stdlib__Filename.is_implicit, name)) { - var _param = path; + let _param = path; while(true) { - var param = _param; + let param = _param; if (param) { - var fullname = Stdlib__Filename.concat(param.hd, name); + let fullname = Stdlib__Filename.concat(param.hd, name); if (Caml_external_polyfill.resolve("caml_sys_file_exists")(fullname)) { return fullname; } @@ -959,11 +959,11 @@ function find_in_path(path, name) { } function find_in_path_rel(path, name) { - var simplify = function (_s) { + let simplify = function (_s) { while(true) { - var s = _s; - var base = Curry._1(Stdlib__Filename.basename, s); - var dir = Curry._1(Stdlib__Filename.dirname, s); + let s = _s; + let base = Curry._1(Stdlib__Filename.basename, s); + let dir = Curry._1(Stdlib__Filename.dirname, s); if (dir === s) { return dir; } @@ -974,11 +974,11 @@ function find_in_path_rel(path, name) { continue ; }; }; - var _param = path; + let _param = path; while(true) { - var param = _param; + let param = _param; if (param) { - var fullname = simplify(Stdlib__Filename.concat(param.hd, name)); + let fullname = simplify(Stdlib__Filename.concat(param.hd, name)); if (Caml_external_polyfill.resolve("caml_sys_file_exists")(fullname)) { return fullname; } @@ -992,14 +992,14 @@ function find_in_path_rel(path, name) { } function find_in_path_uncap(path, name) { - var uname = Caml_bytes.bytes_to_string(Stdlib__Bytes.uncapitalize_ascii(Caml_bytes.bytes_of_string(name))); - var _param = path; + let uname = Caml_bytes.bytes_to_string(Stdlib__Bytes.uncapitalize_ascii(Caml_bytes.bytes_of_string(name))); + let _param = path; while(true) { - var param = _param; + let param = _param; if (param) { - var dir = param.hd; - var fullname = Stdlib__Filename.concat(dir, name); - var ufullname = Stdlib__Filename.concat(dir, uname); + let dir = param.hd; + let fullname = Stdlib__Filename.concat(dir, name); + let ufullname = Stdlib__Filename.concat(dir, uname); if (Caml_external_polyfill.resolve("caml_sys_file_exists")(ufullname)) { return ufullname; } @@ -1020,7 +1020,7 @@ function remove_file(filename) { return Caml_external_polyfill.resolve("caml_sys_remove")(filename); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Sys_error) { return ; } @@ -1037,7 +1037,7 @@ function expand_directory(alt, s) { } function create_hashtable(size, init) { - var tbl = Stdlib__Hashtbl.create(undefined, size); + let tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { Stdlib__Hashtbl.add(tbl, param[0], param[1]); }), init); @@ -1045,10 +1045,10 @@ function create_hashtable(size, init) { } function copy_file(ic, oc) { - var buff = Caml_bytes.caml_create_bytes(4096); - var _param; + let buff = Caml_bytes.caml_create_bytes(4096); + let _param; while(true) { - var n = Stdlib.input(ic, buff, 0, 4096); + let n = Stdlib.input(ic, buff, 0, 4096); if (n === 0) { return ; } @@ -1059,14 +1059,14 @@ function copy_file(ic, oc) { } function copy_file_chunk(ic, oc, len) { - var buff = Caml_bytes.caml_create_bytes(4096); - var _n = len; + let buff = Caml_bytes.caml_create_bytes(4096); + let _n = len; while(true) { - var n = _n; + let n = _n; if (n <= 0) { return ; } - var r = Stdlib.input(ic, buff, 0, n < 4096 ? n : 4096); + let r = Stdlib.input(ic, buff, 0, n < 4096 ? n : 4096); if (r === 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { MEL_EXN_ID: Stdlib.End_of_file @@ -1079,11 +1079,11 @@ function copy_file_chunk(ic, oc, len) { } function string_of_file(ic) { - var b = Stdlib__Buffer.create(65536); - var buff = Caml_bytes.caml_create_bytes(4096); - var _param; + let b = Stdlib__Buffer.create(65536); + let buff = Caml_bytes.caml_create_bytes(4096); + let _param; while(true) { - var n = Stdlib.input(ic, buff, 0, 4096); + let n = Stdlib.input(ic, buff, 0, 4096); if (n === 0) { return Stdlib__Buffer.contents(b); } @@ -1130,7 +1130,7 @@ function chop_extension_if_any(fname) { return Stdlib__Filename.chop_extension(fname); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { return fname; } @@ -1139,11 +1139,11 @@ function chop_extension_if_any(fname) { } function chop_extensions(file) { - var dirname = Curry._1(Stdlib__Filename.dirname, file); - var basename = Curry._1(Stdlib__Filename.basename, file); + let dirname = Curry._1(Stdlib__Filename.dirname, file); + let basename = Curry._1(Stdlib__Filename.basename, file); try { - var pos = Stdlib__String.index(basename, /* '.' */46); - var basename$1 = Stdlib__String.sub(basename, 0, pos); + let pos = Stdlib__String.index(basename, /* '.' */46); + let basename$1 = Stdlib__String.sub(basename, 0, pos); if (Curry._1(Stdlib__Filename.is_implicit, file) && dirname === Stdlib__Filename.current_dir_name) { return basename$1; } else { @@ -1151,7 +1151,7 @@ function chop_extensions(file) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return file; } @@ -1160,11 +1160,11 @@ function chop_extensions(file) { } function search_substring(pat, str, start) { - var _i = start; - var _j = 0; + let _i = start; + let _j = 0; while(true) { - var j = _j; - var i = _i; + let j = _j; + let i = _i; if (j >= pat.length) { return i; } @@ -1184,18 +1184,18 @@ function search_substring(pat, str, start) { } function replace_substring(before, after, str) { - var search = function (_acc, _curr) { + let search = function (_acc, _curr) { while(true) { - var curr = _curr; - var acc = _acc; - var next; + let curr = _curr; + let acc = _acc; + let next; try { next = search_substring(before, str, curr); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var suffix = Stdlib__String.sub(str, curr, str.length - curr | 0); + let suffix = Stdlib__String.sub(str, curr, str.length - curr | 0); return Stdlib__List.rev({ hd: suffix, tl: acc @@ -1203,7 +1203,7 @@ function replace_substring(before, after, str) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var prefix = Stdlib__String.sub(str, curr, next - curr | 0); + let prefix = Stdlib__String.sub(str, curr, next - curr | 0); _curr = next + before.length | 0; _acc = { hd: prefix, @@ -1216,13 +1216,13 @@ function replace_substring(before, after, str) { } function rev_split_words(s) { - var split1 = function (res, _i) { + let split1 = function (res, _i) { while(true) { - var i = _i; + let i = _i; if (i >= s.length) { return res; } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match > 13 || match < 9) { if (match !== 32) { return split2(res, i, i + 1 | 0); @@ -1237,16 +1237,16 @@ function rev_split_words(s) { continue ; }; }; - var split2 = function (res, i, _j) { + let split2 = function (res, i, _j) { while(true) { - var j = _j; + let j = _j; if (j >= s.length) { return { hd: Stdlib__String.sub(s, i, j - i | 0), tl: res }; } - var match = Caml_string.get(s, j); + let match = Caml_string.get(s, j); if (match > 13 || match < 9) { if (match !== 32) { _j = j + 1 | 0; @@ -1267,7 +1267,7 @@ function rev_split_words(s) { } function get_ref(r) { - var v = r.contents; + let v = r.contents; r.contents = /* [] */0; return v; } @@ -1301,9 +1301,9 @@ function for4(param) { } function create(str_size) { - var tbl_size = Caml_int32.div(str_size, Stdlib__Sys.max_string_length) + 1 | 0; - var tbl = Caml_array.make(tbl_size, Stdlib__Bytes.empty); - for(var i = 0 ,i_finish = tbl_size - 2 | 0; i <= i_finish; ++i){ + let tbl_size = Caml_int32.div(str_size, Stdlib__Sys.max_string_length) + 1 | 0; + let tbl = Caml_array.make(tbl_size, Stdlib__Bytes.empty); + for(let i = 0 ,i_finish = tbl_size - 2 | 0; i <= i_finish; ++i){ Caml_array.set(tbl, i, Caml_bytes.caml_create_bytes(Stdlib__Sys.max_string_length)); } Caml_array.set(tbl, tbl_size - 1 | 0, Caml_bytes.caml_create_bytes(Caml_int32.mod_(str_size, Stdlib__Sys.max_string_length))); @@ -1311,7 +1311,7 @@ function create(str_size) { } function length(tbl) { - var tbl_size = tbl.length; + let tbl_size = tbl.length; return Math.imul(Stdlib__Sys.max_string_length, tbl_size - 1 | 0) + Caml_array.get(tbl, tbl_size - 1 | 0).length | 0; } @@ -1324,32 +1324,32 @@ function set(tbl, ind, c) { } function blit(src, srcoff, dst, dstoff, len) { - for(var i = 0; i < len; ++i){ + for(let i = 0; i < len; ++i){ set(dst, dstoff + i | 0, get(src, srcoff + i | 0)); } } function output(oc, tbl, pos, len) { - for(var i = pos ,i_finish = pos + len | 0; i < i_finish; ++i){ + for(let i = pos ,i_finish = pos + len | 0; i < i_finish; ++i){ Caml_io.caml_ml_output_char(oc, get(tbl, i)); } } function unsafe_blit_to_bytes(src, srcoff, dst, dstoff, len) { - for(var i = 0; i < len; ++i){ + for(let i = 0; i < len; ++i){ dst[dstoff + i | 0] = get(src, srcoff + i | 0); } } function input_bytes(ic, len) { - var tbl = create(len); + let tbl = create(len); Stdlib__Array.iter((function (str) { Stdlib.really_input(ic, str, 0, str.length); }), tbl); return tbl; } -var LongString = { +let LongString = { create: create, length: length, get: get, @@ -1361,29 +1361,29 @@ var LongString = { }; function edit_distance(a, b, cutoff) { - var la = a.length; - var lb = b.length; - var cutoff$1 = Caml.caml_int_min(la > lb ? la : lb, cutoff); + let la = a.length; + let lb = b.length; + let cutoff$1 = Caml.caml_int_min(la > lb ? la : lb, cutoff); if (Stdlib.abs(la - lb | 0) > cutoff$1) { return ; } - var m = Stdlib__Array.make_matrix(la + 1 | 0, lb + 1 | 0, cutoff$1 + 1 | 0); + let m = Stdlib__Array.make_matrix(la + 1 | 0, lb + 1 | 0, cutoff$1 + 1 | 0); Caml_array.set(Caml_array.get(m, 0), 0, 0); - for(var i = 1; i <= la; ++i){ + for(let i = 1; i <= la; ++i){ Caml_array.set(Caml_array.get(m, i), 0, i); } - for(var j = 1; j <= lb; ++j){ + for(let j = 1; j <= lb; ++j){ Caml_array.set(Caml_array.get(m, 0), j, j); } - for(var i$1 = 1; i$1 <= la; ++i$1){ - for(var j$1 = Caml.caml_int_max(1, (i$1 - cutoff$1 | 0) - 1 | 0) ,j_finish = Caml.caml_int_min(lb, (i$1 + cutoff$1 | 0) + 1 | 0); j$1 <= j_finish; ++j$1){ - var cost = Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? 0 : 1; - var best = Caml.caml_int_min(1 + Caml.caml_int_min(Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1), Caml_array.get(Caml_array.get(m, i$1), j$1 - 1 | 0)) | 0, Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1 - 1 | 0) + cost | 0); - var best$1 = i$1 > 1 && j$1 > 1 && Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 2 | 0) && Caml_string.get(a, i$1 - 2 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? Caml.caml_int_min(best, Caml_array.get(Caml_array.get(m, i$1 - 2 | 0), j$1 - 2 | 0) + cost | 0) : best; + for(let i$1 = 1; i$1 <= la; ++i$1){ + for(let j$1 = Caml.caml_int_max(1, (i$1 - cutoff$1 | 0) - 1 | 0) ,j_finish = Caml.caml_int_min(lb, (i$1 + cutoff$1 | 0) + 1 | 0); j$1 <= j_finish; ++j$1){ + let cost = Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? 0 : 1; + let best = Caml.caml_int_min(1 + Caml.caml_int_min(Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1), Caml_array.get(Caml_array.get(m, i$1), j$1 - 1 | 0)) | 0, Caml_array.get(Caml_array.get(m, i$1 - 1 | 0), j$1 - 1 | 0) + cost | 0); + let best$1 = i$1 > 1 && j$1 > 1 && Caml_string.get(a, i$1 - 1 | 0) === Caml_string.get(b, j$1 - 2 | 0) && Caml_string.get(a, i$1 - 2 | 0) === Caml_string.get(b, j$1 - 1 | 0) ? Caml.caml_int_min(best, Caml_array.get(Caml_array.get(m, i$1 - 2 | 0), j$1 - 2 | 0) + cost | 0) : best; Caml_array.set(Caml_array.get(m, i$1), j$1, best$1); } } - var result = Caml_array.get(Caml_array.get(m, la), lb); + let result = Caml_array.get(Caml_array.get(m, la), lb); if (result > cutoff$1) { return ; } else { @@ -1392,24 +1392,24 @@ function edit_distance(a, b, cutoff) { } function split(s, c) { - var len = s.length; - var _pos = 0; - var _to_rev = /* [] */0; + let len = s.length; + let _pos = 0; + let _to_rev = /* [] */0; while(true) { - var to_rev = _to_rev; - var pos = _pos; + let to_rev = _to_rev; + let pos = _pos; if (pos === len) { return Stdlib__List.rev({ hd: "", tl: to_rev }); } - var pos2; + let pos2; try { pos2 = Stdlib__String.index_from(s, pos, c); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { pos2 = undefined; } else { @@ -1440,7 +1440,7 @@ function split(s, c) { } function cut_at(s, c) { - var pos = Stdlib__String.index(s, c); + let pos = Stdlib__String.index(s, c); return [ Stdlib__String.sub(s, 0, pos), Stdlib__String.sub(s, pos + 1 | 0, (s.length - pos | 0) - 1 | 0) @@ -1489,13 +1489,13 @@ function code_of_style(param) { } function ansi_of_style_l(l) { - var s = l ? ( + let s = l ? ( l.tl ? Stdlib__String.concat(";", Stdlib__List.map(code_of_style, l)) : code_of_style(l.hd) ) : "0"; return "\x1b[" + (s + "m"); } -var default_styles = { +let default_styles = { error: { hd: /* Bold */0, tl: { @@ -1522,7 +1522,7 @@ var default_styles = { } }; -var cur_styles = { +let cur_styles = { contents: default_styles }; @@ -1584,17 +1584,17 @@ function style_of_tag(param) { } } -var color_enabled = { +let color_enabled = { contents: true }; function set_color_tag_handling(ppf) { - var functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); - var partial_arg = functions.mark_open_stag; - var partial_arg$1 = functions.mark_close_stag; - var functions$p_mark_open_stag = function (param) { + let functions = Stdlib__Format.pp_get_formatter_stag_functions(ppf, undefined); + let partial_arg = functions.mark_open_stag; + let partial_arg$1 = functions.mark_close_stag; + let functions$p_mark_open_stag = function (param) { try { - var style = style_of_tag(param); + let style = style_of_tag(param); if (color_enabled.contents) { return ansi_of_style_l(style); } else { @@ -1602,14 +1602,14 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_mark_close_stag = function (param) { + let functions$p_mark_close_stag = function (param) { try { style_of_tag(param); if (color_enabled.contents) { @@ -1622,16 +1622,16 @@ function set_color_tag_handling(ppf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Curry._1(partial_arg$1, param); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; - var functions$p_print_open_stag = functions.print_open_stag; - var functions$p_print_close_stag = functions.print_close_stag; - var functions$p = { + let functions$p_print_open_stag = functions.print_open_stag; + let functions$p_print_close_stag = functions.print_close_stag; + let functions$p = { mark_open_stag: functions$p_mark_open_stag, mark_close_stag: functions$p_mark_close_stag, print_open_stag: functions$p_print_open_stag, @@ -1641,11 +1641,11 @@ function set_color_tag_handling(ppf) { Stdlib__Format.pp_set_formatter_stag_functions(ppf, functions$p); } -var first = { +let first = { contents: true }; -var formatter_l_1 = { +let formatter_l_1 = { hd: Stdlib__Format.err_formatter, tl: { hd: Stdlib__Format.str_formatter, @@ -1653,7 +1653,7 @@ var formatter_l_1 = { } }; -var formatter_l = { +let formatter_l = { hd: Stdlib__Format.std_formatter, tl: formatter_l_1 }; @@ -1663,7 +1663,7 @@ function setup(o) { first.contents = false; Stdlib__Format.set_mark_tags(true); Stdlib__List.iter(set_color_tag_handling, formatter_l); - var tmp; + let tmp; if (o !== undefined) { switch (o) { case /* Always */1 : @@ -1683,7 +1683,7 @@ function setup(o) { } -var Misc_Color = { +let Misc_Color = { ansi_of_style_l: ansi_of_style_l, default_styles: default_styles, get_styles: get_styles, @@ -1692,7 +1692,7 @@ var Misc_Color = { set_color_tag_handling: set_color_tag_handling }; -var Misc = { +let Misc = { fatal_error: fatal_error, Fatal_error: Fatal_error, try_finally: try_finally, @@ -1739,7 +1739,7 @@ var Misc = { Color: Misc_Color }; -var Terminfo = {}; +let Terminfo = {}; function number(param) { if (typeof param === "number") { @@ -1872,7 +1872,7 @@ function loop(i) { } } -var letter_all = loop(104); +let letter_all = loop(104); function letter(param) { switch (param) { @@ -2039,7 +2039,7 @@ function letter(param) { } } -var current = { +let current = { contents: { active: Caml_array.make(105, true), error: Caml_array.make(105, false) @@ -2063,27 +2063,27 @@ function is_error(x) { } function parse_opt(error, active, flags, s) { - var set = function (i) { + let set = function (i) { Caml_array.set(flags, i, true); }; - var clear = function (i) { + let clear = function (i) { Caml_array.set(flags, i, false); }; - var set_all = function (i) { + let set_all = function (i) { Caml_array.set(active, i, true); Caml_array.set(error, i, true); }; - var get_num = function (_n, _i) { + let get_num = function (_n, _i) { while(true) { - var i = _i; - var n = _n; + let i = _i; + let n = _n; if (i >= s.length) { return [ i, n ]; } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match > 57 || match < 48) { return [ i, @@ -2095,10 +2095,10 @@ function parse_opt(error, active, flags, s) { continue ; }; }; - var get_range = function (i) { - var match = get_num(0, i); - var n1 = match[1]; - var i$1 = match[0]; + let get_range = function (i) { + let match = get_num(0, i); + let n1 = match[1]; + let i$1 = match[0]; if (!((i$1 + 2 | 0) < s.length && Caml_string.get(s, i$1) === /* '.' */46 && Caml_string.get(s, i$1 + 1 | 0) === /* '.' */46)) { return [ i$1, @@ -2106,8 +2106,8 @@ function parse_opt(error, active, flags, s) { n1 ]; } - var match$1 = get_num(0, i$1 + 2 | 0); - var n2 = match$1[1]; + let match$1 = get_num(0, i$1 + 2 | 0); + let n2 = match$1[1]; if (n2 < n1) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, @@ -2120,13 +2120,13 @@ function parse_opt(error, active, flags, s) { n2 ]; }; - var loop = function (_i) { + let loop = function (_i) { while(true) { - var i = _i; + let i = _i; if (i >= s.length) { return ; } - var c = Caml_string.get(s, i); + let c = Caml_string.get(s, i); if (c >= 65) { if (c >= 97) { if (c >= 123) { @@ -2179,14 +2179,14 @@ function parse_opt(error, active, flags, s) { } }; }; - var loop_letter_num = function (myset, i) { + let loop_letter_num = function (myset, i) { if (i >= s.length) { throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { MEL_EXN_ID: Stdlib__Arg.Bad, _1: "Ill-formed list of warnings" }); } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match >= 65) { if (match >= 97) { if (match >= 123) { @@ -2213,8 +2213,8 @@ function parse_opt(error, active, flags, s) { _1: "Ill-formed list of warnings" }); } - var match$1 = get_range(i); - for(var n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ + let match$1 = get_range(i); + for(let n = match$1[1] ,n_finish = Caml.caml_int_min(match$1[2], 104); n <= n_finish; ++n){ Curry._1(myset, n); } loop(match$1[0]); @@ -2223,8 +2223,8 @@ function parse_opt(error, active, flags, s) { } function parse_options(errflag, s) { - var error = Stdlib__Array.copy(current.contents.error); - var active = Stdlib__Array.copy(current.contents.active); + let error = Stdlib__Array.copy(current.contents.error); + let active = Stdlib__Array.copy(current.contents.active); parse_opt(error, active, errflag ? error : active, s); current.contents = { active: active, @@ -2232,9 +2232,9 @@ function parse_options(errflag, s) { }; } -var defaults_w = "+a-4-6-7-9-27-29-32..39-41..42-44-45-48-50-102"; +let defaults_w = "+a-4-6-7-9-27-29-32..39-41..42-44-45-48-50-102"; -var defaults_warn_error = "-a"; +let defaults_warn_error = "-a"; parse_options(false, defaults_w); @@ -2284,16 +2284,16 @@ function message(param) { case /* Deprecated */0 : return "deprecated: " + param._0; case /* Fragile_match */1 : - var s = param._0; + let s = param._0; if (s === "") { return "this pattern-matching is fragile."; } else { return "this pattern-matching is fragile.\nIt will remain exhaustive when constructors are added to type " + (s + "."); } case /* Method_override */2 : - var match = param._0; + let match = param._0; if (match) { - var lab = match.hd; + let lab = match.hd; if (match.tl) { return Stdlib__String.concat(" ", { hd: "the following methods are overridden by the class", @@ -2318,7 +2318,7 @@ function message(param) { ] }); case /* Partial_match */3 : - var s$1 = param._0; + let s$1 = param._0; if (s$1 === "") { return "this pattern-matching is not exhaustive."; } else { @@ -2327,9 +2327,9 @@ function message(param) { case /* Non_closed_record_pattern */4 : return "the following labels are not bound in this record pattern:\n" + (param._0 + "\nEither bind these labels explicitly or add '; _' to the pattern."); case /* Instance_variable_override */5 : - var match$1 = param._0; + let match$1 = param._0; if (match$1) { - var lab$1 = match$1.hd; + let lab$1 = match$1.hd; if (match$1.tl) { return Stdlib__String.concat(" ", { hd: "the following instance variables are overridden by the class", @@ -2449,7 +2449,7 @@ function message(param) { case /* Unused_ancestor */20 : return "unused ancestor variable " + (param._0 + "."); case /* Unused_constructor */21 : - var s$2 = param._0; + let s$2 = param._0; if (param._1) { return "constructor " + (s$2 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -2458,7 +2458,7 @@ function message(param) { return "unused constructor " + (s$2 + "."); } case /* Unused_extension */22 : - var s$3 = param._0; + let s$3 = param._0; if (param._1) { return "extension constructor " + (s$3 + " is never used to build values.\n(However, this constructor appears in patterns.)"); } else if (param._2) { @@ -2467,8 +2467,8 @@ function message(param) { return "unused extension constructor " + (s$3 + "."); } case /* Name_out_of_scope */23 : - var slist = param._1; - var ty = param._0; + let slist = param._1; + let ty = param._0; if (slist && !slist.tl && !param._2) { return slist.hd + (" was selected from type " + (ty + ".\nIt is not visible in the current scope, and will not \nbe selected if the type becomes unknown.")); } @@ -2485,7 +2485,7 @@ function message(param) { }); break; case /* Ambiguous_name */24 : - var slist$1 = param._0; + let slist$1 = param._0; if (slist$1 && !slist$1.tl && !param._2) { return slist$1.hd + (" belongs to several types: " + (Stdlib__String.concat(" ", param._1) + "\nThe first one was selected. Please disambiguate if this is wrong.")); } @@ -2598,7 +2598,7 @@ function message(param) { _1: "illegal payload for attribute '%s'.\n%s" }), param._0, param._1); case /* Eliminated_optional_arguments */31 : - var sl = param._0; + let sl = param._0; return Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -2638,13 +2638,13 @@ function message(param) { } } -var nerrors = { +let nerrors = { contents: 0 }; function print(ppf, w) { - var msg = message(w); - var num = number(w); + let msg = message(w); + let num = number(w); Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* Int */4, @@ -2672,8 +2672,8 @@ function print(ppf, w) { } function super_print(message, ppf, w) { - var msg = Curry._1(message, w); - var num = number(w); + let msg = Curry._1(message, w); + let num = number(w); Curry._1(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { TAG: /* String */2, @@ -2690,14 +2690,14 @@ function super_print(message, ppf, w) { } -var Errors = /* @__PURE__ */Caml_exceptions.create("Parser_api.Warnings.Errors"); +let Errors = /* @__PURE__ */Caml_exceptions.create("Parser_api.Warnings.Errors"); function check_fatal(param) { if (nerrors.contents <= 0) { return ; } - var e_1 = nerrors.contents; - var e = { + let e_1 = nerrors.contents; + let e = { MEL_EXN_ID: Errors, _1: e_1 }; @@ -3041,9 +3041,9 @@ function help_warnings(param) { } }); console.log(" A all warnings"); - for(var i = /* 'b' */98; i <= /* 'z' */122; ++i){ - var c = Stdlib__Char.chr(i); - var l = letter(c); + for(let i = /* 'b' */98; i <= /* 'z' */122; ++i){ + let c = Stdlib__Char.chr(i); + let l = letter(c); if (l) { if (l.tl) { Curry._2(Stdlib__Printf.printf(/* Format */{ @@ -3104,7 +3104,7 @@ function help_warnings(param) { return Stdlib.exit(0); } -var Warnings = { +let Warnings = { parse_options: parse_options, is_active: is_active, is_error: is_error, @@ -3121,12 +3121,12 @@ var Warnings = { super_print: super_print }; -var absname = { +let absname = { contents: false }; function in_file(name) { - var loc = { + let loc = { pos_fname: name, pos_lnum: 1, pos_bol: 0, @@ -3139,7 +3139,7 @@ function in_file(name) { }; } -var none = in_file("_none_"); +let none = in_file("_none_"); function curr(lexbuf) { return { @@ -3182,29 +3182,29 @@ function rhs_loc(n) { }; } -var input_name = { +let input_name = { contents: "_none_" }; -var input_lexbuf = { +let input_lexbuf = { contents: undefined }; -var status = { +let status = { contents: /* Uninitialised */0 }; -var num_loc_lines = { +let num_loc_lines = { contents: 0 }; function print_updating_num_loc_lines(ppf, f, arg) { - var out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); - var out_string = function (str, start, len) { - var count = function (_i, _c) { + let out_functions = Stdlib__Format.pp_get_formatter_out_functions(ppf, undefined); + let out_string = function (str, start, len) { + let count = function (_i, _c) { while(true) { - var c = _c; - var i = _i; + let c = _c; + let i = _i; if (i === (start + len | 0)) { return c; } @@ -3234,14 +3234,14 @@ function print_updating_num_loc_lines(ppf, f, arg) { function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var lines = num_loc_lines.contents; - for(var i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ + let lines = num_loc_lines.contents; + for(let i = pos0 ,i_finish = lb.lex_buffer_len; i < i_finish; ++i){ if (Caml_bytes.get(lb.lex_buffer, i) === /* '\n' */10) { lines = lines + 1 | 0; } @@ -3254,9 +3254,9 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } Caml_io.caml_ml_flush(Stdlib.stdout); Caml_external_polyfill.resolve("caml_terminfo_backup")(lines); - var bol = false; + let bol = false; Stdlib.print_string("# "); - for(var pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ + for(let pos = 0 ,pos_finish = lb.lex_buffer_len - pos0 | 0; pos < pos_finish; ++pos){ if (bol) { Stdlib.print_string(" "); bol = false; @@ -3275,7 +3275,7 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { }(pos)), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } - var c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); + let c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); Stdlib.print_char(c); bol = c === /* '\n' */10; } @@ -3285,16 +3285,16 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } function highlight_dumb(ppf, lb, loc) { - var pos0 = -lb.lex_abs_pos | 0; + let pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - var end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; - var line_start = 0; - var line_end = 0; - for(var pos = 0; pos <= end_pos; ++pos){ + let end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; + let line_start = 0; + let line_end = 0; + for(let pos = 0; pos <= end_pos; ++pos){ if (Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0) === /* '\n' */10) { if (loc.loc_start.pos_cnum > pos) { line_start = line_start + 1 | 0; @@ -3339,10 +3339,10 @@ function highlight_dumb(ppf, lb, loc) { _1: "Characters %i-%i:@." }), loc.loc_start.pos_cnum, loc.loc_end.pos_cnum); Stdlib__Format.pp_print_string(ppf, " "); - var line = 0; - var pos_at_bol = 0; - for(var pos$1 = 0; pos$1 <= end_pos; ++pos$1){ - var c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); + let line = 0; + let pos_at_bol = 0; + for(let pos$1 = 0; pos$1 <= end_pos; ++pos$1){ + let c = Caml_bytes.get(lb.lex_buffer, pos$1 + pos0 | 0); if (c !== 10) { if (c !== 13) { if (line === line_start && line === line_end) { @@ -3379,10 +3379,10 @@ function highlight_dumb(ppf, lb, loc) { }, _1: "@. " }); - for(var _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ + for(let _i = pos_at_bol ,_i_finish = loc.loc_start.pos_cnum; _i < _i_finish; ++_i){ Stdlib__Format.pp_print_char(ppf, /* ' ' */32); } - for(var _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ + for(let _i$1 = loc.loc_start.pos_cnum ,_i_finish$1 = loc.loc_end.pos_cnum; _i$1 < _i_finish$1; ++_i$1){ Stdlib__Format.pp_print_char(ppf, /* '^' */94); } } @@ -3408,19 +3408,19 @@ function highlight_dumb(ppf, lb, loc) { function highlight_locations(ppf, locs) { while(true) { - var num_lines = status.contents; + let num_lines = status.contents; if (typeof num_lines === "number") { if (num_lines) { - var lb = input_lexbuf.contents; + let lb = input_lexbuf.contents; if (lb === undefined) { return false; } - var norepeat; + let norepeat; try { norepeat = Caml_sys.caml_sys_getenv("TERM") === "norepeat"; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { norepeat = false; } else { @@ -3430,13 +3430,13 @@ function highlight_locations(ppf, locs) { if (norepeat) { return false; } - var loc1 = Stdlib__List.hd(locs); + let loc1 = Stdlib__List.hd(locs); try { highlight_dumb(ppf, lb, loc1); return true; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -3447,7 +3447,7 @@ function highlight_locations(ppf, locs) { continue ; } } else { - var lb$1 = input_lexbuf.contents; + let lb$1 = input_lexbuf.contents; if (lb$1 === undefined) { return false; } @@ -3456,7 +3456,7 @@ function highlight_locations(ppf, locs) { return true; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Exit) { return false; } @@ -3467,12 +3467,12 @@ function highlight_locations(ppf, locs) { } function absolute_path(s) { - var s$1 = Curry._1(Stdlib__Filename.is_relative, s) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), s) : s; - var aux = function (_s) { + let s$1 = Curry._1(Stdlib__Filename.is_relative, s) ? Stdlib__Filename.concat(Caml_sys.caml_sys_getcwd(undefined), s) : s; + let aux = function (_s) { while(true) { - var s = _s; - var base = Curry._1(Stdlib__Filename.basename, s); - var dir = Curry._1(Stdlib__Filename.dirname, s); + let s = _s; + let base = Curry._1(Stdlib__Filename.basename, s); + let dir = Curry._1(Stdlib__Filename.dirname, s); if (dir === s) { return dir; } @@ -3523,11 +3523,11 @@ function get_pos_info(pos) { function print_loc(ppf, loc) { Curry._1(Misc_Color.setup, color.contents); - var match = get_pos_info(loc.loc_start); - var startchar = match[2]; - var file = match[0]; - var startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; - var endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; + let match = get_pos_info(loc.loc_start); + let startchar = match[2]; + let file = match[0]; + let startchar$1 = bs_vscode ? startchar + 1 | 0 : startchar; + let endchar = (loc.loc_end.pos_cnum - loc.loc_start.pos_cnum | 0) + startchar$1 | 0; if (file === "//toplevel//") { if (highlight_locations(ppf, { hd: loc, @@ -3677,7 +3677,7 @@ function print$1(ppf, loc) { } } -var error_prefix = "Error"; +let error_prefix = "Error"; function print_error_prefix(ppf, param) { Curry._1(Misc_Color.setup, color.contents); @@ -3767,7 +3767,7 @@ function default_warning_printer(loc, ppf, w) { } -var warning_printer = { +let warning_printer = { contents: default_warning_printer }; @@ -3775,7 +3775,7 @@ function print_warning(loc, ppf, w) { print_updating_num_loc_lines(ppf, Curry._1(warning_printer.contents, loc), w); } -var formatter_for_warnings = { +let formatter_for_warnings = { contents: Stdlib__Format.err_formatter }; @@ -3803,8 +3803,8 @@ function mknoloc(txt) { } function pp_ksprintf(before, k, fmt) { - var buf = Stdlib__Buffer.create(64); - var ppf = Stdlib__Format.formatter_of_buffer(buf); + let buf = Stdlib__Buffer.create(64); + let ppf = Stdlib__Format.formatter_of_buffer(buf); Curry._1(Misc_Color.set_color_tag_handling, ppf); if (before !== undefined) { Curry._1(before, ppf); @@ -3820,9 +3820,9 @@ function print_phanton_error_prefix(ppf) { } function errorf(locOpt, subOpt, if_highlightOpt, fmt) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; return pp_ksprintf(print_phanton_error_prefix, (function (msg) { return { loc: loc, @@ -3834,9 +3834,9 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { } function error(locOpt, subOpt, if_highlightOpt, msg) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; return { loc: loc, msg: msg, @@ -3845,7 +3845,7 @@ function error(locOpt, subOpt, if_highlightOpt, msg) { }; } -var error_of_exn = { +let error_of_exn = { contents: /* [] */0 }; @@ -3857,13 +3857,13 @@ function register_error_of_exn(f) { } function error_of_exn$1(exn) { - var _param = error_of_exn.contents; + let _param = error_of_exn.contents; while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var r = Curry._1(param.hd, exn); + let r = Curry._1(param.hd, exn); if (r !== undefined) { return r; } @@ -3873,16 +3873,16 @@ function error_of_exn$1(exn) { } function default_error_reporter(ppf, err) { - var if_highlight = err.if_highlight; - var highlighted; + let if_highlight = err.if_highlight; + let highlighted; if (if_highlight !== "") { - var collect_locs = function (locs, param) { + let collect_locs = function (locs, param) { return Stdlib__List.fold_left(collect_locs, { hd: param.loc, tl: locs }, param.sub); }; - var locs = collect_locs(/* [] */0, err); + let locs = collect_locs(/* [] */0, err); highlighted = highlight_locations(ppf, locs); } else { highlighted = false; @@ -3940,7 +3940,7 @@ function default_error_reporter(ppf, err) { } } -var error_reporter = { +let error_reporter = { contents: default_error_reporter }; @@ -4005,13 +4005,13 @@ register_error_of_exn(function (param) { }); function report_exception(ppf, exn) { - var _n = 5; - var _exn = exn; + let _n = 5; + let _exn = exn; while(true) { - var exn$1 = _exn; - var n = _n; + let exn$1 = _exn; + let n = _n; try { - var err = error_of_exn$1(exn$1); + let err = error_of_exn$1(exn$1); if (err !== undefined) { return Curry._2(Stdlib__Format.fprintf(ppf)(/* Format */{ _0: { @@ -4042,7 +4042,7 @@ function report_exception(ppf, exn) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } catch (raw_exn){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); if (n > 0) { _exn = exn$2; _n = n - 1 | 0; @@ -4053,7 +4053,7 @@ function report_exception(ppf, exn) { }; } -var $$Error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Location.Error"); +let $$Error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Location.Error"); register_error_of_exn(function (param) { if (param.MEL_EXN_ID === $$Error) { @@ -4063,10 +4063,10 @@ register_error_of_exn(function (param) { }); function raise_errorf(locOpt, subOpt, if_highlightOpt) { - var loc = locOpt !== undefined ? locOpt : none; - var sub = subOpt !== undefined ? subOpt : /* [] */0; - var if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; - var partial_arg = print_phanton_error_prefix; + let loc = locOpt !== undefined ? locOpt : none; + let sub = subOpt !== undefined ? subOpt : /* [] */0; + let if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; + let partial_arg = print_phanton_error_prefix; return function (param) { return pp_ksprintf(partial_arg, (function (msg) { throw new Caml_js_exceptions.MelangeError($$Error, { @@ -4082,7 +4082,7 @@ function raise_errorf(locOpt, subOpt, if_highlightOpt) { }; } -var $$Location = { +let $$Location = { none: none, in_file: in_file, init: init, @@ -4127,14 +4127,14 @@ var $$Location = { report_exception: report_exception }; -var Asttypes = {}; +let Asttypes = {}; function flatten(lid) { - var _accu = /* [] */0; - var _param = lid; + let _accu = /* [] */0; + let _param = lid; while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; switch (param.TAG | 0) { case /* Lident */0 : return { @@ -4169,14 +4169,14 @@ function last(param) { function split_at_dots(s, pos) { try { - var dot = Stdlib__String.index_from(s, pos, /* '.' */46); + let dot = Stdlib__String.index_from(s, pos, /* '.' */46); return { hd: Stdlib__String.sub(s, pos, dot - pos | 0), tl: split_at_dots(s, dot + 1 | 0) }; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: Stdlib__String.sub(s, pos, s.length - pos | 0), @@ -4188,7 +4188,7 @@ function split_at_dots(s, pos) { } function parse(s) { - var match = split_at_dots(s, 0); + let match = split_at_dots(s, 0); if (match) { return Stdlib__List.fold_left((function (p, s) { return { @@ -4208,15 +4208,15 @@ function parse(s) { } } -var Longident = { +let Longident = { flatten: flatten, last: last, parse: parse }; -var Parsetree = {}; +let Parsetree = {}; -var docstrings = { +let docstrings = { contents: /* [] */0 }; @@ -4226,7 +4226,7 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - var match = ds.ds_attached; + let match = ds.ds_attached; switch (match) { case /* Unattached */0 : return prerr_warning(ds.ds_loc, { @@ -4236,7 +4236,7 @@ function warn_bad_docstrings(param) { case /* Info */1 : return ; case /* Docs */2 : - var match$1 = ds.ds_associated; + let match$1 = ds.ds_associated; if (match$1 >= 2) { return prerr_warning(ds.ds_loc, { TAG: /* Bad_docstring */33, @@ -4253,7 +4253,7 @@ function warn_bad_docstrings(param) { } function docstring(body, loc) { - var ds = { + let ds = { ds_body: body, ds_loc: loc, ds_attached: /* Unattached */0, @@ -4274,18 +4274,18 @@ function docstring_loc(ds) { return ds.ds_loc; } -var empty_docs = { +let empty_docs = { docs_pre: undefined, docs_post: undefined }; -var doc_loc = { +let doc_loc = { txt: "ocaml.doc", loc: none }; function docs_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -4293,19 +4293,19 @@ function docs_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -4322,12 +4322,12 @@ function docs_attr(ds) { } function add_docs_attrs(docs, attrs) { - var ds = docs.docs_pre; - var attrs$1 = ds !== undefined ? ({ + let ds = docs.docs_pre; + let attrs$1 = ds !== undefined ? ({ hd: docs_attr(ds), tl: attrs }) : attrs; - var ds$1 = docs.docs_post; + let ds$1 = docs.docs_post; if (ds$1 !== undefined) { return Stdlib.$at(attrs$1, { hd: docs_attr(ds$1), @@ -4349,13 +4349,13 @@ function add_info_attrs(info, attrs) { } } -var text_loc = { +let text_loc = { txt: "ocaml.text", loc: none }; function text_attr(ds) { - var exp_pexp_desc = { + let exp_pexp_desc = { TAG: /* Pexp_constant */1, _0: { TAG: /* Const_string */2, @@ -4363,19 +4363,19 @@ function text_attr(ds) { _1: undefined } }; - var exp_pexp_loc = ds.ds_loc; - var exp = { + let exp_pexp_loc = ds.ds_loc; + let exp = { pexp_desc: exp_pexp_desc, pexp_loc: exp_pexp_loc, pexp_attributes: /* [] */0 }; - var item_pstr_desc = { + let item_pstr_desc = { TAG: /* Pstr_eval */0, _0: exp, _1: /* [] */0 }; - var item_pstr_loc = exp_pexp_loc; - var item = { + let item_pstr_loc = exp_pexp_loc; + let item = { pstr_desc: item_pstr_desc, pstr_loc: item_pstr_loc }; @@ -4396,14 +4396,14 @@ function add_text_attrs(dsl, attrs) { } function get_docstring(info, dsl) { - var _param = dsl; + let _param = dsl; while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = info ? /* Info */1 : /* Docs */2; return ds; @@ -4414,16 +4414,16 @@ function get_docstring(info, dsl) { } function get_docstrings(dsl) { - var _acc = /* [] */0; - var _param = dsl; + let _acc = /* [] */0; + let _param = dsl; while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return Stdlib__List.rev(acc); } - var ds = param.hd; - var match = ds.ds_attached; + let ds = param.hd; + let match = ds.ds_attached; if (match !== 1) { ds.ds_attached = /* Docs */2; _param = param.tl; @@ -4440,7 +4440,7 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - var match = ds.ds_associated; + let match = ds.ds_associated; if (match) { ds.ds_associated = /* Many */2; } else { @@ -4449,7 +4449,7 @@ function associate_docstrings(dsl) { }), dsl); } -var pre_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -4460,12 +4460,12 @@ function set_pre_docstrings(pos, dsl) { function get_pre_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(pre_table, pos); + let dsl = Stdlib__Hashtbl.find(pre_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4478,7 +4478,7 @@ function mark_pre_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(pre_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4486,7 +4486,7 @@ function mark_pre_docs(pos) { } } -var post_table = Stdlib__Hashtbl.create(undefined, 50); +let post_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -4497,12 +4497,12 @@ function set_post_docstrings(pos, dsl) { function get_post_docs(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); associate_docstrings(dsl); return get_docstring(false, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4515,7 +4515,7 @@ function mark_post_docs(pos) { return associate_docstrings(Stdlib__Hashtbl.find(post_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4525,11 +4525,11 @@ function mark_post_docs(pos) { function get_info(pos) { try { - var dsl = Stdlib__Hashtbl.find(post_table, pos); + let dsl = Stdlib__Hashtbl.find(post_table, pos); return get_docstring(true, dsl); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return ; } @@ -4537,7 +4537,7 @@ function get_info(pos) { } } -var floating_table = Stdlib__Hashtbl.create(undefined, 50); +let floating_table = Stdlib__Hashtbl.create(undefined, 50); function set_floating_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -4551,7 +4551,7 @@ function get_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(floating_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -4559,7 +4559,7 @@ function get_text(pos) { } } -var pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let pre_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_pre_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -4573,7 +4573,7 @@ function get_pre_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(pre_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -4581,7 +4581,7 @@ function get_pre_extra_text(pos) { } } -var post_extra_table = Stdlib__Hashtbl.create(undefined, 50); +let post_extra_table = Stdlib__Hashtbl.create(undefined, 50); function set_post_extra_docstrings(pos, dsl) { if (Caml_obj.caml_notequal(dsl, /* [] */0)) { @@ -4595,7 +4595,7 @@ function get_post_extra_text(pos) { return get_docstrings(Stdlib__Hashtbl.find(post_extra_table, pos)); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return /* [] */0; } @@ -4611,8 +4611,8 @@ function symbol_docs(param) { } function symbol_docs_lazy(param) { - var p1 = Stdlib__Parsing.symbol_start_pos(undefined); - var p2 = Stdlib__Parsing.symbol_end_pos(undefined); + let p1 = Stdlib__Parsing.symbol_start_pos(undefined); + let p2 = Stdlib__Parsing.symbol_end_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -4632,8 +4632,8 @@ function rhs_docs(pos1, pos2) { } function rhs_docs_lazy(pos1, pos2) { - var p1 = Stdlib__Parsing.rhs_start_pos(pos1); - var p2 = Stdlib__Parsing.rhs_end_pos(pos2); + let p1 = Stdlib__Parsing.rhs_start_pos(pos1); + let p2 = Stdlib__Parsing.rhs_end_pos(pos2); return { LAZY_DONE: false, VAL: (function () { @@ -4668,7 +4668,7 @@ function symbol_text(param) { } function symbol_text_lazy(param) { - var pos = Stdlib__Parsing.symbol_start_pos(undefined); + let pos = Stdlib__Parsing.symbol_start_pos(undefined); return { LAZY_DONE: false, VAL: (function () { @@ -4682,7 +4682,7 @@ function rhs_text(pos) { } function rhs_text_lazy(pos) { - var pos$1 = Stdlib__Parsing.rhs_start_pos(pos); + let pos$1 = Stdlib__Parsing.rhs_start_pos(pos); return { LAZY_DONE: false, VAL: (function () { @@ -4716,7 +4716,7 @@ function init$1(param) { Stdlib__Hashtbl.reset(post_extra_table); } -var Docstrings = { +let Docstrings = { init: init$1, warn_bad_docstrings: warn_bad_docstrings, docstring: docstring, @@ -4754,15 +4754,15 @@ var Docstrings = { rhs_post_extra_text: rhs_post_extra_text }; -var default_loc = { +let default_loc = { contents: none }; function with_default_loc(l, f) { - var old = default_loc.contents; + let old = default_loc.contents; default_loc.contents = l; try { - var r = Curry._1(f, undefined); + let r = Curry._1(f, undefined); default_loc.contents = old; return r; } @@ -4773,8 +4773,8 @@ function with_default_loc(l, f) { } function mk(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ptyp_desc: d, ptyp_loc: loc, @@ -4887,14 +4887,14 @@ function extension(loc, attrs, a) { } function force_poly(t) { - var match = t.ptyp_desc; + let match = t.ptyp_desc; if (typeof match !== "number" && match.TAG === /* Ptyp_poly */8) { return t; } return poly(t.ptyp_loc, undefined, /* [] */0, t); } -var Typ = { +let Typ = { mk: mk, attr: attr, any: any, @@ -4913,8 +4913,8 @@ var Typ = { }; function mk$1(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { ppat_desc: d, ppat_loc: loc, @@ -5056,7 +5056,7 @@ function extension$1(loc, attrs, a) { }); } -var Pat = { +let Pat = { mk: mk$1, attr: attr$1, any: any$1, @@ -5079,8 +5079,8 @@ var Pat = { }; function mk$2(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pexp_desc: d, pexp_loc: loc, @@ -5379,8 +5379,8 @@ function $$case(lhs, guard, rhs) { } function mk$3(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmty_desc: d, pmty_loc: loc, @@ -5451,7 +5451,7 @@ function extension$3(loc, attrs, a) { }); } -var Mty = { +let Mty = { mk: mk$3, attr: attr$3, ident: ident$1, @@ -5464,8 +5464,8 @@ var Mty = { }; function mk$4(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pmod_desc: d, pmod_loc: loc, @@ -5537,7 +5537,7 @@ function extension$4(loc, attrs, a) { }); } -var Mod = { +let Mod = { mk: mk$4, attr: attr$4, ident: ident$2, @@ -5550,7 +5550,7 @@ var Mod = { }; function mk$5(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { psig_desc: d, psig_loc: loc @@ -5635,7 +5635,7 @@ function class_type(loc, a) { } function extension$5(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$5(loc, { TAG: /* Psig_extension */12, _0: a, @@ -5652,8 +5652,8 @@ function attribute(loc, a) { function text(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$5(loc, { TAG: /* Psig_attribute */11, _0: a @@ -5661,7 +5661,7 @@ function text(txt) { }), txt); } -var Sig = { +let Sig = { mk: mk$5, value: value, type_: type_$1, @@ -5680,7 +5680,7 @@ var Sig = { }; function mk$6(locOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; return { pstr_desc: d, pstr_loc: loc @@ -5688,7 +5688,7 @@ function mk$6(locOpt, d) { } function $$eval(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$6(loc, { TAG: /* Pstr_eval */0, _0: a, @@ -5782,7 +5782,7 @@ function include_$1(loc, a) { } function extension$6(loc, attrsOpt, a) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return mk$6(loc, { TAG: /* Pstr_extension */14, _0: a, @@ -5799,8 +5799,8 @@ function attribute$1(loc, a) { function text$1(txt) { return Stdlib__List.map((function (ds) { - var a = text_attr(ds); - var loc = ds.ds_loc; + let a = text_attr(ds); + let loc = ds.ds_loc; return mk$6(loc, { TAG: /* Pstr_attribute */13, _0: a @@ -5808,7 +5808,7 @@ function text$1(txt) { }), txt); } -var Str = { +let Str = { mk: mk$6, $$eval: $$eval, value: value$1, @@ -5829,8 +5829,8 @@ var Str = { }; function mk$7(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcl_desc: d, pcl_loc: loc, @@ -5906,7 +5906,7 @@ function extension$7(loc, attrs, a) { }); } -var Cl = { +let Cl = { mk: mk$7, attr: attr$5, constr: constr$1, @@ -5919,8 +5919,8 @@ var Cl = { }; function mk$8(locOpt, attrsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; return { pcty_desc: d, pcty_loc: loc, @@ -5970,7 +5970,7 @@ function extension$8(loc, attrs, a) { }); } -var Cty = { +let Cty = { mk: mk$8, attr: attr$6, constr: constr$2, @@ -5980,9 +5980,9 @@ var Cty = { }; function mk$9(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pctf_desc: d, pctf_loc: loc, @@ -6063,9 +6063,9 @@ function attr$7(d, a) { } function mk$10(locOpt, attrsOpt, docsOpt, d) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pcf_desc: d, pcf_loc: loc, @@ -6168,10 +6168,10 @@ function attr$8(d, a) { } function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var prim = primOpt !== undefined ? primOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let prim = primOpt !== undefined ? primOpt : /* [] */0; return { pval_name: name, pval_type: typ, @@ -6181,15 +6181,15 @@ function mk$11(locOpt, attrsOpt, docsOpt, primOpt, name, typ) { }; } -var Val = { +let Val = { mk: mk$11 }; function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmd_name: name, pmd_type: typ, @@ -6198,15 +6198,15 @@ function mk$12(locOpt, attrsOpt, docsOpt, textOpt, name, typ) { }; } -var Md = { +let Md = { mk: mk$12 }; function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmtd_name: name, pmtd_type: typ, @@ -6215,15 +6215,15 @@ function mk$13(locOpt, attrsOpt, docsOpt, textOpt, typ, name) { }; } -var Mtd = { +let Mtd = { mk: mk$13 }; function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pmb_name: name, pmb_expr: expr, @@ -6232,15 +6232,15 @@ function mk$14(locOpt, attrsOpt, docsOpt, textOpt, name, expr) { }; } -var Mb = { +let Mb = { mk: mk$14 }; function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let override = overrideOpt !== undefined ? overrideOpt : /* Fresh */1; return { popen_lid: lid, popen_override: override, @@ -6249,14 +6249,14 @@ function mk$15(locOpt, attrsOpt, docsOpt, overrideOpt, lid) { }; } -var Opn = { +let Opn = { mk: mk$15 }; function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; return { pincl_mod: mexpr, pincl_loc: loc, @@ -6264,15 +6264,15 @@ function mk$16(locOpt, attrsOpt, docsOpt, mexpr) { }; } -var Incl = { +let Incl = { mk: mk$16 }; function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; return { pvb_pat: pat, pvb_expr: expr, @@ -6281,17 +6281,17 @@ function mk$17(locOpt, attrsOpt, docsOpt, textOpt, pat, expr) { }; } -var Vb = { +let Vb = { mk: mk$17 }; function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, expr) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let virt = virtOpt !== undefined ? virtOpt : /* Concrete */1; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; return { pci_virt: virt, pci_params: params, @@ -6302,19 +6302,19 @@ function mk$18(locOpt, attrsOpt, docsOpt, textOpt, virtOpt, paramsOpt, name, exp }; } -var Ci = { +let Ci = { mk: mk$18 }; function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, privOpt, manifest, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var text = textOpt !== undefined ? textOpt : /* [] */0; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; - var kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let text = textOpt !== undefined ? textOpt : /* [] */0; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let cstrs = cstrsOpt !== undefined ? cstrsOpt : /* [] */0; + let kind = kindOpt !== undefined ? kindOpt : /* Ptype_abstract */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptype_name: name, ptype_params: params, @@ -6328,10 +6328,10 @@ function mk$19(locOpt, attrsOpt, docsOpt, textOpt, paramsOpt, cstrsOpt, kindOpt, } function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pcd_name: name, pcd_args: args, @@ -6342,10 +6342,10 @@ function constructor(locOpt, attrsOpt, infoOpt, argsOpt, res, name) { } function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let mut = mutOpt !== undefined ? mutOpt : /* Immutable */0; return { pld_name: name, pld_mutable: mut, @@ -6355,17 +6355,17 @@ function field$1(locOpt, attrsOpt, infoOpt, mutOpt, name, typ) { }; } -var Type = { +let Type = { mk: mk$19, constructor: constructor, field: field$1 }; function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var params = paramsOpt !== undefined ? paramsOpt : /* [] */0; - var priv = privOpt !== undefined ? privOpt : /* Public */1; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let params = paramsOpt !== undefined ? paramsOpt : /* [] */0; + let priv = privOpt !== undefined ? privOpt : /* Public */1; return { ptyext_path: path, ptyext_params: params, @@ -6376,10 +6376,10 @@ function mk$20(attrsOpt, docsOpt, paramsOpt, privOpt, path, constructors) { } function constructor$1(locOpt, attrsOpt, docsOpt, infoOpt, name, kind) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; return { pext_name: name, pext_kind: kind, @@ -6389,11 +6389,11 @@ function constructor$1(locOpt, attrsOpt, docsOpt, infoOpt, name, kind) { } function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; - var args = argsOpt !== undefined ? argsOpt : /* [] */0; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let args = argsOpt !== undefined ? argsOpt : /* [] */0; return { pext_name: name, pext_kind: { @@ -6407,10 +6407,10 @@ function decl(locOpt, attrsOpt, docsOpt, infoOpt, argsOpt, res, name) { } function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { - var loc = locOpt !== undefined ? locOpt : default_loc.contents; - var attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; - var docs = docsOpt !== undefined ? docsOpt : empty_docs; - var info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; + let loc = locOpt !== undefined ? locOpt : default_loc.contents; + let attrs = attrsOpt !== undefined ? attrsOpt : /* [] */0; + let docs = docsOpt !== undefined ? docsOpt : empty_docs; + let info = infoOpt !== undefined ? Caml_option.valFromOption(infoOpt) : undefined; return { pext_name: name, pext_kind: { @@ -6422,7 +6422,7 @@ function rebind(locOpt, attrsOpt, docsOpt, infoOpt, name, lid) { }; } -var Te = { +let Te = { mk: mk$20, constructor: constructor$1, decl: decl, @@ -6436,7 +6436,7 @@ function mk$21(self, fields) { }; } -var Csig = { +let Csig = { mk: mk$21 }; @@ -6447,11 +6447,11 @@ function mk$22(self, fields) { }; } -var Cstr = { +let Cstr = { mk: mk$22 }; -var Ast_helper_Exp = { +let Ast_helper_Exp = { mk: mk$2, attr: attr$2, ident: ident, @@ -6491,7 +6491,7 @@ var Ast_helper_Exp = { $$case: $$case }; -var Ast_helper_Ctf = { +let Ast_helper_Ctf = { mk: mk$9, attr: attr$7, inherit_: inherit_, @@ -6503,7 +6503,7 @@ var Ast_helper_Ctf = { text: text$2 }; -var Ast_helper_Cf = { +let Ast_helper_Cf = { mk: mk$10, attr: attr$8, inherit_: inherit_$1, @@ -6518,7 +6518,7 @@ var Ast_helper_Cf = { concrete: concrete }; -var Ast_helper = { +let Ast_helper = { default_loc: default_loc, with_default_loc: with_default_loc, Typ: Typ, @@ -6546,15 +6546,15 @@ var Ast_helper = { Cstr: Cstr }; -var $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Parser_api.Syntaxerr.Error"); +let $$Error$1 = /* @__PURE__ */Caml_exceptions.create("Parser_api.Syntaxerr.Error"); -var Escape_error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Syntaxerr.Escape_error"); +let Escape_error = /* @__PURE__ */Caml_exceptions.create("Parser_api.Syntaxerr.Escape_error"); function prepare_error(param) { switch (param.TAG | 0) { case /* Unclosed */0 : - var closing = param._3; - var opening = param._1; + let closing = param._3; + let opening = param._1; return Curry._1(errorf(param._2, { hd: Curry._1(errorf(param._0, undefined, undefined, /* Format */{ _0: { @@ -6656,7 +6656,7 @@ function prepare_error(param) { _1: "Syntax error: applicative paths of the form F(X).t are not supported when the option -no-app-func is set." }); case /* Variable_in_scope */4 : - var $$var = param._1; + let $$var = param._1; return Curry._2(errorf(param._0, undefined, undefined, /* Format */{ _0: { TAG: /* String_literal */11, @@ -6733,7 +6733,7 @@ function ill_formed_ast(loc, s) { }); } -var Syntaxerr = { +let Syntaxerr = { $$Error: $$Error$1, Escape_error: Escape_error, report_error: report_error$1, @@ -6786,10 +6786,10 @@ function mkcf(attrs, docs, d) { } function mkoption(d) { - var init = d.ptyp_loc; - var loc_loc_start = init.loc_start; - var loc_loc_end = init.loc_end; - var loc = { + let init = d.ptyp_loc; + let loc_loc_start = init.loc_start; + let loc_loc_end = init.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true @@ -6831,7 +6831,7 @@ function reloc_exp(x) { } function mkoperator(name, pos) { - var loc = rhs_loc(pos); + let loc = rhs_loc(pos); return Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_ident */0, _0: { @@ -6924,16 +6924,16 @@ function mkpat_cons(consloc, args, loc) { function mktailexp(nilloc, param) { if (param) { - var e1 = param.hd; - var exp_el = mktailexp(nilloc, param.tl); - var loc_loc_start = e1.pexp_loc.loc_start; - var loc_loc_end = exp_el.pexp_loc.loc_end; - var loc = { + let e1 = param.hd; + let exp_el = mktailexp(nilloc, param.tl); + let loc_loc_start = e1.pexp_loc.loc_start; + let loc_loc_end = exp_el.pexp_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { + let arg = Curry._3(Ast_helper_Exp.mk, loc, undefined, { TAG: /* Pexp_tuple */8, _0: { hd: e1, @@ -6949,18 +6949,18 @@ function mktailexp(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -6973,16 +6973,16 @@ function mktailexp(nilloc, param) { function mktailpat(nilloc, param) { if (param) { - var p1 = param.hd; - var pat_pl = mktailpat(nilloc, param.tl); - var loc_loc_start = p1.ppat_loc.loc_start; - var loc_loc_end = pat_pl.ppat_loc.loc_end; - var loc = { + let p1 = param.hd; + let pat_pl = mktailpat(nilloc, param.tl); + let loc_loc_start = p1.ppat_loc.loc_start; + let loc_loc_end = pat_pl.ppat_loc.loc_end; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: true }; - var arg = mk$1(loc, undefined, { + let arg = mk$1(loc, undefined, { TAG: /* Ppat_tuple */4, _0: { hd: p1, @@ -6998,18 +6998,18 @@ function mktailpat(nilloc, param) { loc_ghost: true }, arg, loc); } - var loc_loc_start$1 = nilloc.loc_start; - var loc_loc_end$1 = nilloc.loc_end; - var loc$1 = { + let loc_loc_start$1 = nilloc.loc_start; + let loc_loc_end$1 = nilloc.loc_end; + let loc$1 = { loc_start: loc_loc_start$1, loc_end: loc_loc_end$1, loc_ghost: true }; - var nil_txt = { + let nil_txt = { TAG: /* Lident */0, _0: "[]" }; - var nil = { + let nil = { txt: nil_txt, loc: loc$1 }; @@ -7032,8 +7032,8 @@ function mkstrexp(e, attrs) { } function mkexp_constraint(e, param) { - var t2 = param[1]; - var t1 = param[0]; + let t2 = param[1]; + let t1 = param[0]; if (t1 !== undefined) { if (t2 !== undefined) { return ghexp({ @@ -7136,7 +7136,7 @@ function bigarray_function(str, name) { } function bigarray_untuplify(exp) { - var explist = exp.pexp_desc; + let explist = exp.pexp_desc; if (explist.TAG === /* Pexp_tuple */8) { return explist._0; } else { @@ -7148,7 +7148,7 @@ function bigarray_untuplify(exp) { } function exp_of_label(lbl, pos) { - var rhs = { + let rhs = { TAG: /* Lident */0, _0: last(lbl) }; @@ -7162,7 +7162,7 @@ function exp_of_label(lbl, pos) { } function pat_of_label(lbl, pos) { - var rhs = last(lbl); + let rhs = last(lbl); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -7187,15 +7187,15 @@ function check_variable(vl, loc, v) { } function varify_constructors(var_names, t) { - var loop = function (t) { - var x = t.ptyp_desc; - var desc; + let loop = function (t) { + let x = t.ptyp_desc; + let desc; if (typeof x === "number") { desc = /* Ptyp_any */0; } else { switch (x.TAG | 0) { case /* Ptyp_var */0 : - var x$1 = x._0; + let x$1 = x._0; check_variable(var_names, t.ptyp_loc, x$1); desc = { TAG: /* Ptyp_var */0, @@ -7217,15 +7217,15 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_constr */3 : - var longident = x._0; - var exit = 0; - var s = longident.txt; + let longident = x._0; + let exit = 0; + let s = longident.txt; switch (s.TAG | 0) { case /* Lident */0 : if (x._1) { exit = 1; } else { - var s$1 = s._0; + let s$1 = s._0; if (Stdlib__List.mem(s$1, var_names)) { desc = { TAG: /* Ptyp_var */0, @@ -7271,7 +7271,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_alias */6 : - var string = x._1; + let string = x._1; check_variable(var_names, t.ptyp_loc, string); desc = { TAG: /* Ptyp_alias */6, @@ -7288,8 +7288,8 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_poly */8 : - var string_lst = x._0; - var partial_arg = t.ptyp_loc; + let string_lst = x._0; + let partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { return check_variable(var_names, partial_arg, param); }), string_lst); @@ -7300,7 +7300,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_package */9 : - var match = x._0; + let match = x._0; desc = { TAG: /* Ptyp_package */9, _0: [ @@ -7315,7 +7315,7 @@ function varify_constructors(var_names, t) { }; break; case /* Ptyp_extension */10 : - var match$1 = x._0; + let match$1 = x._0; desc = { TAG: /* Ptyp_extension */10, _0: [ @@ -7333,7 +7333,7 @@ function varify_constructors(var_names, t) { ptyp_attributes: t.ptyp_attributes }; }; - var loop_row_field = function (param) { + let loop_row_field = function (param) { if (param.TAG === /* Rtag */0) { return { TAG: /* Rtag */0, @@ -7353,12 +7353,12 @@ function varify_constructors(var_names, t) { } function wrap_type_annotation(newtypes, core_type, body) { - var exp = mkexp({ + let exp = mkexp({ TAG: /* Pexp_constraint */19, _0: body, _1: core_type }); - var exp$1 = Stdlib__List.fold_right((function (newtype, exp) { + let exp$1 = Stdlib__List.fold_right((function (newtype, exp) { return mkexp({ TAG: /* Pexp_newtype */30, _0: newtype, @@ -7376,11 +7376,11 @@ function wrap_type_annotation(newtypes, core_type, body) { } function wrap_exp_attrs(body, param) { - var ext = param[0]; - var body_pexp_desc = body.pexp_desc; - var body_pexp_loc = body.pexp_loc; - var body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); - var body$1 = { + let ext = param[0]; + let body_pexp_desc = body.pexp_desc; + let body_pexp_loc = body.pexp_loc; + let body_pexp_attributes = Stdlib.$at(param[1], body.pexp_attributes); + let body$1 = { pexp_desc: body_pexp_desc, pexp_loc: body_pexp_loc, pexp_attributes: body_pexp_attributes @@ -7415,8 +7415,8 @@ function text_def(pos) { } function extra_text(text, pos, items) { - var pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); - var post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); + let pre_extras = get_pre_extra_text(Stdlib__Parsing.rhs_start_pos(pos)); + let post_extras = get_post_extra_text(Stdlib__Parsing.rhs_end_pos(pos)); return Stdlib.$at(Curry._1(text, pre_extras), Stdlib.$at(items, Curry._1(text, post_extras))); } @@ -7432,8 +7432,8 @@ function add_nonrec(rf, attrs, pos) { if (rf) { return attrs; } - var name_loc = rhs_loc(pos); - var name = { + let name_loc = rhs_loc(pos); + let name = { txt: "nonrec", loc: name_loc }; @@ -7460,7 +7460,7 @@ function mklb(param, attrs) { }; } -var yytransl_const = [ +let yytransl_const = [ 257, 258, 259, @@ -7565,7 +7565,7 @@ var yytransl_const = [ 0 ]; -var yytransl_block = [ +let yytransl_block = [ 268, 287, 298, @@ -7589,7 +7589,7 @@ var yytransl_block = [ 0 ]; -var yyact = [ +let yyact = [ (function (param) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -7597,15 +7597,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text$1, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return extra_text(text, 1, _1); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_def */0, _0: extra_text(text$1, 1, _1) @@ -7620,8 +7620,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), tl: /* [] */0 @@ -7634,16 +7634,16 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var pos = 1; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; return extra_text((function (txt) { return { hd: { @@ -7658,9 +7658,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -7679,9 +7679,9 @@ var yyact = [ return text_def(1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { @@ -7695,8 +7695,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: { TAG: /* Ptop_def */0, @@ -7709,8 +7709,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(2, 3); return Stdlib.$at(text_def(1), Stdlib.$at(text_def(2), { hd: _2, @@ -7718,8 +7718,8 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text_def(1), { hd: { TAG: /* Ptop_def */0, @@ -7732,8 +7732,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 1); return Stdlib.$at(text_def(1), { hd: _1, @@ -7759,8 +7759,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { txt: _2, @@ -7776,22 +7776,22 @@ var yyact = [ return "_"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_ident */0, _0: { @@ -7801,7 +7801,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_structure */1, _0: extra_text(text$1, 2, _2) @@ -7812,8 +7812,8 @@ var yyact = [ return unclosed("struct", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmod({ TAG: /* Pmod_functor */2, @@ -7824,8 +7824,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -7833,7 +7833,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return mkmod({ TAG: /* Pmod_apply */3, _0: _1, @@ -7849,8 +7849,8 @@ var yyact = [ return unclosed("(", 2, ")", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_constraint */4, _0: _2, @@ -7870,15 +7870,15 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -7892,9 +7892,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -7912,8 +7912,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmod({ TAG: /* Pmod_unpack */5, _0: ghexp({ @@ -7940,21 +7940,21 @@ var yyact = [ return unclosed("(", 1, ")", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$4(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_rhs_docs(1, 2); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: mkstrexp(_1, _2), @@ -7968,26 +7968,26 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = lbs.lbs_bindings; - var str; - var exit = 0; + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = lbs.lbs_bindings; + let str; + let exit = 0; if (bindings) { - var lb = bindings.hd; + let lb = bindings.hd; if (typeof lb.lb_pattern.ppat_desc === "number" && !bindings.tl) { - var exp = wrap_exp_attrs(lb.lb_expression, [ + let exp = wrap_exp_attrs(lb.lb_expression, [ undefined, lbs.lbs_attributes ]); @@ -8013,7 +8013,7 @@ var yyact = [ } }); } - var bindings$1 = Stdlib__List.map((function (lb) { + let bindings$1 = Stdlib__List.map((function (lb) { return mk$17(lb.lb_loc, lb.lb_attributes, CamlinternalLazy.force(lb.lb_docs), CamlinternalLazy.force(lb.lb_text), lb.lb_pattern, lb.lb_expression); }), bindings); str = mkstr({ @@ -8022,9 +8022,9 @@ var yyact = [ _1: Stdlib__List.rev(bindings$1) }); } - var id = lbs.lbs_extension; + let id = lbs.lbs_extension; if (id !== undefined) { - var d = { + let d = { TAG: /* Pstr_extension */14, _0: [ id, @@ -8044,85 +8044,85 @@ var yyact = [ } }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_primitive */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_type */3, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_typext */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_exception */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_module */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_recmodule */7, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_modtype */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_open */9, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_class_type */11, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_include */12, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkstr({ TAG: /* Pstr_extension */14, _0: _1, @@ -8130,7 +8130,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkstr({ TAG: /* Pstr_attribute */13, @@ -8138,16 +8138,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_constraint */4, _0: _4, @@ -8155,8 +8155,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmod({ TAG: /* Pmod_functor */2, _0: _1[0], @@ -8165,49 +8165,49 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$14(symbol_rloc(undefined), _4, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_ident */0, _0: { @@ -8217,7 +8217,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkmty({ TAG: /* Pmty_signature */1, _0: extra_text(text, 2, _2) @@ -8228,8 +8228,8 @@ var yyact = [ return unclosed("sig", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib__List.fold_left((function (acc, param) { return mkmty({ TAG: /* Pmty_functor */2, @@ -8240,8 +8240,8 @@ var yyact = [ }), _4, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_with */3, _0: _1, @@ -8249,7 +8249,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_typeof */4, _0: _4 @@ -8263,126 +8263,126 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$3(_1, _2); }), (function (__caml_parser_env) { return /* [] */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), { hd: _1, tl: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_value */0, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_type */1, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_typext */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_exception */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_module */4, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_recmodule */5, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_modtype */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_open */7, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_include */8, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class */9, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_class_type */10, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mksig({ TAG: /* Psig_extension */12, _0: _1, @@ -8390,7 +8390,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mksig({ TAG: /* Psig_attribute */11, @@ -8398,26 +8398,26 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$15(symbol_rloc(undefined), _4, symbol_docs(undefined), _2, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -8429,7 +8429,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkmty({ TAG: /* Pmty_functor */2, _0: { @@ -8441,18 +8441,18 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -8462,33 +8462,33 @@ var yyact = [ })); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, { txt: _3, loc: rhs_loc(3) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), { txt: _2, loc: rhs_loc(2) @@ -8501,46 +8501,46 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$13(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, _4, { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -8550,8 +8550,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constraint */5, _0: _4, @@ -8559,8 +8559,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -8576,8 +8576,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -8587,8 +8587,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_fun */2, _0: _1[0], @@ -8604,8 +8604,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_apply */3, _0: _1, @@ -8613,9 +8613,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -8656,20 +8656,20 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$5(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -8680,7 +8680,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkclass({ TAG: /* Pcl_constr */0, _0: { @@ -8691,7 +8691,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_structure */1, _0: _2 @@ -8702,8 +8702,8 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkclass({ TAG: /* Pcl_constraint */5, _0: _2, @@ -8723,8 +8723,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcstr_self: _1, pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) @@ -8734,8 +8734,8 @@ var yyact = [ return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -8749,18 +8749,18 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Cf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_5, symbol_docs(undefined), { TAG: /* Pcf_inherit */0, _0: _2, @@ -8769,47 +8769,47 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_method */2, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_3, symbol_docs(undefined), { TAG: /* Pcf_initializer */4, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcf(_2, symbol_docs(undefined), { TAG: /* Pcf_extension */6, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkcf(undefined, undefined, { TAG: /* Pcf_attribute */5, @@ -8823,9 +8823,9 @@ var yyact = [ }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -8844,9 +8844,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -8860,10 +8860,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -8878,12 +8878,12 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var e = mkexp_constraint(_6, _4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let e = mkexp_constraint(_6, _4); return [ { txt: _3, @@ -8898,9 +8898,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -8919,10 +8919,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_1 === /* Override */0) { throw new Caml_js_exceptions.MelangeError(Escape_error, { MEL_EXN_ID: Escape_error @@ -8941,10 +8941,10 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -8963,11 +8963,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _3, @@ -8986,13 +8986,13 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_6, _8, _10); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_6, _8, _10); return [ { txt: _3, @@ -9014,9 +9014,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _2, @@ -9025,9 +9025,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "?" + _1, @@ -9036,9 +9036,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: _1, @@ -9047,8 +9047,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_arrow */2, _0: "", @@ -9057,8 +9057,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -9069,7 +9069,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_constr */0, _0: { @@ -9080,7 +9080,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkcty({ TAG: /* Pcty_signature */1, _0: _2 @@ -9091,20 +9091,20 @@ var yyact = [ return unclosed("object", 1, "end", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$6(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkcty({ TAG: /* Pcty_extension */3, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { pcsig_self: _1, pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) @@ -9120,34 +9120,34 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Stdlib.$at({ hd: _2, tl: Curry._1(Ast_helper_Ctf.text, get_text(Stdlib__Parsing.rhs_start_pos(2))) }, _1); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_inherit */0, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_val */1, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_6, symbol_docs(undefined), { TAG: /* Pctf_method */2, _0: [ @@ -9159,23 +9159,23 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_3, symbol_docs(undefined), { TAG: /* Pctf_constraint */3, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkctf(_2, symbol_docs(undefined), { TAG: /* Pctf_extension */5, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); mark_symbol_docs(undefined); return mkctf(undefined, undefined, { TAG: /* Pctf_attribute */4, @@ -9183,9 +9183,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, _2, @@ -9194,9 +9194,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _3, /* Mutable */1, @@ -9205,8 +9205,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, /* Immutable */0, @@ -9215,8 +9215,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3, @@ -9224,82 +9224,82 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), undefined, _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) }, _6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _8, symbol_docs(undefined), undefined, _3, _4, { txt: _5, loc: rhs_loc(5) }, _7); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$18(symbol_rloc(undefined), _7, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, _3, { txt: _4, loc: rhs_loc(4) @@ -9312,8 +9312,8 @@ var yyact = [ return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_sequence */16, _0: _1, @@ -9321,8 +9321,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _3[0], _4, @@ -9330,7 +9330,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], undefined, @@ -9338,9 +9338,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ "?" + _1, _4, @@ -9348,8 +9348,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, undefined, @@ -9357,7 +9357,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _3[0], undefined, @@ -9365,7 +9365,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2[0], undefined, @@ -9373,8 +9373,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, undefined, @@ -9382,7 +9382,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", undefined, @@ -9390,7 +9390,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -9412,8 +9412,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1[0], mkpat({ @@ -9424,7 +9424,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkpat({ @@ -9440,8 +9440,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constraint */10, _0: _1, @@ -9452,8 +9452,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: _1, @@ -9461,9 +9461,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var bindings = Stdlib__List.map((function (lb) { + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let bindings = Stdlib__List.map((function (lb) { if (Caml_obj.caml_notequal(lb.lb_attributes, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -9476,9 +9476,9 @@ var yyact = [ } return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); }), _1.lbs_bindings); - var d_0 = _1.lbs_rec; - var d_1 = Stdlib__List.rev(bindings); - var d = { + let d_0 = _1.lbs_rec; + let d_1 = Stdlib__List.rev(bindings); + let d = { TAG: /* Pexp_let */2, _0: d_0, _1: d_1, @@ -9490,15 +9490,15 @@ var yyact = [ ]); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_0 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_0 = { txt: _4, loc: rhs_loc(4) }; - var d = { + let d = { TAG: /* Pexp_letmodule */25, _0: d_0, _1: _5, @@ -9507,15 +9507,15 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = { + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = { txt: _5, loc: rhs_loc(5) }; - var d = { + let d = { TAG: /* Pexp_open */32, _0: _3, _1: d_1, @@ -9524,19 +9524,19 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_function */3, _0: Stdlib__List.rev(_4) }; return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_fun */4, _0: _3[0], @@ -9546,9 +9546,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_newtype */30, _0: _5, @@ -9556,12 +9556,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_match */6, _0: _3, _1: d_1 @@ -9569,12 +9569,12 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d_1 = Stdlib__List.rev(_6); - var d = { + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d_1 = Stdlib__List.rev(_6); + let d = { TAG: /* Pexp_try */7, _0: _3, _1: d_1 @@ -9589,15 +9589,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_tuple */8, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -9608,8 +9608,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -9617,10 +9617,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -9629,9 +9629,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_ifthenelse */15, _0: _3, @@ -9640,9 +9640,9 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_while */17, _0: _3, @@ -9650,12 +9650,12 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_for */18, _0: _3, @@ -9666,8 +9666,8 @@ var yyact = [ }), _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -9680,8 +9680,8 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_cons(rhs_loc(2), ghexp({ TAG: /* Pexp_tuple */8, _0: { @@ -9694,119 +9694,119 @@ var yyact = [ }), symbol_rloc(undefined)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "+=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "-.", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "*", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "%", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "<", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ">", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "or", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "||", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, "&&", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, ":=", _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = _2.pexp_desc; + let exit = 0; switch (_1) { case "-" : if (match.TAG === /* Pexp_constant */1) { - var n = match._0; + let n = match._0; switch (n.TAG | 0) { case /* Const_int */0 : return mkexp({ @@ -9854,7 +9854,7 @@ var yyact = [ } if (exit === 2 && match.TAG === /* Pexp_constant */1) { - var f = match._0; + let f = match._0; if (f.TAG === /* Const_float */3) { return mkexp({ TAG: /* Pexp_constant */1, @@ -9879,10 +9879,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var desc = _2.pexp_desc; - var exit = 0; + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let desc = _2.pexp_desc; + let exit = 0; switch (_1) { case "+" : if (desc.TAG === /* Pexp_constant */1) { @@ -9921,9 +9921,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setfield */13, _0: _1, @@ -9935,9 +9935,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -9966,9 +9966,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -9997,14 +9997,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var set = fast.contents ? "unsafe_set" : "set"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let set = fast.contents ? "unsafe_set" : "set"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -10033,8 +10033,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -10142,8 +10142,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_setinstvar */23, _0: { @@ -10154,24 +10154,24 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_assert */26, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_lazy */27, _0: _3 }), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(mkexp({ TAG: /* Pexp_object */29, _0: _3 @@ -10183,12 +10183,12 @@ var yyact = [ return unclosed("object", 1, "end", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._2(Ast_helper_Exp.attr, _1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_ident */0, _0: { @@ -10198,14 +10198,14 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_constant */1, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_construct */9, _0: { @@ -10216,7 +10216,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_variant */10, _0: _1, @@ -10231,20 +10231,20 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return wrap_exp_attrs(reloc_exp(_3), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var d_0 = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let d_0 = { txt: { TAG: /* Lident */0, _0: "()" }, loc: symbol_rloc(undefined) }; - var d = { + let d = { TAG: /* Pexp_construct */9, _0: d_0, _1: undefined @@ -10257,13 +10257,13 @@ var yyact = [ return unclosed("begin", 1, "end", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp_constraint(_2, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_field */12, _0: _1, @@ -10274,8 +10274,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -10292,8 +10292,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -10321,8 +10321,8 @@ var yyact = [ return unclosed("(", 3, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_apply */5, _0: ghexp({ @@ -10350,13 +10350,13 @@ var yyact = [ return unclosed("[", 3, "]", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var get = fast.contents ? "unsafe_get" : "get"; - var coords = bigarray_untuplify(_4); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let get = fast.contents ? "unsafe_get" : "get"; + let coords = bigarray_untuplify(_4); if (coords) { - var match = coords.tl; - var c1 = coords.hd; + let match = coords.tl; + let c1 = coords.hd; if (!match) { return mkexp({ TAG: /* Pexp_apply */5, @@ -10379,8 +10379,8 @@ var yyact = [ } }); } - var match$1 = match.tl; - var c2 = match.hd; + let match$1 = match.tl; + let c2 = match.hd; if (!match$1) { return mkexp({ TAG: /* Pexp_apply */5, @@ -10475,7 +10475,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_record */11, _0: _2[1], @@ -10487,9 +10487,9 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var rec_exp = mkexp({ + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let rec_exp = mkexp({ TAG: /* Pexp_record */11, _0: _4[1], _1: _4[0] @@ -10510,7 +10510,7 @@ var yyact = [ return unclosed("{", 3, "}", 5); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_array */14, @@ -10529,8 +10529,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -10552,7 +10552,7 @@ var yyact = [ return unclosed("[|", 3, "|]", 6); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_exp(mktailexp(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -10562,10 +10562,10 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + let list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -10583,8 +10583,8 @@ var yyact = [ return unclosed("[", 3, "]", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator(_1, 1), @@ -10598,7 +10598,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_apply */5, _0: mkoperator("!", 1), @@ -10612,9 +10612,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var d = { + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let d = { TAG: /* Pexp_new */22, _0: { txt: _3, @@ -10624,7 +10624,7 @@ var yyact = [ return wrap_exp_attrs(mkexp(d), _2); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_override */24, @@ -10643,8 +10643,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, @@ -10666,8 +10666,8 @@ var yyact = [ return unclosed("{<", 3, ">}", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_send */21, _0: _1, @@ -10675,21 +10675,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkinfix(_1, _2, _3); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_pack */31, _0: _3 }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_constraint */19, _0: ghexp({ @@ -10707,9 +10707,9 @@ var yyact = [ return unclosed("(", 1, ")", 5); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkexp({ TAG: /* Pexp_open */32, _0: /* Fresh */1, @@ -10736,29 +10736,29 @@ var yyact = [ return unclosed("(", 3, ")", 7); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_extension */33, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "", _1 @@ -10768,8 +10768,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _2 @@ -10779,22 +10779,22 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _2[0], _2[1] ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ "?" + _1, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, mkexp({ @@ -10810,33 +10810,33 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ mkpatvar(_1, 1), _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -10851,11 +10851,11 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var match = wrap_type_annotation(_4, _6, _8); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let match = wrap_type_annotation(_4, _6, _8); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -10866,17 +10866,17 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ ghpat({ TAG: /* Ppat_constraint */10, @@ -10890,8 +10890,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { lbs_bindings: { hd: _2, @@ -10904,11 +10904,11 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var lb = mklb(_4, _5); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); return { lbs_bindings: { hd: lb, @@ -10921,24 +10921,24 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mklb(_2, _3); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp_constraint(_3, _1); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -10948,8 +10948,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -10957,37 +10957,37 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return ghexp({ TAG: /* Pexp_fun */4, _0: _1[0], @@ -10997,8 +10997,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkexp({ TAG: /* Pexp_newtype */30, _0: _3, @@ -11006,16 +11006,16 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -11025,45 +11025,45 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -11073,7 +11073,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -11083,8 +11083,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -11097,9 +11097,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: [ { @@ -11112,37 +11112,37 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, _2 @@ -11162,8 +11162,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_alias */1, _0: _1, @@ -11178,15 +11178,15 @@ var yyact = [ return expecting(3, "identifier"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_tuple */4, _0: Stdlib__List.rev(_1) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -11197,8 +11197,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -11206,8 +11206,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -11224,8 +11224,8 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat_cons(rhs_loc(2), ghpat({ TAG: /* Ppat_tuple */4, _0: { @@ -11243,8 +11243,8 @@ var yyact = [ return unclosed("(", 4, ")", 8); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_or */9, _0: _1, @@ -11256,26 +11256,26 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_lazy */12, _0: _2 }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_exception */14, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr$1(_1, _2); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_var */0, _0: { @@ -11291,15 +11291,15 @@ var yyact = [ return mkpat(/* Ppat_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_constant */2, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_interval */3, _0: _1, @@ -11307,7 +11307,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_construct */5, _0: { @@ -11318,7 +11318,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_variant */6, _0: _1, @@ -11326,7 +11326,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_type */11, _0: { @@ -11336,7 +11336,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_record */7, _0: _2[0], @@ -11348,7 +11348,7 @@ var yyact = [ return unclosed("{", 1, "}", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return reloc_pat(mktailpat(rhs_loc(4), Stdlib__List.rev(_2))); }), @@ -11358,7 +11358,7 @@ var yyact = [ return unclosed("[", 1, "]", 4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_array */8, @@ -11384,8 +11384,8 @@ var yyact = [ return unclosed("(", 1, ")", 3); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: _2, @@ -11402,7 +11402,7 @@ var yyact = [ return expecting(4, "type"); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_unpack */13, _0: { @@ -11412,8 +11412,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mkpat({ TAG: /* Ppat_constraint */10, _0: mkpat({ @@ -11435,23 +11435,23 @@ var yyact = [ return unclosed("(", 1, ")", 6); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mkpat({ TAG: /* Ppat_extension */15, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: { @@ -11465,22 +11465,22 @@ var yyact = [ return expecting(3, "pattern"); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -11490,7 +11490,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { hd: _1, @@ -11500,7 +11500,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -11511,8 +11511,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -11522,8 +11522,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -11533,7 +11533,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -11543,80 +11543,80 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1[0], tl: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$11(symbol_rloc(undefined), _7, symbol_docs(undefined), _6, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), add_nonrec(_2, _7, 2), symbol_docs(undefined), undefined, _3, Stdlib__List.rev(_6), _5[0], _5[1], _5[2], { txt: _4, loc: rhs_loc(4) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mk$19(symbol_rloc(undefined), _6, symbol_docs(undefined), get_text(Stdlib__Parsing.symbol_start_pos(undefined)), _2, Stdlib__List.rev(_5), _4[0], _4[1], _4[2], { txt: _3, loc: rhs_loc(3) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -11633,7 +11633,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Public */1, @@ -11641,7 +11641,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* Ptype_abstract */0, /* Private */0, @@ -11649,7 +11649,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -11660,7 +11660,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -11678,8 +11678,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -11690,9 +11690,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { TAG: /* Ptype_variant */0, @@ -11703,7 +11703,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); return [ /* Ptype_open */1, /* Public */1, @@ -11711,9 +11711,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ { TAG: /* Ptype_record */1, @@ -11727,7 +11727,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -11737,30 +11737,30 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -11773,7 +11773,7 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 @@ -11783,8 +11783,8 @@ var yyact = [ return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _1 @@ -11800,62 +11800,62 @@ var yyact = [ return /* Contravariant */1; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _3, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return constructor(symbol_rloc(undefined), _4, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -11865,10 +11865,10 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), Stdlib.$at(_5, _6), symbol_docs(undefined), undefined, { txt: _2, loc: rhs_loc(2) @@ -11878,10 +11878,10 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), Stdlib.$at(_4, _5), symbol_docs(undefined), undefined, _3[0], _3[1], { txt: _2, loc: rhs_loc(2) @@ -11894,79 +11894,79 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), undefined ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ Stdlib__List.rev(_2), _4 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ /* [] */0, _2 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return field$1(symbol_rloc(undefined), _5, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - var info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + let info = info_before_semi !== undefined ? info_before_semi : get_info(Stdlib__Parsing.symbol_end_pos(undefined)); return field$1(symbol_rloc(undefined), Stdlib.$at(_5, _7), Caml_option.some(info), _1, { txt: _2, loc: rhs_loc(2) }, _4); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -11976,12 +11976,12 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); if (_2 !== /* Recursive */1) { not_expecting(2, "nonrec flag"); } @@ -11991,93 +11991,93 @@ var yyact = [ }, Stdlib__List.rev(_7)); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _3, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _2[0], _2[1], { txt: _1, loc: rhs_loc(1) }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return decl(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), _3[0], _3[1], { txt: _2, loc: rhs_loc(2) }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _4, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _1, loc: rhs_loc(1) @@ -12087,9 +12087,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return rebind(symbol_rloc(undefined), _5, undefined, Caml_option.some(get_info(Stdlib__Parsing.symbol_end_pos(undefined))), { txt: _2, loc: rhs_loc(2) @@ -12099,27 +12099,27 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - var rhs = last(_3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let rhs = last(_3); return { TAG: /* Pwith_type */0, _0: { @@ -12133,9 +12133,9 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_typesubst */2, _0: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, undefined, undefined, undefined, _5, { @@ -12145,8 +12145,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_module */1, _0: { @@ -12160,8 +12160,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Pwith_modsubst */3, _0: { @@ -12181,15 +12181,15 @@ var yyact = [ return /* Private */0; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -12199,8 +12199,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -12211,8 +12211,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_poly */8, _0: Stdlib__List.rev(_1), @@ -12223,16 +12223,16 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return attr(_1, _2); }), (function (__caml_parser_env) { return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_alias */6, _0: _1, @@ -12243,9 +12243,9 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _2, @@ -12254,9 +12254,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "?" + _1, @@ -12265,9 +12265,9 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: _1, @@ -12276,8 +12276,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_arrow */1, _0: "", @@ -12289,7 +12289,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -12306,7 +12306,7 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { @@ -12320,7 +12320,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_var */0, _0: _2 @@ -12330,7 +12330,7 @@ var yyact = [ return mktyp(/* Ptyp_any */0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -12341,8 +12341,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -12356,8 +12356,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_constr */3, _0: { @@ -12368,7 +12368,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_object */4, _0: _2[0], @@ -12383,7 +12383,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -12394,8 +12394,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -12409,8 +12409,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_class */5, _0: { @@ -12421,7 +12421,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -12433,7 +12433,7 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -12442,8 +12442,8 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: { @@ -12456,7 +12456,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -12474,7 +12474,7 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -12484,8 +12484,8 @@ var yyact = [ }), (function (__caml_parser_env) { Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_variant */7, _0: Stdlib__List.rev(_3), @@ -12494,21 +12494,21 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return mktyp({ TAG: /* Ptyp_package */9, _0: _3 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_extension */10, _0: _1 }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -12518,8 +12518,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _1, @@ -12529,8 +12529,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { txt: _2, @@ -12540,30 +12540,30 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _3 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 @@ -12573,17 +12573,17 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rinherit */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -12593,8 +12593,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Rtag */0, _0: _1, @@ -12610,30 +12610,30 @@ var yyact = [ return false; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _2, tl: _1 @@ -12643,8 +12643,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -12657,8 +12657,8 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return mktyp({ TAG: /* Ptyp_tuple */2, _0: { @@ -12668,53 +12668,53 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: /* [] */0 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _3, tl: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { hd: _1, @@ -12724,7 +12724,7 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ { @@ -12741,9 +12741,9 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _1, _4, @@ -12754,21 +12754,21 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_char */1, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_string */2, _0: _1[0], @@ -12776,28 +12776,28 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _1 @@ -12807,70 +12807,70 @@ var yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 0); }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: "-" + _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: -_2 | 0 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: Caml_int64.neg(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int */0, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_float */3, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int32 */4, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_int64 */5, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Const_nativeint */6, _0: _2 @@ -12983,15 +12983,15 @@ var yyact = [ return "true"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13026,15 +13026,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13042,15 +13042,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13058,15 +13058,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13074,15 +13074,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13090,8 +13090,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (applicative_functors.contents) { return { TAG: /* Lapply */2, @@ -13108,15 +13108,15 @@ var yyact = [ }); }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13124,15 +13124,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13140,15 +13140,15 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Lident */0, _0: _1 }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ldot */1, _0: _1, @@ -13156,7 +13156,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13164,8 +13164,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13176,8 +13176,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13188,8 +13188,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13200,8 +13200,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13212,7 +13212,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13223,7 +13223,7 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return { TAG: /* Ptop_dir */1, _0: _2, @@ -13483,39 +13483,39 @@ var yyact = [ return "with"; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1, loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { txt: _1 + ("." + _3.txt), loc: symbol_rloc(undefined) }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 @@ -13525,8 +13525,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -13536,8 +13536,8 @@ var yyact = [ return /* [] */0; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { hd: _1, tl: _2 @@ -13550,8 +13550,8 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ undefined, { @@ -13561,45 +13561,45 @@ var yyact = [ ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); return [ _2, _3 ]; }), (function (__caml_parser_env) { - var _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PStr */0, _0: _1 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PTyp */1, _0: _2 }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -13607,8 +13607,8 @@ var yyact = [ }; }), (function (__caml_parser_env) { - var _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - var _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + let _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); return { TAG: /* PPat */2, _0: _2, @@ -13659,7 +13659,7 @@ var yyact = [ }) ]; -var yytables = { +let yytables = { actions: yyact, transl_const: yytransl_const, transl_block: yytransl_block, @@ -13706,7 +13706,7 @@ function parse_pattern(lexfun, lexbuf) { return Stdlib__Parsing.yyparse(yytables, 7, lexfun, lexbuf); } -var Parser = { +let Parser = { implementation: implementation, $$interface: $$interface, toplevel_phrase: toplevel_phrase, @@ -13749,11 +13749,11 @@ function string_of_type_directive(x) { } } -var $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Parser_api.Lexer.Error"); +let $$Error$2 = /* @__PURE__ */Caml_exceptions.create("Parser_api.Lexer.Error"); function assert_same_type(lexbuf, x, y) { - var lhs = type_of_directive(x); - var rhs = type_of_directive(y); + let lhs = type_of_directive(x); + let rhs = type_of_directive(y); if (lhs !== rhs) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -13768,7 +13768,7 @@ function assert_same_type(lexbuf, x, y) { return y; } -var directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); +let directive_built_in_values = Stdlib__Hashtbl.create(undefined, 51); function remove_directive_built_in_value(k) { Stdlib__Hashtbl.replace(directive_built_in_values, k, /* Dir_null */0); @@ -13800,18 +13800,18 @@ Stdlib__Hashtbl.replace(directive_built_in_values, "OCAML_VERSION", { _0: Stdlib__Sys.ocaml_version }); -var tmp; +let tmp; -var exit = 0; +let exit = 0; -var i; +let i; try { i = Stdlib__String.rindex(Stdlib__Sys.ocaml_version, /* '+' */43); exit = 1; } catch (raw_exn$1){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { tmp = ""; } else { @@ -13844,24 +13844,24 @@ Stdlib__Hashtbl.replace(directive_built_in_values, "WORD_SIZE", { }); function semantic_version_parse(str, start, last_index) { - var aux = function (_start, _acc, last_index) { + let aux = function (_start, _acc, last_index) { while(true) { - var acc = _acc; - var start = _start; + let acc = _acc; + let start = _start; if (start > last_index) { return [ acc, start ]; } - var c = str.charCodeAt(start); + let c = str.charCodeAt(start); if (c === /* '.' */46) { return [ acc, start + 1 | 0 ]; } - var v = c - /* '0' */48 | 0; + let v = c - /* '0' */48 | 0; if (!(v >= 0 && v <= 9)) { return [ acc, @@ -13873,11 +13873,11 @@ function semantic_version_parse(str, start, last_index) { continue ; }; }; - var match = aux(start, 0, last_index); - var match$1 = aux(match[1], 0, last_index); - var match$2 = aux(match$1[1], 0, last_index); - var patch_end = match$2[1]; - var additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); + let match = aux(start, 0, last_index); + let match$1 = aux(match[1], 0, last_index); + let match$2 = aux(match$1[1], 0, last_index); + let patch_end = match$2[1]; + let additional = Stdlib__String.sub(str, patch_end, (last_index - patch_end | 0) + 1 | 0); return [ [ match[0], @@ -13889,7 +13889,7 @@ function semantic_version_parse(str, start, last_index) { } function semver(loc, lhs, str) { - var last_index = str.length - 1 | 0; + let last_index = str.length - 1 | 0; if (last_index < 0) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -13900,9 +13900,9 @@ function semver(loc, lhs, str) { _2: loc }); } - var v = str.charCodeAt(0); - var match; - var exit = 0; + let v = str.charCodeAt(0); + let match; + let exit = 0; if (v !== 94) { if (v >= 63) { if (v !== 126) { @@ -13973,11 +13973,11 @@ function semver(loc, lhs, str) { semantic_version_parse(str, 0, last_index) ]; } - var version = match[1][0]; - var major = version[0]; - var pred = match[0]; - var match$1 = semantic_version_parse(lhs, 0, lhs.length - 1 | 0); - var lversion = match$1[0]; + let version = match[1][0]; + let major = version[0]; + let pred = match[0]; + let match$1 = semantic_version_parse(lhs, 0, lhs.length - 1 | 0); + let lversion = match$1[0]; if (pred === "Ge") { return Caml_obj.caml_greaterequal(lversion, version); } @@ -13993,7 +13993,7 @@ function semver(loc, lhs, str) { if (pred === "Exact") { return Caml_obj.caml_equal(lversion, version); } - var l_major = lversion[0]; + let l_major = lversion[0]; if (pred === "Compatible") { return major === l_major; } else if (major === l_major) { @@ -14071,7 +14071,7 @@ function list_variables(fmt) { } function defined(str) { - var val; + let val; try { val = Stdlib__Hashtbl.find(directive_built_in_values, str); } @@ -14092,21 +14092,21 @@ function defined(str) { } function query(loc, str) { - var v; + let v; try { v = Stdlib__Hashtbl.find(directive_built_in_values, str); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var exit = 0; - var v$1; + let exit = 0; + let v$1; try { v$1 = Caml_sys.caml_sys_getenv(str); exit = 2; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* Dir_bool */0, @@ -14164,7 +14164,7 @@ function define_key_value(key, v) { if (!(key.length !== 0 && Stdlib__Char.uppercase_ascii(Caml_string.get(key, 0)) === Caml_string.get(key, 0))) { return false; } - var tmp; + let tmp; try { tmp = { TAG: /* Dir_bool */0, @@ -14247,18 +14247,18 @@ function value_of_token(loc, t) { } function directive_parse(token_with_comments, lexbuf) { - var look_ahead = { + let look_ahead = { contents: undefined }; - var token = function (param) { - var v = look_ahead.contents; + let token = function (param) { + let v = look_ahead.contents; if (v !== undefined) { look_ahead.contents = undefined; return v; } - var _param; + let _param; while(true) { - var t = Curry._1(token_with_comments, lexbuf); + let t = Curry._1(token_with_comments, lexbuf); if (typeof t === "number") { switch (t) { case /* EOF */25 : @@ -14285,7 +14285,7 @@ function directive_parse(token_with_comments, lexbuf) { } }; }; - var push = function (e) { + let push = function (e) { if (look_ahead.contents !== undefined) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -14298,9 +14298,9 @@ function directive_parse(token_with_comments, lexbuf) { } look_ahead.contents = e; }; - var token_op = function (calc, no, lhs) { - var op = token(undefined); - var exit = 0; + let token_op = function (calc, no, lhs) { + let op = token(undefined); + let exit = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -14320,13 +14320,13 @@ function directive_parse(token_with_comments, lexbuf) { if (!calc) { return true; } - var exit$1 = 0; + let exit$1 = 0; if (typeof lhs === "number" || lhs.TAG !== /* Dir_string */3) { exit$1 = 2; } else { - var curr_loc = curr(lexbuf); - var rhs = value_of_token(curr_loc, token(undefined)); - var exit$2 = 0; + let curr_loc = curr(lexbuf); + let rhs = value_of_token(curr_loc, token(undefined)); + let exit$2 = 0; if (typeof rhs === "number") { exit$2 = 3; } else { @@ -14370,8 +14370,8 @@ function directive_parse(token_with_comments, lexbuf) { } } if (exit === 1) { - var f; - var exit$3 = 0; + let f; + let exit$3 = 0; if (typeof op === "number") { switch (op) { case /* EQUAL */26 : @@ -14410,8 +14410,8 @@ function directive_parse(token_with_comments, lexbuf) { ] }); } - var curr_loc$1 = curr(lexbuf); - var rhs$1 = value_of_token(curr_loc$1, token(undefined)); + let curr_loc$1 = curr(lexbuf); + let rhs$1 = value_of_token(curr_loc$1, token(undefined)); if (calc) { return Curry._2(f, lhs, assert_same_type(lexbuf, lhs, rhs$1)); } else { @@ -14420,11 +14420,11 @@ function directive_parse(token_with_comments, lexbuf) { } }; - var parse_or_aux = function (calc, v) { - var e = token(undefined); + let parse_or_aux = function (calc, v) { + let e = token(undefined); if (e === 8) { - var calc$1 = calc && !v; - var b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); + let calc$1 = calc && !v; + let b = parse_or_aux(calc$1, parse_and_aux(calc$1, parse_relation(calc$1))); if (v) { return true; } else { @@ -14434,15 +14434,15 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var parse_and_aux = function (calc, v) { - var e = token(undefined); + let parse_and_aux = function (calc, v) { + let e = token(undefined); if (typeof e === "number") { if (e) { push(e); return v; } - var calc$1 = calc && v; - var b = parse_and_aux(calc$1, parse_relation(calc$1)); + let calc$1 = calc && v; + let b = parse_and_aux(calc$1, parse_relation(calc$1)); if (v) { return b; } else { @@ -14452,16 +14452,16 @@ function directive_parse(token_with_comments, lexbuf) { push(e); return v; }; - var parse_relation = function (calc) { - var curr_token = token(undefined); - var curr_loc = curr(lexbuf); + let parse_relation = function (calc) { + let curr_token = token(undefined); + let curr_loc = curr(lexbuf); if (typeof curr_token === "number") { switch (curr_token) { case /* FALSE */29 : return false; case /* LPAREN */54 : - var v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); - var match = token(undefined); + let v = parse_or_aux(calc, parse_and_aux(calc, parse_relation(calc))); + let match = token(undefined); if (match === 81) { return v; } @@ -14497,7 +14497,7 @@ function directive_parse(token_with_comments, lexbuf) { _0: Caml_format.caml_float_of_string(curr_token._0) }); case /* INT */7 : - var v$1 = curr_token._0; + let v$1 = curr_token._0; return token_op(calc, (function (e) { push(e); return v$1 !== 0; @@ -14506,7 +14506,7 @@ function directive_parse(token_with_comments, lexbuf) { _0: v$1 }); case /* LIDENT */11 : - var r = curr_token._0; + let r = curr_token._0; switch (r) { case "defined" : case "undefined" : @@ -14518,8 +14518,8 @@ function directive_parse(token_with_comments, lexbuf) { _2: curr_loc }); } - var t = token(undefined); - var loc = curr(lexbuf); + let t = token(undefined); + let loc = curr(lexbuf); if (typeof t === "number") { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -14528,7 +14528,7 @@ function directive_parse(token_with_comments, lexbuf) { }); } if (t.TAG === /* UIDENT */17) { - var s = t._0; + let s = t._0; if (calc) { if (Caml_string.get(r, 0) === /* 'u' */117) { return !defined(s); @@ -14561,13 +14561,13 @@ function directive_parse(token_with_comments, lexbuf) { _0: curr_token._0[0] }); case /* UIDENT */17 : - var value_v = query(curr_loc, curr_token._0); + let value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { push(e); if (typeof value_v !== "number" && value_v.TAG === /* Dir_bool */0) { return value_v._0; } - var ty = type_of_directive(value_v); + let ty = type_of_directive(value_v); throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -14587,8 +14587,8 @@ function directive_parse(token_with_comments, lexbuf) { } } }; - var v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); - var match = token(undefined); + let v = parse_or_aux(true, parse_and_aux(true, parse_relation(true))); + let match = token(undefined); if (match === 88) { return v; } @@ -14607,7 +14607,7 @@ function is_elif(i) { } } -var keyword_table = create_hashtable(149, { +let keyword_table = create_hashtable(149, { hd: [ "and", /* AND */2 @@ -14966,13 +14966,13 @@ var keyword_table = create_hashtable(149, { } }); -var initial_string_buffer = Caml_bytes.caml_create_bytes(256); +let initial_string_buffer = Caml_bytes.caml_create_bytes(256); -var string_buff = { +let string_buff = { contents: initial_string_buffer }; -var string_index = { +let string_index = { contents: 0 }; @@ -14983,7 +14983,7 @@ function reset_string_buffer(param) { function store_string_char(c) { if (string_index.contents >= string_buff.contents.length) { - var new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); + let new_buff = Caml_bytes.caml_create_bytes((string_buff.contents.length << 1)); Stdlib__Bytes.blit(string_buff.contents, 0, new_buff, 0, string_buff.contents.length); string_buff.contents = new_buff; } @@ -14992,22 +14992,22 @@ function store_string_char(c) { } function store_string(s) { - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ store_string_char(Caml_string.get(s, i)); } } function get_stored_string(param) { - var s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); + let s = Stdlib__Bytes.sub_string(string_buff.contents, 0, string_index.contents); string_buff.contents = initial_string_buffer; return s; } -var string_start_loc = { +let string_start_loc = { contents: none }; -var comment_start_loc = { +let comment_start_loc = { contents: /* [] */0 }; @@ -15015,7 +15015,7 @@ function in_comment(param) { return Caml_obj.caml_notequal(comment_start_loc.contents, /* [] */0); } -var is_in_string = { +let is_in_string = { contents: false }; @@ -15023,32 +15023,32 @@ function in_string(param) { return is_in_string.contents; } -var print_warnings = { +let print_warnings = { contents: true }; -var if_then_else = { +let if_then_else = { contents: /* Dir_out */2 }; -var sharp_look_ahead = { +let sharp_look_ahead = { contents: undefined }; function with_comment_buffer(comment, lexbuf) { - var start_loc = curr(lexbuf); + let start_loc = curr(lexbuf); comment_start_loc.contents = { hd: start_loc, tl: /* [] */0 }; reset_string_buffer(undefined); - var end_loc = Curry._1(comment, lexbuf); - var s = get_stored_string(undefined); + let end_loc = Curry._1(comment, lexbuf); + let s = get_stored_string(undefined); reset_string_buffer(undefined); - var loc_loc_start = start_loc.loc_start; - var loc_loc_end = end_loc.loc_end; - var loc_loc_ghost = start_loc.loc_ghost; - var loc = { + let loc_loc_start = start_loc.loc_start; + let loc_loc_end = end_loc.loc_end; + let loc_loc_ghost = start_loc.loc_ghost; + let loc = { loc_start: loc_loc_start, loc_end: loc_loc_end, loc_ghost: loc_loc_ghost @@ -15087,7 +15087,7 @@ function char_for_backslash(c) { } function char_for_decimal_code(lexbuf, i) { - var c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; + let c = (Math.imul(100, Stdlib__Lexing.lexeme_char(lexbuf, i) - 48 | 0) + Math.imul(10, Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0) - 48 | 0) | 0) + (Stdlib__Lexing.lexeme_char(lexbuf, i + 2 | 0) - 48 | 0) | 0; if (!(c < 0 || c > 255)) { return Stdlib__Char.chr(c); } @@ -15105,12 +15105,12 @@ function char_for_decimal_code(lexbuf, i) { } function char_for_hexadecimal_code(lexbuf, i) { - var d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); - var val1 = d1 >= 97 ? d1 - 87 | 0 : ( + let d1 = Stdlib__Lexing.lexeme_char(lexbuf, i); + let val1 = d1 >= 97 ? d1 - 87 | 0 : ( d1 >= 65 ? d1 - 55 | 0 : d1 - 48 | 0 ); - var d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); - var val2 = d2 >= 97 ? d2 - 87 | 0 : ( + let d2 = Stdlib__Lexing.lexeme_char(lexbuf, i + 1 | 0); + let val2 = d2 >= 97 ? d2 - 87 | 0 : ( d2 >= 65 ? d2 - 55 | 0 : d2 - 48 | 0 ); return Stdlib__Char.chr((val1 << 4) + val2 | 0); @@ -15140,13 +15140,13 @@ function cvt_nativeint_literal(s) { } function remove_underscores(s) { - var l = s.length; - var b = Caml_bytes.caml_create_bytes(l); - var _src = 0; - var _dst = 0; + let l = s.length; + let b = Caml_bytes.caml_create_bytes(l); + let _src = 0; + let _dst = 0; while(true) { - var dst = _dst; - var src = _src; + let dst = _dst; + let src = _src; if (src >= l) { if (dst >= l) { return s; @@ -15154,7 +15154,7 @@ function remove_underscores(s) { return Stdlib__Bytes.sub_string(b, 0, dst); } } - var c = Caml_string.get(s, src); + let c = Caml_string.get(s, src); if (c !== 95) { Caml_bytes.set(b, dst, c); _dst = dst + 1 | 0; @@ -15167,8 +15167,8 @@ function remove_underscores(s) { } function get_label_name(lexbuf) { - var s = Stdlib__Lexing.lexeme(lexbuf); - var name = Stdlib__String.sub(s, 1, s.length - 2 | 0); + let s = Stdlib__Lexing.lexeme(lexbuf); + let name = Stdlib__String.sub(s, 1, s.length - 2 | 0); if (Stdlib__Hashtbl.mem(keyword_table, name)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15183,8 +15183,8 @@ function get_label_name(lexbuf) { } function update_loc(lexbuf, file, line, absolute, chars) { - var pos = lexbuf.lex_curr_p; - var new_file = file !== undefined ? file : pos.pos_fname; + let pos = lexbuf.lex_curr_p; + let new_file = file !== undefined ? file : pos.pos_fname; lexbuf.lex_curr_p = { pos_fname: new_file, pos_lnum: absolute ? line : pos.pos_lnum + line | 0, @@ -15193,15 +15193,15 @@ function update_loc(lexbuf, file, line, absolute, chars) { }; } -var preprocessor$1 = { +let preprocessor$1 = { contents: undefined }; -var escaped_newlines = { +let escaped_newlines = { contents: false }; -var comment_list = { +let comment_list = { contents: /* [] */0 }; @@ -15436,7 +15436,7 @@ register_error_of_exn(function (param) { }); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xa4\xff\xa5\xff\xe0\0\x03\x01&\x01I\x01l\x01\x8f\x01\xbc\xff\xb2\x01\xd7\x01\xc4\xff[\0\xfc\x01\x1f\x02D\0G\0T\0B\x02\xd5\xff\xd7\xff\xda\xffe\x02\xc4\x02\xe7\x02Y\0\xff\0\x05\x03\xec\xffR\x03s\x03\xbc\x03\x8c\x04\\\x05,\x06\x0b\x07g\x077\b}\0\xfe\xff\x01\0\x05\0\xff\xff\x06\0\x07\0\x16\t4\t\x04\n\xfa\xff\xf9\xff\xd4\n\xa4\x0b\xf7\xff\xf6\xff\xed\xff\xee\xff\xef\xff]\0v\x02[\0n\0\xe7\x02\x07\x04\xd7\x04e\x02\xfe\x02v\0\xc2\xff\xeb\xffx\x05\x84\f`\0q\0\x0b\0\xea\xff\xe9\xff\xe5\xff\xe5\x04\x80\0s\0\xe8\xff\xe0\0u\0\xe7\xffw\x06\x93\0\xe6\xff\x92\0\xe1\xff\x94\0\xe0\xff\xd9\0\x84\f\xdf\xff\xab\f\xaf\b\xae\x06\xde\xff\f\0\x18\x01,\x01P\x01-\x01\xde\xff\r\0\xd9\f\0\r#\rI\r\xd2\xff\xce\xff\xcf\xff\xd0\xff\xcc\xffl\r\x9a\0\xb7\0\xc5\xff\xc6\xff\xc7\xff\xc7\0\xb6\xff\xb8\xff\xbf\xff\x8f\r\xbb\xff\xbd\xff\xb2\r\xd5\r\xf8\r\x1b\x0e\xeb\x05\xf3\xff\xf4\xff\x11\0\xf5\xff>\x02\xac\x07\xfd\xff\xdf\0\xf1\0\xff\xff\xfe\xff\xfc\xff\xc8\x07-\x0e\xfa\0\xfc\0\x12\0\xfb\xff\xfa\xff\xf9\xff\x80\t\x1e\x03\x03\x01\xf8\xff\\\x03\x04\x01\xf7\xffO\n\x05\x01\xf6\xff+\x01\xc7\x01\xf7\xff\xf8\xff\xf9\xff;\x01v\x0e\xff\xff\xfa\xff\x1f\x0b$\x04\xfd\xff&\x01E\x01^\x01\xfc\x04\xfc\xff\xef\x0b\xfb\xff_\x01\xb5\x01\xfc\xff\xee\x06\xfe\xff\xff\xffo\x01p\x01\xfd\xffJ\x07\x10\x01\x13\x012\x01?\x01\x1a\x01k\x01!\x01\x13\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xffX\0W\0T\0S\0L\0J\0\xff\xffA\0>\0\xff\xff7\x006\x004\x002\0.\0,\0O\0\xff\xff\xff\xff\xff\xff#\0\"\0)\0'\0&\0<\0\xff\xff\x0e\0\x0e\0\r\0\f\0\x0b\0\n\0\x07\0\x04\0\x03\0\x02\0\xff\xff[\0[\0\xff\xff\xff\xff\xff\xffR\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\x0e\0\x0e\0\x0e\0\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\0\x1a\0\x1a\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\0\xff\xff\x1c\0\xff\xff\x1d\0V\0\xff\xffY\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff$\0U\0P\0+\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\0F\0E\0\xff\xff\xff\xff\xff\xffH\0\xff\xff\xff\xff\xff\xff?\0\xff\xff\xff\xffQ\0K\0N\0M\0\xff\xff\xff\xff\xff\xff\f\0\xff\xff\f\0\f\0\xff\xff\f\0\f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\b\0\b\0\xff\xff\xff\xff\x05\0\x05\0\xff\xff\x01\0\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", lex_default: "\x01\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffH\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xffM\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xffd\0\xff\xff\0\0\xff\xffd\0e\0d\0g\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\x85\0\0\0\0\0\xff\xff\0\0\x93\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xa5\0\0\0\0\0\0\0\xff\xff\xab\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xb8\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xc2\0\xc5\0\xff\xff\xc5\0\xff\xff\xff\xff\0\0", @@ -15452,10 +15452,10 @@ var __ocaml_lex_tables = { function token(lexbuf) { lexbuf.lex_mem = Caml_array.make(8, -1); - var ___ocaml_lex_state = 0; + let ___ocaml_lex_state = 0; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : if (!escaped_newlines.contents) { @@ -15510,12 +15510,12 @@ function token(lexbuf) { _0: get_label_name(lexbuf) }; case 10 : - var s = Stdlib__Lexing.lexeme(lexbuf); + let s = Stdlib__Lexing.lexeme(lexbuf); try { return Stdlib__Hashtbl.find(keyword_table, s); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { TAG: /* LIDENT */11, @@ -15555,7 +15555,7 @@ function token(lexbuf) { }; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15581,7 +15581,7 @@ function token(lexbuf) { }; } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15602,7 +15602,7 @@ function token(lexbuf) { }; } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15623,7 +15623,7 @@ function token(lexbuf) { }; } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID === Stdlib.Failure) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15639,7 +15639,7 @@ function token(lexbuf) { case 19 : reset_string_buffer(undefined); is_in_string.contents = true; - var string_start = lexbuf.lex_start_p; + let string_start = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); string(lexbuf); is_in_string.contents = false; @@ -15653,10 +15653,10 @@ function token(lexbuf) { }; case 20 : reset_string_buffer(undefined); - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); is_in_string.contents = true; - var string_start$1 = lexbuf.lex_start_p; + let string_start$1 = lexbuf.lex_start_p; string_start_loc.contents = curr(lexbuf); __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); is_in_string.contents = false; @@ -15695,8 +15695,8 @@ function token(lexbuf) { _0: char_for_hexadecimal_code(lexbuf, 3) }; case 26 : - var l = Stdlib__Lexing.lexeme(lexbuf); - var esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); + let l = Stdlib__Lexing.lexeme(lexbuf); + let esc = Stdlib__String.sub(l, 1, l.length - 1 | 0); throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -15706,7 +15706,7 @@ function token(lexbuf) { _2: curr(lexbuf) }); case 27 : - var match = with_comment_buffer(comment, lexbuf); + let match = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -15715,14 +15715,14 @@ function token(lexbuf) { ] }; case 28 : - var match$1 = with_comment_buffer(comment, lexbuf); + let match$1 = with_comment_buffer(comment, lexbuf); return { TAG: /* DOCSTRING */19, _0: docstring(match$1[0], match$1[1]) }; case 29 : - var stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); - var match$2 = with_comment_buffer((function(stars){ + let stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); + let match$2 = with_comment_buffer((function(stars){ return function (lexbuf) { store_string("*" + stars); return __ocaml_lex_comment_rec(lexbuf, 132); @@ -15739,7 +15739,7 @@ function token(lexbuf) { if (print_warnings.contents) { prerr_warning(curr(lexbuf), /* Comment_start */0); } - var match$3 = with_comment_buffer(comment, lexbuf); + let match$3 = with_comment_buffer(comment, lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -15748,7 +15748,7 @@ function token(lexbuf) { ] }; case 31 : - var stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); + let stars$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos - 2 | 0); return { TAG: /* COMMENT */18, _0: [ @@ -15757,10 +15757,10 @@ function token(lexbuf) { ] }; case 32 : - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Comment_not_end */1); lexbuf.lex_curr_pos = lexbuf.lex_curr_pos - 1 | 0; - var curpos = lexbuf.lex_curr_p; + let curpos = lexbuf.lex_curr_p; lexbuf.lex_curr_p = { pos_fname: curpos.pos_fname, pos_lnum: curpos.pos_lnum, @@ -15769,8 +15769,8 @@ function token(lexbuf) { }; return /* STAR */86; case 33 : - var num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); - var name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); + let num = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); + let name = Stdlib__Lexing.sub_lexeme_opt(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); update_loc(lexbuf, name, Caml_format.caml_int_of_string(num), true, 0); return token(lexbuf); case 34 : @@ -15943,15 +15943,15 @@ function token(lexbuf) { function string(lexbuf) { lexbuf.lex_mem = Caml_array.make(2, -1); - var ___ocaml_lex_state = 164; + let ___ocaml_lex_state = 164; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.new_engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return ; case 1 : - var space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); + let space = Stdlib__Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); update_loc(lexbuf, undefined, 1, false, space.length); return string(lexbuf); case 2 : @@ -15967,7 +15967,7 @@ function string(lexbuf) { if (Caml_obj.caml_notequal(comment_start_loc.contents, /* [] */0)) { return string(lexbuf); } - var loc = curr(lexbuf); + let loc = curr(lexbuf); prerr_warning(loc, /* Illegal_backslash */7); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 0)); store_string_char(Stdlib__Lexing.lexeme_char(lexbuf, 1)); @@ -16003,8 +16003,8 @@ function comment(lexbuf) { function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : comment_start_loc.contents = { @@ -16015,7 +16015,7 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 1 : - var match = comment_start_loc.contents; + let match = comment_start_loc.contents; if (match) { if (match.tl) { comment_start_loc.contents = match.tl; @@ -16042,16 +16042,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { string(lexbuf); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$2) { - var match$1 = exn._1; + let match$1 = exn._1; if (typeof match$1 === "number") { if (match$1) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var match$2 = comment_start_loc.contents; + let match$2 = comment_start_loc.contents; if (match$2) { - var start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -16081,8 +16081,8 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 3 : - var delim = Stdlib__Lexing.lexeme(lexbuf); - var delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); + let delim = Stdlib__Lexing.lexeme(lexbuf); + let delim$1 = Stdlib__String.sub(delim, 1, delim.length - 2 | 0); string_start_loc.contents = curr(lexbuf); store_string(Stdlib__Lexing.lexeme(lexbuf)); is_in_string.contents = true; @@ -16090,16 +16090,16 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { __ocaml_lex_quoted_string_rec(delim$1, lexbuf, 183); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === $$Error$2) { - var match$3 = exn$1._1; + let match$3 = exn$1._1; if (typeof match$3 === "number") { if (match$3) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } - var match$4 = comment_start_loc.contents; + let match$4 = comment_start_loc.contents; if (match$4) { - var start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$1 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -16136,9 +16136,9 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { ___ocaml_lex_state = 132; continue ; case 10 : - var match$5 = comment_start_loc.contents; + let match$5 = comment_start_loc.contents; if (match$5) { - var start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); + let start$2 = Stdlib__List.hd(Stdlib__List.rev(comment_start_loc.contents)); comment_start_loc.contents = /* [] */0; throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -16181,8 +16181,8 @@ function __ocaml_lex_comment_rec(lexbuf, ___ocaml_lex_state) { function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : update_loc(lexbuf, undefined, 1, false, 0); @@ -16197,8 +16197,8 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { _2: string_start_loc.contents }); case 2 : - var edelim = Stdlib__Lexing.lexeme(lexbuf); - var edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); + let edelim = Stdlib__Lexing.lexeme(lexbuf); + let edelim$1 = Stdlib__String.sub(edelim, 1, edelim.length - 2 | 0); if (delim === edelim$1) { return ; } @@ -16218,10 +16218,10 @@ function __ocaml_lex_quoted_string_rec(delim, lexbuf, ___ocaml_lex_state) { } function skip_sharp_bang(lexbuf) { - var ___ocaml_lex_state = 192; + let ___ocaml_lex_state = 192; while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return update_loc(lexbuf, undefined, 3, false, 0); @@ -16238,12 +16238,12 @@ function skip_sharp_bang(lexbuf) { } function at_bol(lexbuf) { - var pos = lexbuf.lex_start_p; + let pos = lexbuf.lex_start_p; return pos.pos_cnum === pos.pos_bol; } function token_with_comments(lexbuf) { - var match = preprocessor$1.contents; + let match = preprocessor$1.contents; if (match !== undefined) { return Curry._2(match[1], token, lexbuf); } else { @@ -16252,8 +16252,8 @@ function token_with_comments(lexbuf) { } function interpret_directive(lexbuf, cont, look_ahead) { - var if_then_else$1 = if_then_else.contents; - var match = token_with_comments(lexbuf); + let if_then_else$1 = if_then_else.contents; + let match = token_with_comments(lexbuf); if (typeof match === "number") { switch (match) { case /* ELSE */23 : @@ -16281,9 +16281,9 @@ function interpret_directive(lexbuf, cont, look_ahead) { if_then_else.contents = /* Dir_if_true */0; return Curry._1(cont, lexbuf); } else { - var _param; + let _param; while(true) { - var token = token_with_comments(lexbuf); + let token = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -16292,7 +16292,7 @@ function interpret_directive(lexbuf, cont, look_ahead) { }); } if (Caml_obj.caml_equal(token, /* SHARP */84) && at_bol(lexbuf)) { - var token$1 = token_with_comments(lexbuf); + let token$1 = token_with_comments(lexbuf); if (typeof token$1 === "number") { if (token$1 === 24 || token$1 === 23) { if (token$1 >= 24) { @@ -16351,10 +16351,10 @@ function interpret_directive(lexbuf, cont, look_ahead) { if (if_then_else$1) { return Curry._1(look_ahead, match); } - var _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); + let _else_seen = Caml_obj.caml_equal(match, /* ELSE */23); while(true) { - var else_seen = _else_seen; - var token$2 = token_with_comments(lexbuf); + let else_seen = _else_seen; + let token$2 = token_with_comments(lexbuf); if (Caml_obj.caml_equal(token$2, /* EOF */25)) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -16363,7 +16363,7 @@ function interpret_directive(lexbuf, cont, look_ahead) { }); } if (Caml_obj.caml_equal(token$2, /* SHARP */84) && at_bol(lexbuf)) { - var token$3 = token_with_comments(lexbuf); + let token$3 = token_with_comments(lexbuf); if (typeof token$3 === "number") { if (token$3 === 24 || token$3 === 23) { if (token$3 >= 24) { @@ -16403,13 +16403,13 @@ function interpret_directive(lexbuf, cont, look_ahead) { } function token$1(lexbuf) { - var post_pos = lexbuf.lex_curr_p; - var attach = function (lines, docs, pre_pos) { + let post_pos = lexbuf.lex_curr_p; + let attach = function (lines, docs, pre_pos) { if (typeof docs === "number") { return ; } if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a)); return set_pre_extra_docstrings(pre_pos, Stdlib__List.rev(a)); @@ -16418,9 +16418,9 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, a); } } - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; if (lines >= 2) { set_post_docstrings(post_pos, Stdlib__List.rev(a$1)); set_post_extra_docstrings(post_pos, Stdlib__List.rev_append(f, Stdlib__List.rev(b))); @@ -16434,11 +16434,11 @@ function token$1(lexbuf) { return set_pre_docstrings(pre_pos, b); } }; - var loop = function (_lines, _docs, lexbuf) { + let loop = function (_lines, _docs, lexbuf) { while(true) { - var docs = _docs; - var lines = _lines; - var doc = token_with_comments(lexbuf); + let docs = _docs; + let lines = _lines; + let doc = token_with_comments(lexbuf); if (typeof doc === "number") { switch (doc) { case /* SHARP */84 : @@ -16454,7 +16454,7 @@ function token$1(lexbuf) { } break; case /* EOL */100 : - var lines$p = lines ? /* BlankLine */2 : /* NewLine */1; + let lines$p = lines ? /* BlankLine */2 : /* NewLine */1; _lines = lines$p; continue ; default: @@ -16463,18 +16463,18 @@ function token$1(lexbuf) { } else { switch (doc.TAG | 0) { case /* COMMENT */18 : - var match = doc._0; + let match = doc._0; add_comment([ match[0], match[1] ]); - var lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; + let lines$p$1 = lines >= 2 ? /* BlankLine */2 : /* NoLine */0; _lines = lines$p$1; continue ; case /* DOCSTRING */19 : - var doc$1 = doc._0; + let doc$1 = doc._0; add_docstring_comment(doc$1); - var docs$p; + let docs$p; if (typeof docs === "number") { docs$p = lines >= 2 ? ({ TAG: /* Before */1, @@ -16492,7 +16492,7 @@ function token$1(lexbuf) { } }); } else if (docs.TAG === /* After */0) { - var a = docs._0; + let a = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a, @@ -16509,9 +16509,9 @@ function token$1(lexbuf) { } }); } else { - var b = docs._2; - var f = docs._1; - var a$1 = docs._0; + let b = docs._2; + let f = docs._1; + let a$1 = docs._0; docs$p = lines >= 2 ? ({ TAG: /* Before */1, _0: a$1, @@ -16541,7 +16541,7 @@ function token$1(lexbuf) { return doc; }; }; - var token$2 = sharp_look_ahead.contents; + let token$2 = sharp_look_ahead.contents; if (token$2 !== undefined) { sharp_look_ahead.contents = undefined; return token$2; @@ -16556,7 +16556,7 @@ function init$2(param) { is_in_string.contents = false; comment_start_loc.contents = /* [] */0; comment_list.contents = /* [] */0; - var match = preprocessor$1.contents; + let match = preprocessor$1.contents; if (match !== undefined) { return Curry._1(match[0], undefined); } @@ -16565,7 +16565,7 @@ function init$2(param) { function filter_directive(pos, acc, lexbuf) { while(true) { - var match = token_with_comments(lexbuf); + let match = token_with_comments(lexbuf); if (typeof match === "number") { if (match === 25) { return { @@ -16580,7 +16580,7 @@ function filter_directive(pos, acc, lexbuf) { continue ; } if (at_bol(lexbuf)) { - var start_pos = lexbuf.lex_start_p.pos_cnum; + let start_pos = lexbuf.lex_start_p.pos_cnum; return interpret_directive(lexbuf, (function(start_pos){ return function (lexbuf) { return filter_directive(lexbuf.lex_curr_p.pos_cnum, { @@ -16613,7 +16613,7 @@ function set_preprocessor(init, preprocess) { ]; } -var Lexer = { +let Lexer = { init: init$2, token: token$1, skip_sharp_bang: skip_sharp_bang, @@ -16638,7 +16638,7 @@ var Lexer = { function skip_phrase(lexbuf) { while(true) { try { - var match = token$1(lexbuf); + let match = token$1(lexbuf); if (typeof match === "number" && !(match !== 25 && match !== 83)) { return ; } else { @@ -16646,9 +16646,9 @@ function skip_phrase(lexbuf) { } } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === $$Error$2) { - var tmp = exn._1; + let tmp = exn._1; if (typeof tmp === "number") { if (tmp === /* Unterminated_string */0) { continue ; @@ -16683,15 +16683,15 @@ function wrap(parsing_fun, lexbuf) { try { init$1(undefined); init$2(undefined); - var ast = Curry._2(parsing_fun, token$1, lexbuf); + let ast = Curry._2(parsing_fun, token$1, lexbuf); Stdlib__Parsing.clear_parser(undefined); warn_bad_docstrings(undefined); return ast; } catch (raw_err){ - var err = Caml_js_exceptions.internalToOCamlException(raw_err); + let err = Caml_js_exceptions.internalToOCamlException(raw_err); if (err.MEL_EXN_ID === $$Error$2) { - var tmp = err._1; + let tmp = err._1; if (typeof tmp === "number") { throw new Caml_js_exceptions.MelangeError(err.MEL_EXN_ID, err); } @@ -16716,7 +16716,7 @@ function wrap(parsing_fun, lexbuf) { } } - var loc = curr(lexbuf); + let loc = curr(lexbuf); if (input_name.contents === "//toplevel//") { maybe_skip_phrase(lexbuf); } @@ -16758,7 +16758,7 @@ function pattern(param) { return wrap(parse_pattern, param); } -var Parse = { +let Parse = { implementation: implementation$1, $$interface: $$interface$1, toplevel_phrase: toplevel_phrase$1, diff --git a/jscomp/test/dist/jscomp/test/parser_api_test.js b/jscomp/test/dist/jscomp/test/parser_api_test.js index ca0ddbaab6..dae9fd724e 100644 --- a/jscomp/test/dist/jscomp/test/parser_api_test.js +++ b/jscomp/test/dist/jscomp/test/parser_api_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Parser_api = require("./parser_api.js"); -var Stdlib__Lexing = require("melange/lexing.js"); +let Mt = require("./mt.js"); +let Parser_api = require("./parser_api.js"); +let Stdlib__Lexing = require("melange/lexing.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -17,188 +17,188 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var match = Parser_api.implementation(Stdlib__Lexing.from_string(undefined, "let v str = \n str \n |> Lexing.from_string \n |> Parse.implementation\n")); +let match = Parser_api.implementation(Stdlib__Lexing.from_string(undefined, "let v str = \n str \n |> Lexing.from_string \n |> Parse.implementation\n")); if (match) { - var match$1 = match.hd.pstr_desc; + let match$1 = match.hd.pstr_desc; if (match$1.TAG === /* Pstr_value */1 && !match$1._0) { - var match$2 = match$1._1; + let match$2 = match$1._1; if (match$2) { - var match$3 = match$2.hd; - var match$4 = match$3.pvb_pat; - var match$5 = match$4.ppat_desc; + let match$3 = match$2.hd; + let match$4 = match$3.pvb_pat; + let match$5 = match$4.ppat_desc; if (typeof match$5 === "number" || match$5.TAG !== /* Ppat_var */0) { eq("File \"jscomp/test/parser_api_test.ml\", line 211, characters 12-19", true, false); } else { - var match$6 = match$5._0; + let match$6 = match$5._0; if (match$6.txt === "v") { - var match$7 = match$6.loc; - var match$8 = match$7.loc_start; + let match$7 = match$6.loc; + let match$8 = match$7.loc_start; if (match$8.pos_fname === "" && !(match$8.pos_lnum !== 1 || match$8.pos_bol !== 0 || match$8.pos_cnum !== 4)) { - var match$9 = match$7.loc_end; + let match$9 = match$7.loc_end; if (match$9.pos_fname === "" && !(match$9.pos_lnum !== 1 || match$9.pos_bol !== 0 || match$9.pos_cnum !== 5 || match$7.loc_ghost)) { - var match$10 = match$4.ppat_loc; - var match$11 = match$10.loc_start; + let match$10 = match$4.ppat_loc; + let match$11 = match$10.loc_start; if (match$11.pos_fname === "" && !(match$11.pos_lnum !== 1 || match$11.pos_bol !== 0 || match$11.pos_cnum !== 4)) { - var match$12 = match$10.loc_end; + let match$12 = match$10.loc_end; if (match$12.pos_fname === "" && !(match$12.pos_lnum !== 1 || match$12.pos_bol !== 0 || match$12.pos_cnum !== 5 || match$10.loc_ghost || match$4.ppat_attributes)) { - var match$13 = match$3.pvb_expr; - var match$14 = match$13.pexp_desc; + let match$13 = match$3.pvb_expr; + let match$14 = match$13.pexp_desc; if (match$14.TAG === /* Pexp_fun */4 && match$14._0 === "" && match$14._1 === undefined) { - var match$15 = match$14._2; - var match$16 = match$15.ppat_desc; + let match$15 = match$14._2; + let match$16 = match$15.ppat_desc; if (typeof match$16 === "number" || match$16.TAG !== /* Ppat_var */0) { eq("File \"jscomp/test/parser_api_test.ml\", line 211, characters 12-19", true, false); } else { - var match$17 = match$16._0; + let match$17 = match$16._0; if (match$17.txt === "str") { - var match$18 = match$17.loc; - var match$19 = match$18.loc_start; + let match$18 = match$17.loc; + let match$19 = match$18.loc_start; if (match$19.pos_fname === "" && !(match$19.pos_lnum !== 1 || match$19.pos_bol !== 0 || match$19.pos_cnum !== 6)) { - var match$20 = match$18.loc_end; + let match$20 = match$18.loc_end; if (match$20.pos_fname === "" && !(match$20.pos_lnum !== 1 || match$20.pos_bol !== 0 || match$20.pos_cnum !== 9 || match$18.loc_ghost)) { - var match$21 = match$15.ppat_loc; - var match$22 = match$21.loc_start; + let match$21 = match$15.ppat_loc; + let match$22 = match$21.loc_start; if (match$22.pos_fname === "" && !(match$22.pos_lnum !== 1 || match$22.pos_bol !== 0 || match$22.pos_cnum !== 6)) { - var match$23 = match$21.loc_end; + let match$23 = match$21.loc_end; if (match$23.pos_fname === "" && !(match$23.pos_lnum !== 1 || match$23.pos_bol !== 0 || match$23.pos_cnum !== 9 || match$21.loc_ghost || match$15.ppat_attributes)) { - var match$24 = match$14._3; - var match$25 = match$24.pexp_desc; + let match$24 = match$14._3; + let match$25 = match$24.pexp_desc; if (match$25.TAG === /* Pexp_apply */5) { - var match$26 = match$25._0; - var match$27 = match$26.pexp_desc; + let match$26 = match$25._0; + let match$27 = match$26.pexp_desc; if (match$27.TAG === /* Pexp_ident */0) { - var match$28 = match$27._0; - var match$29 = match$28.txt; + let match$28 = match$27._0; + let match$29 = match$28.txt; switch (match$29.TAG | 0) { case /* Lident */0 : if (match$29._0 === "|>") { - var match$30 = match$28.loc; - var match$31 = match$30.loc_start; + let match$30 = match$28.loc; + let match$31 = match$30.loc_start; if (match$31.pos_fname === "" && !(match$31.pos_lnum !== 4 || match$31.pos_bol !== 46 || match$31.pos_cnum !== 48)) { - var match$32 = match$30.loc_end; + let match$32 = match$30.loc_end; if (match$32.pos_fname === "" && !(match$32.pos_lnum !== 4 || match$32.pos_bol !== 46 || match$32.pos_cnum !== 50 || match$30.loc_ghost)) { - var match$33 = match$26.pexp_loc; - var match$34 = match$33.loc_start; + let match$33 = match$26.pexp_loc; + let match$34 = match$33.loc_start; if (match$34.pos_fname === "" && !(match$34.pos_lnum !== 4 || match$34.pos_bol !== 46 || match$34.pos_cnum !== 48)) { - var match$35 = match$33.loc_end; + let match$35 = match$33.loc_end; if (match$35.pos_fname === "" && !(match$35.pos_lnum !== 4 || match$35.pos_bol !== 46 || match$35.pos_cnum !== 50 || match$33.loc_ghost || match$26.pexp_attributes)) { - var match$36 = match$25._1; + let match$36 = match$25._1; if (match$36) { - var match$37 = match$36.hd; + let match$37 = match$36.hd; if (match$37[0] === "") { - var match$38 = match$37[1]; - var match$39 = match$38.pexp_desc; + let match$38 = match$37[1]; + let match$39 = match$38.pexp_desc; if (match$39.TAG === /* Pexp_apply */5) { - var match$40 = match$39._0; - var match$41 = match$40.pexp_desc; + let match$40 = match$39._0; + let match$41 = match$40.pexp_desc; if (match$41.TAG === /* Pexp_ident */0) { - var match$42 = match$41._0; - var match$43 = match$42.txt; + let match$42 = match$41._0; + let match$43 = match$42.txt; switch (match$43.TAG | 0) { case /* Lident */0 : if (match$43._0 === "|>") { - var match$44 = match$42.loc; - var match$45 = match$44.loc_start; + let match$44 = match$42.loc; + let match$45 = match$44.loc_start; if (match$45.pos_fname === "" && !(match$45.pos_lnum !== 3 || match$45.pos_bol !== 21 || match$45.pos_cnum !== 23)) { - var match$46 = match$44.loc_end; + let match$46 = match$44.loc_end; if (match$46.pos_fname === "" && !(match$46.pos_lnum !== 3 || match$46.pos_bol !== 21 || match$46.pos_cnum !== 25 || match$44.loc_ghost)) { - var match$47 = match$40.pexp_loc; - var match$48 = match$47.loc_start; + let match$47 = match$40.pexp_loc; + let match$48 = match$47.loc_start; if (match$48.pos_fname === "" && !(match$48.pos_lnum !== 3 || match$48.pos_bol !== 21 || match$48.pos_cnum !== 23)) { - var match$49 = match$47.loc_end; + let match$49 = match$47.loc_end; if (match$49.pos_fname === "" && !(match$49.pos_lnum !== 3 || match$49.pos_bol !== 21 || match$49.pos_cnum !== 25 || match$47.loc_ghost || match$40.pexp_attributes)) { - var match$50 = match$39._1; + let match$50 = match$39._1; if (match$50) { - var match$51 = match$50.hd; + let match$51 = match$50.hd; if (match$51[0] === "") { - var match$52 = match$51[1]; - var match$53 = match$52.pexp_desc; + let match$52 = match$51[1]; + let match$53 = match$52.pexp_desc; if (match$53.TAG === /* Pexp_ident */0) { - var match$54 = match$53._0; - var match$55 = match$54.txt; + let match$54 = match$53._0; + let match$55 = match$54.txt; switch (match$55.TAG | 0) { case /* Lident */0 : if (match$55._0 === "str") { - var match$56 = match$54.loc; - var match$57 = match$56.loc_start; + let match$56 = match$54.loc; + let match$57 = match$56.loc_start; if (match$57.pos_fname === "" && !(match$57.pos_lnum !== 2 || match$57.pos_bol !== 13 || match$57.pos_cnum !== 15)) { - var match$58 = match$56.loc_end; + let match$58 = match$56.loc_end; if (match$58.pos_fname === "" && !(match$58.pos_lnum !== 2 || match$58.pos_bol !== 13 || match$58.pos_cnum !== 18 || match$56.loc_ghost)) { - var match$59 = match$52.pexp_loc; - var match$60 = match$59.loc_start; + let match$59 = match$52.pexp_loc; + let match$60 = match$59.loc_start; if (match$60.pos_fname === "" && !(match$60.pos_lnum !== 2 || match$60.pos_bol !== 13 || match$60.pos_cnum !== 15)) { - var match$61 = match$59.loc_end; + let match$61 = match$59.loc_end; if (match$61.pos_fname === "" && !(match$61.pos_lnum !== 2 || match$61.pos_bol !== 13 || match$61.pos_cnum !== 18 || match$59.loc_ghost || match$52.pexp_attributes)) { - var match$62 = match$50.tl; + let match$62 = match$50.tl; if (match$62) { - var match$63 = match$62.hd; + let match$63 = match$62.hd; if (match$63[0] === "") { - var match$64 = match$63[1]; - var match$65 = match$64.pexp_desc; + let match$64 = match$63[1]; + let match$65 = match$64.pexp_desc; if (match$65.TAG === /* Pexp_ident */0) { - var match$66 = match$65._0; - var match$67 = match$66.txt; + let match$66 = match$65._0; + let match$67 = match$66.txt; switch (match$67.TAG | 0) { case /* Ldot */1 : - var match$68 = match$67._0; + let match$68 = match$67._0; switch (match$68.TAG | 0) { case /* Lident */0 : if (match$68._0 === "Lexing" && match$67._1 === "from_string") { - var match$69 = match$66.loc; - var match$70 = match$69.loc_start; + let match$69 = match$66.loc; + let match$70 = match$69.loc_start; if (match$70.pos_fname === "" && !(match$70.pos_lnum !== 3 || match$70.pos_bol !== 21 || match$70.pos_cnum !== 26)) { - var match$71 = match$69.loc_end; + let match$71 = match$69.loc_end; if (match$71.pos_fname === "" && !(match$71.pos_lnum !== 3 || match$71.pos_bol !== 21 || match$71.pos_cnum !== 44 || match$69.loc_ghost)) { - var match$72 = match$64.pexp_loc; - var match$73 = match$72.loc_start; + let match$72 = match$64.pexp_loc; + let match$73 = match$72.loc_start; if (match$73.pos_fname === "" && !(match$73.pos_lnum !== 3 || match$73.pos_bol !== 21 || match$73.pos_cnum !== 26)) { - var match$74 = match$72.loc_end; + let match$74 = match$72.loc_end; if (match$74.pos_fname === "" && !(match$74.pos_lnum !== 3 || match$74.pos_bol !== 21 || match$74.pos_cnum !== 44 || match$72.loc_ghost || match$64.pexp_attributes || match$62.tl)) { - var match$75 = match$38.pexp_loc; - var match$76 = match$75.loc_start; + let match$75 = match$38.pexp_loc; + let match$76 = match$75.loc_start; if (match$76.pos_fname === "" && !(match$76.pos_lnum !== 2 || match$76.pos_bol !== 13 || match$76.pos_cnum !== 15)) { - var match$77 = match$75.loc_end; + let match$77 = match$75.loc_end; if (match$77.pos_fname === "" && !(match$77.pos_lnum !== 3 || match$77.pos_bol !== 21 || match$77.pos_cnum !== 44 || match$75.loc_ghost || match$38.pexp_attributes)) { - var match$78 = match$36.tl; + let match$78 = match$36.tl; if (match$78) { - var match$79 = match$78.hd; + let match$79 = match$78.hd; if (match$79[0] === "") { - var match$80 = match$79[1]; - var match$81 = match$80.pexp_desc; + let match$80 = match$79[1]; + let match$81 = match$80.pexp_desc; if (match$81.TAG === /* Pexp_ident */0) { - var match$82 = match$81._0; - var match$83 = match$82.txt; + let match$82 = match$81._0; + let match$83 = match$82.txt; switch (match$83.TAG | 0) { case /* Ldot */1 : - var match$84 = match$83._0; + let match$84 = match$83._0; switch (match$84.TAG | 0) { case /* Lident */0 : if (match$84._0 === "Parse" && match$83._1 === "implementation") { - var match$85 = match$82.loc; - var match$86 = match$85.loc_start; + let match$85 = match$82.loc; + let match$86 = match$85.loc_start; if (match$86.pos_fname === "" && !(match$86.pos_lnum !== 4 || match$86.pos_bol !== 46 || match$86.pos_cnum !== 51)) { - var match$87 = match$85.loc_end; + let match$87 = match$85.loc_end; if (match$87.pos_fname === "" && !(match$87.pos_lnum !== 4 || match$87.pos_bol !== 46 || match$87.pos_cnum !== 71 || match$85.loc_ghost)) { - var match$88 = match$80.pexp_loc; - var match$89 = match$88.loc_start; + let match$88 = match$80.pexp_loc; + let match$89 = match$88.loc_start; if (match$89.pos_fname === "" && !(match$89.pos_lnum !== 4 || match$89.pos_bol !== 46 || match$89.pos_cnum !== 51)) { - var match$90 = match$88.loc_end; + let match$90 = match$88.loc_end; if (match$90.pos_fname === "" && !(match$90.pos_lnum !== 4 || match$90.pos_bol !== 46 || match$90.pos_cnum !== 71 || match$88.loc_ghost || match$80.pexp_attributes || match$78.tl)) { - var match$91 = match$24.pexp_loc; - var match$92 = match$91.loc_start; + let match$91 = match$24.pexp_loc; + let match$92 = match$91.loc_start; if (match$92.pos_fname === "" && !(match$92.pos_lnum !== 2 || match$92.pos_bol !== 13 || match$92.pos_cnum !== 15)) { - var match$93 = match$91.loc_end; + let match$93 = match$91.loc_end; if (match$93.pos_fname === "" && !(match$93.pos_lnum !== 4 || match$93.pos_bol !== 46 || match$93.pos_cnum !== 71 || match$91.loc_ghost || match$24.pexp_attributes)) { - var match$94 = match$13.pexp_loc; - var match$95 = match$94.loc_start; + let match$94 = match$13.pexp_loc; + let match$95 = match$94.loc_start; if (match$95.pos_fname === "" && !(match$95.pos_lnum !== 1 || match$95.pos_bol !== 0 || match$95.pos_cnum !== 6)) { - var match$96 = match$94.loc_end; + let match$96 = match$94.loc_end; if (match$96.pos_fname === "" && !(match$96.pos_lnum !== 4 || match$96.pos_bol !== 46 || match$96.pos_cnum !== 71 || !(match$94.loc_ghost && !(match$13.pexp_attributes || match$3.pvb_attributes)))) { - var match$97 = match$3.pvb_loc; - var match$98 = match$97.loc_start; + let match$97 = match$3.pvb_loc; + let match$98 = match$97.loc_start; if (match$98.pos_fname === "" && !(match$98.pos_lnum !== 1 || match$98.pos_bol !== 0 || match$98.pos_cnum !== 0)) { - var match$99 = match$97.loc_end; + let match$99 = match$97.loc_end; if (match$99.pos_fname === "" && !(match$99.pos_lnum !== 4 || match$99.pos_bol !== 46 || match$99.pos_cnum !== 71 || match$97.loc_ghost || match$2.tl)) { eq("File \"jscomp/test/parser_api_test.ml\", line 210, characters 10-17", true, true); } else { @@ -441,9 +441,9 @@ if (match) { Mt.from_pair_suites("Parser_api_test", suites.contents); -var lex = Parser_api.from_string; +let lex = Parser_api.from_string; -var parse = Parser_api.implementation; +let parse = Parser_api.implementation; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/pipe_syntax.js b/jscomp/test/dist/jscomp/test/pipe_syntax.js index be8ba4b3f9..377814f149 100644 --- a/jscomp/test/dist/jscomp/test/pipe_syntax.js +++ b/jscomp/test/dist/jscomp/test/pipe_syntax.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); function t0(x, f) { return Curry._1(f, Curry._1(f, Curry._1(f, x))); @@ -29,7 +29,7 @@ function f(a, b, c) { } function f1(a, b, c, d) { - var __ocaml_internal_obj = Curry._1(a, b); + let __ocaml_internal_obj = Curry._1(a, b); return [ Curry._1(c, __ocaml_internal_obj), Curry._1(d, __ocaml_internal_obj) @@ -37,17 +37,17 @@ function f1(a, b, c, d) { } function f2(a, b, c, d) { - var __ocaml_internal_obj = Curry._1(a, b); - var u = Curry._1(c, __ocaml_internal_obj); - var v = Curry._1(d, __ocaml_internal_obj); + let __ocaml_internal_obj = Curry._1(a, b); + let u = Curry._1(c, __ocaml_internal_obj); + let v = Curry._1(d, __ocaml_internal_obj); return u + v | 0; } function f3(a, b, c, d, e) { - var __ocaml_internal_obj = Curry._1(a, b); - var u = Curry._2(c, __ocaml_internal_obj, d); - var v = Curry._3(d, __ocaml_internal_obj, 1, 2); - var h = Curry._1(e, __ocaml_internal_obj); + let __ocaml_internal_obj = Curry._1(a, b); + let u = Curry._2(c, __ocaml_internal_obj, d); + let v = Curry._3(d, __ocaml_internal_obj, 1, 2); + let h = Curry._1(e, __ocaml_internal_obj); return (u + v | 0) + h | 0; } @@ -59,9 +59,9 @@ function f4(a, b, c) { } function f5(a, b, c, d) { - var v0 = Curry._3(b, a, c, c); - var v1 = Curry._3(b, a, c, c); - var v2 = Curry._3(b, a, d, d); + let v0 = Curry._3(b, a, c, c); + let v1 = Curry._3(b, a, c, c); + let v2 = Curry._3(b, a, d, d); return (v0 + v1 | 0) + v2 | 0; } @@ -87,7 +87,7 @@ function hi(x) { })); } -var with_poly = { +let with_poly = { NAME: "Foo", VAL: 1 }; diff --git a/jscomp/test/dist/jscomp/test/poly_empty_array.js b/jscomp/test/dist/jscomp/test/poly_empty_array.js index 38c4df3b45..4344905467 100644 --- a/jscomp/test/dist/jscomp/test/poly_empty_array.js +++ b/jscomp/test/dist/jscomp/test/poly_empty_array.js @@ -2,7 +2,7 @@ 'use strict'; -var a = []; +let a = []; exports.a = a; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js b/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js index 397ff81bd0..3fe3e56ff1 100644 --- a/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js +++ b/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,12 +28,12 @@ function eq(loc, x, y) { }; } -var f = ((a) => typeof a +let f = ((a) => typeof a ); -var a = f(3); +let a = f(3); -var b = f("3"); +let b = f("3"); eq("File \"jscomp/test/polymorphic_raw_test.ml\", line 22, characters 6-13", a, "number"); diff --git a/jscomp/test/dist/jscomp/test/polymorphism_test.js b/jscomp/test/dist/jscomp/test/polymorphism_test.js index f5a0af33aa..0aed8403b4 100644 --- a/jscomp/test/dist/jscomp/test/polymorphism_test.js +++ b/jscomp/test/dist/jscomp/test/polymorphism_test.js @@ -6,7 +6,7 @@ function map(f, param) { if (!param) { return /* [] */0; } - var r = f(param.hd); + let r = f(param.hd); return { hd: r, tl: map(f, param.tl) diff --git a/jscomp/test/dist/jscomp/test/polyvar_convert.js b/jscomp/test/dist/jscomp/test/polyvar_convert.js index 7d61e21ad1..ccfd330f2c 100644 --- a/jscomp/test/dist/jscomp/test/polyvar_convert.js +++ b/jscomp/test/dist/jscomp/test/polyvar_convert.js @@ -2,9 +2,9 @@ 'use strict'; -var revData = {"x":"a","b":"b"}; +let revData = {"x":"a","b":"b"}; -var data = {"a":"x","b":"b"}; +let data = {"a":"x","b":"b"}; function tToJs(x) { return data[x]; diff --git a/jscomp/test/dist/jscomp/test/polyvar_test.js b/jscomp/test/dist/jscomp/test/polyvar_test.js index 5be22d9470..8e259bfe92 100644 --- a/jscomp/test/dist/jscomp/test/polyvar_test.js +++ b/jscomp/test/dist/jscomp/test/polyvar_test.js @@ -2,7 +2,7 @@ 'use strict'; -var ff = "B"; +let ff = "B"; console.log([ "A", diff --git a/jscomp/test/dist/jscomp/test/ppx_apply_test.js b/jscomp/test/dist/jscomp/test/ppx_apply_test.js index 04694dcd3f..463545d9a0 100644 --- a/jscomp/test/dist/jscomp/test/ppx_apply_test.js +++ b/jscomp/test/dist/jscomp/test/ppx_apply_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -28,7 +28,7 @@ function eq(loc, x, y) { }; } -var u = 3; +let u = 3; function nullary() { return 3; @@ -38,7 +38,7 @@ function unary(a) { return a + 3 | 0; } -var xx = unary(3); +let xx = unary(3); eq("File \"jscomp/test/ppx_apply_test.ml\", line 17, characters 5-12", u, 3); diff --git a/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js b/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js index 85b8acc874..86161d4dd4 100644 --- a/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js +++ b/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -30,11 +30,11 @@ function eq(loc, param) { }; } -var v5 = { +let v5 = { x: 3, y: 3, setY: (function (v) { - var self = this ; + let self = this ; self.y = 2; return [ self.y, @@ -42,11 +42,11 @@ var v5 = { ]; }), say: (function () { - var self = this ; + let self = this ; return self.x + self.y | 0; }), hihi: (function (u) { - var self = this ; + let self = this ; return self.x + self.say() | 0; }), bark: (function () { @@ -57,28 +57,28 @@ var v5 = { }) }; -var v = { +let v = { x: 3, y: 0, reset: (function () { - var self = this ; + let self = this ; self.y = 0; }), incr: (function () { - var self = this ; + let self = this ; self.y = self.y + 1 | 0; }), getY: (function () { - var self = this ; + let self = this ; return self.y; }), say: (function () { - var self = this ; + let self = this ; return self.x + self.y | 0; }) }; -var u = { +let u = { incr: (function () { console.log("hey"); }), @@ -90,42 +90,42 @@ var u = { }) }; -var test_type_1 = { +let test_type_1 = { hd: v, tl: /* [] */0 }; -var test_type = { +let test_type = { hd: u, tl: test_type_1 }; -var z = { +let z = { x: { contents: 3 }, setX: (function (x) { - var self = this ; + let self = this ; self.x.contents = x; }), getX: (function () { - var self = this ; + let self = this ; return self.x.contents; }) }; -var eventObj = { +let eventObj = { events: [], empty: (function () { - var self = this ; + let self = this ; self.events.splice(0); }), push: (function (a) { - var self = this ; + let self = this ; self.events.push(a); }), needRebuild: (function () { - var self = this ; + let self = this ; return self.events.length !== 0; }) }; @@ -134,24 +134,24 @@ function test__(x) { eventObj.push(x); } -var zz = { +let zz = { x: 3, setX: (function (x) { - var self = this ; + let self = this ; self.x = x; }), getX: (function () { - var self = this ; + let self = this ; return self.x; }) }; -var test_type2_1 = { +let test_type2_1 = { hd: zz, tl: /* [] */0 }; -var test_type2 = { +let test_type2 = { hd: z, tl: test_type2_1 }; @@ -161,15 +161,15 @@ eq("File \"jscomp/test/ppx_this_obj_field.ml\", line 94, characters 5-12", [ v5.say() ]); -var a = v.say(); +let a = v.say(); v.incr(); -var b = v.say(); +let b = v.say(); v.incr(); -var c = v.say(); +let c = v.say(); v.incr(); @@ -186,11 +186,11 @@ eq("File \"jscomp/test/ppx_this_obj_field.ml\", line 101, characters 5-12", [ ] ]); -var aa = z.getX(); +let aa = z.getX(); z.setX(32); -var bb = z.getX(); +let bb = z.getX(); eq("File \"jscomp/test/ppx_this_obj_field.ml\", line 105, characters 5-12", [ [ diff --git a/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js b/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js index 4e18c314cd..47193cc032 100644 --- a/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js +++ b/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -30,27 +30,27 @@ function eq(loc, param) { }; } -var v = { +let v = { x: (function () { return 3; }), say: (function (x) { - var self = this ; + let self = this ; return x * self.x(); }), hi: (function (x, y) { - var self = this ; + let self = this ; return self.say(x) + y; }) }; -var v2 = { +let v2 = { hi: (function (x, y) { - var self = this ; + let self = this ; return self.say(x) + y; }), say: (function (x) { - var self = this ; + let self = this ; return x * self.x(); }), x: (function () { @@ -58,16 +58,16 @@ var v2 = { }) }; -var v3 = { +let v3 = { hi: (function (x, y) { - var self = this ; - var u = { + let self = this ; + let u = { x: x }; return self.say(u.x) + y + x; }), say: (function (x) { - var self = this ; + let self = this ; return x * self.x(); }), x: (function () { @@ -75,7 +75,7 @@ var v3 = { }) }; -var v4 = { +let v4 = { hi: (function (x, y) { return x + y; }), @@ -87,7 +87,7 @@ var v4 = { }) }; -var collection = [ +let collection = [ v, v2, v3, diff --git a/jscomp/test/dist/jscomp/test/pq_test.js b/jscomp/test/dist/jscomp/test/pq_test.js index 91325ba920..fb8584b402 100644 --- a/jscomp/test/dist/jscomp/test/pq_test.js +++ b/jscomp/test/dist/jscomp/test/pq_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function insert(queue, prio, elt) { if (!queue) { @@ -13,10 +13,10 @@ function insert(queue, prio, elt) { _3: /* Empty */0 }; } - var right = queue._3; - var left = queue._2; - var e = queue._1; - var p = queue._0; + let right = queue._3; + let left = queue._2; + let e = queue._1; + let p = queue._0; if (prio <= p) { return /* Node */{ _0: prio, @@ -34,20 +34,20 @@ function insert(queue, prio, elt) { } } -var Queue_is_empty = /* @__PURE__ */Caml_exceptions.create("Pq_test.PrioQueue.Queue_is_empty"); +let Queue_is_empty = /* @__PURE__ */Caml_exceptions.create("Pq_test.PrioQueue.Queue_is_empty"); function remove_top(param) { if (param) { - var left = param._2; + let left = param._2; if (!param._3) { return left; } if (!left) { return param._3; } - var right = param._3; - var rprio = right._0; - var lprio = left._0; + let right = param._3; + let rprio = right._0; + let lprio = left._0; if (lprio <= rprio) { return /* Node */{ _0: lprio, @@ -82,7 +82,7 @@ function extract(queue) { }); } -var PrioQueue = { +let PrioQueue = { empty: /* Empty */0, insert: insert, Queue_is_empty: Queue_is_empty, diff --git a/jscomp/test/dist/jscomp/test/pr6726.js b/jscomp/test/dist/jscomp/test/pr6726.js index 2e3af3c0d3..a554d4085c 100644 --- a/jscomp/test/dist/jscomp/test/pr6726.js +++ b/jscomp/test/dist/jscomp/test/pr6726.js @@ -6,21 +6,21 @@ function get_uint8(str, off) { return 33; } -var BigEndian = { +let BigEndian = { get_uint8: get_uint8 }; -var ExtUnixAll = { +let ExtUnixAll = { BigEndian: BigEndian }; -var ExtUnix = {}; +let ExtUnix = {}; function test_endian_string(x) { return 33; } -var Test = { +let Test = { test_endian_string: test_endian_string, v: 33 }; diff --git a/jscomp/test/dist/jscomp/test/pr_regression_test.js b/jscomp/test/dist/jscomp/test/pr_regression_test.js index 6a59d54157..e3ac94d3b8 100644 --- a/jscomp/test/dist/jscomp/test/pr_regression_test.js +++ b/jscomp/test/dist/jscomp/test/pr_regression_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var v = { +let v = { contents: 3 }; function f(h) { v.contents = v.contents + 1 | 0; - var partial_arg = 3; + let partial_arg = 3; return function (param) { return Curry._2(h, partial_arg, param); }; @@ -24,15 +24,15 @@ f(function (prim0, prim1) { return prim0 + prim1 | 0; }); -var a = v.contents; +let a = v.contents; -var v$1 = { +let v$1 = { contents: 3 }; function f$1(h) { v$1.contents = v$1.contents + 1 | 0; - var partial_arg = 3; + let partial_arg = 3; return function (param) { return Curry._2(h, partial_arg, param); }; @@ -46,9 +46,9 @@ f$1(function (prim0, prim1) { return prim0 + prim1 | 0; }); -var b = v$1.contents; +let b = v$1.contents; -var v$2 = { +let v$2 = { contents: 3 }; @@ -64,15 +64,15 @@ f$2(function (prim0, prim1) { return prim0 + prim1 | 0; }); -var c = v$2.contents; +let c = v$2.contents; -var v$3 = { +let v$3 = { contents: 3 }; function f$3(h, g) { v$3.contents = v$3.contents + 1 | 0; - var partial_arg = 9; + let partial_arg = 9; return function (param) { return Curry._2(h, partial_arg, param); }; @@ -86,7 +86,7 @@ f$3((function (prim0, prim1) { return prim0 + prim1 | 0; }), 3); -var d = v$3.contents; +let d = v$3.contents; Mt.from_pair_suites("Pr_regression_test", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/preamble_test.js b/jscomp/test/dist/jscomp/test/preamble_test.js index 620b1cddf9..dfd3d69147 100644 --- a/jscomp/test/dist/jscomp/test/preamble_test.js +++ b/jscomp/test/dist/jscomp/test/preamble_test.js @@ -3,7 +3,7 @@ 'use strict'; -var x = 1; +let x = 1; exports.x = x; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/prepend_data_ffi.js b/jscomp/test/dist/jscomp/test/prepend_data_ffi.js index d6feeeb121..2adcc572e0 100644 --- a/jscomp/test/dist/jscomp/test/prepend_data_ffi.js +++ b/jscomp/test/dist/jscomp/test/prepend_data_ffi.js @@ -2,12 +2,12 @@ 'use strict'; -var v1 = { +let v1 = { stdio: "inherit", v: 3 }; -var v2 = { +let v2 = { stdio: 1, v: 2 }; @@ -56,7 +56,7 @@ function register(p) { })); } -var config = { +let config = { stdio: "inherit", cwd: "." }; diff --git a/jscomp/test/dist/jscomp/test/print_alpha_test.js b/jscomp/test/dist/jscomp/test/print_alpha_test.js index ca86a8b234..174822f4cf 100644 --- a/jscomp/test/dist/jscomp/test/print_alpha_test.js +++ b/jscomp/test/dist/jscomp/test/print_alpha_test.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); function f(h, param) { console.log(3); diff --git a/jscomp/test/dist/jscomp/test/printf_sim.js b/jscomp/test/dist/jscomp/test/printf_sim.js index 4d34601856..41cee808bc 100644 --- a/jscomp/test/dist/jscomp/test/printf_sim.js +++ b/jscomp/test/dist/jscomp/test/printf_sim.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Printf = require("melange/printf.js"); Curry._1(Stdlib__Printf.printf(/* Format */{ _0: { diff --git a/jscomp/test/dist/jscomp/test/printf_test.js b/jscomp/test/dist/jscomp/test/printf_test.js index e9cb78d251..c64dab9d57 100644 --- a/jscomp/test/dist/jscomp/test/printf_test.js +++ b/jscomp/test/dist/jscomp/test/printf_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__Printf = require("melange/printf.js"); function print_pair(fmt, param) { Curry._2(Stdlib__Format.fprintf(fmt)(/* Format */{ @@ -37,7 +37,7 @@ function print_pair(fmt, param) { }), param[0], param[1]); } -var suites_0 = [ +let suites_0 = [ "sprintf_simple", (function (param) { return { @@ -61,7 +61,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "print_asprintf", (function (param) { @@ -103,12 +103,12 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; -var v = Stdlib__Format.asprintf(/* Format */{ +let v = Stdlib__Format.asprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "xx", diff --git a/jscomp/test/dist/jscomp/test/promise.js b/jscomp/test/dist/jscomp/test/promise.js index bb2bbd17a8..dff1526d5b 100644 --- a/jscomp/test/dist/jscomp/test/promise.js +++ b/jscomp/test/dist/jscomp/test/promise.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var SysBluebird = require("sys-bluebird"); +let SysBluebird = require("sys-bluebird"); function f(p) { return p.catch(3); } -var p = new SysBluebird.Promise(); +let p = new SysBluebird.Promise(); p.then(function (x) { return x + 3 | 0; @@ -15,16 +15,16 @@ p.then(function (x) { return reason; }); -var u = { +let u = { then: 3, catch: 32 }; -var uu = { +let uu = { "'x": 3 }; -var hh = uu["'x"]; +let hh = uu["'x"]; exports.f = f; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/promise_catch_test.js b/jscomp/test/dist/jscomp/test/promise_catch_test.js index e5f1055ede..1db6571be4 100644 --- a/jscomp/test/dist/jscomp/test/promise_catch_test.js +++ b/jscomp/test/dist/jscomp/test/promise_catch_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Js__Js_exn = require("melange.js/js_exn.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Option = require("melange/option.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Js__Js_exn = require("melange.js/js_exn.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Option = require("melange/option.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -69,17 +69,17 @@ function f(x) { return x.catch(handler); } -var exit = 0; +let exit = 0; -var val; +let val; try { val = JSON.parse(" 1. + "); exit = 1; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); - var r = myHandler(e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); + let r = myHandler(e); eq("File \"jscomp/test/promise_catch_test.ml\", line 35, characters 7-14", true, r !== undefined && 2 === Stdlib__Option.get(r)); } diff --git a/jscomp/test/dist/jscomp/test/qcc.js b/jscomp/test/dist/jscomp/test/qcc.js index 70bb21976e..56d1fa5af8 100644 --- a/jscomp/test/dist/jscomp/test/qcc.js +++ b/jscomp/test/dist/jscomp/test/qcc.js @@ -1,38 +1,38 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__String = require("melange/string.js"); - -var dbg = { +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__String = require("melange/string.js"); + +let dbg = { contents: true }; -var inch = { +let inch = { contents: Stdlib.stdin }; function bufferize(f) { - var buf = { + let buf = { contents: undefined }; return [ (function (param) { - var x = buf.contents; + let x = buf.contents; if (x !== undefined) { buf.contents = undefined; return Caml_option.valFromOption(x); @@ -56,29 +56,29 @@ function bufferize(f) { ]; } -var match = bufferize(function (param) { +let match = bufferize(function (param) { return Caml_external_polyfill.resolve("caml_ml_input_char")(inch.contents); }); -var ungetch = match[1]; +let ungetch = match[1]; -var getch = match[0]; +let getch = match[0]; function peekch(param) { - var ch = Curry._1(getch, undefined); + let ch = Curry._1(getch, undefined); Curry._1(ungetch, ch); return ch; } -var symtab = Caml_array.make(100, ""); +let symtab = Caml_array.make(100, ""); -var syms = { +let syms = { contents: 0 }; function find(s, _n) { while(true) { - var n = _n; + let n = _n; if (n >= syms.contents) { syms.contents = syms.contents + 1 | 0; return n; @@ -92,7 +92,7 @@ function find(s, _n) { } function addsym(s) { - var sid = find(s, 0); + let sid = find(s, 0); Caml_array.set(symtab, sid, s); return sid; } @@ -112,21 +112,21 @@ function symstr(n) { } function symitr(f) { - for(var i = 0 ,i_finish = syms.contents; i < i_finish; ++i){ + for(let i = 0 ,i_finish = syms.contents; i < i_finish; ++i){ Curry._2(f, i, Caml_array.get(symtab, i)); } } -var glo = Stdlib__Bytes.make(4096, /* '\000' */0); +let glo = Stdlib__Bytes.make(4096, /* '\000' */0); -var gpos = { +let gpos = { contents: 0 }; -var s = Caml_bytes.caml_create_bytes(100); +let s = Caml_bytes.caml_create_bytes(100); function getq(param) { - var c = Curry._1(getch, undefined); + let c = Curry._1(getch, undefined); if (c !== 92 || peekch(undefined) !== /* 'n' */110) { return c; } else { @@ -145,15 +145,15 @@ function isid(param) { function skip(_param) { while(true) { - var ch = Curry._1(getch, undefined); + let ch = Curry._1(getch, undefined); if (ch >= 14) { if (ch !== 32) { if (ch !== 47 || peekch(undefined) !== /* '*' */42) { return ch; } else { - var _param$1 = (Curry._1(getch, undefined), undefined); + let _param$1 = (Curry._1(getch, undefined), undefined); while(true) { - var match = Curry._1(getch, undefined); + let match = Curry._1(getch, undefined); if (match !== 42) { _param$1 = undefined; continue ; @@ -185,12 +185,12 @@ function skip(_param) { } function next(param) { - var c; + let c; try { c = skip(undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { c = undefined; } else { @@ -204,11 +204,11 @@ function next(param) { }; } if (c === 34) { - var b = gpos.contents; - var _e = gpos.contents; + let b = gpos.contents; + let _e = gpos.contents; while(true) { - var e = _e; - var match = peekch(undefined); + let e = _e; + let match = peekch(undefined); if (match !== 34) { Caml_bytes.set(glo, e, getq(undefined)); _e = e + 1 | 0; @@ -225,10 +225,10 @@ function next(param) { } if (c >= 48) { if (c < 58) { - var _n = c - 48 | 0; + let _n = c - 48 | 0; while(true) { - var n = _n; - var match$1 = peekch(undefined); + let n = _n; + let match$1 = peekch(undefined); if (match$1 > 57 || match$1 < 48) { return { TAG: /* ILit */1, @@ -241,8 +241,8 @@ function next(param) { } } else if (c === 39) { - var ch = getq(undefined); - var qt = Curry._1(getch, undefined); + let ch = getq(undefined); + let qt = Curry._1(getch, undefined); if (qt !== /* '\'' */39) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -255,11 +255,11 @@ function next(param) { }; } if (isid(c)) { - var _n$1 = 0; - var _ch = c; + let _n$1 = 0; + let _ch = c; while(true) { - var ch$1 = _ch; - var n$1 = _n$1; + let ch$1 = _ch; + let n$1 = _n$1; Caml_bytes.set(s, n$1, ch$1); if (!isid(peekch(undefined))) { return { @@ -272,7 +272,7 @@ function next(param) { continue ; }; } else { - var _param = { + let _param = { hd: "++", tl: { hd: "--", @@ -304,14 +304,14 @@ function next(param) { } }; while(true) { - var param$1 = _param; + let param$1 = _param; if (!param$1) { return { TAG: /* Op */0, _0: Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c)) }; } - var lop = param$1.hd; + let lop = param$1.hd; if (Caml_string.get(lop, 0) === c && Caml_string.get(lop, 1) === peekch(undefined)) { Curry._1(getch, undefined); return { @@ -325,21 +325,21 @@ function next(param) { } } -var match$1 = bufferize(next); +let match$1 = bufferize(next); -var unnext = match$1[1]; +let unnext = match$1[1]; -var next$1 = match$1[0]; +let next$1 = match$1[0]; function nextis(t) { - var nt = Curry._1(next$1, undefined); + let nt = Curry._1(next$1, undefined); Curry._1(unnext, nt); return Caml_obj.caml_equal(t, nt); } -var obuf = Stdlib__Bytes.make(1048576, /* '\000' */0); +let obuf = Stdlib__Bytes.make(1048576, /* '\000' */0); -var opos = { +let opos = { contents: 0 }; @@ -354,8 +354,8 @@ function out(x) { } function le(n, x) { - for(var i = 0 ,i_finish = n / 8 | 0; i < i_finish; ++i){ - var $$byte = (x >>> (i << 3)) & 255; + for(let i = 0 ,i_finish = n / 8 | 0; i < i_finish; ++i){ + let $$byte = (x >>> (i << 3)) & 255; Caml_bytes.set(obuf, opos.contents, Stdlib__Char.chr($$byte)); opos.contents = opos.contents + 1 | 0; } @@ -379,9 +379,9 @@ function patch(rel, loc, n) { if (loc === 0) { return ; } - var i = opos.contents; - var loc$p = get32(loc); - var x = rel ? n - (loc + 4 | 0) | 0 : n; + let i = opos.contents; + let loc$p = get32(loc); + let x = rel ? n - (loc + 4 | 0) | 0 : n; if (dbg.contents) { Curry._3(Stdlib__Printf.eprintf(/* Format */{ _0: { @@ -441,12 +441,12 @@ function cmp(n) { function test(n, l) { out(4752832); out(3972 + n | 0); - var loc = opos.contents; + let loc = opos.contents; le(32, l); return loc; } -var align = { +let align = { contents: 0 }; @@ -468,7 +468,7 @@ function pop(r) { } } -var lval = { +let lval = { contents: [ { TAG: /* Mov */0, @@ -479,7 +479,7 @@ var lval = { }; function patchlval(param) { - var n = lval.contents[0]; + let n = lval.contents[0]; if (n.TAG === /* Mov */0) { return Caml_bytes.set(obuf, opos.contents - n._0 | 0, /* '\141' */141); } else { @@ -512,12 +512,12 @@ function read(param) { } } -var globs = Caml_array.make(100, { +let globs = Caml_array.make(100, { loc: 0, va: -1 }); -var lvls = { +let lvls = { hd: [ "*", 0 @@ -627,7 +627,7 @@ var lvls = { } }; -var inss = { +let inss = { hd: [ "*", { @@ -827,42 +827,42 @@ var inss = { } }; -var tokint = { +let tokint = { TAG: /* Sym */3, _0: addsym("int") }; -var tokchar = { +let tokchar = { TAG: /* Sym */3, _0: addsym("char") }; -var tokret = { +let tokret = { TAG: /* Sym */3, _0: addsym("return") }; -var tokif = { +let tokif = { TAG: /* Sym */3, _0: addsym("if") }; -var tokelse = { +let tokelse = { TAG: /* Sym */3, _0: addsym("else") }; -var tokwhile = { +let tokwhile = { TAG: /* Sym */3, _0: addsym("while") }; -var tokfor = { +let tokfor = { TAG: /* Sym */3, _0: addsym("for") }; -var tokbreak = { +let tokbreak = { TAG: /* Sym */3, _0: addsym("break") }; @@ -871,20 +871,20 @@ function binary(stk, lvl) { if (lvl === -1) { return unary(stk); } - var lvlof = function (o) { + let lvlof = function (o) { if (Stdlib__List.mem_assoc(o, lvls)) { return Stdlib__List.assoc(o, lvls); } else { return -1; } }; - var foldtst = function (_loc) { + let foldtst = function (_loc) { while(true) { - var loc = _loc; - var o = Curry._1(next$1, undefined); + let loc = _loc; + let o = Curry._1(next$1, undefined); if (o.TAG === /* Op */0) { if (lvlof(o._0) === lvl) { - var loc$p = test(lvl - 8 | 0, loc); + let loc$p = test(lvl - 8 | 0, loc); binary(stk, lvl - 1 | 0); _loc = loc$p; continue ; @@ -898,20 +898,20 @@ function binary(stk, lvl) { }; binary(stk, lvl - 1 | 0); if (lvl < 8) { - var _param; + let _param; while(true) { - var o = Curry._1(next$1, undefined); + let o = Curry._1(next$1, undefined); if (o.TAG !== /* Op */0) { return Curry._1(unnext, o); } - var o$1 = o._0; + let o$1 = o._0; if (lvlof(o$1) !== lvl) { return Curry._1(unnext, o); } push(0); binary(stk, lvl - 1 | 0); pop(1); - var ops = Stdlib__List.assoc(o$1, inss); + let ops = Stdlib__List.assoc(o$1, inss); if (ops.TAG === /* Bin */0) { Stdlib__List.iter(out, ops._0); } else { @@ -922,15 +922,15 @@ function binary(stk, lvl) { continue ; }; } - var loc = foldtst(0); + let loc = foldtst(0); patch(true, loc, opos.contents); } function unary(stk) { - var i = Curry._1(next$1, undefined); + let i = Curry._1(next$1, undefined); switch (i.TAG | 0) { case /* Op */0 : - var o = i._0; + let o = i._0; switch (o) { case "&" : unary(stk); @@ -941,8 +941,8 @@ function unary(stk) { return postfix(stk); case "*" : Curry._1(next$1, undefined); - var t = Curry._1(next$1, undefined); - var match; + let t = Curry._1(next$1, undefined); + let match; if (Caml_obj.caml_equal(t, tokint)) { match = Caml_obj.caml_equal(Curry._1(next$1, undefined), { TAG: /* Op */0, @@ -965,13 +965,13 @@ function unary(stk) { _1: "[cast] expected" }); } - for(var _k = 1 ,_k_finish = match[1]; _k <= _k_finish; ++_k){ + for(let _k = 1 ,_k_finish = match[1]; _k <= _k_finish; ++_k){ Curry._1(next$1, undefined); } unary(stk); return read(match[0]); default: - var unops = { + let unops = { hd: [ "+", 0 @@ -998,7 +998,7 @@ function unary(stk) { }; unary(stk); if (!Stdlib__List.mem_assoc(o, unops)) { - var s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "unknown operator ", @@ -1028,9 +1028,9 @@ function unary(stk) { out(18616); return le(64, i._0); case /* Sym */3 : - var i$1 = i._0; + let i$1 = i._0; if (Stdlib__List.mem_assoc(i$1, stk)) { - var l = Stdlib__List.assoc(i$1, stk); + let l = Stdlib__List.assoc(i$1, stk); if (l <= -256) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -1052,8 +1052,8 @@ function unary(stk) { ]; } else { out(18616); - var g = Caml_array.get(globs, i$1); - var loc = opos.contents; + let g = Caml_array.get(globs, i$1); + let loc = opos.contents; le(64, g.loc); Caml_array.set(globs, i$1, { loc: loc, @@ -1067,17 +1067,17 @@ function unary(stk) { } function postfix(stk) { - var op = Curry._1(next$1, undefined); + let op = Curry._1(next$1, undefined); if (op.TAG !== /* Op */0) { return Curry._1(unnext, op); } - var op$1 = op._0; + let op$1 = op._0; switch (op$1) { case "(" : - var emitargs = function (_l, _rl) { + let emitargs = function (_l, _rl) { while(true) { - var rl = _rl; - var l = _l; + let rl = _rl; + let l = _l; if (nextis({ TAG: /* Op */0, _0: ")" @@ -1185,9 +1185,9 @@ function postfix(stk) { function expr(stk) { binary(stk, 10); - var _param; + let _param; while(true) { - var t = Curry._1(next$1, undefined); + let t = Curry._1(next$1, undefined); if (t.TAG !== /* Op */0) { return Curry._1(unnext, t); } @@ -1195,7 +1195,7 @@ function expr(stk) { return Curry._1(unnext, t); } patchlval(undefined); - var ty = lval.contents[1]; + let ty = lval.contents[1]; push(0); expr(stk); pop(1); @@ -1211,16 +1211,16 @@ function expr(stk) { function decl(g, _n, _stk) { while(true) { - var stk = _stk; - var n = _n; - var t = Curry._1(next$1, undefined); + let stk = _stk; + let n = _n; + let t = Curry._1(next$1, undefined); if (Caml_obj.caml_equal(t, tokint)) { - var top = stk ? stk.hd[1] : 0; - var vars = (function(top){ + let top = stk ? stk.hd[1] : 0; + let vars = (function(top){ return function vars(_n, _stk) { while(true) { - var stk = _stk; - var n = _n; + let stk = _stk; + let n = _n; while(nextis({ TAG: /* Op */0, _0: "*" @@ -1236,20 +1236,20 @@ function decl(g, _n, _stk) { stk ]; } - var s = Curry._1(next$1, undefined); + let s = Curry._1(next$1, undefined); if (s.TAG === /* Sym */3) { - var s$1 = s._0; - var n$p = n + 1 | 0; - var stk$p; + let s$1 = s._0; + let n$p = n + 1 | 0; + let stk$p; if (g) { - var glo = Caml_array.get(globs, s$1); + let glo = Caml_array.get(globs, s$1); if (glo.va >= 0) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: "symbol defined twice" }); } - var va = (gpos.contents + 232 | 0) + 4194304 | 0; + let va = (gpos.contents + 232 | 0) + 4194304 | 0; Caml_array.set(globs, s$1, { loc: glo.loc, va: va @@ -1286,7 +1286,7 @@ function decl(g, _n, _stk) { }; } }(top)); - var match = vars(0, stk); + let match = vars(0, stk); Curry._1(next$1, undefined); if (dbg.contents) { Curry._1(Stdlib__Printf.eprintf(/* Format */{ @@ -1338,26 +1338,26 @@ function decl(g, _n, _stk) { }; } -var retl = { +let retl = { contents: 0 }; function stmt(brk, stk) { - var pexpr = function (stk) { + let pexpr = function (stk) { Curry._1(next$1, undefined); expr(stk); Curry._1(next$1, undefined); }; - var t = Curry._1(next$1, undefined); + let t = Curry._1(next$1, undefined); if (Caml_obj.caml_equal(t, tokif)) { pexpr(stk); - var loc = test(0, 0); + let loc = test(0, 0); stmt(brk, stk); - var loc$1; + let loc$1; if (nextis(tokelse)) { Curry._1(next$1, undefined); out(233); - var l = opos.contents; + let l = opos.contents; le(32, 0); patch(true, loc, opos.contents); stmt(brk, stk); @@ -1368,13 +1368,13 @@ function stmt(brk, stk) { return patch(true, loc$1, opos.contents); } if (Caml_obj.caml_equal(t, tokwhile) || Caml_obj.caml_equal(t, tokfor)) { - var bl = { + let bl = { contents: 0 }; - var ba = align.contents; - var match; + let ba = align.contents; + let match; if (Caml_obj.caml_equal(t, tokwhile)) { - var loc$2 = opos.contents; + let loc$2 = opos.contents; pexpr(stk); bl.contents = test(0, 0); match = [ @@ -1390,7 +1390,7 @@ function stmt(brk, stk) { expr(stk); } Curry._1(next$1, undefined); - var top = opos.contents; + let top = opos.contents; if (nextis({ TAG: /* Op */0, _0: ";" @@ -1402,9 +1402,9 @@ function stmt(brk, stk) { } Curry._1(next$1, undefined); out(233); - var bdy = opos.contents; + let bdy = opos.contents; le(32, 0); - var itr = opos.contents; + let itr = opos.contents; expr(stk); Curry._1(next$1, undefined); out(233); @@ -1432,15 +1432,15 @@ function stmt(brk, stk) { } Curry._1(next$1, undefined); out(233); - var loc$3 = opos.contents; + let loc$3 = opos.contents; le(32, retl.contents); retl.contents = loc$3; return ; } if (Caml_obj.caml_equal(t, tokbreak)) { Curry._1(next$1, undefined); - var brkl = brk[0]; - var n = align.contents - brk[1] | 0; + let brkl = brk[0]; + let n = align.contents - brk[1] | 0; if (n < 0) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -1456,7 +1456,7 @@ function stmt(brk, stk) { out((n << 3)); } out(233); - var loc$4 = opos.contents; + let loc$4 = opos.contents; le(32, brkl.contents); brkl.contents = loc$4; return ; @@ -1477,9 +1477,9 @@ function stmt(brk, stk) { } function block(brk, stk) { - var match = decl(false, 0, stk); - var stk$p = match[1]; - var n = match[0]; + let match = decl(false, 0, stk); + let stk$p = match[1]; + let n = match[0]; while(!nextis({ TAG: /* Op */0, _0: "}" @@ -1509,10 +1509,10 @@ function top(_param) { _param = undefined; continue ; } - var f = Curry._1(next$1, undefined); + let f = Curry._1(next$1, undefined); if (f.TAG === /* Sym */3) { - var f$1 = f._0; - var g = Caml_array.get(globs, f$1); + let f$1 = f._0; + let g = Caml_array.get(globs, f$1); if (g.va >= 0) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -1523,12 +1523,12 @@ function top(_param) { loc: g.loc, va: opos.contents }); - var emitargs = function (_regs, _n, _stk) { + let emitargs = function (_regs, _n, _stk) { while(true) { - var stk = _stk; - var n = _n; - var regs = _regs; - var i = Curry._1(next$1, undefined); + let stk = _stk; + let n = _n; + let regs = _regs; + let i = Curry._1(next$1, undefined); switch (i.TAG | 0) { case /* Op */0 : if (i._0 === ")") { @@ -1545,7 +1545,7 @@ function top(_param) { _1: "[var] or ) expected" }); case /* Sym */3 : - var r = Stdlib__List.hd(regs); + let r = Stdlib__List.hd(regs); push(r); if (nextis({ TAG: /* Op */0, @@ -1553,11 +1553,11 @@ function top(_param) { })) { Curry._1(next$1, undefined); } - var stk$p_0 = [ + let stk$p_0 = [ i._0, ((-n | 0) << 3) ]; - var stk$p = { + let stk$p = { hd: stk$p_0, tl: stk }; @@ -1573,7 +1573,7 @@ function top(_param) { align.contents = 0; out(85); out(4753893); - var stk = emitargs({ + let stk = emitargs({ hd: 7, tl: { hd: 6, @@ -1635,7 +1635,7 @@ function top(_param) { }; } -var elfhdr = Stdlib__Bytes.of_string(Stdlib__String.concat("", { +let elfhdr = Stdlib__Bytes.of_string(Stdlib__String.concat("", { hd: "\x7fELF\x02\x01\x01\0", tl: { hd: "\0\0\0\0\0\0\0\0", @@ -1694,9 +1694,9 @@ function elfphdr(ty, off, sz, align) { } function elfgen(outf) { - var entry = opos.contents; - var main = addsym("main"); - var gmain = Caml_array.get(globs, main); + let entry = opos.contents; + let main = addsym("main"); + let gmain = Caml_array.get(globs, main); out(1217084452); out(-1921768440); out(18616); @@ -1709,21 +1709,21 @@ function elfgen(outf) { out(35271); load(0, 60); out(3845); - var off = 232 + gpos.contents | 0; - var itr = function (f) { + let off = 232 + gpos.contents | 0; + let itr = function (f) { symitr(function (i, s) { - var g = Caml_array.get(globs, i); + let g = Caml_array.get(globs, i); if (g.va < 0 && g.loc !== 0) { return Curry._3(f, s, s.length, g.loc); } }); }; - var va = function (x) { + let va = function (x) { return (x + off | 0) + 4194304 | 0; }; - var patchloc = function (i, param) { - var g = Caml_array.get(globs, i); + let patchloc = function (i, param) { + let g = Caml_array.get(globs, i); if (g.va >= 0 && g.va < 4194304) { return patch(false, g.loc, va(g.va)); } else if (g.va >= 0) { @@ -1733,7 +1733,7 @@ function elfgen(outf) { } }; symitr(patchloc); - var strtab = opos.contents; + let strtab = opos.contents; opos.contents = opos.contents + 1 | 0; Stdlib__String.blit("/lib64/ld-linux-x86-64.so.2\0libc.so.6", 0, obuf, opos.contents, 37); opos.contents = (opos.contents + 37 | 0) + 1 | 0; @@ -1742,8 +1742,8 @@ function elfgen(outf) { opos.contents = (opos.contents + sl | 0) + 1 | 0; }); opos.contents = opos.contents + 7 & -8; - var symtab = opos.contents; - var n = { + let symtab = opos.contents; + let n = { contents: 39 }; opos.contents = opos.contents + 24 | 0; @@ -1754,14 +1754,14 @@ function elfgen(outf) { le(64, 0); n.contents = (n.contents + sl | 0) + 1 | 0; }); - var rel = opos.contents; - var n$1 = { + let rel = opos.contents; + let n$1 = { contents: 1 }; itr(function (param, param$1, l) { - var genrel = function (_l) { + let genrel = function (_l) { while(true) { - var l = _l; + let l = _l; if (l === 0) { return ; } @@ -1775,16 +1775,16 @@ function elfgen(outf) { genrel(l); n$1.contents = n$1.contents + 1 | 0; }); - var hash = opos.contents; - var n$2 = ((rel - symtab | 0) / 24 | 0) - 1 | 0; + let hash = opos.contents; + let n$2 = ((rel - symtab | 0) / 24 | 0) - 1 | 0; le(32, 1); le(32, n$2 + 1 | 0); le(32, n$2 > 0 ? 1 : 0); - for(var i = 1; i <= n$2; ++i){ + for(let i = 1; i <= n$2; ++i){ le(32, i); } le(32, 0); - var dyn = opos.contents; + let dyn = opos.contents; Stdlib__List.iter((function (param) { return le(64, param); }), { @@ -1845,7 +1845,7 @@ function elfgen(outf) { } } }); - var tend = opos.contents; + let tend = opos.contents; Stdlib__Bytes.blit(obuf, 0, obuf, off, tend); Stdlib__Bytes.blit(glo, 0, obuf, 232, gpos.contents); Stdlib__Bytes.blit(elfhdr, 0, obuf, 0, 64); @@ -1868,7 +1868,7 @@ function elfgen(outf) { } function main(param) { - var ppsym = function (param) { + let ppsym = function (param) { switch (param.TAG | 0) { case /* Op */0 : return Curry._1(Stdlib__Printf.printf(/* Format */{ @@ -1924,7 +1924,7 @@ function main(param) { _1: "Str literal %S\n" }), param._1); case /* Sym */3 : - var i = param._0; + let i = param._0; return Curry._2(Stdlib__Printf.printf(/* Format */{ _0: { TAG: /* String_literal */11, @@ -1954,27 +1954,27 @@ function main(param) { } }; - var f = Caml_sys.caml_sys_argv(0).length < 2 ? "-blk" : Caml_array.get(Caml_sys.caml_sys_argv(0), 1); + let f = Caml_sys.caml_sys_argv(0).length < 2 ? "-blk" : Caml_array.get(Caml_sys.caml_sys_argv(0), 1); switch (f) { case "-blk" : - var partial_arg_0 = { + let partial_arg_0 = { contents: 0 }; - var partial_arg = [ + let partial_arg = [ partial_arg_0, 0 ]; - var c = function (param) { + let c = function (param) { return block(partial_arg, param); }; - var stk = /* [] */0; + let stk = /* [] */0; opos.contents = 0; Curry._1(c, stk); return Stdlib.print_bytes(Stdlib__Bytes.sub(obuf, 0, opos.contents)); case "-lex" : - var _param; + let _param; while(true) { - var tok = Curry._1(next$1, undefined); + let tok = Curry._1(next$1, undefined); if (tok.TAG === /* Op */0) { if (tok._0 === "EOF!") { return Stdlib__Printf.printf(/* Format */{ @@ -1995,7 +1995,7 @@ function main(param) { continue ; }; default: - var oc = Stdlib.open_out("a.out"); + let oc = Stdlib.open_out("a.out"); inch.contents = Stdlib.open_in_bin(f); top(undefined); elfgen(oc); @@ -2006,9 +2006,9 @@ function main(param) { main(undefined); -var base = 4194304; +let base = 4194304; -var textoff = 232; +let textoff = 232; exports.dbg = dbg; exports.inch = inch; diff --git a/jscomp/test/dist/jscomp/test/queue_test.js b/jscomp/test/dist/jscomp/test/queue_test.js index 6dcd153937..e35c0fe24d 100644 --- a/jscomp/test/dist/jscomp/test/queue_test.js +++ b/jscomp/test/dist/jscomp/test/queue_test.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Queue = require("melange/queue.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Queue = require("melange/queue.js"); function Test(Queue) { - var to_array = function (q) { - var v = Caml_array.make(Curry._1(Queue.length, q), 0); + let to_array = function (q) { + let v = Caml_array.make(Curry._1(Queue.length, q), 0); Curry._3(Queue.fold, (function (i, e) { Caml_array.set(v, i, e); return i + 1 | 0; }), 0, q); return v; }; - var queue_1 = function (x) { - var q = Curry._1(Queue.create, undefined); + let queue_1 = function (x) { + let q = Curry._1(Queue.create, undefined); Stdlib__Array.iter((function (x) { Curry._2(Queue.add, x, q); }), x); @@ -30,7 +30,7 @@ function Test(Queue) { } function to_array(q) { - var v = Caml_array.make(q.length, 0); + let v = Caml_array.make(q.length, 0); Stdlib__Queue.fold((function (i, e) { Caml_array.set(v, i, e); return i + 1 | 0; @@ -39,7 +39,7 @@ function to_array(q) { } function queue_1(x) { - var q = { + let q = { length: 0, first: /* Nil */0, last: /* Nil */0 @@ -50,15 +50,15 @@ function queue_1(x) { return to_array(q); } -var T1 = { +let T1 = { to_array: to_array, queue_1: queue_1 }; -var suites_0 = [ +let suites_0 = [ "File \"jscomp/test/queue_test.ml\", line 25, characters 2-9", (function (param) { - var x = [ + let x = [ 3, 4, 5, @@ -72,7 +72,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/random_test.js b/jscomp/test/dist/jscomp/test/random_test.js index 3d57807240..a133b5916b 100644 --- a/jscomp/test/dist/jscomp/test/random_test.js +++ b/jscomp/test/dist/jscomp/test/random_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__Int64 = require("melange/int64.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Random = require("melange/random.js"); - -var id = { +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__Int64 = require("melange/int64.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Random = require("melange/random.js"); + +let id = { contents: 0 }; -var suites = { +let suites = { contents: /* [] */0 }; @@ -39,9 +39,9 @@ Mt_global.collect_neq(id, suites, "File \"jscomp/test/random_test.ml\", line 12, Stdlib__Random.init(0); -var v = Caml_array.make(10, false); +let v = Caml_array.make(10, false); -for(var i = 0; i <= 9; ++i){ +for(let i = 0; i <= 9; ++i){ Caml_array.set(v, i, Stdlib__Random.bool(undefined)); } @@ -58,18 +58,18 @@ Mt_global.collect_eq(id, suites, "File \"jscomp/test/random_test.ml\", line 26, false ]); -var f = Stdlib__Random.int64(Stdlib__Int64.max_int); +let f = Stdlib__Random.int64(Stdlib__Int64.max_int); -var h = Stdlib__Random.int64([ +let h = Stdlib__Random.int64([ 0, 3 ]); -var vv = Stdlib__Random.bits(undefined); +let vv = Stdlib__Random.bits(undefined); -var xx = Stdlib__Random.$$float(3.0); +let xx = Stdlib__Random.$$float(3.0); -var xxx = Stdlib__Random.int32(103); +let xxx = Stdlib__Random.int32(103); Curry._5(Stdlib__Printf.printf(/* Format */{ _0: { diff --git a/jscomp/test/dist/jscomp/test/raw_hash_tbl_bench.js b/jscomp/test/dist/jscomp/test/raw_hash_tbl_bench.js index cab55188b7..a4f3a604c7 100644 --- a/jscomp/test/dist/jscomp/test/raw_hash_tbl_bench.js +++ b/jscomp/test/dist/jscomp/test/raw_hash_tbl_bench.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); function bench(param) { - var table = Stdlib__Hashtbl.create(undefined, 1000000); - for(var i = 0; i <= 1000000; ++i){ + let table = Stdlib__Hashtbl.create(undefined, 1000000); + for(let i = 0; i <= 1000000; ++i){ Stdlib__Hashtbl.add(table, i, i); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ if (!Stdlib__Hashtbl.mem(table, i$1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -22,14 +22,14 @@ function bench(param) { } } - for(var i$2 = 0; i$2 <= 1000000; ++i$2){ + for(let i$2 = 0; i$2 <= 1000000; ++i$2){ Stdlib__Hashtbl.remove(table, i$2); } } bench(undefined); -var count = 1000000; +let count = 1000000; exports.count = count; exports.bench = bench; diff --git a/jscomp/test/dist/jscomp/test/raw_output_test.js b/jscomp/test/dist/jscomp/test/raw_output_test.js index be06893a9c..dbed9f2cfc 100644 --- a/jscomp/test/dist/jscomp/test/raw_output_test.js +++ b/jscomp/test/dist/jscomp/test/raw_output_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function mk(fn) { return Curry._1(fn, undefined); diff --git a/jscomp/test/dist/jscomp/test/raw_pure_test.js b/jscomp/test/dist/jscomp/test/raw_pure_test.js index 02c6afe6da..857b9564da 100644 --- a/jscomp/test/dist/jscomp/test/raw_pure_test.js +++ b/jscomp/test/dist/jscomp/test/raw_pure_test.js @@ -5,13 +5,13 @@ // hello 'use strict'; -var Stdlib__List = require("melange/list.js"); +let Stdlib__List = require("melange/list.js"); -var x0 = null; +let x0 = null; -var x2 = "荷兰"; +let x2 = "荷兰"; -var x3 = /ghoghos/; +let x3 = /ghoghos/; /** * copyright @@ -23,7 +23,7 @@ function f(x) { return x; } -var hh = Stdlib__List.length; +let hh = Stdlib__List.length; exports.x0 = x0; exports.x2 = x2; diff --git a/jscomp/test/dist/jscomp/test/rbset.js b/jscomp/test/dist/jscomp/test/rbset.js index be9403e7c5..371a402fb5 100644 --- a/jscomp/test/dist/jscomp/test/rbset.js +++ b/jscomp/test/dist/jscomp/test/rbset.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function blackify(s) { if (s && s._0) { @@ -32,11 +32,11 @@ function is_empty(param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var y = param._2; + let y = param._2; if (x === y) { return true; } @@ -50,17 +50,17 @@ function mem(x, _param) { } function balance_left(l, x, r) { - var exit = 0; - var a; - var x$1; - var b; - var y; - var c; - var z; - var d; + let exit = 0; + let a; + let x$1; + let b; + let y; + let c; + let z; + let d; if (l && l._0) { - var a$1 = l._1; - var exit$1 = 0; + let a$1 = l._1; + let exit$1 = 0; if (a$1 && a$1._0) { a = a$1._1; x$1 = a$1._2; @@ -74,7 +74,7 @@ function balance_left(l, x, r) { exit$1 = 3; } if (exit$1 === 3) { - var match = l._3; + let match = l._3; if (match && match._0) { a = a$1; x$1 = l._2; @@ -122,17 +122,17 @@ function balance_left(l, x, r) { } function balance_right(l, x, r) { - var exit = 0; - var a; - var x$1; - var b; - var y; - var c; - var z; - var d; + let exit = 0; + let a; + let x$1; + let b; + let y; + let c; + let z; + let d; if (r && r._0) { - var b$1 = r._1; - var exit$1 = 0; + let b$1 = r._1; + let exit$1 = 0; if (b$1 && b$1._0) { a = l; x$1 = x; @@ -146,7 +146,7 @@ function balance_right(l, x, r) { exit$1 = 3; } if (exit$1 === 3) { - var match = r._3; + let match = r._3; if (match && match._0) { a = l; x$1 = x; @@ -205,7 +205,7 @@ function singleton(x) { function unbalanced_left(param) { if (param) { if (param._0) { - var match = param._1; + let match = param._1; if (match && !match._0) { return [ balance_left(/* Node */{ @@ -219,7 +219,7 @@ function unbalanced_left(param) { } } else { - var match$1 = param._1; + let match$1 = param._1; if (match$1) { if (!match$1._0) { return [ @@ -232,7 +232,7 @@ function unbalanced_left(param) { true ]; } - var match$2 = match$1._3; + let match$2 = match$1._3; if (match$2 && !match$2._0) { return [ /* Node */{ @@ -267,7 +267,7 @@ function unbalanced_left(param) { function unbalanced_right(param) { if (param) { if (param._0) { - var match = param._3; + let match = param._3; if (match && !match._0) { return [ balance_right(param._1, param._2, /* Node */{ @@ -281,10 +281,10 @@ function unbalanced_right(param) { } } else { - var match$1 = param._3; + let match$1 = param._3; if (match$1) { - var x = param._2; - var a = param._1; + let x = param._2; + let a = param._1; if (!match$1._0) { return [ balance_right(a, x, /* Node */{ @@ -296,7 +296,7 @@ function unbalanced_right(param) { true ]; } - var match$2 = match$1._1; + let match$2 = match$1._1; if (match$2 && !match$2._0) { return [ /* Node */{ @@ -345,8 +345,8 @@ function lbalance(x1, x2, x3) { _3: x3 }; } - var r = x1._3; - var l = x1._1; + let r = x1._3; + let l = x1._1; if (l && l._0) { return /* Node */{ _0: /* Red */1, @@ -381,7 +381,7 @@ function lbalance(x1, x2, x3) { _3: x3 }; } - var y = r._2; + let y = r._2; return /* Node */{ _0: /* Red */1, _1: /* Node */{ @@ -402,8 +402,8 @@ function lbalance(x1, x2, x3) { function rbalance(x1, x2, x3) { if (x3 && x3._0) { - var b = x3._1; - var exit = 0; + let b = x3._1; + let exit = 0; if (b) { if (b._0) { return /* Node */{ @@ -428,7 +428,7 @@ function rbalance(x1, x2, x3) { exit = 2; } if (exit === 2) { - var match = x3._3; + let match = x3._3; if (match && match._0) { return /* Node */{ _0: /* Red */1, @@ -469,12 +469,12 @@ function ins(x, s) { }; } if (s._0) { - var y = s._2; + let y = s._2; if (x === y) { return s; } - var b = s._3; - var a = s._1; + let b = s._3; + let a = s._1; if (x < y) { return /* Node */{ _0: /* Red */1, @@ -491,12 +491,12 @@ function ins(x, s) { }; } } - var y$1 = s._2; + let y$1 = s._2; if (x === y$1) { return s; } - var b$1 = s._3; - var a$1 = s._1; + let b$1 = s._3; + let a$1 = s._1; if (x < y$1) { return lbalance(ins(x, a$1), y$1, b$1); } else { @@ -505,7 +505,7 @@ function ins(x, s) { } function add(x, s) { - var s$1 = ins(x, s); + let s$1 = ins(x, s); if (s$1 && s$1._0) { return /* Node */{ _0: /* Black */0, @@ -520,7 +520,7 @@ function add(x, s) { function remove_min(param) { if (param) { - var c = param._0; + let c = param._0; if (c) { if (!param._1) { return [ @@ -531,8 +531,8 @@ function remove_min(param) { } } else if (!param._1) { - var match = param._3; - var x = param._2; + let match = param._3; + let x = param._2; if (!match) { return [ /* Empty */0, @@ -561,12 +561,12 @@ function remove_min(param) { ] }); } - var match$1 = remove_min(param._1); - var y = match$1[1]; - var s_1 = match$1[0]; - var s_2 = param._2; - var s_3 = param._3; - var s = /* Node */{ + let match$1 = remove_min(param._1); + let y = match$1[1]; + let s_1 = match$1[0]; + let s_2 = param._2; + let s_3 = param._3; + let s = /* Node */{ _0: c, _1: s_1, _2: s_2, @@ -579,7 +579,7 @@ function remove_min(param) { false ]; } - var match$2 = unbalanced_right(s); + let match$2 = unbalanced_right(s); return [ match$2[0], y, @@ -603,10 +603,10 @@ function remove_aux(x, n) { false ]; } - var r = n._3; - var y = n._2; - var l = n._1; - var c = n._0; + let r = n._3; + let y = n._2; + let l = n._1; + let c = n._0; if (x === y) { if (!r) { if (c === /* Red */1) { @@ -618,10 +618,10 @@ function remove_aux(x, n) { return blackify(l); } } - var match = remove_min(r); - var n_2 = match[1]; - var n_3 = match[0]; - var n$1 = /* Node */{ + let match = remove_min(r); + let n_2 = match[1]; + let n_3 = match[0]; + let n$1 = /* Node */{ _0: c, _1: l, _2: n_2, @@ -637,9 +637,9 @@ function remove_aux(x, n) { } } if (x < y) { - var match$1 = remove_aux(x, l); - var n_1 = match$1[0]; - var n$2 = /* Node */{ + let match$1 = remove_aux(x, l); + let n_1 = match$1[0]; + let n$2 = /* Node */{ _0: c, _1: n_1, _2: y, @@ -654,9 +654,9 @@ function remove_aux(x, n) { ]; } } - var match$2 = remove_aux(x, r); - var n_3$1 = match$2[0]; - var n$3 = /* Node */{ + let match$2 = remove_aux(x, r); + let n_3$1 = match$2[0]; + let n$3 = /* Node */{ _0: c, _1: l, _2: y, @@ -684,7 +684,7 @@ function cardinal(param) { } } -var empty = /* Empty */0; +let empty = /* Empty */0; exports.blackify = blackify; exports.empty = empty; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/arity.js b/jscomp/test/dist/jscomp/test/re_or_res/arity.js index d71dc34384..4d4913ab0b 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/arity.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/arity.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function u(f, a, b) { console.log(f(a, b)); @@ -22,11 +22,11 @@ function add(prim0, prim1) { } function h(u) { - var m = u.hi; + let m = u.hi; return m(1, 2); } -var nested = { +let nested = { x: { y: 3 } diff --git a/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865.js b/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865.js index 35c6a32f2d..a4a80941fd 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Gpr_3865_foo = require("./gpr_3865_foo.js"); +let Gpr_3865_foo = require("./gpr_3865_foo.js"); -var B = Gpr_3865_foo; +let B = Gpr_3865_foo; console.log(Gpr_3865_foo.$$return); diff --git a/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865_foo.js b/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865_foo.js index f55ca27770..51a92eb202 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865_foo.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/gpr_3865_foo.js @@ -2,7 +2,7 @@ 'use strict'; -var $$return = 5; +let $$return = 5; exports.$$return = $$return; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/re_or_res/lazy_demo.js b/jscomp/test/dist/jscomp/test/re_or_res/lazy_demo.js index c9259bf602..1011c8dd35 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/lazy_demo.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/lazy_demo.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var CamlinternalLazy = require("melange/camlinternalLazy.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); -var lazy1 = { +let lazy1 = { LAZY_DONE: false, VAL: (function () { console.log("Hello, lazy"); @@ -11,16 +11,16 @@ var lazy1 = { }) }; -var lazy2 = { +let lazy2 = { LAZY_DONE: true, VAL: 3 }; console.log(lazy1, lazy2); -var la = CamlinternalLazy.force(lazy1); +let la = CamlinternalLazy.force(lazy1); -var lb = CamlinternalLazy.force(lazy2); +let lb = CamlinternalLazy.force(lazy2); console.log(la, lb); diff --git a/jscomp/test/dist/jscomp/test/re_or_res/method_string_name.js b/jscomp/test/dist/jscomp/test/re_or_res/method_string_name.js index 0ac9f0fc9b..0c87b6d6c1 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/method_string_name.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/method_string_name.js @@ -2,7 +2,7 @@ 'use strict'; -var f = { +let f = { "Content-Type": 3 }; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/re_first_test.js b/jscomp/test/dist/jscomp/test/re_or_res/re_first_test.js index 4d18ab8d44..741f2d46bb 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/re_first_test.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/re_first_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Mt = require("../mt.js"); -var Stdlib__List = require("melange/list.js"); +let Mt = require("../mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,7 +16,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var x = Stdlib__List.length({ +let x = Stdlib__List.length({ hd: 1, tl: { hd: 2, @@ -27,7 +27,7 @@ var x = Stdlib__List.length({ } }); -var _map = {"idb":"idb","leveldb":"leveldb","http":"http"}; +let _map = {"idb":"idb","leveldb":"leveldb","http":"http"}; function adapterToJs(param) { return param; @@ -41,7 +41,7 @@ eq("File \"jscomp/test/re_or_res/re_first_test.re\", line 13, characters 3-10", Mt.from_pair_suites("Re_first_test", suites.contents); -var u = 3; +let u = 3; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/react.js b/jscomp/test/dist/jscomp/test/re_or_res/react.js index 09d63d68da..050842c091 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/react.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/react.js @@ -2,19 +2,19 @@ 'use strict'; -var Ref = {}; +let Ref = {}; -var Children = {}; +let Children = {}; -var Context = {}; +let Context = {}; -var Fragment = {}; +let Fragment = {}; -var StrictMode = {}; +let StrictMode = {}; -var Suspense = {}; +let Suspense = {}; -var SuspenseList = {}; +let SuspenseList = {}; exports.Ref = Ref; exports.Children = Children; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reactDOMRe.js b/jscomp/test/dist/jscomp/test/re_or_res/reactDOMRe.js index 801dd2678e..474c34b78e 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactDOMRe.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactDOMRe.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); -var React = require("react"); -var ReactDom = require("react-dom"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); +let React = require("react"); +let ReactDom = require("react-dom"); function renderToElementWithClassName(reactElement, className) { - var elements = document.getElementsByClassName(className); + let elements = document.getElementsByClassName(className); if (elements.length) { ReactDom.render(reactElement, elements[0]); } else { @@ -16,7 +16,7 @@ function renderToElementWithClassName(reactElement, className) { } function renderToElementWithId(reactElement, id) { - var element = document.getElementById(id); + let element = document.getElementById(id); if (element == null) { console.error("ReactDOMRe.renderToElementWithId : no element of id " + (id + " found in the HTML.")); } else { @@ -25,7 +25,7 @@ function renderToElementWithId(reactElement, id) { } function createRootWithClassName(className) { - var elements = document.getElementsByClassName(className); + let elements = document.getElementsByClassName(className); if (elements.length) { return { TAG: /* Ok */0, @@ -40,7 +40,7 @@ function createRootWithClassName(className) { } function createRootWithId(id) { - var element = document.getElementById(id); + let element = document.getElementById(id); if (element == null) { return { TAG: /* Error */1, @@ -54,13 +54,13 @@ function createRootWithId(id) { } } -var Experimental = { +let Experimental = { createRootWithClassName: createRootWithClassName, createRootWithId: createRootWithId }; function hydrateToElementWithClassName(reactElement, className) { - var elements = document.getElementsByClassName(className); + let elements = document.getElementsByClassName(className); if (elements.length) { ReactDom.hydrate(reactElement, elements[0]); } else { @@ -69,7 +69,7 @@ function hydrateToElementWithClassName(reactElement, className) { } function hydrateToElementWithId(reactElement, id) { - var element = document.getElementById(id); + let element = document.getElementById(id); if (element == null) { throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { MEL_EXN_ID: Stdlib.Invalid_argument, @@ -79,10 +79,10 @@ function hydrateToElementWithId(reactElement, id) { ReactDom.hydrate(reactElement, element); } -var Ref = {}; +let Ref = {}; function createElementVariadic(domClassName, props, children) { - var variadicArguments = [ + let variadicArguments = [ domClassName, props ].concat(children); @@ -90,12 +90,12 @@ function createElementVariadic(domClassName, props, children) { } function unsafeAddProp(style, key, value) { - var dict = {}; + let dict = {}; dict[key] = value; return Object.assign({}, style, dict); } -var Style = { +let Style = { unsafeAddProp: unsafeAddProp }; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reactEvent.js b/jscomp/test/dist/jscomp/test/re_or_res/reactEvent.js index 0737e91036..32c6311e6d 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactEvent.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactEvent.js @@ -2,35 +2,35 @@ 'use strict'; -var Synthetic = {}; +let Synthetic = {}; -var Clipboard = {}; +let Clipboard = {}; -var Composition = {}; +let Composition = {}; -var Keyboard = {}; +let Keyboard = {}; -var Focus = {}; +let Focus = {}; -var Form = {}; +let Form = {}; -var Mouse = {}; +let Mouse = {}; -var $$Selection = {}; +let $$Selection = {}; -var $$Touch = {}; +let $$Touch = {}; -var UI = {}; +let UI = {}; -var Wheel = {}; +let Wheel = {}; -var Media = {}; +let Media = {}; -var $$Image = {}; +let $$Image = {}; -var $$Animation = {}; +let $$Animation = {}; -var Transition = {}; +let Transition = {}; exports.Synthetic = Synthetic; exports.Clipboard = Clipboard; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reactEventRe.js b/jscomp/test/dist/jscomp/test/re_or_res/reactEventRe.js index 0737e91036..32c6311e6d 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactEventRe.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactEventRe.js @@ -2,35 +2,35 @@ 'use strict'; -var Synthetic = {}; +let Synthetic = {}; -var Clipboard = {}; +let Clipboard = {}; -var Composition = {}; +let Composition = {}; -var Keyboard = {}; +let Keyboard = {}; -var Focus = {}; +let Focus = {}; -var Form = {}; +let Form = {}; -var Mouse = {}; +let Mouse = {}; -var $$Selection = {}; +let $$Selection = {}; -var $$Touch = {}; +let $$Touch = {}; -var UI = {}; +let UI = {}; -var Wheel = {}; +let Wheel = {}; -var Media = {}; +let Media = {}; -var $$Image = {}; +let $$Image = {}; -var $$Animation = {}; +let $$Animation = {}; -var Transition = {}; +let Transition = {}; exports.Synthetic = Synthetic; exports.Clipboard = Clipboard; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js b/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js index 5c9543624a..50ad24efe0 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Belt__Belt_Array = require("melange.belt/belt_Array.js"); -var Belt__Belt_Option = require("melange.belt/belt_Option.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var TestUtils = require("react-dom/test-utils"); +let Belt__Belt_Array = require("melange.belt/belt_Array.js"); +let Belt__Belt_Option = require("melange.belt/belt_Option.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let TestUtils = require("react-dom/test-utils"); function act(func) { - var reactFunc = function () { + let reactFunc = function () { Curry._1(func, undefined); }; TestUtils.act(reactFunc); @@ -21,7 +21,7 @@ function actAsync(func) { } function changeWithValue(element, value) { - var $$event = { + let $$event = { target: { value: value } @@ -30,7 +30,7 @@ function changeWithValue(element, value) { } function changeWithChecked(element, value) { - var $$event = { + let $$event = { target: { checked: value } @@ -38,7 +38,7 @@ function changeWithChecked(element, value) { TestUtils.Simulate.change(element, $$event); } -var Simulate = { +let Simulate = { changeWithValue: changeWithValue, changeWithChecked: changeWithChecked }; @@ -59,12 +59,12 @@ function findBySelectorAndTextContent(element, selector, content) { function findBySelectorAndPartialTextContent(element, selector, content) { return Belt__Belt_Array.getBy(Array.from(element.querySelectorAll(selector)), (function (node) { - var arg = node.textContent; + let arg = node.textContent; return arg.includes(content, undefined); })); } -var DOM = { +let DOM = { findBySelector: findBySelector, findByAllSelector: findByAllSelector, findBySelectorAndTextContent: findBySelectorAndTextContent, @@ -72,7 +72,7 @@ var DOM = { }; function prepareContainer(container, param) { - var containerElement = document.createElement("div"); + let containerElement = document.createElement("div"); Belt__Belt_Option.map(document.body, (function (body) { return body.appendChild(containerElement); })); diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reactjs_ppx_custom.js b/jscomp/test/dist/jscomp/test/re_or_res/reactjs_ppx_custom.js index a6faf7302e..46e34964d5 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactjs_ppx_custom.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactjs_ppx_custom.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var JsxRuntime = require("react/jsx-runtime"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let JsxRuntime = require("react/jsx-runtime"); function Reactjs_ppx_custom$Internal$header(Props) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -15,7 +15,7 @@ function Reactjs_ppx_custom$Internal$header(Props) { }); } -var Internal = { +let Internal = { header: Reactjs_ppx_custom$Internal$header }; @@ -23,7 +23,7 @@ function Reactjs_ppx_custom(Props) { return JsxRuntime.jsx(Reactjs_ppx_custom$Internal$header, {}); } -var make = Reactjs_ppx_custom; +let make = Reactjs_ppx_custom; exports.Internal = Internal; exports.make = make; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js b/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js index d1d24cac6b..a40f2445d1 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var ReasonReactOptimizedCreateClass = require("./reasonReactOptimizedCreateClass.js"); -var Stdlib = require("melange/stdlib.js"); -var React = require("react"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let ReasonReactOptimizedCreateClass = require("./reasonReactOptimizedCreateClass.js"); +let Stdlib = require("melange/stdlib.js"); +let React = require("react"); function createDomElement(s, props, children) { - var vararg = [ + let vararg = [ s, props ].concat(children); @@ -41,7 +41,7 @@ function reducerDefault(_action, _state) { } function convertPropsIfTheyreFromJs(props, jsPropsToReason, debugName) { - var match = props.reasonProps; + let match = props.reasonProps; if (!(match == null)) { return match; } @@ -61,7 +61,7 @@ function createClass(debugName) { displayName: debugName, subscriptions: null, self: (function (state, retainedProps) { - var $$this = this ; + let $$this = this ; return { handle: $$this.handleMethod, state: state, @@ -71,44 +71,44 @@ function createClass(debugName) { }; }), getInitialState: (function () { - var thisJs = this; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let thisJs = this; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); return { reasonState: Curry._1(convertedReasonProps._0.initialState, undefined) }; }), componentDidMount: (function () { - var $$this = this ; - var thisJs = this; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - var component = convertedReasonProps._0; - var curTotalState = thisJs.state; - var curReasonState = curTotalState.reasonState; - var self = $$this.self(curReasonState, component.retainedProps); + let $$this = this ; + let thisJs = this; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let component = convertedReasonProps._0; + let curTotalState = thisJs.state; + let curReasonState = curTotalState.reasonState; + let self = $$this.self(curReasonState, component.retainedProps); if (component.didMount !== anyToUnit) { return Curry._1(component.didMount, self); } }), componentDidUpdate: (function (prevProps, prevState) { - var $$this = this ; - var thisJs = this; - var curState = thisJs.state; - var curReasonState = curState.reasonState; - var newJsProps = thisJs.props; - var newConvertedReasonProps = convertPropsIfTheyreFromJs(newJsProps, thisJs.jsPropsToReason, debugName); - var newComponent = newConvertedReasonProps._0; + let $$this = this ; + let thisJs = this; + let curState = thisJs.state; + let curReasonState = curState.reasonState; + let newJsProps = thisJs.props; + let newConvertedReasonProps = convertPropsIfTheyreFromJs(newJsProps, thisJs.jsPropsToReason, debugName); + let newComponent = newConvertedReasonProps._0; if (newComponent.didUpdate === anyToUnit) { return ; } - var oldConvertedReasonProps = prevProps === newJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(prevProps, thisJs.jsPropsToReason, debugName); - var prevReasonState = prevState.reasonState; - var newSelf = $$this.self(curReasonState, newComponent.retainedProps); - var oldSelf_handle = newSelf.handle; - var oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - var oldSelf_send = newSelf.send; - var oldSelf_onUnmount = newSelf.onUnmount; - var oldSelf = { + let oldConvertedReasonProps = prevProps === newJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(prevProps, thisJs.jsPropsToReason, debugName); + let prevReasonState = prevState.reasonState; + let newSelf = $$this.self(curReasonState, newComponent.retainedProps); + let oldSelf_handle = newSelf.handle; + let oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + let oldSelf_send = newSelf.send; + let oldSelf_onUnmount = newSelf.onUnmount; + let oldSelf = { handle: oldSelf_handle, state: prevReasonState, retainedProps: oldSelf_retainedProps, @@ -121,16 +121,16 @@ function createClass(debugName) { }); }), componentWillUnmount: (function () { - var $$this = this ; - var thisJs = this; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - var component = convertedReasonProps._0; - var curState = thisJs.state; - var curReasonState = curState.reasonState; + let $$this = this ; + let thisJs = this; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let component = convertedReasonProps._0; + let curState = thisJs.state; + let curReasonState = curState.reasonState; if (component.willUnmount !== anyToUnit) { Curry._1(component.willUnmount, $$this.self(curReasonState, component.retainedProps)); } - var subs = $$this.subscriptions; + let subs = $$this.subscriptions; if (subs !== null) { subs.forEach(function (unsubscribe) { Curry._1(unsubscribe, undefined); @@ -140,24 +140,24 @@ function createClass(debugName) { }), componentWillUpdate: (function (nextProps, nextState) { - var $$this = this ; - var thisJs = this; - var newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); - var newComponent = newConvertedReasonProps._0; + let $$this = this ; + let thisJs = this; + let newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); + let newComponent = newConvertedReasonProps._0; if (newComponent.willUpdate === anyToUnit) { return ; } - var oldJsProps = thisJs.props; - var oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); - var curState = thisJs.state; - var curReasonState = curState.reasonState; - var nextReasonState = nextState.reasonState; - var newSelf = $$this.self(nextReasonState, newComponent.retainedProps); - var oldSelf_handle = newSelf.handle; - var oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - var oldSelf_send = newSelf.send; - var oldSelf_onUnmount = newSelf.onUnmount; - var oldSelf = { + let oldJsProps = thisJs.props; + let oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); + let curState = thisJs.state; + let curReasonState = curState.reasonState; + let nextReasonState = nextState.reasonState; + let newSelf = $$this.self(nextReasonState, newComponent.retainedProps); + let oldSelf_handle = newSelf.handle; + let oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + let oldSelf_send = newSelf.send; + let oldSelf_onUnmount = newSelf.onUnmount; + let oldSelf = { handle: oldSelf_handle, state: curReasonState, retainedProps: oldSelf_retainedProps, @@ -170,20 +170,20 @@ function createClass(debugName) { }); }), componentWillReceiveProps: (function (nextProps) { - var $$this = this ; - var thisJs = this; - var newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); - var newComponent = newConvertedReasonProps._0; + let $$this = this ; + let thisJs = this; + let newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); + let newComponent = newConvertedReasonProps._0; if (newComponent.willReceiveProps === willReceivePropsDefault) { return ; } - var oldJsProps = thisJs.props; - var oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); - var oldComponent = oldConvertedReasonProps._0; + let oldJsProps = thisJs.props; + let oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); + let oldComponent = oldConvertedReasonProps._0; thisJs.setState((function (curTotalState, param) { - var curReasonState = curTotalState.reasonState; - var oldSelf = $$this.self(curReasonState, oldComponent.retainedProps); - var nextReasonState = Curry._1(newComponent.willReceiveProps, oldSelf); + let curReasonState = curTotalState.reasonState; + let oldSelf = $$this.self(curReasonState, oldComponent.retainedProps); + let nextReasonState = Curry._1(newComponent.willReceiveProps, oldSelf); if (nextReasonState !== curTotalState) { return { reasonState: nextReasonState @@ -194,24 +194,24 @@ function createClass(debugName) { }), null); }), shouldComponentUpdate: (function (nextJsProps, nextState, param) { - var $$this = this ; - var thisJs = this; - var curJsProps = thisJs.props; - var oldConvertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - var newConvertedReasonProps = nextJsProps === curJsProps ? oldConvertedReasonProps : convertPropsIfTheyreFromJs(nextJsProps, thisJs.jsPropsToReason, debugName); - var newComponent = newConvertedReasonProps._0; - var nextReasonState = nextState.reasonState; - var newSelf = $$this.self(nextReasonState, newComponent.retainedProps); + let $$this = this ; + let thisJs = this; + let curJsProps = thisJs.props; + let oldConvertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let newConvertedReasonProps = nextJsProps === curJsProps ? oldConvertedReasonProps : convertPropsIfTheyreFromJs(nextJsProps, thisJs.jsPropsToReason, debugName); + let newComponent = newConvertedReasonProps._0; + let nextReasonState = nextState.reasonState; + let newSelf = $$this.self(nextReasonState, newComponent.retainedProps); if (newComponent.shouldUpdate === anyToTrue) { return true; } - var curState = thisJs.state; - var curReasonState = curState.reasonState; - var oldSelf_handle = newSelf.handle; - var oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - var oldSelf_send = newSelf.send; - var oldSelf_onUnmount = newSelf.onUnmount; - var oldSelf = { + let curState = thisJs.state; + let curReasonState = curState.reasonState; + let oldSelf_handle = newSelf.handle; + let oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + let oldSelf_send = newSelf.send; + let oldSelf_onUnmount = newSelf.onUnmount; + let oldSelf = { handle: oldSelf_handle, state: curReasonState, retainedProps: oldSelf_retainedProps, @@ -224,8 +224,8 @@ function createClass(debugName) { }); }), onUnmountMethod: (function (subscription) { - var $$this = this ; - var subs = $$this.subscriptions; + let $$this = this ; + let subs = $$this.subscriptions; if (subs !== null) { subs.push(subscription); } else { @@ -233,36 +233,36 @@ function createClass(debugName) { } }), handleMethod: (function (callback) { - var $$this = this ; - var thisJs = this; + let $$this = this ; + let thisJs = this; return function (callbackPayload) { - var curState = thisJs.state; - var curReasonState = curState.reasonState; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let curState = thisJs.state; + let curReasonState = curState.reasonState; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); Curry._2(callback, callbackPayload, $$this.self(curReasonState, convertedReasonProps._0.retainedProps)); }; }), sendMethod: (function (action) { - var $$this = this ; - var thisJs = this; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - var component = convertedReasonProps._0; + let $$this = this ; + let thisJs = this; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let component = convertedReasonProps._0; if (component.reducer === reducerDefault) { return ; } - var sideEffects = { + let sideEffects = { contents: (function (prim) { }) }; - var partialStateApplication = Curry._1(component.reducer, action); + let partialStateApplication = Curry._1(component.reducer, action); thisJs.setState((function (curTotalState, param) { - var curReasonState = curTotalState.reasonState; - var reasonStateUpdate = Curry._1(partialStateApplication, curReasonState); + let curReasonState = curTotalState.reasonState; + let reasonStateUpdate = Curry._1(partialStateApplication, curReasonState); if (reasonStateUpdate === /* NoUpdate */0) { return null; } - var nextTotalState; + let nextTotalState; if (typeof reasonStateUpdate === "number") { nextTotalState = curTotalState; } else { @@ -295,12 +295,12 @@ function createClass(debugName) { })); }), render: (function () { - var $$this = this ; - var thisJs = this; - var convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - var created = convertedReasonProps._0; - var curState = thisJs.state; - var curReasonState = curState.reasonState; + let $$this = this ; + let thisJs = this; + let convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + let created = convertedReasonProps._0; + let curState = thisJs.state; + let curReasonState = curState.reasonState; return Curry._1(created.render, $$this.self(curReasonState, created.retainedProps)); }) }); @@ -327,21 +327,21 @@ function basicComponent(debugName) { }; } -var statelessComponent = basicComponent; +let statelessComponent = basicComponent; -var statelessComponentWithRetainedProps = basicComponent; +let statelessComponentWithRetainedProps = basicComponent; -var reducerComponent = basicComponent; +let reducerComponent = basicComponent; -var reducerComponentWithRetainedProps = basicComponent; +let reducerComponentWithRetainedProps = basicComponent; function element(keyOpt, refOpt, component) { - var key = keyOpt !== undefined ? keyOpt : undefined; - var ref = refOpt !== undefined ? refOpt : undefined; - var element$1 = /* Element */{ + let key = keyOpt !== undefined ? keyOpt : undefined; + let ref = refOpt !== undefined ? refOpt : undefined; + let element$1 = /* Element */{ _0: component }; - var jsElementWrapped = component.jsElementWrapped; + let jsElementWrapped = component.jsElementWrapped; if (jsElementWrapped !== undefined) { return Curry._2(Caml_option.valFromOption(jsElementWrapped), key, ref); } else { @@ -354,20 +354,20 @@ function element(keyOpt, refOpt, component) { } function wrapReasonForJs(component, jsPropsToReason) { - var uncurriedJsPropsToReason = Curry.__1(jsPropsToReason); + let uncurriedJsPropsToReason = Curry.__1(jsPropsToReason); component.reactClassInternal.prototype.jsPropsToReason = uncurriedJsPropsToReason; return component.reactClassInternal; } -var dummyInteropComponent = basicComponent("interop"); +let dummyInteropComponent = basicComponent("interop"); function wrapJsForReason(reactClass, props, children) { - var jsElementWrapped = (function (param, param$1) { - var props$1 = Object.assign(Object.assign({}, props), { + let jsElementWrapped = (function (param, param$1) { + let props$1 = Object.assign(Object.assign({}, props), { ref: param$1, key: param }); - var varargs = [ + let varargs = [ reactClass, props$1 ].concat(children); diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactCompat.js b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactCompat.js index d0354ebddc..261bb5c71e 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactCompat.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactCompat.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var ReasonReact = require("./reasonReact.js"); +let ReasonReact = require("./reasonReact.js"); -var wrapReactForReasonReact = ReasonReact.wrapJsForReason; +let wrapReactForReasonReact = ReasonReact.wrapJsForReason; -var wrapReasonReactForReact = ReasonReact.wrapReasonForJs; +let wrapReasonReactForReact = ReasonReact.wrapReasonForJs; exports.wrapReactForReasonReact = wrapReactForReasonReact; exports.wrapReasonReactForReact = wrapReasonReactForReact; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactOptimizedCreateClass.js b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactOptimizedCreateClass.js index d3c256654f..391f90403c 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactOptimizedCreateClass.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactOptimizedCreateClass.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var React = require("react"); +let React = require("react"); function _assign(prim0, prim1) { return Object.assign(prim0, prim1); } -var emptyObject = {}; +let emptyObject = {}; /** * Copyright 2013-present, Facebook, Inc. @@ -50,7 +50,7 @@ var ReactPropTypeLocationNames; // } ; -var factory = (function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { +let factory = (function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ @@ -882,9 +882,9 @@ var factory = (function factory(ReactComponent, isValidElement, ReactNoopUpdateQ } ); -var reactNoopUpdateQueue = new React.Component().updater; +let reactNoopUpdateQueue = new React.Component().updater; -var createClass = factory(React.Component, React.isValidElement, reactNoopUpdateQueue); +let createClass = factory(React.Component, React.isValidElement, reactNoopUpdateQueue); exports._assign = _assign; exports.emptyObject = emptyObject; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js index b2252a818a..720cb32009 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js @@ -1,38 +1,38 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var React = require("react"); +let Curry = require("melange.js/curry.js"); +let React = require("react"); function safeMakeEvent(eventName) { if (typeof Event === "function") { return new Event(eventName); } - var $$event = document.createEvent("Event"); + let $$event = document.createEvent("Event"); $$event.initEvent(eventName, true, true); return $$event; } function path(param) { - var $$window = typeof window === "undefined" ? undefined : window; + let $$window = typeof window === "undefined" ? undefined : window; if ($$window === undefined) { return /* [] */0; } - var raw = $$window.location.pathname; + let raw = $$window.location.pathname; switch (raw) { case "" : case "/" : return /* [] */0; default: - var raw$1 = raw.slice(1, undefined); - var match = raw$1[raw$1.length - 1 | 0]; - var raw$2 = match === "/" ? raw$1.slice(0, -1) : raw$1; - var a = raw$2.split("/", undefined); - var _i = a.length - 1 | 0; - var _res = /* [] */0; + let raw$1 = raw.slice(1, undefined); + let match = raw$1[raw$1.length - 1 | 0]; + let raw$2 = match === "/" ? raw$1.slice(0, -1) : raw$1; + let a = raw$2.split("/", undefined); + let _i = a.length - 1 | 0; + let _res = /* [] */0; while(true) { - var res = _res; - var i = _i; + let res = _res; + let i = _i; if (i < 0) { return res; } @@ -47,11 +47,11 @@ function path(param) { } function hash(param) { - var $$window = typeof window === "undefined" ? undefined : window; + let $$window = typeof window === "undefined" ? undefined : window; if ($$window === undefined) { return ""; } - var raw = $$window.location.hash; + let raw = $$window.location.hash; switch (raw) { case "" : case "#" : @@ -62,11 +62,11 @@ function hash(param) { } function search(param) { - var $$window = typeof window === "undefined" ? undefined : window; + let $$window = typeof window === "undefined" ? undefined : window; if ($$window === undefined) { return ""; } - var raw = $$window.location.search; + let raw = $$window.location.search; switch (raw) { case "" : case "?" : @@ -77,8 +77,8 @@ function search(param) { } function push(path) { - var match = typeof history === "undefined" ? undefined : history; - var match$1 = typeof window === "undefined" ? undefined : window; + let match = typeof history === "undefined" ? undefined : history; + let match$1 = typeof window === "undefined" ? undefined : window; if (match !== undefined && match$1 !== undefined) { match.pushState(null, "", path); match$1.dispatchEvent(safeMakeEvent("popstate")); @@ -88,8 +88,8 @@ function push(path) { } function replace(path) { - var match = typeof history === "undefined" ? undefined : history; - var match$1 = typeof window === "undefined" ? undefined : window; + let match = typeof history === "undefined" ? undefined : history; + let match$1 = typeof window === "undefined" ? undefined : window; if (match !== undefined && match$1 !== undefined) { match.replaceState(null, "", path); match$1.dispatchEvent(safeMakeEvent("popstate")); @@ -102,11 +102,11 @@ function urlNotEqual(a, b) { if (a.hash !== b.hash || a.search !== b.search) { return true; } else { - var _aList = a.path; - var _bList = b.path; + let _aList = a.path; + let _bList = b.path; while(true) { - var bList = _bList; - var aList = _aList; + let bList = _bList; + let aList = _aList; if (!aList) { if (bList) { return true; @@ -136,13 +136,13 @@ function url(param) { } function watchUrl(callback) { - var $$window = typeof window === "undefined" ? undefined : window; + let $$window = typeof window === "undefined" ? undefined : window; if ($$window === undefined) { return function (param) { }; } - var watcherID = function (param) { + let watcherID = function (param) { Curry._1(callback, url(undefined)); }; $$window.addEventListener("popstate", watcherID); @@ -150,7 +150,7 @@ function watchUrl(callback) { } function unwatchUrl(watcherID) { - var $$window = typeof window === "undefined" ? undefined : window; + let $$window = typeof window === "undefined" ? undefined : window; if ($$window !== undefined) { $$window.removeEventListener("popstate", watcherID); return ; @@ -159,22 +159,22 @@ function unwatchUrl(watcherID) { } function useUrl(serverUrl, param) { - var match = React.useState(function () { + let match = React.useState(function () { if (serverUrl !== undefined) { return serverUrl; } else { return url(undefined); } }); - var setUrl = match[1]; - var url$1 = match[0]; + let setUrl = match[1]; + let url$1 = match[0]; React.useEffect((function () { - var watcherId = watchUrl(function (url) { + let watcherId = watchUrl(function (url) { Curry._1(setUrl, (function (param) { return url; })); }); - var newUrl = url(undefined); + let newUrl = url(undefined); if (urlNotEqual(newUrl, url$1)) { Curry._1(setUrl, (function (param) { return newUrl; @@ -187,7 +187,7 @@ function useUrl(serverUrl, param) { return url$1; } -var dangerouslyGetInitialUrl = url; +let dangerouslyGetInitialUrl = url; exports.push = push; exports.replace = replace; diff --git a/jscomp/test/dist/jscomp/test/re_or_res/recursive_react_component.js b/jscomp/test/dist/jscomp/test/re_or_res/recursive_react_component.js index 965687bf37..3fa9dbcd18 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/recursive_react_component.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/recursive_react_component.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var React = require("react"); +let React = require("react"); function make(Props) { - var foo = Props.foo; + let foo = Props.foo; return React.createElement(make, { foo: foo }); diff --git a/jscomp/test/dist/jscomp/test/rebind_module.js b/jscomp/test/dist/jscomp/test/rebind_module.js index 117b5ac296..cdbf4bc380 100644 --- a/jscomp/test/dist/jscomp/test/rebind_module.js +++ b/jscomp/test/dist/jscomp/test/rebind_module.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); -var A = /* @__PURE__ */Caml_exceptions.create("Rebind_module.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Rebind_module.A"); -var AA = /* @__PURE__ */Caml_exceptions.create("Rebind_module.AA"); +let AA = /* @__PURE__ */Caml_exceptions.create("Rebind_module.AA"); exports.A = A; exports.AA = AA; diff --git a/jscomp/test/dist/jscomp/test/rebind_module_test.js b/jscomp/test/dist/jscomp/test/rebind_module_test.js index bc3292cc2e..4bcb403252 100644 --- a/jscomp/test/dist/jscomp/test/rebind_module_test.js +++ b/jscomp/test/dist/jscomp/test/rebind_module_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Rebind_module = require("./rebind_module.js"); +let Rebind_module = require("./rebind_module.js"); function x(v) { if (v.MEL_EXN_ID === Rebind_module.AA) { diff --git a/jscomp/test/dist/jscomp/test/rec_fun_test.js b/jscomp/test/dist/jscomp/test/rec_fun_test.js index acb7f81154..fd76355a59 100644 --- a/jscomp/test/dist/jscomp/test/rec_fun_test.js +++ b/jscomp/test/dist/jscomp/test/rec_fun_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -30,13 +30,13 @@ function eq(loc, x, y) { }; } -var called = { +let called = { contents: 0 }; function g(param) { - var v = {}; - var next = function (i, b) { + let v = {}; + let next = function (i, b) { called.contents = called.contents + 1 | 0; if (b) { Curry._2(v.contents, i, false); @@ -51,9 +51,9 @@ function g(param) { g(undefined); -var x = {}; +let x = {}; -var y = {}; +let y = {}; Caml_obj.update_dummy(x, { hd: 1, diff --git a/jscomp/test/dist/jscomp/test/rec_module_opt.js b/jscomp/test/dist/jscomp/test/rec_module_opt.js index e9219d21ea..a2774e4dea 100644 --- a/jscomp/test/dist/jscomp/test/rec_module_opt.js +++ b/jscomp/test/dist/jscomp/test/rec_module_opt.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Set = require("melange/set.js"); +let Caml = require("melange.js/caml.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Set = require("melange/set.js"); function compare(t1, t2) { if (t1.TAG === /* Leaf */0) { @@ -19,21 +19,21 @@ function compare(t1, t2) { } } -var A = { +let A = { compare: compare }; -var ASet = Stdlib__Set.Make(A); +let ASet = Stdlib__Set.Make(A); -var X0 = {}; +let X0 = {}; -var Y0 = {}; +let Y0 = {}; function f(x) { return x + 1 | 0; } -var X1 = { +let X1 = { f: f }; @@ -41,11 +41,11 @@ function f$1(x) { return x + 2 | 0; } -var Y1 = { +let Y1 = { f: f$1 }; -var X; +let X; exports.A = A; exports.ASet = ASet; diff --git a/jscomp/test/dist/jscomp/test/rec_module_test.js b/jscomp/test/dist/jscomp/test/rec_module_test.js index ee8d8a24ba..1b3bcfd174 100644 --- a/jscomp/test/dist/jscomp/test/rec_module_test.js +++ b/jscomp/test/dist/jscomp/test/rec_module_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); function even(n) { if (n === 0) { @@ -21,7 +21,7 @@ function even(n) { } } -var A = { +let A = { even: even }; @@ -35,7 +35,7 @@ function odd(n) { } } -var B = { +let B = { odd: odd }; @@ -53,7 +53,7 @@ function x(param) { return Curry._1(BB.y, undefined) + 3 | 0; } -var AA = { +let AA = { even: even$1, x: x }; @@ -72,14 +72,14 @@ function y(param) { return 32; } -var BB = { +let BB = { odd: odd$1, y: y }; -var Even = {}; +let Even = {}; -var Odd = {}; +let Odd = {}; function compare(t1, t2) { if (t1.TAG === /* Leaf */0) { @@ -95,7 +95,7 @@ function compare(t1, t2) { } } -var AAA = { +let AAA = { compare: compare }; @@ -108,8 +108,8 @@ function height(param) { } function create(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -119,13 +119,13 @@ function create(l, v, r) { } function bal(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -151,9 +151,9 @@ function bal(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -180,22 +180,22 @@ function add(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(AAA.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add(x, l); + let ll = add(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = add(x, r); + let rr = add(x, r); if (r === rr) { return t; } else { @@ -235,8 +235,8 @@ function join(l, v, r) { if (!r) { return add_max_element(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, join(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -248,9 +248,9 @@ function join(l, v, r) { function min_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return param.v; } @@ -265,11 +265,11 @@ function min_elt(_param) { function min_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return Caml_option.some(param.v); } @@ -280,7 +280,7 @@ function min_elt_opt(_param) { function max_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return param.v; @@ -296,7 +296,7 @@ function max_elt(_param) { function max_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -310,7 +310,7 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_elt(l), param.v, param.r); } else { @@ -343,10 +343,10 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(AAA.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { return [ l, @@ -355,14 +355,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, match$1[0]), match$1[1], @@ -380,11 +380,11 @@ function is_empty(param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(AAA.compare, x, param.v); + let c = Curry._2(AAA.compare, x, param.v); if (c === 0) { return true; } @@ -397,10 +397,10 @@ function remove(x, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(AAA.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { if (l) { if (r) { @@ -413,14 +413,14 @@ function remove(x, t) { } } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return t; } else { @@ -435,21 +435,21 @@ function union(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add(v2, s1); } - var match = split(v1, s2); + let match = split(v1, s2); return join(union(s1.l, match[0]), v1, union(s1.r, match[2])); } if (h1 === 1) { return add(v1, s2); } - var match$1 = split(v2, s1); + let match$1 = split(v2, s1); return join(union(match$1[0], s2.l), v2, union(match$1[2], s2.r)); } @@ -460,11 +460,11 @@ function inter(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return join(inter(l1, l2), v1, inter(r1, match[2])); } else { @@ -481,19 +481,19 @@ function split_bis(x, param) { }) }; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(AAA.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { return /* Found */0; } if (c < 0) { - var match = split_bis(x, l); + let match = split_bis(x, l); if (!match) { return /* Found */0; } - var rl = match._1; + let rl = match._1; return /* NotFound */{ _0: match._0, _1: (function (param) { @@ -501,7 +501,7 @@ function split_bis(x, param) { }) }; } - var match$1 = split_bis(x, r); + let match$1 = split_bis(x, r); if (match$1) { return /* NotFound */{ _0: join(l, v, match$1._0), @@ -514,8 +514,8 @@ function split_bis(x, param) { function disjoint(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } @@ -525,7 +525,7 @@ function disjoint(_s1, _s2) { if (s1 === s2) { return false; } - var match = split_bis(s1.v, s2); + let match = split_bis(s1.v, s2); if (!match) { return false; } @@ -545,11 +545,11 @@ function diff(s1, s2) { if (!s2) { return s1; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return concat(diff(l1, l2), diff(r1, match[2])); } else { @@ -559,8 +559,8 @@ function diff(s1, s2) { function cons_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -575,11 +575,11 @@ function cons_enum(_s, _e) { } function compare$1(s1, s2) { - var _e1 = cons_enum(s1, /* End */0); - var _e2 = cons_enum(s2, /* End */0); + let _e1 = cons_enum(s1, /* End */0); + let _e2 = cons_enum(s2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -590,7 +590,7 @@ function compare$1(s1, s2) { if (!e2) { return 1; } - var c = Curry._2(AAA.compare, e1._0, e2._0); + let c = Curry._2(AAA.compare, e1._0, e2._0); if (c !== 0) { return c; } @@ -606,20 +606,20 @@ function equal(s1, s2) { function subset(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2.r; - var l2 = s2.l; - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var c = Curry._2(AAA.compare, v1, s2.v); + let r2 = s2.r; + let l2 = s2.l; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let c = Curry._2(AAA.compare, v1, s2.v); if (c === 0) { if (!subset(l1, l2)) { return false; @@ -655,7 +655,7 @@ function subset(_s1, _s2) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -668,8 +668,8 @@ function iter(f, _param) { function fold(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -681,7 +681,7 @@ function fold(f, _s, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -698,7 +698,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -717,12 +717,12 @@ function filter(p, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter(p, l); - var pv = Curry._1(p, v); - var r$p = filter(p, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter(p, l); + let pv = Curry._1(p, v); + let r$p = filter(p, r); if (pv) { if (l === l$p && r === r$p) { return t; @@ -741,14 +741,14 @@ function partition(p, param) { /* Empty */0 ]; } - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pv = Curry._1(p, v); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pv = Curry._1(p, v); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pv) { return [ join(lt, v, rt), @@ -772,8 +772,8 @@ function cardinal(param) { function elements_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -792,10 +792,10 @@ function elements(s) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; - var c = Curry._2(AAA.compare, x, v); + let v = param.v; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { return v; } @@ -810,19 +810,19 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -843,21 +843,21 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -874,19 +874,19 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -907,21 +907,21 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -938,12 +938,12 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; - var c = Curry._2(AAA.compare, x, v); + let v = param.v; + let c = Curry._2(AAA.compare, x, v); if (c === 0) { return Caml_option.some(v); } @@ -964,12 +964,12 @@ function map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = map(f, l); - var v$p = Curry._1(f, v); - var r$p = map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = map(f, l); + let v$p = Curry._1(f, v); + let r$p = map(f, r); if (l === l$p && v === v$p && r === r$p) { return t; } else { @@ -981,12 +981,12 @@ function filter_map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter_map(f, l); - var v$p = Curry._1(f, v); - var r$p = filter_map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter_map(f, l); + let v$p = Curry._1(f, v); + let r$p = filter_map(f, r); if (v$p === undefined) { if (l$p) { if (r$p) { @@ -998,7 +998,7 @@ function filter_map(f, t) { return r$p; } } - var v$p$1 = Caml_option.valFromOption(v$p); + let v$p$1 = Caml_option.valFromOption(v$p); if (l === l$p && v === v$p$1 && r === r$p) { return t; } else { @@ -1010,27 +1010,27 @@ function of_list(l) { if (!l) { return /* Empty */0; } - var match = l.tl; - var x0 = l.hd; + let match = l.tl; + let x0 = l.hd; if (!match) { return singleton(x0); } - var match$1 = match.tl; - var x1 = match.hd; + let match$1 = match.tl; + let x1 = match.hd; if (!match$1) { return add(x1, singleton(x0)); } - var match$2 = match$1.tl; - var x2 = match$1.hd; + let match$2 = match$1.tl; + let x2 = match$1.hd; if (!match$2) { return add(x2, add(x1, singleton(x0))); } - var match$3 = match$2.tl; - var x3 = match$2.hd; + let match$3 = match$2.tl; + let x3 = match$2.hd; if (match$3) { if (match$3.tl) { - var l$1 = Stdlib__List.sort_uniq(AAA.compare, l); - var sub = function (n, l) { + let l$1 = Stdlib__List.sort_uniq(AAA.compare, l); + let sub = function (n, l) { switch (n) { case 0 : return [ @@ -1052,7 +1052,7 @@ function of_list(l) { break; case 2 : if (l) { - var match = l.tl; + let match = l.tl; if (match) { return [ /* Node */{ @@ -1074,9 +1074,9 @@ function of_list(l) { break; case 3 : if (l) { - var match$1 = l.tl; + let match$1 = l.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return [ /* Node */{ @@ -1106,11 +1106,11 @@ function of_list(l) { default: } - var nl = n / 2 | 0; - var match$3 = sub(nl, l); - var l$1 = match$3[1]; + let nl = n / 2 | 0; + let match$3 = sub(nl, l); + let l$1 = match$3[1]; if (l$1) { - var match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); + let match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); return [ create(match$3[0], l$1.hd, match$4[0]), match$4[1] @@ -1148,7 +1148,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._1, c._2); + let partial_arg = cons_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1158,7 +1158,7 @@ function seq_of_enum_(c, param) { } function to_seq(c) { - var partial_arg = cons_enum(c, /* End */0); + let partial_arg = cons_enum(c, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1166,8 +1166,8 @@ function to_seq(c) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1185,7 +1185,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._1, c._2); + let partial_arg = snoc_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1195,23 +1195,23 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, s) { - var aux = function (low, _s, _c) { + let aux = function (low, _s, _c) { while(true) { - var c = _c; - var s = _s; + let c = _c; + let s = _s; if (!s) { return c; } - var r = s.r; - var v = s.v; - var n = Curry._2(AAA.compare, v, low); + let r = s.r; + let v = s.v; + let n = Curry._2(AAA.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1232,13 +1232,13 @@ function to_seq_from(low, s) { continue ; }; }; - var partial_arg = aux(low, s, /* End */0); + let partial_arg = aux(low, s, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var ASet = { +let ASet = { empty: /* Empty */0, add: add, singleton: singleton, @@ -1284,7 +1284,7 @@ var ASet = { of_seq: of_seq }; -var suites_0 = [ +let suites_0 = [ "test1", (function (param) { return { @@ -1305,7 +1305,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "test2", (function (param) { @@ -1397,7 +1397,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/rec_value_test.js b/jscomp/test/dist/jscomp/test/rec_value_test.js index eabbeeb760..743811976c 100644 --- a/jscomp/test/dist/jscomp/test/rec_value_test.js +++ b/jscomp/test/dist/jscomp/test/rec_value_test.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var x = {}; +let x = {}; x.hd = 1; x.tl = x; -var x0 = {}; +let x0 = {}; Caml_obj.update_dummy(x0, { NAME: "Cons", @@ -24,18 +24,18 @@ Caml_obj.update_dummy(x0, { ] }); -var y0 = {}; +let y0 = {}; Caml_obj.update_dummy(y0, { NAME: "Cons", VAL: y0 }); -var a = {}; +let a = {}; -var b = {}; +let b = {}; -var c = {}; +let c = {}; Caml_obj.update_dummy(a, { hd: 2, @@ -52,7 +52,7 @@ Caml_obj.update_dummy(c, { tl: a }); -var xx = {}; +let xx = {}; xx.hd = 1; @@ -66,20 +66,20 @@ function naive(n) { } } -var four = { +let four = { contents: 2 }; -var three = { +let three = { contents: 3 }; -var h = { +let h = { LAZY_DONE: true, VAL: fib }; -var v = { +let v = { contents: (function (param) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -112,12 +112,12 @@ function zs(param) { return Stdlib__List.hd(xs[0]); } -var xs_0 = { +let xs_0 = { hd: 2, tl: /* [] */0 }; -var xs = [ +let xs = [ xs_0, zs ]; @@ -130,7 +130,7 @@ function fib2(n) { } } -var two = 2; +let two = 2; function fib3(n) { if (n === 0 || n === 1) { @@ -144,7 +144,7 @@ function even(n) { if (n === 0) { return true; } else { - var n$1 = n - 1 | 0; + let n$1 = n - 1 | 0; if (n$1 === 1) { return true; } else { @@ -155,7 +155,7 @@ function even(n) { function even2(_n) { while(true) { - var n = _n; + let n = _n; if (n === 0) { return true; } @@ -164,7 +164,7 @@ function even2(_n) { }; } -var lazy_v = { +let lazy_v = { LAZY_DONE: true, VAL: (function (param) { CamlinternalLazy.force(lazy_v); @@ -173,8 +173,8 @@ var lazy_v = { function sum(_acc, _n) { while(true) { - var n = _n; - var acc = _acc; + let n = _n; + let acc = _acc; if (n <= 0) { return acc; } @@ -184,7 +184,7 @@ function sum(_acc, _n) { }; } -var fake_v = { +let fake_v = { hd: 1, tl: { hd: 2, @@ -192,7 +192,7 @@ var fake_v = { } }; -var fake_y = { +let fake_y = { hd: 2, tl: { hd: 3, @@ -200,12 +200,12 @@ var fake_y = { } }; -var fake_z = { +let fake_z = { hd: 1, tl: fake_y }; -var fake_y2 = { +let fake_y2 = { hd: 2, tl: { hd: 3, @@ -213,12 +213,12 @@ var fake_y2 = { } }; -var fake_z2_1 = { +let fake_z2_1 = { hd: sum(0, 10), tl: fake_y2 }; -var fake_z2 = { +let fake_z2 = { hd: 1, tl: fake_z2_1 }; @@ -227,7 +227,7 @@ function rec_variant_b_1(param) { return rec_variant_a; } -var rec_variant_b = { +let rec_variant_b = { TAG: /* B */0, _0: "gho", _1: rec_variant_b_1 @@ -237,7 +237,7 @@ function rec_variant_a_1(param) { return rec_variant_b; } -var rec_variant_a = { +let rec_variant_a = { TAG: /* A */1, _0: 3, _1: rec_variant_a_1 @@ -291,7 +291,7 @@ function ptl(l) { }); } -var y00 = {}; +let y00 = {}; Caml_obj.update_dummy(y00, { TAG: /* C1 */1, @@ -307,7 +307,7 @@ function xtl(h) { return h.tail; } -var suites_0 = [ +let suites_0 = [ "File \"jscomp/test/rec_value_test.ml\", line 128, characters 2-9", (function (param) { return { @@ -318,7 +318,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "File \"jscomp/test/rec_value_test.ml\", line 130, characters 2-9", (function (param) { @@ -344,9 +344,9 @@ var suites_1 = { hd: [ "mutual", (function (param) { - var tmp; + let tmp; if (a) { - var match = a.tl; + let match = a.tl; if (match) { tmp = match.hd; } else { @@ -548,7 +548,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; @@ -558,17 +558,17 @@ function fake_minus(n) { return n + 1 | 0; } -var fake_odd = fake_minus; +let fake_odd = fake_minus; function fake_inline_minus(n) { return n + 1 | 0; } -var fake_inline = fake_inline_minus; +let fake_inline = fake_inline_minus; -var fake_inline_inlie2 = fake_inline_minus(3); +let fake_inline_inlie2 = fake_inline_minus(3); -var u = []; +let u = []; Caml_obj.update_dummy(u, [ 1, @@ -577,7 +577,7 @@ Caml_obj.update_dummy(u, [ Mt.from_pair_suites("Rec_value_test", suites); -var v$1 = 3; +let v$1 = 3; exports.x = x; exports.x0 = x0; diff --git a/jscomp/test/dist/jscomp/test/record_debug_test.js b/jscomp/test/dist/jscomp/test/record_debug_test.js index 5935fdf596..1dc9dac506 100644 --- a/jscomp/test/dist/jscomp/test/record_debug_test.js +++ b/jscomp/test/dist/jscomp/test/record_debug_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Mt = require("./mt.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,34 +16,34 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var u_a = 2; +let u_a = 2; -var u_b = { +let u_b = { xx: 2, yy: 3 }; -var u = { +let u = { a: u_a, b: u_b }; -var A = /* @__PURE__ */Caml_exceptions.create("Record_debug_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Record_debug_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Record_debug_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Record_debug_test.B"); -var v0 = { +let v0 = { MEL_EXN_ID: A, _1: 3 }; -var v1 = { +let v1 = { MEL_EXN_ID: B, _1: 3, _2: 2 }; -var N = { +let N = { a: 0, b: 1 }; @@ -52,23 +52,23 @@ function N0_f(prim) { return prim; } -var N0 = { +let N0 = { a: 0, b: 1, f: N0_f }; -var i = String(3); +let i = String(3); -var a_2 = "" + i; +let a_2 = "" + i; -var a_3 = "" + i + i; +let a_3 = "" + i + i; -var a_4 = "" + i + i + i; +let a_4 = "" + i + i + i; -var a_5 = " " + i; +let a_5 = " " + i; -var a = [ +let a = [ "", "a", a_2, @@ -88,7 +88,7 @@ eq("File \"jscomp/test/record_debug_test.ml\", line 59, characters 3-10", a, [ Mt.from_pair_suites("jscomp/test/record_debug_test.ml", suites.contents); -var v = { +let v = { a: 3, b: { xx: 2, @@ -96,7 +96,7 @@ var v = { } }; -var h = { +let h = { hd: 1, tl: { hd: 2, @@ -110,12 +110,12 @@ var h = { } }; -var v2 = { +let v2 = { NAME: "C", VAL: 2 }; -var v3 = { +let v3 = { NAME: "C", VAL: [ 2, diff --git a/jscomp/test/dist/jscomp/test/record_extension_test.js b/jscomp/test/dist/jscomp/test/record_extension_test.js index 5bf0c36c8e..0cd3f95c78 100644 --- a/jscomp/test/dist/jscomp/test/record_extension_test.js +++ b/jscomp/test/dist/jscomp/test/record_extension_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -19,7 +19,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var Inline_record = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.Inline_record"); +let Inline_record = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.Inline_record"); function f(x) { if (x.MEL_EXN_ID === Inline_record) { @@ -28,7 +28,7 @@ function f(x) { } -var v0 = { +let v0 = { MEL_EXN_ID: Inline_record, x: 3, y: "4" @@ -56,18 +56,18 @@ function f2_with(x) { } } -var A = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.A"); -var B = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.B"); +let B = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.B"); -var C = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.C"); +let C = /* @__PURE__ */Caml_exceptions.create("Record_extension_test.C"); function u(f) { try { return Curry._1(f, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === A) { return exn.name + exn.x | 0; } else if (exn.MEL_EXN_ID === B) { diff --git a/jscomp/test/dist/jscomp/test/record_with_test.js b/jscomp/test/dist/jscomp/test/record_with_test.js index de14b00f82..12751405c2 100644 --- a/jscomp/test/dist/jscomp/test/record_with_test.js +++ b/jscomp/test/dist/jscomp/test/record_with_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var v = { +let v = { syntax: undefined, imports: 0, file_options: 0, @@ -14,7 +14,7 @@ var v = { extends: 0 }; -var u_v = { +let u_v = { syntax: undefined, imports: 0, file_options: 0, @@ -25,7 +25,7 @@ var u_v = { }; function f(g, h) { - var init = Curry._1(g, h); + let init = Curry._1(g, h); return { syntax: init.syntax, imports: 0, @@ -37,7 +37,7 @@ function f(g, h) { }; } -var suites_0 = [ +let suites_0 = [ "eq_with", (function (param) { return { @@ -48,14 +48,14 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; Mt.from_pair_suites("Record_with_test", suites); -var uv = { +let uv = { syntax: undefined, imports: 1, file_options: 0, diff --git a/jscomp/test/dist/jscomp/test/recursive_module.js b/jscomp/test/dist/jscomp/test/recursive_module.js index 318ec3f50a..a99b4aa150 100644 --- a/jscomp/test/dist/jscomp/test/recursive_module.js +++ b/jscomp/test/dist/jscomp/test/recursive_module.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_module = require("melange.js/caml_module.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Lazy = require("melange/lazy.js"); - -var suites = { +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_module = require("melange.js/caml_module.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Lazy = require("melange/lazy.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -22,13 +22,13 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var Xx = { +let Xx = { f: (function (prim0, prim1) { return Caml_external_polyfill.resolve("caml_hfiehi")(prim0, prim1); }) }; -var Int3 = Caml_module.init_mod([ +let Int3 = Caml_module.init_mod([ "jscomp/test/recursive_module.ml", 27, 6 @@ -48,7 +48,7 @@ Caml_module.update_mod({ ]] }, Int3, Int3); -var Inta = Caml_module.init_mod([ +let Inta = Caml_module.init_mod([ "jscomp/test/recursive_module.ml", 31, 6 @@ -60,7 +60,7 @@ var Inta = Caml_module.init_mod([ ]] }); -var Intb = Caml_module.init_mod([ +let Intb = Caml_module.init_mod([ "jscomp/test/recursive_module.ml", 36, 6 @@ -72,7 +72,7 @@ var Intb = Caml_module.init_mod([ ]] }); -var a = { +let a = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(Intb.a); @@ -89,7 +89,7 @@ Caml_module.update_mod({ a: a }); -var a$1 = { +let a$1 = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(Inta.a) + 1 | 0; @@ -106,13 +106,13 @@ Caml_module.update_mod({ a: a$1 }); -var tmp; +let tmp; try { tmp = CamlinternalLazy.force(Intb.a); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Lazy.Undefined) { tmp = -1; } else { @@ -122,7 +122,7 @@ catch (raw_exn){ eq("File \"jscomp/test/recursive_module.ml\", line 41, characters 3-10", -1, tmp); -var Inta$1 = Caml_module.init_mod([ +let Inta$1 = Caml_module.init_mod([ "jscomp/test/recursive_module.ml", 48, 8 @@ -134,7 +134,7 @@ var Inta$1 = Caml_module.init_mod([ ]] }); -var Intb$1 = Caml_module.init_mod([ +let Intb$1 = Caml_module.init_mod([ "jscomp/test/recursive_module.ml", 53, 8 @@ -146,7 +146,7 @@ var Intb$1 = Caml_module.init_mod([ ]] }); -var a$2 = { +let a$2 = { LAZY_DONE: false, VAL: (function () { return CamlinternalLazy.force(Intb$1.a) + 1 | 0; @@ -163,7 +163,7 @@ Caml_module.update_mod({ a: a$2 }); -var a$3 = { +let a$3 = { LAZY_DONE: true, VAL: 2 }; @@ -178,21 +178,21 @@ Caml_module.update_mod({ a: a$3 }); -var A = { +let A = { Inta: Inta$1, Intb: Intb$1 }; eq("File \"jscomp/test/recursive_module.ml\", line 58, characters 6-13", CamlinternalLazy.force(Inta$1.a), 3); -var tmp$1; +let tmp$1; try { Curry._1(Int3.u, 3); tmp$1 = 3; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { tmp$1 = 4; } else { @@ -204,9 +204,9 @@ eq("File \"jscomp/test/recursive_module.ml\", line 60, characters 6-13", 4, tmp$ Mt.from_pair_suites("Recursive_module", suites.contents); -var Int32; +let Int32; -var uuu = Xx.f; +let uuu = Xx.f; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/recursive_module_test.js b/jscomp/test/dist/jscomp/test/recursive_module_test.js index df615452a3..601d17a659 100644 --- a/jscomp/test/dist/jscomp/test/recursive_module_test.js +++ b/jscomp/test/dist/jscomp/test/recursive_module_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_module = require("melange.js/caml_module.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_module = require("melange.js/caml_module.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -37,7 +37,7 @@ function add(suite) { }; } -var Int3 = Caml_module.init_mod([ +let Int3 = Caml_module.init_mod([ "jscomp/test/recursive_module_test.ml", 13, 6 @@ -65,13 +65,13 @@ function fact(n) { } } -var M = { +let M = { fact: fact }; -var fact$1 = M.fact; +let fact$1 = M.fact; -var Fact = { +let Fact = { M: M, fact: fact$1 }; diff --git a/jscomp/test/dist/jscomp/test/recursive_records_test.js b/jscomp/test/dist/jscomp/test/recursive_records_test.js index 6145f575d7..5679bcf012 100644 --- a/jscomp/test/dist/jscomp/test/recursive_records_test.js +++ b/jscomp/test/dist/jscomp/test/recursive_records_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,14 +18,14 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var rec_cell = {}; +let rec_cell = {}; rec_cell.content = 3; rec_cell.next = rec_cell; function f0(x) { - var rec_cell = {}; + let rec_cell = {}; Caml_obj.update_dummy(rec_cell, { content: Math.imul(x, x) - 6 | 0, next: rec_cell @@ -41,14 +41,14 @@ eq("File \"jscomp/test/recursive_records_test.ml\", line 29, characters 5-12", a eq("File \"jscomp/test/recursive_records_test.ml\", line 30, characters 5-12", a0(f0(3)), 9); -var rec_cell2 = {}; +let rec_cell2 = {}; rec_cell2.content = 3; rec_cell2.next = rec_cell2; function f2(x) { - var rec_cell2 = {}; + let rec_cell2 = {}; Caml_obj.update_dummy(rec_cell2, /* Cons */{ content: Math.imul(x, x) - 6 | 0, next: rec_cell2 @@ -80,18 +80,18 @@ function tl_exn(x) { eq("File \"jscomp/test/recursive_records_test.ml\", line 56, characters 6-13", (hd(rec_cell2) + hd(tl_exn(rec_cell2)) | 0) + hd(tl_exn(tl_exn(rec_cell2))) | 0, 9); -var rec_cell2$1 = f2(3); +let rec_cell2$1 = f2(3); eq("File \"jscomp/test/recursive_records_test.ml\", line 60, characters 5-12", (hd(rec_cell2$1) + hd(tl_exn(rec_cell2$1)) | 0) + hd(tl_exn(tl_exn(rec_cell2$1))) | 0, 9); -var rec_cell3 = {}; +let rec_cell3 = {}; rec_cell3.hd = 3; rec_cell3.tl = rec_cell3; function f3(x) { - var rec_cell3 = {}; + let rec_cell3 = {}; Caml_obj.update_dummy(rec_cell3, { hd: Math.imul(x, x) - 6 | 0, tl: rec_cell3 @@ -101,7 +101,7 @@ function f3(x) { eq("File \"jscomp/test/recursive_records_test.ml\", line 74, characters 5-12", (Stdlib__List.hd(rec_cell3) + Stdlib__List.hd(Stdlib__List.tl(rec_cell3)) | 0) + Stdlib__List.hd(Stdlib__List.tl(Stdlib__List.tl(rec_cell3))) | 0, 9); -var rec_cell3$1 = f3(3); +let rec_cell3$1 = f3(3); eq("File \"jscomp/test/recursive_records_test.ml\", line 77, characters 5-12", (Stdlib__List.hd(rec_cell3$1) + Stdlib__List.hd(Stdlib__List.tl(rec_cell3$1)) | 0) + Stdlib__List.hd(Stdlib__List.tl(Stdlib__List.tl(rec_cell3$1))) | 0, 9); diff --git a/jscomp/test/dist/jscomp/test/recursive_unbound_module_test.js b/jscomp/test/dist/jscomp/test/recursive_unbound_module_test.js index 758dda1086..6eaa197309 100644 --- a/jscomp/test/dist/jscomp/test/recursive_unbound_module_test.js +++ b/jscomp/test/dist/jscomp/test/recursive_unbound_module_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_module = require("melange.js/caml_module.js"); +let Caml_module = require("melange.js/caml_module.js"); function Make(X) { - var f = function (param) { + let f = function (param) { }; - var M = { + let M = { f: f }; return { @@ -15,7 +15,7 @@ function Make(X) { }; } -var B = Caml_module.init_mod([ +let B = Caml_module.init_mod([ "jscomp/test/recursive_unbound_module_test.ml", 18, 0 @@ -37,7 +37,7 @@ function f(param) { } -var M = { +let M = { f: f }; @@ -57,7 +57,7 @@ Caml_module.update_mod({ M: M }); -var A; +let A; exports.Make = Make; exports.A = A; diff --git a/jscomp/test/dist/jscomp/test/relative_path.js b/jscomp/test/dist/jscomp/test/relative_path.js index 33b3e65a80..be19cbded4 100644 --- a/jscomp/test/dist/jscomp/test/relative_path.js +++ b/jscomp/test/dist/jscomp/test/relative_path.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var FileJs = require("./File.js"); +let FileJs = require("./File.js"); -var foo = FileJs.foo; +let foo = FileJs.foo; function foo2(prim) { return FileJs.foo2(prim); } -var bar = foo; +let bar = foo; exports.foo = foo; exports.foo2 = foo2; diff --git a/jscomp/test/dist/jscomp/test/return_check.js b/jscomp/test/dist/jscomp/test/return_check.js index fdc8704309..51c5ab1dec 100644 --- a/jscomp/test/dist/jscomp/test/return_check.js +++ b/jscomp/test/dist/jscomp/test/return_check.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); function test(dom) { - var elem = dom.getElementById("haha"); + let elem = dom.getElementById("haha"); if (elem !== null) { console.log(elem); return 2; @@ -15,7 +15,7 @@ function test(dom) { } function f_undefined(xs, i) { - var k = xs[i]; + let k = xs[i]; if (k !== undefined) { return k; } @@ -30,7 +30,7 @@ function f_undefined(xs, i) { } function f_escaped_not(xs, i) { - var x = xs[i]; + let x = xs[i]; console.log("hei"); if (x !== undefined) { return x; @@ -40,7 +40,7 @@ function f_escaped_not(xs, i) { } function f_escaped_1(xs, i) { - var x = xs[i]; + let x = xs[i]; return function (param) { if (x !== undefined) { return x; @@ -55,7 +55,7 @@ function f_escaped_2(xs, i) { } function f_null(xs, i) { - var k = xs[i]; + let k = xs[i]; if (k !== null) { return k; } @@ -70,7 +70,7 @@ function f_null(xs, i) { } function f_null_undefined(xs, i) { - var k = xs[i]; + let k = xs[i]; if (!(k == null)) { return k; } diff --git a/jscomp/test/dist/jscomp/test/runtime_encoding_test.js b/jscomp/test/dist/jscomp/test/runtime_encoding_test.js index 3f08cc1e37..269d030fe1 100644 --- a/jscomp/test/dist/jscomp/test/runtime_encoding_test.js +++ b/jscomp/test/dist/jscomp/test/runtime_encoding_test.js @@ -2,7 +2,7 @@ 'use strict'; -var v = [ +let v = [ 0, 1 ]; diff --git a/jscomp/test/dist/jscomp/test/scanf_io.js b/jscomp/test/dist/jscomp/test/scanf_io.js index 3a1223e1b0..26ecae1d5f 100644 --- a/jscomp/test/dist/jscomp/test/scanf_io.js +++ b/jscomp/test/dist/jscomp/test/scanf_io.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Digest = require("melange/digest.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Scanf = require("melange/scanf.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Digest = require("melange/digest.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Scanf = require("melange/scanf.js"); -var tscanf_data_file = "tscanf_data"; +let tscanf_data_file = "tscanf_data"; -var tscanf_data_file_lines = { +let tscanf_data_file_lines = { hd: [ "Objective", "Caml" @@ -26,7 +26,7 @@ var tscanf_data_file_lines = { }; function create_tscanf_data(ob, lines) { - var add_line = function (param) { + let add_line = function (param) { Stdlib__Buffer.add_string(ob, Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Caml_string */3, @@ -50,8 +50,8 @@ function create_tscanf_data(ob, lines) { } function write_tscanf_data_file(fname, lines) { - var oc = Stdlib.open_out(fname); - var ob = Stdlib__Buffer.create(42); + let oc = Stdlib.open_out(fname); + let ob = Stdlib__Buffer.create(42); create_tscanf_data(ob, lines); Stdlib__Buffer.output_buffer(oc, ob); Caml_io.caml_ml_flush(oc); @@ -59,8 +59,8 @@ function write_tscanf_data_file(fname, lines) { } function get_lines(fname) { - var ib = Stdlib__Scanf.Scanning.from_file(fname); - var l = { + let ib = Stdlib__Scanf.Scanning.from_file(fname); + let l = { contents: /* [] */0 }; try { @@ -101,9 +101,9 @@ function get_lines(fname) { return Stdlib__List.rev(l.contents); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { - var s = Curry._2(Stdlib__Printf.sprintf(/* Format */{ + let s = Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "in file ", @@ -129,7 +129,7 @@ function get_lines(fname) { }); } if (exn.MEL_EXN_ID === Stdlib.End_of_file) { - var s$1 = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let s$1 = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "in file ", @@ -155,7 +155,7 @@ function get_lines(fname) { } function add_digest_ib(ob, ib) { - var scan_line = function (ib, f) { + let scan_line = function (ib, f) { return Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Scan_char_set */20, @@ -170,10 +170,10 @@ function add_digest_ib(ob, ib) { _1: "%[^\n\r]\n" }), f); }; - var output_line_digest = function (s) { + let output_line_digest = function (s) { Stdlib__Buffer.add_string(ob, s); Stdlib__Buffer.add_char(ob, /* '#' */35); - var s$1 = Stdlib__Digest.to_hex(Stdlib__Digest.string(s)); + let s$1 = Stdlib__Digest.to_hex(Stdlib__Digest.string(s)); Stdlib__Buffer.add_string(ob, Caml_bytes.bytes_to_string(Stdlib__Bytes.uppercase_ascii(Caml_bytes.bytes_of_string(s$1)))); Stdlib__Buffer.add_char(ob, /* '\n' */10); }; @@ -184,7 +184,7 @@ function add_digest_ib(ob, ib) { return ; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.End_of_file) { return ; } @@ -193,8 +193,8 @@ function add_digest_ib(ob, ib) { } function digest_file(fname) { - var ib = Stdlib__Scanf.Scanning.from_file(fname); - var ob = Stdlib__Buffer.create(42); + let ib = Stdlib__Scanf.Scanning.from_file(fname); + let ob = Stdlib__Buffer.create(42); add_digest_ib(ob, ib); return Stdlib__Buffer.contents(ob); } @@ -204,13 +204,13 @@ function test54(param) { } function test55(param) { - var ob = Stdlib__Buffer.create(42); + let ob = Stdlib__Buffer.create(42); create_tscanf_data(ob, tscanf_data_file_lines); - var s = Stdlib__Buffer.contents(ob); + let s = Stdlib__Buffer.contents(ob); ob.position = 0; - var ib = Stdlib__Scanf.Scanning.from_string(s); + let ib = Stdlib__Scanf.Scanning.from_string(s); add_digest_ib(ob, ib); - var tscanf_data_file_lines_digest = Stdlib__Buffer.contents(ob); + let tscanf_data_file_lines_digest = Stdlib__Buffer.contents(ob); return digest_file(tscanf_data_file) === tscanf_data_file_lines_digest; } diff --git a/jscomp/test/dist/jscomp/test/scanf_reference_error_regression_test.js b/jscomp/test/dist/jscomp/test/scanf_reference_error_regression_test.js index 868e6aff1e..1dca1bf9b6 100644 --- a/jscomp/test/dist/jscomp/test/scanf_reference_error_regression_test.js +++ b/jscomp/test/dist/jscomp/test/scanf_reference_error_regression_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Scanf = require("melange/scanf.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Scanf = require("melange/scanf.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -52,7 +52,7 @@ function scan_rest(ib, accu) { }, _1: " %i " }), (function (i) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -71,7 +71,7 @@ function scan_rest(ib, accu) { case "]" : return accu$1; default: - var s = Stdlib__Printf.sprintf(/* Format */{ + let s = Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "scan_int_list", diff --git a/jscomp/test/dist/jscomp/test/scanf_test.js b/jscomp/test/dist/jscomp/test/scanf_test.js index cb1f6baa81..366332a281 100644 --- a/jscomp/test/dist/jscomp/test/scanf_test.js +++ b/jscomp/test/dist/jscomp/test/scanf_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__Scanf = require("melange/scanf.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__Scanf = require("melange/scanf.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/set_gen.js b/jscomp/test/dist/jscomp/test/set_gen.js index 94c49ff01c..cddd1f4fa4 100644 --- a/jscomp/test/dist/jscomp/test/set_gen.js +++ b/jscomp/test/dist/jscomp/test/set_gen.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); function cons_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -35,9 +35,9 @@ function height(param) { function min_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param._0; + let l = param._0; if (!l) { return param._1; } @@ -52,7 +52,7 @@ function min_elt(_param) { function max_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param._2) { return param._1; @@ -76,8 +76,8 @@ function is_empty(param) { function cardinal_aux(_acc, _param) { while(true) { - var param = _param; - var acc = _acc; + let param = _param; + let acc = _acc; if (!param) { return acc; } @@ -93,8 +93,8 @@ function cardinal(s) { function elements_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -113,7 +113,7 @@ function elements(s) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -126,8 +126,8 @@ function iter(f, _param) { function fold(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -139,7 +139,7 @@ function fold(f, _s, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -156,7 +156,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -193,23 +193,23 @@ function max_int_2(a, b) { } } -var Height_invariant_broken = /* @__PURE__ */Caml_exceptions.create("Set_gen.Height_invariant_broken"); +let Height_invariant_broken = /* @__PURE__ */Caml_exceptions.create("Set_gen.Height_invariant_broken"); -var Height_diff_borken = /* @__PURE__ */Caml_exceptions.create("Set_gen.Height_diff_borken"); +let Height_diff_borken = /* @__PURE__ */Caml_exceptions.create("Set_gen.Height_diff_borken"); function check_height_and_diff(param) { if (!param) { return 0; } - var h = param._3; - var hl = check_height_and_diff(param._0); - var hr = check_height_and_diff(param._2); + let h = param._3; + let hl = check_height_and_diff(param._0); + let hr = check_height_and_diff(param._2); if (h !== (max_int_2(hl, hr) + 1 | 0)) { throw new Caml_js_exceptions.MelangeError(Height_invariant_broken, { MEL_EXN_ID: Height_invariant_broken }); } - var diff = Stdlib.abs(hl - hr | 0); + let diff = Stdlib.abs(hl - hr | 0); if (diff > 2) { throw new Caml_js_exceptions.MelangeError(Height_diff_borken, { MEL_EXN_ID: Height_diff_borken @@ -223,8 +223,8 @@ function check(tree) { } function create(l, v, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; return /* Node */{ _0: l, _1: v, @@ -234,13 +234,13 @@ function create(l, v, r) { } function internal_bal(l, v, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -274,9 +274,9 @@ function internal_bal(l, v, r) { }; } if (r) { - var rr = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -304,7 +304,7 @@ function internal_bal(l, v, r) { function remove_min_elt(param) { if (param) { - var l = param._0; + let l = param._0; if (l) { return internal_bal(remove_min_elt(l), param._1, param._2); } else { @@ -361,8 +361,8 @@ function internal_join(l, v, r) { if (!r) { return add_max_element(v, l); } - var rh = r._3; - var lh = l._3; + let rh = r._3; + let lh = l._3; if (lh > (rh + 2 | 0)) { return internal_bal(l._0, l._1, internal_join(l._2, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -388,10 +388,10 @@ function filter(p, param) { if (!param) { return /* Empty */0; } - var v = param._1; - var l$p = filter(p, param._0); - var pv = Curry._1(p, v); - var r$p = filter(p, param._2); + let v = param._1; + let l$p = filter(p, param._0); + let pv = Curry._1(p, v); + let r$p = filter(p, param._2); if (pv) { return internal_join(l$p, v, r$p); } else { @@ -406,14 +406,14 @@ function partition(p, param) { /* Empty */0 ]; } - var v = param._1; - var match = partition(p, param._0); - var lf = match[1]; - var lt = match[0]; - var pv = Curry._1(p, v); - var match$1 = partition(p, param._2); - var rf = match$1[1]; - var rt = match$1[0]; + let v = param._1; + let match = partition(p, param._0); + let lf = match[1]; + let lt = match[0]; + let pv = Curry._1(p, v); + let match$1 = partition(p, param._2); + let rf = match$1[1]; + let rt = match$1[0]; if (pv) { return [ internal_join(lt, v, rt), @@ -428,7 +428,7 @@ function partition(p, param) { } function of_sorted_list(l) { - var sub = function (n, l) { + let sub = function (n, l) { switch (n) { case 0 : return [ @@ -450,7 +450,7 @@ function of_sorted_list(l) { break; case 2 : if (l) { - var match = l.tl; + let match = l.tl; if (match) { return [ /* Node */{ @@ -472,9 +472,9 @@ function of_sorted_list(l) { break; case 3 : if (l) { - var match$1 = l.tl; + let match$1 = l.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return [ /* Node */{ @@ -504,11 +504,11 @@ function of_sorted_list(l) { default: } - var nl = n / 2 | 0; - var match$3 = sub(nl, l); - var l$1 = match$3[1]; + let nl = n / 2 | 0; + let match$3 = sub(nl, l); + let l$1 = match$3[1]; if (l$1) { - var match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); + let match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); return [ create(match$3[0], l$1.hd, match$4[0]), match$4[1] @@ -527,12 +527,12 @@ function of_sorted_list(l) { } function of_sorted_array(l) { - var sub = function (start, n, l) { + let sub = function (start, n, l) { if (n === 0) { return /* Empty */0; } if (n === 1) { - var x0 = l[start]; + let x0 = l[start]; return /* Node */{ _0: /* Empty */0, _1: x0, @@ -541,8 +541,8 @@ function of_sorted_array(l) { }; } if (n === 2) { - var x0$1 = l[start]; - var x1 = l[start + 1 | 0]; + let x0$1 = l[start]; + let x1 = l[start + 1 | 0]; return /* Node */{ _0: /* Node */{ _0: /* Empty */0, @@ -556,9 +556,9 @@ function of_sorted_array(l) { }; } if (n === 3) { - var x0$2 = l[start]; - var x1$1 = l[start + 1 | 0]; - var x2 = l[start + 2 | 0]; + let x0$2 = l[start]; + let x1$1 = l[start + 1 | 0]; + let x2 = l[start + 2 | 0]; return /* Node */{ _0: /* Node */{ _0: /* Empty */0, @@ -576,29 +576,29 @@ function of_sorted_array(l) { _3: 2 }; } - var nl = n / 2 | 0; - var left = sub(start, nl, l); - var mid = start + nl | 0; - var v = l[mid]; - var right = sub(mid + 1 | 0, (n - nl | 0) - 1 | 0, l); + let nl = n / 2 | 0; + let left = sub(start, nl, l); + let mid = start + nl | 0; + let v = l[mid]; + let right = sub(mid + 1 | 0, (n - nl | 0) - 1 | 0, l); return create(left, v, right); }; return sub(0, l.length, l); } function is_ordered(cmp, tree) { - var is_ordered_min_max = function (tree) { + let is_ordered_min_max = function (tree) { if (!tree) { return "Empty"; } - var r = tree._2; - var v = tree._1; - var match = is_ordered_min_max(tree._0); + let r = tree._2; + let v = tree._1; + let match = is_ordered_min_max(tree._0); if (typeof match === "string") { if (match !== "Empty") { return "No"; } - var match$1 = is_ordered_min_max(r); + let match$1 = is_ordered_min_max(r); if (typeof match$1 === "string") { if (match$1 === "Empty") { return { @@ -612,7 +612,7 @@ function is_ordered(cmp, tree) { return "No"; } } - var match$2 = match$1.VAL; + let match$2 = match$1.VAL; if (Curry._2(cmp, v, match$2[0]) < 0) { return { NAME: "V", @@ -625,10 +625,10 @@ function is_ordered(cmp, tree) { return "No"; } } - var match$3 = match.VAL; - var max_v = match$3[1]; - var min_v = match$3[0]; - var match$4 = is_ordered_min_max(r); + let match$3 = match.VAL; + let max_v = match$3[1]; + let min_v = match$3[0]; + let match$4 = is_ordered_min_max(r); if (typeof match$4 === "string") { if (match$4 === "Empty" && Curry._2(cmp, max_v, v) < 0) { return { @@ -642,7 +642,7 @@ function is_ordered(cmp, tree) { return "No"; } } - var match$5 = match$4.VAL; + let match$5 = match$4.VAL; if (Curry._2(cmp, max_v, match$5[0]) < 0) { return { NAME: "V", @@ -665,8 +665,8 @@ function invariant(cmp, t) { function compare_aux(cmp, _e1, _e2) { while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -677,7 +677,7 @@ function compare_aux(cmp, _e1, _e2) { if (!e2) { return 1; } - var c = Curry._2(cmp, e1._0, e2._0); + let c = Curry._2(cmp, e1._0, e2._0); if (c !== 0) { return c; } @@ -691,9 +691,9 @@ function compare(cmp, s1, s2) { return compare_aux(cmp, cons_enum(s1, /* End */0), cons_enum(s2, /* End */0)); } -var empty = /* Empty */0; +let empty = /* Empty */0; -var choose = min_elt; +let choose = min_elt; exports.cons_enum = cons_enum; exports.height = height; diff --git a/jscomp/test/dist/jscomp/test/sexp.js b/jscomp/test/dist/jscomp/test/sexp.js index 73ee47a0d1..d3bc647020 100644 --- a/jscomp/test/dist/jscomp/test/sexp.js +++ b/jscomp/test/dist/jscomp/test/sexp.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_format = require("melange.js/caml_format.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Hashtbl = require("melange/hashtbl.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Hashtbl = require("melange/hashtbl.js"); +let Stdlib__List = require("melange/list.js"); -var equal = Caml_obj.caml_equal; +let equal = Caml_obj.caml_equal; -var compare = Caml_obj.caml_compare; +let compare = Caml_obj.caml_compare; -var hash = Stdlib__Hashtbl.hash; +let hash = Stdlib__Hashtbl.hash; function of_int(x) { return { @@ -163,15 +163,15 @@ function $great$great$eq(e, f) { } function map_opt(f, l) { - var _acc = /* [] */0; - var _l = l; + let _acc = /* [] */0; + let _l = l; while(true) { - var l$1 = _l; - var acc = _acc; + let l$1 = _l; + let acc = _acc; if (!l$1) { return Stdlib__List.rev(acc); } - var y = Curry._1(f, l$1.hd); + let y = Curry._1(f, l$1.hd); if (y === undefined) { return ; } @@ -186,13 +186,13 @@ function map_opt(f, l) { function list_any(f, e) { if (e.NAME === "List") { - var _l = e.VAL; + let _l = e.VAL; while(true) { - var l = _l; + let l = _l; if (!l) { return ; } - var res = Curry._1(f, l.hd); + let res = Curry._1(f, l.hd); if (res !== undefined) { return res; } @@ -205,16 +205,16 @@ function list_any(f, e) { function list_all(f, e) { if (e.NAME === "List") { - var _acc = /* [] */0; - var _l = e.VAL; + let _acc = /* [] */0; + let _l = e.VAL; while(true) { - var l = _l; - var acc = _acc; + let l = _l; + let acc = _acc; if (!l) { return Stdlib__List.rev(acc); } - var tl = l.tl; - var y = Curry._1(f, l.hd); + let tl = l.tl; + let y = Curry._1(f, l.hd); if (y !== undefined) { _l = tl; _acc = { @@ -268,11 +268,11 @@ function to_pair(e) { if (e.NAME !== "List") { return ; } - var match = e.VAL; + let match = e.VAL; if (!match) { return ; } - var match$1 = match.tl; + let match$1 = match.tl; if (match$1 && !match$1.tl) { return [ match.hd, @@ -284,7 +284,7 @@ function to_pair(e) { function to_pair_with(f1, f2, e) { return $great$great$eq(to_pair(e), (function (param) { - var y = param[1]; + let y = param[1]; return $great$great$eq(Curry._1(f1, param[0]), (function (x) { return $great$great$eq(Curry._1(f2, y), (function (y) { return [ @@ -303,15 +303,15 @@ function to_triple(e) { if (e.NAME !== "List") { return ; } - var match = e.VAL; + let match = e.VAL; if (!match) { return ; } - var match$1 = match.tl; + let match$1 = match.tl; if (!match$1) { return ; } - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2 && !match$2.tl) { return [ match.hd, @@ -324,8 +324,8 @@ function to_triple(e) { function to_triple_with(f1, f2, f3, e) { return $great$great$eq(to_triple(e), (function (param) { - var z = param[2]; - var y = param[1]; + let z = param[2]; + let y = param[1]; return $great$great$eq(Curry._1(f1, param[0]), (function (x) { return $great$great$eq(Curry._1(f2, y), (function (y) { return $great$great$eq(Curry._1(f3, z), (function (z) { @@ -356,27 +356,27 @@ function to_list_with(f, e) { function get_field(name, e) { if (e.NAME === "List") { - var _l = e.VAL; + let _l = e.VAL; while(true) { - var l = _l; + let l = _l; if (!l) { return ; } - var match = l.hd; + let match = l.hd; if (typeof match === "string") { _l = l.tl; continue ; } if (match.NAME === "List") { - var match$1 = match.VAL; + let match$1 = match.VAL; if (match$1) { - var match$2 = match$1.hd; + let match$2 = match$1.hd; if (typeof match$2 === "string") { _l = l.tl; continue ; } if (match$2.NAME === "Atom") { - var match$3 = match$1.tl; + let match$3 = match$1.tl; if (match$3) { if (match$3.tl) { _l = l.tl; @@ -410,19 +410,19 @@ function field(name, f, e) { function _get_field_list(name, _l) { while(true) { - var l = _l; + let l = _l; if (!l) { return ; } - var match = l.hd; + let match = l.hd; if (typeof match === "string") { _l = l.tl; continue ; } if (match.NAME === "List") { - var match$1 = match.VAL; + let match$1 = match.VAL; if (match$1) { - var match$2 = match$1.hd; + let match$2 = match$1.hd; if (typeof match$2 === "string") { _l = l.tl; continue ; @@ -454,11 +454,11 @@ function field_list(name, f, e) { function _get_variant(s, args, _l) { while(true) { - var l = _l; + let l = _l; if (!l) { return ; } - var match = l.hd; + let match = l.hd; if (Caml_obj.caml_equal(s, match[0])) { return Curry._1(match[1], args); } @@ -471,11 +471,11 @@ function get_variant(l, e) { if (e.NAME !== "List") { return _get_variant(e.VAL, /* [] */0, l); } - var match = e.VAL; + let match = e.VAL; if (!match) { return ; } - var match$1 = match.hd; + let match$1 = match.hd; if (typeof match$1 === "string" || match$1.NAME !== "Atom") { return ; } else { @@ -493,12 +493,12 @@ function get_exn(e) { }); } -var of_unit = { +let of_unit = { NAME: "List", VAL: /* [] */0 }; -var Traverse = { +let Traverse = { map_opt: map_opt, list_any: list_any, list_all: list_all, diff --git a/jscomp/test/dist/jscomp/test/sexpm.js b/jscomp/test/dist/jscomp/test/sexpm.js index affde10362..7caa7b5f58 100644 --- a/jscomp/test/dist/jscomp/test/sexpm.js +++ b/jscomp/test/dist/jscomp/test/sexpm.js @@ -1,32 +1,32 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Char = require("melange/char.js"); -var Stdlib__Format = require("melange/format.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printexc = require("melange/printexc.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__String = require("melange/string.js"); -var Stdlib__Sys = require("melange/sys.js"); +let Caml = require("melange.js/caml.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Char = require("melange/char.js"); +let Stdlib__Format = require("melange/format.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printexc = require("melange/printexc.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__String = require("melange/string.js"); +let Stdlib__Sys = require("melange/sys.js"); function _with_in(filename, f) { - var ic = Stdlib.open_in_bin(filename); + let ic = Stdlib.open_in_bin(filename); try { - var x = Curry._1(f, ic); + let x = Curry._1(f, ic); Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); return x; } catch (raw_e){ - var e = Caml_js_exceptions.internalToOCamlException(raw_e); + let e = Caml_js_exceptions.internalToOCamlException(raw_e); Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); return { NAME: "Error", @@ -37,9 +37,9 @@ function _with_in(filename, f) { function _must_escape(s) { try { - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ - var c = s.charCodeAt(i); - var exit = 0; + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let c = s.charCodeAt(i); + let exit = 0; if (c >= 42) { if (c !== 59) { if (c !== 92) { @@ -95,7 +95,7 @@ function _must_escape(s) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Exit) { return true; } @@ -105,7 +105,7 @@ function _must_escape(s) { function to_buf(b, t) { if (t.NAME === "List") { - var l = t.VAL; + let l = t.VAL; if (l) { if (l.tl) { Stdlib__Buffer.add_char(b, /* '(' */40); @@ -137,7 +137,7 @@ function to_buf(b, t) { return Stdlib__Buffer.add_string(b, "()"); } } - var s = t.VAL; + let s = t.VAL; if (_must_escape(s)) { return Curry._1(Stdlib__Printf.bprintf(b, /* Format */{ _0: { @@ -161,14 +161,14 @@ function to_buf(b, t) { } function to_string(t) { - var b = Stdlib__Buffer.create(128); + let b = Stdlib__Buffer.create(128); to_buf(b, t); return Stdlib__Buffer.contents(b); } function print(fmt, t) { if (t.NAME === "List") { - var l = t.VAL; + let l = t.VAL; if (l) { if (l.tl) { Stdlib__Format.fprintf(fmt)(/* Format */{ @@ -262,7 +262,7 @@ function print(fmt, t) { return Stdlib__Format.pp_print_string(fmt, "()"); } } - var s = t.VAL; + let s = t.VAL; if (_must_escape(s)) { return Curry._1(Stdlib__Format.fprintf(fmt)(/* Format */{ _0: { @@ -287,7 +287,7 @@ function print(fmt, t) { function print_noindent(fmt, t) { if (t.NAME === "List") { - var l = t.VAL; + let l = t.VAL; if (l) { if (l.tl) { Stdlib__Format.pp_print_char(fmt, /* '(' */40); @@ -319,7 +319,7 @@ function print_noindent(fmt, t) { return Stdlib__Format.pp_print_string(fmt, "()"); } } - var s = t.VAL; + let s = t.VAL; if (_must_escape(s)) { return Curry._1(Stdlib__Format.fprintf(fmt)(/* Format */{ _0: { @@ -343,21 +343,21 @@ function print_noindent(fmt, t) { } function to_chan(oc, t) { - var fmt = Stdlib__Format.formatter_of_out_channel(oc); + let fmt = Stdlib__Format.formatter_of_out_channel(oc); print(fmt, t); Stdlib__Format.pp_print_flush(fmt, undefined); } function to_file_seq(filename, seq) { - var f = function (oc) { + let f = function (oc) { return Curry._1(seq, (function (t) { to_chan(oc, t); Caml_io.caml_ml_output_char(oc, /* '\n' */10); })); }; - var oc = Stdlib.open_out(filename); + let oc = Stdlib.open_out(filename); try { - var x = Curry._1(f, oc); + let x = Curry._1(f, oc); Caml_io.caml_ml_flush(oc); Caml_external_polyfill.resolve("caml_ml_close_channel")(oc); return x; @@ -383,14 +383,14 @@ function $great$great$eq(x, f) { return Curry._1(f, x); } -var ID_MONAD = { +let ID_MONAD = { $$return: $$return, $great$great$eq: $great$great$eq }; function make(bufsizeOpt, refill) { - var bufsize = bufsizeOpt !== undefined ? bufsizeOpt : 1024; - var bufsize$1 = Caml.caml_int_min(bufsize > 16 ? bufsize : 16, Stdlib__Sys.max_string_length); + let bufsize = bufsizeOpt !== undefined ? bufsizeOpt : 1024; + let bufsize$1 = Caml.caml_int_min(bufsize > 16 ? bufsize : 16, Stdlib__Sys.max_string_length); return { buf: Caml_bytes.caml_create_bytes(bufsize$1), refill: refill, @@ -411,7 +411,7 @@ function _is_digit(c) { } function _refill(t, k_succ, k_fail) { - var n = Curry._3(t.refill, t.buf, 0, t.buf.length); + let n = Curry._3(t.refill, t.buf, 0, t.buf.length); t.i = 0; t.len = n; if (n === 0) { @@ -432,7 +432,7 @@ function _get(t) { ] }); } - var c = Caml_bytes.get(t.buf, t.i); + let c = Caml_bytes.get(t.buf, t.i); t.i = t.i + 1 | 0; if (c === /* '\n' */10) { t.col = 1; @@ -444,7 +444,7 @@ function _get(t) { } function _error(t, msg) { - var b = Stdlib__Buffer.create(32); + let b = Stdlib__Buffer.create(32); Curry._2(Stdlib__Printf.bprintf(b, /* Format */{ _0: { TAG: /* String_literal */11, @@ -474,7 +474,7 @@ function _error(t, msg) { _1: "at %d, %d: " }), t.line, t.col); return Stdlib__Printf.kbprintf((function (b) { - var msg$p = Stdlib__Buffer.contents(b); + let msg$p = Stdlib__Buffer.contents(b); return { NAME: "Error", VAL: msg$p @@ -500,7 +500,7 @@ function expr(k, t) { return expr(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c >= 11) { if (c !== 32) { return expr_starting_with(c, k, t); @@ -589,7 +589,7 @@ function expr_list(acc, k, t) { return expr_list(acc, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c > 32 || c < 9) { if (c === 41) { return Curry._2(k, undefined, { @@ -637,7 +637,7 @@ function expr_list(acc, k, t) { } function _return_atom(last, k, t) { - var s = Stdlib__Buffer.contents(t.atom); + let s = Stdlib__Buffer.contents(t.atom); t.atom.position = 0; return Curry._2(k, last, { NAME: "Atom", @@ -654,8 +654,8 @@ function atom(k, t) { return _return_atom(undefined, k, param); })); } - var c = _get(t); - var exit = 0; + let c = _get(t); + let exit = 0; if (c >= 35) { if (c >= 42) { if (c === 92) { @@ -716,7 +716,7 @@ function quoted(k, t) { return quoted(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c === 34) { return _return_atom(undefined, k, t); } @@ -737,7 +737,7 @@ function escaped(k, t) { return escaped(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c >= 92) { if (c < 117) { switch (c) { @@ -808,7 +808,7 @@ function read2int(i, k, t) { return read2int(i, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (_is_digit(c)) { return read1int(Math.imul(10, i) + (c - /* '0' */48 | 0) | 0, k, t); } else { @@ -836,7 +836,7 @@ function read1int(i, k, t) { return read1int(i, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (_is_digit(c)) { return Curry._1(k, Math.imul(10, i) + (c - /* '0' */48 | 0) | 0); } else { @@ -865,7 +865,7 @@ function skip_comment(k, t) { return skip_comment(k, param); }), _error_eof); } - var match = _get(t); + let match = _get(t); if (match === 10) { return Curry._2(k, undefined, undefined); } @@ -882,7 +882,7 @@ function expr_or_end(k, t) { return "End"; })); } - var c = _get(t); + let c = _get(t); if (c >= 11) { if (c !== 32) { return expr_starting_with(c, k, t); @@ -906,11 +906,11 @@ function next(t) { } function parse_string(s) { - var n = s.length; - var stop = { + let n = s.length; + let stop = { contents: false }; - var refill = function (bytes, i, _len) { + let refill = function (bytes, i, _len) { if (stop.contents) { return 0; } else { @@ -919,8 +919,8 @@ function parse_string(s) { return n; } }; - var d = make(n, refill); - var res = next(d); + let d = make(n, refill); + let res = next(d); if (typeof res === "string") { return { NAME: "Error", @@ -932,10 +932,10 @@ function parse_string(s) { } function parse_chan(bufsize, ic) { - var d = make(bufsize, (function (param, param$1, param$2) { + let d = make(bufsize, (function (param, param$1, param$2) { return Stdlib.input(ic, param, param$1, param$2); })); - var res = next(d); + let res = next(d); if (typeof res === "string") { return { NAME: "Error", @@ -947,11 +947,11 @@ function parse_chan(bufsize, ic) { } function parse_chan_gen(bufsize, ic) { - var d = make(bufsize, (function (param, param$1, param$2) { + let d = make(bufsize, (function (param, param$1, param$2) { return Stdlib.input(ic, param, param$1, param$2); })); return function (param) { - var e = next(d); + let e = next(d); if (typeof e === "string") { return ; } else { @@ -961,13 +961,13 @@ function parse_chan_gen(bufsize, ic) { } function parse_chan_list(bufsize, ic) { - var d = make(bufsize, (function (param, param$1, param$2) { + let d = make(bufsize, (function (param, param$1, param$2) { return Stdlib.input(ic, param, param$1, param$2); })); - var _acc = /* [] */0; + let _acc = /* [] */0; while(true) { - var acc = _acc; - var e = next(d); + let acc = _acc; + let e = next(d); if (typeof e === "string") { return { NAME: "Ok", @@ -998,10 +998,10 @@ function parse_file_list(filename) { } function MakeDecode(funarg) { - var $great$great$eq = funarg.$great$great$eq; - var make = function (bufsizeOpt, refill) { - var bufsize = bufsizeOpt !== undefined ? bufsizeOpt : 1024; - var bufsize$1 = Caml.caml_int_min(bufsize > 16 ? bufsize : 16, Stdlib__Sys.max_string_length); + let $great$great$eq = funarg.$great$great$eq; + let make = function (bufsizeOpt, refill) { + let bufsize = bufsizeOpt !== undefined ? bufsizeOpt : 1024; + let bufsize$1 = Caml.caml_int_min(bufsize > 16 ? bufsize : 16, Stdlib__Sys.max_string_length); return { buf: Caml_bytes.caml_create_bytes(bufsize$1), refill: refill, @@ -1012,14 +1012,14 @@ function MakeDecode(funarg) { col: 1 }; }; - var _is_digit = function (c) { + let _is_digit = function (c) { if (/* '0' */48 <= c) { return c <= /* '9' */57; } else { return false; } }; - var _refill = function (t, k_succ, k_fail) { + let _refill = function (t, k_succ, k_fail) { return Curry._2($great$great$eq, Curry._3(t.refill, t.buf, 0, t.buf.length), (function (n) { t.i = 0; t.len = n; @@ -1030,7 +1030,7 @@ function MakeDecode(funarg) { } })); }; - var _get = function (t) { + let _get = function (t) { if (t.i >= t.len) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -1041,7 +1041,7 @@ function MakeDecode(funarg) { ] }); } - var c = Caml_bytes.get(t.buf, t.i); + let c = Caml_bytes.get(t.buf, t.i); t.i = t.i + 1 | 0; if (c === /* '\n' */10) { t.col = 1; @@ -1051,8 +1051,8 @@ function MakeDecode(funarg) { } return c; }; - var _error = function (t, msg) { - var b = Stdlib__Buffer.create(32); + let _error = function (t, msg) { + let b = Stdlib__Buffer.create(32); Curry._2(Stdlib__Printf.bprintf(b, /* Format */{ _0: { TAG: /* String_literal */11, @@ -1082,14 +1082,14 @@ function MakeDecode(funarg) { _1: "at %d, %d: " }), t.line, t.col); return Stdlib__Printf.kbprintf((function (b) { - var msg$p = Stdlib__Buffer.contents(b); + let msg$p = Stdlib__Buffer.contents(b); return Curry._1(funarg.$$return, { NAME: "Error", VAL: msg$p }); }), b, msg); }; - var _error_eof = function (t) { + let _error_eof = function (t) { return _error(t, /* Format */{ _0: { TAG: /* String_literal */11, @@ -1099,14 +1099,14 @@ function MakeDecode(funarg) { _1: "unexpected end of input" }); }; - var expr = function (k, t) { + let expr = function (k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { return expr(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c >= 11) { if (c !== 32) { return expr_starting_with(c, k, t); @@ -1119,7 +1119,7 @@ function MakeDecode(funarg) { continue ; }; }; - var expr_starting_with = function (c, k, t) { + let expr_starting_with = function (c, k, t) { if (c >= 42) { if (c === 59) { return skip_comment((function (param, param$1) { @@ -1186,14 +1186,14 @@ function MakeDecode(funarg) { Stdlib__Buffer.add_char(t.atom, c); return atom(k, t); }; - var expr_list = function (acc, k, t) { + let expr_list = function (acc, k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { return expr_list(acc, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c > 32 || c < 9) { if (c === 41) { return Curry._2(k, undefined, { @@ -1239,15 +1239,15 @@ function MakeDecode(funarg) { }), t); }; }; - var _return_atom = function (last, k, t) { - var s = Stdlib__Buffer.contents(t.atom); + let _return_atom = function (last, k, t) { + let s = Stdlib__Buffer.contents(t.atom); t.atom.position = 0; return Curry._2(k, last, { NAME: "Atom", VAL: s }); }; - var atom = function (k, t) { + let atom = function (k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { @@ -1256,8 +1256,8 @@ function MakeDecode(funarg) { return _return_atom(undefined, k, param); })); } - var c = _get(t); - var exit = 0; + let c = _get(t); + let exit = 0; if (c >= 35) { if (c >= 42) { if (c === 92) { @@ -1310,14 +1310,14 @@ function MakeDecode(funarg) { } }; }; - var quoted = function (k, t) { + let quoted = function (k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { return quoted(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c === 34) { return _return_atom(undefined, k, t); } @@ -1331,13 +1331,13 @@ function MakeDecode(funarg) { continue ; }; }; - var escaped = function (k, t) { + let escaped = function (k, t) { if (t.i === t.len) { return _refill(t, (function (param) { return escaped(k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (c >= 92) { if (c < 117) { switch (c) { @@ -1401,13 +1401,13 @@ function MakeDecode(funarg) { }), c); } }; - var read2int = function (i, k, t) { + let read2int = function (i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { return read2int(i, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (_is_digit(c)) { return read1int(Math.imul(10, i) + (c - /* '0' */48 | 0) | 0, k, t); } else { @@ -1428,13 +1428,13 @@ function MakeDecode(funarg) { }), c); } }; - var read1int = function (i, k, t) { + let read1int = function (i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { return read1int(i, k, param); }), _error_eof); } - var c = _get(t); + let c = _get(t); if (_is_digit(c)) { return Curry._1(k, Math.imul(10, i) + (c - /* '0' */48 | 0) | 0); } else { @@ -1455,21 +1455,21 @@ function MakeDecode(funarg) { }), c); } }; - var skip_comment = function (k, t) { + let skip_comment = function (k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { return skip_comment(k, param); }), _error_eof); } - var match = _get(t); + let match = _get(t); if (match === 10) { return Curry._2(k, undefined, undefined); } continue ; }; }; - var expr_or_end = function (k, t) { + let expr_or_end = function (k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { @@ -1478,7 +1478,7 @@ function MakeDecode(funarg) { return Curry._1(funarg.$$return, "End"); })); } - var c = _get(t); + let c = _get(t); if (c >= 11) { if (c !== 32) { return expr_starting_with(c, k, t); @@ -1491,7 +1491,7 @@ function MakeDecode(funarg) { continue ; }; }; - var next = function (t) { + let next = function (t) { return expr_or_end((function (param, x) { return Curry._1(funarg.$$return, { NAME: "Ok", @@ -1505,7 +1505,7 @@ function MakeDecode(funarg) { }; } -var D = { +let D = { make: make, next: next }; diff --git a/jscomp/test/dist/jscomp/test/sexpm_test.js b/jscomp/test/dist/jscomp/test/sexpm_test.js index 46dd45a9a3..8a5374964a 100644 --- a/jscomp/test/dist/jscomp/test/sexpm_test.js +++ b/jscomp/test/dist/jscomp/test/sexpm_test.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Sexpm = require("./sexpm.js"); -var Stdlib__Format = require("melange/format.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Sexpm = require("./sexpm.js"); +let Stdlib__Format = require("melange/format.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; function eq(loc, param) { - var y = param[1]; - var x = param[0]; + let y = param[1]; + let x = param[0]; test_id.contents = test_id.contents + 1 | 0; suites.contents = { hd: [ @@ -98,7 +98,7 @@ function print_or_error(fmt, x) { } } -var a = Sexpm.parse_string("(x x gh 3 3)"); +let a = Sexpm.parse_string("(x x gh 3 3)"); eq("File \"jscomp/test/sexpm_test.ml\", line 17, characters 7-14", [ { diff --git a/jscomp/test/dist/jscomp/test/side_effect_free.js b/jscomp/test/dist/jscomp/test/side_effect_free.js index f307377b37..75daf3e678 100644 --- a/jscomp/test/dist/jscomp/test/side_effect_free.js +++ b/jscomp/test/dist/jscomp/test/side_effect_free.js @@ -2,7 +2,7 @@ 'use strict'; -var a = 3; +let a = 3; exports.a = a; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/simple_lexer_test.js b/jscomp/test/dist/jscomp/test/simple_lexer_test.js index 44dc1fe20c..3e718586b1 100644 --- a/jscomp/test/dist/jscomp/test/simple_lexer_test.js +++ b/jscomp/test/dist/jscomp/test/simple_lexer_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Lexing = require("melange/lexing.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Lexing = require("melange/lexing.js"); -var __ocaml_lex_tables = { +let __ocaml_lex_tables = { lex_base: "\0\0\xfd\xff\xfe\xff\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\0\x01\0\x04\0\x03\0\0\0\x06\0\0\0\xff\xff", lex_backtrk: "\xff\xff\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", lex_default: "\x02\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0", @@ -23,13 +23,13 @@ var __ocaml_lex_tables = { function __ocaml_lex_translate_rec(lexbuf, ___ocaml_lex_state) { while(true) { - var __ocaml_lex_state = ___ocaml_lex_state; - var __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); + let __ocaml_lex_state = ___ocaml_lex_state; + let __ocaml_lex_state$1 = Stdlib__Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf); switch (__ocaml_lex_state$1) { case 0 : return "." + __ocaml_lex_translate_rec(lexbuf, 0); case 1 : - var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); + let c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); return Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c)) + __ocaml_lex_translate_rec(lexbuf, 0); case 2 : return ""; @@ -45,7 +45,7 @@ function translate(lexbuf) { return __ocaml_lex_translate_rec(lexbuf, 0); } -var suites_0 = [ +let suites_0 = [ "translate", (function (param) { return { @@ -56,7 +56,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/singular_unit_test.js b/jscomp/test/dist/jscomp/test/singular_unit_test.js index 66d5b48bf2..35075a0baa 100644 --- a/jscomp/test/dist/jscomp/test/singular_unit_test.js +++ b/jscomp/test/dist/jscomp/test/singular_unit_test.js @@ -18,7 +18,7 @@ function f3(x) { } } -var v0; +let v0; exports.f0 = f0; exports.f1 = f1; diff --git a/jscomp/test/dist/jscomp/test/small_inline_test.js b/jscomp/test/dist/jscomp/test/small_inline_test.js index 78a172b570..3cd4f19741 100644 --- a/jscomp/test/dist/jscomp/test/small_inline_test.js +++ b/jscomp/test/dist/jscomp/test/small_inline_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function $pipe$great(x, f) { return Curry._1(f, x); @@ -29,7 +29,7 @@ function hello5(y, f) { function f(_x) { while(true) { - var x = _x; + let x = _x; _x = x + 1 | 0; continue ; }; @@ -37,8 +37,8 @@ function f(_x) { function ff(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; _y = x + 1 | 0; _x = y; continue ; @@ -47,8 +47,8 @@ function ff(_x, _y) { function fff(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; _y = x; _x = y; continue ; diff --git a/jscomp/test/dist/jscomp/test/splice_test.js b/jscomp/test/dist/jscomp/test/splice_test.js index 5e4d3eae36..9b704c6f90 100644 --- a/jscomp/test/dist/jscomp/test/splice_test.js +++ b/jscomp/test/dist/jscomp/test/splice_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_splice_call = require("melange.js/caml_splice_call.js"); -var Mt = require("./mt.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_splice_call = require("melange.js/caml_splice_call.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -17,7 +17,7 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var Caml_splice_call$1 = {}; +let Caml_splice_call$1 = {}; Math.max(1); @@ -25,7 +25,7 @@ function f00(a, b) { return a.send(b); } -var a = []; +let a = []; a.push(1, 2, 3, 4); @@ -37,7 +37,7 @@ eq("File \"jscomp/test/splice_test.ml\", line 29, characters 5-12", a, [ ]); function dynamic(arr) { - var a = []; + let a = []; Caml_splice_call.spliceObjApply(a, "push", [ 1, arr @@ -65,7 +65,7 @@ dynamic([ 3 ]); -var a$1 = new Array(1, 2, 3, 4); +let a$1 = new Array(1, 2, 3, 4); eq("File \"jscomp/test/splice_test.ml\", line 49, characters 5-12", a$1, [ 1, @@ -75,7 +75,7 @@ eq("File \"jscomp/test/splice_test.ml\", line 49, characters 5-12", a$1, [ ]); function dynamicNew(arr) { - var a = Caml_splice_call.spliceNewApply(Array, [ + let a = Caml_splice_call.spliceNewApply(Array, [ 1, 2, arr @@ -104,7 +104,7 @@ dynamicNew([ 3 ]); -var a$2 = []; +let a$2 = []; a$2.push(1, 2, 3, 4); @@ -116,7 +116,7 @@ eq("File \"jscomp/test/splice_test.ml\", line 70, characters 7-14", a$2, [ ]); function dynamic$1(arr) { - var a = []; + let a = []; Caml_splice_call.spliceObjApply(a, "push", [ 1, arr @@ -144,7 +144,7 @@ dynamic$1([ 3 ]); -var Pipe = { +let Pipe = { dynamic: dynamic$1 }; diff --git a/jscomp/test/dist/jscomp/test/sprintf_reg_test.js b/jscomp/test/dist/jscomp/test/sprintf_reg_test.js index c67aa9055e..f9d3780c75 100644 --- a/jscomp/test/dist/jscomp/test/sprintf_reg_test.js +++ b/jscomp/test/dist/jscomp/test/sprintf_reg_test.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__Printf = require("melange/printf.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -18,7 +18,7 @@ function eq(f, param) { Mt_global.collect_eq(test_id, suites, f, param[0], param[1]); } -var s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ +let s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Format_arg */13, _0: undefined, @@ -51,7 +51,7 @@ eq("File \"jscomp/test/sprintf_reg_test.ml\", line 8, characters 5-12", [ "%s." ]); -var s$1 = Curry._2(Stdlib__Printf.sprintf(/* Format */{ +let s$1 = Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Int */4, _0: /* Int_i */3, diff --git a/jscomp/test/dist/jscomp/test/stack_comp_test.js b/jscomp/test/dist/jscomp/test/stack_comp_test.js index fde20cd118..5e1c191774 100644 --- a/jscomp/test/dist/jscomp/test/stack_comp_test.js +++ b/jscomp/test/dist/jscomp/test/stack_comp_test.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Stack = require("melange/stack.js"); - -var suites = { +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Stack = require("melange/stack.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -29,7 +29,7 @@ function assert_(loc, v) { } function to_list(s) { - var l = { + let l = { contents: /* [] */0 }; Stdlib__List.iter((function (x) { @@ -41,7 +41,7 @@ function to_list(s) { return l.contents; } -var S = { +let S = { Empty: Stdlib__Stack.Empty, create: Stdlib__Stack.create, push: Stdlib__Stack.push, @@ -68,7 +68,7 @@ function does_raise(f, s) { return false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Stack.Empty) { return true; } @@ -76,7 +76,7 @@ function does_raise(f, s) { } } -var s = { +let s = { c: /* [] */0, len: 0 }; @@ -165,7 +165,7 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 41, characters 41-48", Ca assert_("File \"jscomp/test/stack_comp_test.ml\", line 42, characters 10-17", does_raise(Stdlib__Stack.pop, s)); -var s$1 = { +let s$1 = { c: /* [] */0, len: 0 }; @@ -184,7 +184,7 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 48, characters 53-60", do assert_("File \"jscomp/test/stack_comp_test.ml\", line 49, characters 10-17", s$1.len === 0); -var s$2 = { +let s$2 = { c: /* [] */0, len: 0 }; @@ -217,12 +217,12 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 60, characters 10-17", do assert_("File \"jscomp/test/stack_comp_test.ml\", line 61, characters 10-17", does_raise(Stdlib__Stack.top, s$2)); -var s$3 = { +let s$3 = { c: /* [] */0, len: 0 }; -for(var i = 1; i <= 10; ++i){ +for(let i = 1; i <= 10; ++i){ Stdlib__Stack.push(i, s$3); } @@ -241,16 +241,16 @@ Stdlib__Stack.push(42, s$3); assert_("File \"jscomp/test/stack_comp_test.ml\", line 72, characters 10-17", Stdlib__Stack.pop(s$3) === 42); -var s1 = { +let s1 = { c: /* [] */0, len: 0 }; -for(var i$1 = 1; i$1 <= 10; ++i$1){ +for(let i$1 = 1; i$1 <= 10; ++i$1){ Stdlib__Stack.push(i$1, s1); } -var s2 = Stdlib__Stack.copy(s1); +let s2 = Stdlib__Stack.copy(s1); assert_("File \"jscomp/test/stack_comp_test.ml\", line 79, characters 10-17", Caml_obj.caml_equal(to_list(s1), { hd: 1, @@ -320,28 +320,28 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 81, characters 10-17", s1 assert_("File \"jscomp/test/stack_comp_test.ml\", line 82, characters 10-17", s2.len === 10); -for(var i$2 = 10; i$2 >= 1; --i$2){ +for(let i$2 = 10; i$2 >= 1; --i$2){ assert_("File \"jscomp/test/stack_comp_test.ml\", line 84, characters 12-19", Stdlib__Stack.pop(s1) === i$2); } -for(var i$3 = 10; i$3 >= 1; --i$3){ +for(let i$3 = 10; i$3 >= 1; --i$3){ assert_("File \"jscomp/test/stack_comp_test.ml\", line 87, characters 12-19", Stdlib__Stack.pop(s2) === i$3); } -var s$4 = { +let s$4 = { c: /* [] */0, len: 0 }; assert_("File \"jscomp/test/stack_comp_test.ml\", line 93, characters 10-17", Caml_obj.caml_equal(s$4.c, /* [] */0)); -for(var i$4 = 1; i$4 <= 10; ++i$4){ +for(let i$4 = 1; i$4 <= 10; ++i$4){ Stdlib__Stack.push(i$4, s$4); assert_("File \"jscomp/test/stack_comp_test.ml\", line 96, characters 12-19", s$4.len === i$4); assert_("File \"jscomp/test/stack_comp_test.ml\", line 97, characters 12-19", !Caml_obj.caml_equal(s$4.c, /* [] */0)); } -for(var i$5 = 10; i$5 >= 1; --i$5){ +for(let i$5 = 10; i$5 >= 1; --i$5){ assert_("File \"jscomp/test/stack_comp_test.ml\", line 100, characters 12-19", s$4.len === i$5); assert_("File \"jscomp/test/stack_comp_test.ml\", line 101, characters 12-19", !Caml_obj.caml_equal(s$4.c, /* [] */0)); Stdlib__Stack.pop(s$4); @@ -351,16 +351,16 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 104, characters 10-17", s assert_("File \"jscomp/test/stack_comp_test.ml\", line 105, characters 10-17", Caml_obj.caml_equal(s$4.c, /* [] */0)); -var s$5 = { +let s$5 = { c: /* [] */0, len: 0 }; -for(var i$6 = 10; i$6 >= 1; --i$6){ +for(let i$6 = 10; i$6 >= 1; --i$6){ Stdlib__Stack.push(i$6, s$5); } -var i$7 = { +let i$7 = { contents: 1 }; @@ -369,7 +369,7 @@ Stdlib__List.iter((function (j) { i$7.contents = i$7.contents + 1 | 0; }), s$5.c); -var s1$1 = { +let s1$1 = { c: /* [] */0, len: 0 }; @@ -378,7 +378,7 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 117, characters 10-17", s assert_("File \"jscomp/test/stack_comp_test.ml\", line 117, characters 45-52", Caml_obj.caml_equal(to_list(s1$1), /* [] */0)); -var s2$1 = Stdlib__Stack.copy(s1$1); +let s2$1 = Stdlib__Stack.copy(s1$1); assert_("File \"jscomp/test/stack_comp_test.ml\", line 119, characters 10-17", s1$1.len === 0); @@ -388,12 +388,12 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 120, characters 10-17", s assert_("File \"jscomp/test/stack_comp_test.ml\", line 120, characters 45-52", Caml_obj.caml_equal(to_list(s2$1), /* [] */0)); -var s1$2 = { +let s1$2 = { c: /* [] */0, len: 0 }; -for(var i$8 = 1; i$8 <= 4; ++i$8){ +for(let i$8 = 1; i$8 <= 4; ++i$8){ Stdlib__Stack.push(i$8, s1$2); } @@ -413,7 +413,7 @@ assert_("File \"jscomp/test/stack_comp_test.ml\", line 126, characters 45-52", C } })); -var s2$2 = Stdlib__Stack.copy(s1$2); +let s2$2 = Stdlib__Stack.copy(s1$2); assert_("File \"jscomp/test/stack_comp_test.ml\", line 128, characters 10-17", s1$2.len === 4); diff --git a/jscomp/test/dist/jscomp/test/stack_test.js b/jscomp/test/dist/jscomp/test/stack_test.js index 46f6235f39..ee8c95e6e7 100644 --- a/jscomp/test/dist/jscomp/test/stack_test.js +++ b/jscomp/test/dist/jscomp/test/stack_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Stack = require("melange/stack.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Stack = require("melange/stack.js"); function to_list(v) { - var acc = /* [] */0; + let acc = /* [] */0; while(!Caml_obj.caml_equal(v.c, /* [] */0)) { acc = { hd: Stdlib__Stack.pop(v), @@ -18,7 +18,7 @@ function to_list(v) { } function v(param) { - var v$1 = { + let v$1 = { c: /* [] */0, len: 0 }; @@ -28,7 +28,7 @@ function v(param) { return to_list(v$1); } -var suites_0 = [ +let suites_0 = [ "push_test", (function (param) { return { @@ -48,7 +48,7 @@ var suites_0 = [ }) ]; -var suites = { +let suites = { hd: suites_0, tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/stdlib_bytes_utf8_test.js b/jscomp/test/dist/jscomp/test/stdlib_bytes_utf8_test.js index 70bdcfd753..48317221f2 100644 --- a/jscomp/test/dist/jscomp/test/stdlib_bytes_utf8_test.js +++ b/jscomp/test/dist/jscomp/test/stdlib_bytes_utf8_test.js @@ -1,24 +1,24 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Uchar = require("melange/uchar.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Uchar = require("melange/uchar.js"); function fold_uchars(f, acc) { - var _acc = acc; - var _u = Stdlib__Uchar.min; + let _acc = acc; + let _u = Stdlib__Uchar.min; while(true) { - var u = _u; - var acc$1 = _acc; - var acc$2 = Curry._2(f, acc$1, u); + let u = _u; + let acc$1 = _acc; + let acc$2 = Curry._2(f, acc$1, u); if (u === Stdlib__Uchar.max) { return acc$2; } @@ -28,7 +28,7 @@ function fold_uchars(f, acc) { }; } -var utf_8_spec_0 = [ +let utf_8_spec_0 = [ [ 0, 127 @@ -39,7 +39,7 @@ var utf_8_spec_0 = [ ]] ]; -var utf_8_spec_1 = { +let utf_8_spec_1 = { hd: [ [ 128, @@ -225,12 +225,12 @@ var utf_8_spec_1 = { } }; -var utf_8_spec = { +let utf_8_spec = { hd: utf_8_spec_0, tl: utf_8_spec_1 }; -var utf_16be_spec_0 = [ +let utf_16be_spec_0 = [ [ 0, 55295 @@ -247,7 +247,7 @@ var utf_16be_spec_0 = [ ] ]; -var utf_16be_spec_1 = { +let utf_16be_spec_1 = { hd: [ [ 57344, @@ -293,22 +293,22 @@ var utf_16be_spec_1 = { } }; -var utf_16be_spec = { +let utf_16be_spec = { hd: utf_16be_spec_0, tl: utf_16be_spec_1 }; function uchar_map_of_spec(spec) { - var map = Caml_array.make(Stdlib__Uchar.max + 1 | 0, Stdlib__Bytes.empty); - var add_range = function (param) { - var bytes = param[1]; - var match = param[0]; - var len = bytes.length; - var uchar = { + let map = Caml_array.make(Stdlib__Uchar.max + 1 | 0, Stdlib__Bytes.empty); + let add_range = function (param) { + let bytes = param[1]; + let match = param[0]; + let len = bytes.length; + let uchar = { contents: match[0] }; - var buf = Caml_bytes.caml_create_bytes(len); - var add = function (len$p) { + let buf = Caml_bytes.caml_create_bytes(len); + let add = function (len$p) { if (len === len$p) { Caml_array.set(map, uchar.contents, Stdlib__Bytes.copy(buf)); uchar.contents = uchar.contents + 1 | 0; @@ -316,13 +316,13 @@ function uchar_map_of_spec(spec) { } }; - for(var b0 = 0 < len ? Caml_array.get(bytes, 0)[0] : Stdlib.max_int ,b0_finish = 0 < len ? Caml_array.get(bytes, 0)[1] : Stdlib.min_int; b0 <= b0_finish; ++b0){ + for(let b0 = 0 < len ? Caml_array.get(bytes, 0)[0] : Stdlib.max_int ,b0_finish = 0 < len ? Caml_array.get(bytes, 0)[1] : Stdlib.min_int; b0 <= b0_finish; ++b0){ Caml_bytes.set(buf, 0, b0); - for(var b1 = 1 < len ? Caml_array.get(bytes, 1)[0] : Stdlib.max_int ,b1_finish = 1 < len ? Caml_array.get(bytes, 1)[1] : Stdlib.min_int; b1 <= b1_finish; ++b1){ + for(let b1 = 1 < len ? Caml_array.get(bytes, 1)[0] : Stdlib.max_int ,b1_finish = 1 < len ? Caml_array.get(bytes, 1)[1] : Stdlib.min_int; b1 <= b1_finish; ++b1){ Caml_bytes.set(buf, 1, b1); - for(var b2 = 2 < len ? Caml_array.get(bytes, 2)[0] : Stdlib.max_int ,b2_finish = 2 < len ? Caml_array.get(bytes, 2)[1] : Stdlib.min_int; b2 <= b2_finish; ++b2){ + for(let b2 = 2 < len ? Caml_array.get(bytes, 2)[0] : Stdlib.max_int ,b2_finish = 2 < len ? Caml_array.get(bytes, 2)[1] : Stdlib.min_int; b2 <= b2_finish; ++b2){ Caml_bytes.set(buf, 2, b2); - for(var b3 = 3 < len ? Caml_array.get(bytes, 3)[0] : Stdlib.max_int ,b3_finish = 3 < len ? Caml_array.get(bytes, 3)[1] : Stdlib.min_int; b3 <= b3_finish; ++b3){ + for(let b3 = 3 < len ? Caml_array.get(bytes, 3)[0] : Stdlib.max_int ,b3_finish = 3 < len ? Caml_array.get(bytes, 3)[1] : Stdlib.min_int; b3 <= b3_finish; ++b3){ Caml_bytes.set(buf, 3, b3); add(4); } @@ -352,29 +352,29 @@ function uchar_map_get(u, map) { return Caml_array.get(map, u); } -var utf_8 = uchar_map_of_spec(utf_8_spec); +let utf_8 = uchar_map_of_spec(utf_8_spec); -var utf_16be = uchar_map_of_spec(utf_16be_spec); +let utf_16be = uchar_map_of_spec(utf_16be_spec); function swap(_u, b) { - var len = b.length; + let len = b.length; if (len === 0) { return ; } - for(var i = 0 ,i_finish = (b.length >> 1); i < i_finish; ++i){ - var j = (i << 1); + for(let i = 0 ,i_finish = (b.length >> 1); i < i_finish; ++i){ + let j = (i << 1); Stdlib__Bytes.set_uint16_le(b, j, Stdlib__Bytes.get_uint16_be(b, j)); } } -var map = Stdlib__Array.map(Stdlib__Bytes.copy, utf_16be); +let map = Stdlib__Array.map(Stdlib__Bytes.copy, utf_16be); Stdlib__Array.iteri(swap, map); function test_utf(utf, utf_len, get_utf, set_utf, utf_is_valid) { - var f = function (param, u) { - var utf_len$1 = Curry._1(utf_len, u); - var buf = Caml_bytes.caml_create_bytes(utf_len$1); + let f = function (param, u) { + let utf_len$1 = Curry._1(utf_len, u); + let buf = Caml_bytes.caml_create_bytes(utf_len$1); if (Curry._3(set_utf, buf, 0, u) !== utf_len$1) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -405,7 +405,7 @@ function test_utf(utf, utf_len, get_utf, set_utf, utf_is_valid) { ] }); } - var dec = Curry._2(get_utf, buf, 0); + let dec = Curry._2(get_utf, buf, 0); if ((dec >>> 27) !== 1) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -458,13 +458,13 @@ test_utf(utf_16be, Stdlib__Uchar.utf_16_byte_length, Stdlib__Bytes.get_utf_16be_ test_utf(map, Stdlib__Uchar.utf_16_byte_length, Stdlib__Bytes.get_utf_16le_uchar, Stdlib__Bytes.set_utf_16le_uchar, Stdlib__Bytes.is_valid_utf_16le); function raises(f) { - var tmp; + let tmp; try { Curry._1(f, undefined); tmp = false; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { tmp = true; } else { @@ -508,7 +508,7 @@ raises(function (param) { return Stdlib__Bytes.set_utf_16be_uchar(Stdlib__Bytes.empty, 0, Stdlib__Uchar.min); }); -var b = Stdlib__Bytes.make(1, /* '\171' */171); +let b = Stdlib__Bytes.make(1, /* '\171' */171); if (!(Stdlib__Bytes.set_utf_8_uchar(b, 0, Stdlib__Uchar.max) === 0 && Caml_bytes.get(b, 0) === /* '\171' */171)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -543,7 +543,7 @@ if (!(Stdlib__Bytes.set_utf_16le_uchar(b, 0, Stdlib__Uchar.max) === 0 && Caml_by }); } -var b$1 = [ +let b$1 = [ 0, 0 ]; @@ -563,14 +563,14 @@ if (Stdlib__Bytes.is_valid_utf_8(b$1)) { }); } -var b$2 = Stdlib__Bytes.of_string("\xc0\xaf\xe0\x80\xbf\xf0\x81\x82A"); +let b$2 = Stdlib__Bytes.of_string("\xc0\xaf\xe0\x80\xbf\xf0\x81\x82A"); function ok(i) { return i === (b$2.length - 1 | 0); } -for(var i = 0 ,i_finish = b$2.length; i < i_finish; ++i){ - var dec = Stdlib__Bytes.get_utf_8_uchar(b$2, i); +for(let i = 0 ,i_finish = b$2.length; i < i_finish; ++i){ + let dec = Stdlib__Bytes.get_utf_8_uchar(b$2, i); if (ok(i)) { if ((dec >>> 27) === 1 !== true) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -638,14 +638,14 @@ for(var i = 0 ,i_finish = b$2.length; i < i_finish; ++i){ } } -var b$3 = Stdlib__Bytes.of_string("\xed\xa0\x80\xed\xbf\xbf\xed\xafA"); +let b$3 = Stdlib__Bytes.of_string("\xed\xa0\x80\xed\xbf\xbf\xed\xafA"); function ok$1(i) { return i === (b$3.length - 1 | 0); } -for(var i$1 = 0 ,i_finish$1 = b$3.length; i$1 < i_finish$1; ++i$1){ - var dec$1 = Stdlib__Bytes.get_utf_8_uchar(b$3, i$1); +for(let i$1 = 0 ,i_finish$1 = b$3.length; i$1 < i_finish$1; ++i$1){ + let dec$1 = Stdlib__Bytes.get_utf_8_uchar(b$3, i$1); if (ok$1(i$1)) { if ((dec$1 >>> 27) === 1 !== true) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -713,7 +713,7 @@ for(var i$1 = 0 ,i_finish$1 = b$3.length; i$1 < i_finish$1; ++i$1){ } } -var b$4 = Stdlib__Bytes.of_string("\xf4\x91\x92\x93\xffA\x80\xbfB"); +let b$4 = Stdlib__Bytes.of_string("\xf4\x91\x92\x93\xffA\x80\xbfB"); function ok$2(i) { if (i === 5) { @@ -723,8 +723,8 @@ function ok$2(i) { } } -for(var i$2 = 0 ,i_finish$2 = b$4.length; i$2 < i_finish$2; ++i$2){ - var dec$2 = Stdlib__Bytes.get_utf_8_uchar(b$4, i$2); +for(let i$2 = 0 ,i_finish$2 = b$4.length; i$2 < i_finish$2; ++i$2){ + let dec$2 = Stdlib__Bytes.get_utf_8_uchar(b$4, i$2); if (ok$2(i$2)) { if ((dec$2 >>> 27) === 1 !== true) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -792,9 +792,9 @@ for(var i$2 = 0 ,i_finish$2 = b$4.length; i$2 < i_finish$2; ++i$2){ } } -var b$5 = Stdlib__Bytes.of_string("\xe1\x80\xe2\xf0\x91\x92\xf1\xbfA"); +let b$5 = Stdlib__Bytes.of_string("\xe1\x80\xe2\xf0\x91\x92\xf1\xbfA"); -var d0 = Stdlib__Bytes.get_utf_8_uchar(b$5, 0); +let d0 = Stdlib__Bytes.get_utf_8_uchar(b$5, 0); if ((d0 >>> 27) === 1 !== false) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -829,7 +829,7 @@ if ((d0 & 16777215) !== Stdlib__Uchar.rep) { }); } -var d2 = Stdlib__Bytes.get_utf_8_uchar(b$5, 2); +let d2 = Stdlib__Bytes.get_utf_8_uchar(b$5, 2); if ((d2 >>> 27) === 1 !== false) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -864,7 +864,7 @@ if ((d2 & 16777215) !== Stdlib__Uchar.rep) { }); } -var d3 = Stdlib__Bytes.get_utf_8_uchar(b$5, 3); +let d3 = Stdlib__Bytes.get_utf_8_uchar(b$5, 3); if ((d3 >>> 27) === 1 !== false) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -899,7 +899,7 @@ if ((d3 & 16777215) !== Stdlib__Uchar.rep) { }); } -var d6 = Stdlib__Bytes.get_utf_8_uchar(b$5, 6); +let d6 = Stdlib__Bytes.get_utf_8_uchar(b$5, 6); if ((d6 >>> 27) === 1 !== false) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -934,7 +934,7 @@ if ((d6 & 16777215) !== Stdlib__Uchar.rep) { }); } -var d8 = Stdlib__Bytes.get_utf_8_uchar(b$5, 8); +let d8 = Stdlib__Bytes.get_utf_8_uchar(b$5, 8); if (((d8 >>> 24) & 7) !== 1) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -967,7 +967,7 @@ Stdlib__Printf.printf(/* Format */{ _1: "All UTF tests passed!\n" }); -var utf_16le = map; +let utf_16le = map; exports.fold_uchars = fold_uchars; exports.utf_8_spec = utf_8_spec; diff --git a/jscomp/test/dist/jscomp/test/string_bound_get_test.js b/jscomp/test/dist/jscomp/test/string_bound_get_test.js index ae41071154..f3d7ac73b6 100644 --- a/jscomp/test/dist/jscomp/test/string_bound_get_test.js +++ b/jscomp/test/dist/jscomp/test/string_bound_get_test.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_string = require("melange.js/caml_string.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_string = require("melange.js/caml_string.js"); -var v = "ghos"; +let v = "ghos"; -var u_a = /* 'g' */103; +let u_a = /* 'g' */103; function u_b(param) { return Caml_string.get(v, -1); @@ -16,15 +16,15 @@ function u_d(param) { return Caml_string.get("ghos", -1); } -var u_e = Caml_bytes.caml_create_bytes(32); +let u_e = Caml_bytes.caml_create_bytes(32); -var u_f = Caml_bytes.get(u_e, 0); +let u_f = Caml_bytes.get(u_e, 0); function u_g(param) { return Caml_bytes.get(u_e, -1); } -var u_c = /* 'g' */103; +let u_c = /* 'g' */103; exports.v = v; exports.u_a = u_a; diff --git a/jscomp/test/dist/jscomp/test/string_constant_compare.js b/jscomp/test/dist/jscomp/test/string_constant_compare.js index d042f7bb7a..e2434eee15 100644 --- a/jscomp/test/dist/jscomp/test/string_constant_compare.js +++ b/jscomp/test/dist/jscomp/test/string_constant_compare.js @@ -2,17 +2,17 @@ 'use strict'; -var a1 = true; +let a1 = true; -var a2 = false; +let a2 = false; -var a3 = true; +let a3 = true; -var a4 = false; +let a4 = false; -var a5 = "'" === "'"; +let a5 = "'" === "'"; -var a6 = "'" !== "'"; +let a6 = "'" !== "'"; exports.a1 = a1; exports.a2 = a2; diff --git a/jscomp/test/dist/jscomp/test/string_get_set_test.js b/jscomp/test/dist/jscomp/test/string_get_set_test.js index 41075cf3a9..0176ba0e1b 100644 --- a/jscomp/test/dist/jscomp/test/string_get_set_test.js +++ b/jscomp/test/dist/jscomp/test/string_get_set_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); Mt.from_pair_suites("jscomp/test/string_get_set_test.ml", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/string_interp_test.js b/jscomp/test/dist/jscomp/test/string_interp_test.js index 0acb93c663..ab4847dac7 100644 --- a/jscomp/test/dist/jscomp/test/string_interp_test.js +++ b/jscomp/test/dist/jscomp/test/string_interp_test.js @@ -31,15 +31,15 @@ function ffff(a_1, a_2) { } function f(x, y) { - var x$1 = String(x); - var y$1 = String(y); - var sum = String(x + y | 0); + let x$1 = String(x); + let y$1 = String(y); + let sum = String(x + y | 0); console.log(" " + x$1 + " + " + y$1 + " = " + sum + " "); } -var world = "世界"; +let world = "世界"; -var hello_world = "你好," + world; +let hello_world = "你好," + world; function test1(x0) { return "你好," + x0; @@ -53,25 +53,25 @@ function test5(x) { return "" + x; } -var js_in_raw = ("hello" + "你好" +let js_in_raw = ("hello" + "你好" ); -var j_in_raw = ("hello" + "你好" +let j_in_raw = ("hello" + "你好" ); -var b = "test"; +let b = "test"; -var c = "test"; +let c = "test"; -var a = "test"; +let a = "test"; -var a0 = "Hello \\"; +let a0 = "Hello \\"; -var a1 = "Hello \\"; +let a1 = "Hello \\"; -var a2 = "Hello \$"; +let a2 = "Hello \$"; -var a4 = ""; +let a4 = ""; exports.hi2 = hi2; exports.hi = hi; diff --git a/jscomp/test/dist/jscomp/test/string_literal_print_test.js b/jscomp/test/dist/jscomp/test/string_literal_print_test.js index 790f5021e6..cc61261abf 100644 --- a/jscomp/test/dist/jscomp/test/string_literal_print_test.js +++ b/jscomp/test/dist/jscomp/test/string_literal_print_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var zero_to_255 = "\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; +let zero_to_255 = "\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; -var js_zero_to_255 = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; +let js_zero_to_255 = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; Mt.from_pair_suites("String_literal_print_test", { hd: [ @@ -21,15 +21,15 @@ Mt.from_pair_suites("String_literal_print_test", { tl: /* [] */0 }); -var f = "\b\r\n"; +let f = "\b\r\n"; -var u = "\\"; +let u = "\\"; -var h = "\0\x01\x02\x03\x04\x05"; +let h = "\0\x01\x02\x03\x04\x05"; -var x = "W"; +let x = "W"; -var wth_quote = "'\"'\""; +let wth_quote = "'\"'\""; exports.f = f; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/string_runtime_test.js b/jscomp/test/dist/jscomp/test/string_runtime_test.js index 335df31bd4..5ec0ac4f8a 100644 --- a/jscomp/test/dist/jscomp/test/string_runtime_test.js +++ b/jscomp/test/dist/jscomp/test/string_runtime_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Mt = require("./mt.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__List = require("melange/list.js"); -var Test_char = require("./test_char.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Mt = require("./mt.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__List = require("melange/list.js"); +let Test_char = require("./test_char.js"); -var suites_0 = [ +let suites_0 = [ "caml_is_printable", (function (param) { return { @@ -18,12 +18,12 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "caml_string_of_bytes", (function (param) { - var match = Stdlib__List.split(Stdlib__List.map((function (x) { - var b = Caml_bytes.caml_create_bytes(x); + let match = Stdlib__List.split(Stdlib__List.map((function (x) { + let b = Caml_bytes.caml_create_bytes(x); Stdlib__Bytes.fill(b, 0, x, /* 'c' */99); return [ Stdlib__Bytes.to_string(b), @@ -63,7 +63,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/string_set.js b/jscomp/test/dist/jscomp/test/string_set.js index 0554b198ba..1dc8c6fcf7 100644 --- a/jscomp/test/dist/jscomp/test/string_set.js +++ b/jscomp/test/dist/jscomp/test/string_set.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Set_gen = require("./set_gen.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Set_gen = require("./set_gen.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); function split(x, tree) { if (!tree) { @@ -17,10 +17,10 @@ function split(x, tree) { /* Empty */0 ]; } - var r = tree._2; - var v = tree._1; - var l = tree._0; - var c = Caml.caml_string_compare(x, v); + let r = tree._2; + let v = tree._1; + let l = tree._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return [ l, @@ -29,14 +29,14 @@ function split(x, tree) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], Set_gen.internal_join(match[2], v, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ Set_gen.internal_join(l, v, match$1[0]), match$1[1], @@ -53,10 +53,10 @@ function add(x, tree) { _3: 1 }; } - var r = tree._2; - var v = tree._1; - var l = tree._0; - var c = Caml.caml_string_compare(x, v); + let r = tree._2; + let v = tree._1; + let l = tree._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return tree; } else if (c < 0) { @@ -73,21 +73,21 @@ function union(s1, s2) { if (!s2) { return s1; } - var h2 = s2._3; - var v2 = s2._1; - var h1 = s1._3; - var v1 = s1._1; + let h2 = s2._3; + let v2 = s2._1; + let h1 = s1._3; + let v1 = s1._1; if (h1 >= h2) { if (h2 === 1) { return add(v2, s1); } - var match = split(v1, s2); + let match = split(v1, s2); return Set_gen.internal_join(union(s1._0, match[0]), v1, union(s1._2, match[2])); } if (h1 === 1) { return add(v1, s2); } - var match$1 = split(v2, s1); + let match$1 = split(v2, s1); return Set_gen.internal_join(union(match$1[0], s2._0), v2, union(match$1[2], s2._2)); } @@ -98,11 +98,11 @@ function inter(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return Set_gen.internal_join(inter(l1, l2), v1, inter(r1, match[2])); } else { @@ -117,11 +117,11 @@ function diff(s1, s2) { if (!s2) { return s1; } - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return Set_gen.internal_concat(diff(l1, l2), diff(r1, match[2])); } else { @@ -131,11 +131,11 @@ function diff(s1, s2) { function mem(x, _tree) { while(true) { - var tree = _tree; + let tree = _tree; if (!tree) { return false; } - var c = Caml.caml_string_compare(x, tree._1); + let c = Caml.caml_string_compare(x, tree._1); if (c === 0) { return true; } @@ -148,10 +148,10 @@ function remove(x, tree) { if (!tree) { return /* Empty */0; } - var r = tree._2; - var v = tree._1; - var l = tree._0; - var c = Caml.caml_string_compare(x, v); + let r = tree._2; + let v = tree._1; + let l = tree._0; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return Set_gen.internal_merge(l, r); } else if (c < 0) { @@ -171,20 +171,20 @@ function equal(s1, s2) { function subset(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2._2; - var l2 = s2._0; - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var c = Caml.caml_string_compare(v1, s2._1); + let r2 = s2._2; + let l2 = s2._0; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let c = Caml.caml_string_compare(v1, s2._1); if (c === 0) { if (!subset(l1, l2)) { return false; @@ -220,10 +220,10 @@ function subset(_s1, _s2) { function find(x, _tree) { while(true) { - var tree = _tree; + let tree = _tree; if (tree) { - var v = tree._1; - var c = Caml.caml_string_compare(x, v); + let v = tree._1; + let c = Caml.caml_string_compare(x, v); if (c === 0) { return v; } @@ -240,23 +240,23 @@ function of_list(l) { if (!l) { return /* Empty */0; } - var match = l.tl; - var x0 = l.hd; + let match = l.tl; + let x0 = l.hd; if (!match) { return Set_gen.singleton(x0); } - var match$1 = match.tl; - var x1 = match.hd; + let match$1 = match.tl; + let x1 = match.hd; if (!match$1) { return add(x1, Set_gen.singleton(x0)); } - var match$2 = match$1.tl; - var x2 = match$1.hd; + let match$2 = match$1.tl; + let x2 = match$1.hd; if (!match$2) { return add(x2, add(x1, Set_gen.singleton(x0))); } - var match$3 = match$2.tl; - var x3 = match$2.hd; + let match$3 = match$2.tl; + let x3 = match$2.hd; if (match$3) { if (match$3.tl) { return Set_gen.of_sorted_list(Stdlib__List.sort_uniq(Stdlib__String.compare, l)); @@ -279,39 +279,39 @@ function invariant(t) { return Set_gen.is_ordered(Stdlib__String.compare, t); } -var compare_elt = Stdlib__String.compare; +let compare_elt = Stdlib__String.compare; -var empty = /* Empty */0; +let empty = /* Empty */0; -var is_empty = Set_gen.is_empty; +let is_empty = Set_gen.is_empty; -var iter = Set_gen.iter; +let iter = Set_gen.iter; -var fold = Set_gen.fold; +let fold = Set_gen.fold; -var for_all = Set_gen.for_all; +let for_all = Set_gen.for_all; -var exists = Set_gen.exists; +let exists = Set_gen.exists; -var singleton = Set_gen.singleton; +let singleton = Set_gen.singleton; -var cardinal = Set_gen.cardinal; +let cardinal = Set_gen.cardinal; -var elements = Set_gen.elements; +let elements = Set_gen.elements; -var min_elt = Set_gen.min_elt; +let min_elt = Set_gen.min_elt; -var max_elt = Set_gen.max_elt; +let max_elt = Set_gen.max_elt; -var choose = Set_gen.choose; +let choose = Set_gen.choose; -var partition = Set_gen.partition; +let partition = Set_gen.partition; -var filter = Set_gen.filter; +let filter = Set_gen.filter; -var of_sorted_list = Set_gen.of_sorted_list; +let of_sorted_list = Set_gen.of_sorted_list; -var of_sorted_array = Set_gen.of_sorted_array; +let of_sorted_array = Set_gen.of_sorted_array; exports.compare_elt = compare_elt; exports.empty = empty; diff --git a/jscomp/test/dist/jscomp/test/string_set_test.js b/jscomp/test/dist/jscomp/test/string_set_test.js index 75fe504545..2da6b9b7f3 100644 --- a/jscomp/test/dist/jscomp/test/string_set_test.js +++ b/jscomp/test/dist/jscomp/test/string_set_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var String_set = require("./string_set.js"); +let Mt = require("./mt.js"); +let String_set = require("./string_set.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -29,9 +29,9 @@ function eq(loc, x, y) { }; } -var s = String_set.empty; +let s = String_set.empty; -for(var i = 0; i <= 99999; ++i){ +for(let i = 0; i <= 99999; ++i){ s = String_set.add(String(i), s); } diff --git a/jscomp/test/dist/jscomp/test/string_test.js b/jscomp/test/dist/jscomp/test/string_test.js index f23daab670..872d8bac0f 100644 --- a/jscomp/test/dist/jscomp/test/string_test.js +++ b/jscomp/test/dist/jscomp/test/string_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Ext_string_test = require("./ext_string_test.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Ext_string_test = require("./ext_string_test.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); function ff(x) { - var a; + let a; switch (x) { case "0" : case "1" : @@ -34,7 +34,7 @@ function ff(x) { } function gg(x) { - var a; + let a; switch (x) { case 0 : case 1 : @@ -62,17 +62,17 @@ function gg(x) { } function rev_split_by_char(c, s) { - var loop = function (i, l) { + let loop = function (i, l) { try { - var i$p = Stdlib__String.index_from(s, i, c); - var s$p = Stdlib__String.sub(s, i, i$p - i | 0); + let i$p = Stdlib__String.index_from(s, i, c); + let s$p = Stdlib__String.sub(s, i, i$p - i | 0); return loop(i$p + 1 | 0, s$p === "" ? l : ({ hd: s$p, tl: l })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: Stdlib__String.sub(s, i, s.length - i | 0), @@ -86,22 +86,22 @@ function rev_split_by_char(c, s) { } function xsplit(delim, s) { - var len = s.length; + let len = s.length; if (len !== 0) { - var _l = /* [] */0; - var _i = len; + let _l = /* [] */0; + let _i = len; while(true) { - var i = _i; - var l = _l; + let i = _i; + let l = _l; if (i === 0) { return l; } - var i$p; + let i$p; try { i$p = Stdlib__String.rindex_from(s, i - 1 | 0, delim); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: Stdlib__String.sub(s, 0, i), @@ -110,12 +110,12 @@ function xsplit(delim, s) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var l_0 = Stdlib__String.sub(s, i$p + 1 | 0, (i - i$p | 0) - 1 | 0); - var l$1 = { + let l_0 = Stdlib__String.sub(s, i$p + 1 | 0, (i - i$p | 0) - 1 | 0); + let l$1 = { hd: l_0, tl: l }; - var l$2 = i$p === 0 ? ({ + let l$2 = i$p === 0 ? ({ hd: "", tl: l$1 }) : l$1; diff --git a/jscomp/test/dist/jscomp/test/stringmatch_test.js b/jscomp/test/dist/jscomp/test/stringmatch_test.js index deed79fb48..713e2fc16d 100644 --- a/jscomp/test/dist/jscomp/test/stringmatch_test.js +++ b/jscomp/test/dist/jscomp/test/stringmatch_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function tst01(s) { if (s === "") { @@ -45,7 +45,7 @@ if (tst01("\0\0\0\0\0\0\0\x07") !== 1) { } function tst02(s) { - var len = s.length; + let len = s.length; if (s === "") { if (len >= 0) { return 1; @@ -1229,373 +1229,373 @@ if (tst05("BBBBBBBD") !== -1) { }); } -var s00 = "and"; +let s00 = "and"; -var t00 = "nad"; +let t00 = "nad"; -var s01 = "as"; +let s01 = "as"; -var t01 = "sa"; +let t01 = "sa"; -var s02 = "assert"; +let s02 = "assert"; -var t02 = "asesrt"; +let t02 = "asesrt"; -var s03 = "begin"; +let s03 = "begin"; -var t03 = "negib"; +let t03 = "negib"; -var s04 = "class"; +let s04 = "class"; -var t04 = "lcass"; +let t04 = "lcass"; -var s05 = "constraint"; +let s05 = "constraint"; -var t05 = "constiarnt"; +let t05 = "constiarnt"; -var s06 = "do"; +let s06 = "do"; -var t06 = "od"; +let t06 = "od"; -var s07 = "done"; +let s07 = "done"; -var t07 = "eond"; +let t07 = "eond"; -var s08 = "downto"; +let s08 = "downto"; -var t08 = "dowtno"; +let t08 = "dowtno"; -var s09 = "else"; +let s09 = "else"; -var t09 = "lese"; +let t09 = "lese"; -var s10 = "end"; +let s10 = "end"; -var t10 = "edn"; +let t10 = "edn"; -var s11 = "exception"; +let s11 = "exception"; -var t11 = "exception"; +let t11 = "exception"; -var s12 = "external"; +let s12 = "external"; -var t12 = "external"; +let t12 = "external"; -var s13 = "false"; +let s13 = "false"; -var t13 = "fslae"; +let t13 = "fslae"; -var s14 = "for"; +let s14 = "for"; -var t14 = "ofr"; +let t14 = "ofr"; -var s15 = "fun"; +let s15 = "fun"; -var t15 = "fnu"; +let t15 = "fnu"; -var s16 = "function"; +let s16 = "function"; -var t16 = "function"; +let t16 = "function"; -var s17 = "functor"; +let s17 = "functor"; -var t17 = "ounctfr"; +let t17 = "ounctfr"; -var s18 = "if"; +let s18 = "if"; -var t18 = "fi"; +let t18 = "fi"; -var s19 = "in"; +let s19 = "in"; -var t19 = "in"; +let t19 = "in"; -var s20 = "include"; +let s20 = "include"; -var t20 = "inculde"; +let t20 = "inculde"; -var s21 = "inherit"; +let s21 = "inherit"; -var t21 = "iehnrit"; +let t21 = "iehnrit"; -var s22 = "initializer"; +let s22 = "initializer"; -var t22 = "enitializir"; +let t22 = "enitializir"; -var s23 = "lazy"; +let s23 = "lazy"; -var t23 = "zaly"; +let t23 = "zaly"; -var s24 = "let"; +let s24 = "let"; -var t24 = "elt"; +let t24 = "elt"; -var s25 = "match"; +let s25 = "match"; -var t25 = "match"; +let t25 = "match"; -var s26 = "method"; +let s26 = "method"; -var t26 = "methdo"; +let t26 = "methdo"; -var s27 = "module"; +let s27 = "module"; -var t27 = "modelu"; +let t27 = "modelu"; -var s28 = "mutable"; +let s28 = "mutable"; -var t28 = "butamle"; +let t28 = "butamle"; -var s29 = "new"; +let s29 = "new"; -var t29 = "wen"; +let t29 = "wen"; -var s30 = "object"; +let s30 = "object"; -var t30 = "objcet"; +let t30 = "objcet"; -var s31 = "of"; +let s31 = "of"; -var t31 = "of"; +let t31 = "of"; -var s32 = "open"; +let s32 = "open"; -var t32 = "epon"; +let t32 = "epon"; -var s33 = "or"; +let s33 = "or"; -var t33 = "ro"; +let t33 = "ro"; -var s34 = "private"; +let s34 = "private"; -var t34 = "privaet"; +let t34 = "privaet"; -var s35 = "rec"; +let s35 = "rec"; -var t35 = "rec"; +let t35 = "rec"; -var s36 = "sig"; +let s36 = "sig"; -var t36 = "gis"; +let t36 = "gis"; -var s37 = "struct"; +let s37 = "struct"; -var t37 = "scrutt"; +let t37 = "scrutt"; -var s38 = "then"; +let s38 = "then"; -var t38 = "hten"; +let t38 = "hten"; -var s39 = "to"; +let s39 = "to"; -var t39 = "to"; +let t39 = "to"; -var s40 = "true"; +let s40 = "true"; -var t40 = "teur"; +let t40 = "teur"; -var s41 = "try"; +let s41 = "try"; -var t41 = "try"; +let t41 = "try"; -var s42 = "type"; +let s42 = "type"; -var t42 = "pyte"; +let t42 = "pyte"; -var s43 = "val"; +let s43 = "val"; -var t43 = "val"; +let t43 = "val"; -var s44 = "virtual"; +let s44 = "virtual"; -var t44 = "vritual"; +let t44 = "vritual"; -var s45 = "when"; +let s45 = "when"; -var t45 = "whne"; +let t45 = "whne"; -var s46 = "while"; +let s46 = "while"; -var t46 = "wlihe"; +let t46 = "wlihe"; -var s47 = "with"; +let s47 = "with"; -var t47 = "iwth"; +let t47 = "iwth"; -var s48 = "mod"; +let s48 = "mod"; -var t48 = "mod"; +let t48 = "mod"; -var s49 = "land"; +let s49 = "land"; -var t49 = "alnd"; +let t49 = "alnd"; -var s50 = "lor"; +let s50 = "lor"; -var t50 = "rol"; +let t50 = "rol"; -var s51 = "lxor"; +let s51 = "lxor"; -var t51 = "lxor"; +let t51 = "lxor"; -var s52 = "lsl"; +let s52 = "lsl"; -var t52 = "lsl"; +let t52 = "lsl"; -var s53 = "lsr"; +let s53 = "lsr"; -var t53 = "lsr"; +let t53 = "lsr"; -var s54 = "asr"; +let s54 = "asr"; -var t54 = "sar"; +let t54 = "sar"; -var s55 = "A"; +let s55 = "A"; -var t55 = "A"; +let t55 = "A"; -var s56 = "AA"; +let s56 = "AA"; -var t56 = "AA"; +let t56 = "AA"; -var s57 = "AAA"; +let s57 = "AAA"; -var t57 = "AAA"; +let t57 = "AAA"; -var s58 = "AAAA"; +let s58 = "AAAA"; -var t58 = "AAAA"; +let t58 = "AAAA"; -var s59 = "AAAAA"; +let s59 = "AAAAA"; -var t59 = "AAAAA"; +let t59 = "AAAAA"; -var s60 = "AAAAAA"; +let s60 = "AAAAAA"; -var t60 = "AAAAAA"; +let t60 = "AAAAAA"; -var s61 = "AAAAAAA"; +let s61 = "AAAAAAA"; -var t61 = "AAAAAAA"; +let t61 = "AAAAAAA"; -var s62 = "AAAAAAAA"; +let s62 = "AAAAAAAA"; -var t62 = "AAAAAAAA"; +let t62 = "AAAAAAAA"; -var s63 = "AAAAAAAAA"; +let s63 = "AAAAAAAAA"; -var t63 = "AAAAAAAAA"; +let t63 = "AAAAAAAAA"; -var s64 = "AAAAAAAAAA"; +let s64 = "AAAAAAAAAA"; -var t64 = "AAAAAAAAAA"; +let t64 = "AAAAAAAAAA"; -var s65 = "AAAAAAAAAAA"; +let s65 = "AAAAAAAAAAA"; -var t65 = "AAAAAAAAAAA"; +let t65 = "AAAAAAAAAAA"; -var s66 = "AAAAAAAAAAAA"; +let s66 = "AAAAAAAAAAAA"; -var t66 = "AAAAAAAAAAAA"; +let t66 = "AAAAAAAAAAAA"; -var s67 = "AAAAAAAAAAAAA"; +let s67 = "AAAAAAAAAAAAA"; -var t67 = "AAAAAAAAAAAAA"; +let t67 = "AAAAAAAAAAAAA"; -var s68 = "AAAAAAAAAAAAAA"; +let s68 = "AAAAAAAAAAAAAA"; -var t68 = "AAAAAAAAAAAAAA"; +let t68 = "AAAAAAAAAAAAAA"; -var s69 = "AAAAAAAAAAAAAAA"; +let s69 = "AAAAAAAAAAAAAAA"; -var t69 = "AAAAAAAAAAAAAAA"; +let t69 = "AAAAAAAAAAAAAAA"; -var s70 = "AAAAAAAAAAAAAAAA"; +let s70 = "AAAAAAAAAAAAAAAA"; -var t70 = "AAAAAAAAAAAAAAAA"; +let t70 = "AAAAAAAAAAAAAAAA"; -var s71 = "AAAAAAAAAAAAAAAAA"; +let s71 = "AAAAAAAAAAAAAAAAA"; -var t71 = "AAAAAAAAAAAAAAAAA"; +let t71 = "AAAAAAAAAAAAAAAAA"; -var s72 = "AAAAAAAAAAAAAAAAAA"; +let s72 = "AAAAAAAAAAAAAAAAAA"; -var t72 = "AAAAAAAAAAAAAAAAAA"; +let t72 = "AAAAAAAAAAAAAAAAAA"; -var s73 = "AAAAAAAAAAAAAAAAAAA"; +let s73 = "AAAAAAAAAAAAAAAAAAA"; -var t73 = "AAAAAAAAAAAAAAAAAAA"; +let t73 = "AAAAAAAAAAAAAAAAAAA"; -var s74 = "AAAAAAAAAAAAAAAAAAAA"; +let s74 = "AAAAAAAAAAAAAAAAAAAA"; -var t74 = "AAAAAAAAAAAAAAAAAAAA"; +let t74 = "AAAAAAAAAAAAAAAAAAAA"; -var s75 = "AAAAAAAAAAAAAAAAAAAAA"; +let s75 = "AAAAAAAAAAAAAAAAAAAAA"; -var t75 = "AAAAAAAAAAAAAAAAAAAAA"; +let t75 = "AAAAAAAAAAAAAAAAAAAAA"; -var s76 = "AAAAAAAAAAAAAAAAAAAAAA"; +let s76 = "AAAAAAAAAAAAAAAAAAAAAA"; -var t76 = "AAAAAAAAAAAAAAAAAAAAAA"; +let t76 = "AAAAAAAAAAAAAAAAAAAAAA"; -var s77 = "AAAAAAAAAAAAAAAAAAAAAAA"; +let s77 = "AAAAAAAAAAAAAAAAAAAAAAA"; -var t77 = "AAAAAAAAAAAAAAAAAAAAAAA"; +let t77 = "AAAAAAAAAAAAAAAAAAAAAAA"; -var s78 = "AAAAAAAAAAAAAAAAAAAAAAAA"; +let s78 = "AAAAAAAAAAAAAAAAAAAAAAAA"; -var t78 = "AAAAAAAAAAAAAAAAAAAAAAAA"; +let t78 = "AAAAAAAAAAAAAAAAAAAAAAAA"; -var s79 = "AAAAAAAAAAAAAAAAAAAAAAAAA"; +let s79 = "AAAAAAAAAAAAAAAAAAAAAAAAA"; -var t79 = "AAAAAAAAAAAAAAAAAAAAAAAAA"; +let t79 = "AAAAAAAAAAAAAAAAAAAAAAAAA"; -var s80 = "AAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s80 = "AAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t80 = "AAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t80 = "AAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s81 = "AAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s81 = "AAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t81 = "AAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t81 = "AAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s82 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s82 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t82 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t82 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s83 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s83 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t83 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t83 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s84 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s84 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t84 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t84 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s85 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s85 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t85 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t85 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s86 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s86 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t86 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t86 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s87 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s87 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t87 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t87 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s88 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let s88 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var t88 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; +let t88 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; -var s89 = "BBBBBBBBBBBBBBB"; +let s89 = "BBBBBBBBBBBBBBB"; -var t89 = "BBBBBBBBBBBBBBB"; +let t89 = "BBBBBBBBBBBBBBB"; -var s90 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; +let s90 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; -var t90 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; +let t90 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; -var s91 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; +let s91 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; -var t91 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; +let t91 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; function tst06(s) { switch (s) { diff --git a/jscomp/test/dist/jscomp/test/submodule.js b/jscomp/test/dist/jscomp/test/submodule.js index 49adfc44ab..aee04a94e7 100644 --- a/jscomp/test/dist/jscomp/test/submodule.js +++ b/jscomp/test/dist/jscomp/test/submodule.js @@ -32,39 +32,39 @@ function a4(x, y) { return a3(x, y) + 1 | 0; } -var A4 = { +let A4 = { a4: a4 }; -var A3 = { +let A3 = { a3: a3, A4: A4 }; -var A2 = { +let A2 = { a2: a2, A3: A3 }; -var A1 = { +let A1 = { a1: a1, A2: A2 }; -var A0 = { +let A0 = { a0: a0, A1: A1 }; -var v1 = a1(1, 2); +let v1 = a1(1, 2); -var v2 = a2(1, 2); +let v2 = a2(1, 2); -var v3 = a3(1, 2); +let v3 = a3(1, 2); -var v4 = a4(1, 2); +let v4 = a4(1, 2); -var v0 = 4; +let v0 = 4; exports.A0 = A0; exports.v0 = v0; diff --git a/jscomp/test/dist/jscomp/test/submodule_call.js b/jscomp/test/dist/jscomp/test/submodule_call.js index ca4dce656a..a81e26c546 100644 --- a/jscomp/test/dist/jscomp/test/submodule_call.js +++ b/jscomp/test/dist/jscomp/test/submodule_call.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Submodule = require("./submodule.js"); +let Curry = require("melange.js/curry.js"); +let Submodule = require("./submodule.js"); -var a0 = Submodule.A0.a0(1, 2); +let a0 = Submodule.A0.a0(1, 2); -var a1 = Curry._2(Submodule.A0.A1.a1, 1, 2); +let a1 = Curry._2(Submodule.A0.A1.a1, 1, 2); -var a2 = Curry._2(Submodule.A0.A1.A2.a2, 1, 2); +let a2 = Curry._2(Submodule.A0.A1.A2.a2, 1, 2); -var a3 = Curry._2(Submodule.A0.A1.A2.A3.a3, 1, 2); +let a3 = Curry._2(Submodule.A0.A1.A2.A3.a3, 1, 2); -var a4 = Curry._2(Submodule.A0.A1.A2.A3.A4.a4, 1, 2); +let a4 = Curry._2(Submodule.A0.A1.A2.A3.A4.a4, 1, 2); exports.a0 = a0; exports.a1 = a1; diff --git a/jscomp/test/dist/jscomp/test/switch_case_test.js b/jscomp/test/dist/jscomp/test/switch_case_test.js index 74c6d90b49..caff2dfba4 100644 --- a/jscomp/test/dist/jscomp/test/switch_case_test.js +++ b/jscomp/test/dist/jscomp/test/switch_case_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/tailcall_inline_test.js b/jscomp/test/dist/jscomp/test/tailcall_inline_test.js index 9fa8a64cff..0de390d9d7 100644 --- a/jscomp/test/dist/jscomp/test/tailcall_inline_test.js +++ b/jscomp/test/dist/jscomp/test/tailcall_inline_test.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Mt = require("./mt.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Mt = require("./mt.js"); +let Stdlib__Array = require("melange/array.js"); function f(param) { - var f$1 = function (_acc, _n) { + let f$1 = function (_acc, _n) { while(true) { - var n = _n; - var acc = _acc; + let n = _n; + let acc = _acc; if (n <= 0) { return acc; } @@ -18,14 +18,14 @@ function f(param) { continue ; }; }; - var v = Caml_array.make(10, 0); - for(var i = 0; i <= 9; ++i){ + let v = Caml_array.make(10, 0); + for(let i = 0; i <= 9; ++i){ Caml_array.set(v, i, f$1(0, i)); } return v; } -var suites_0 = [ +let suites_0 = [ "acc", (function (param) { return { @@ -47,7 +47,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "array_to_list", (function (param) { @@ -74,7 +74,7 @@ var suites_1 = { tl: /* [] */0 }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/test_alias.js b/jscomp/test/dist/jscomp/test/test_alias.js index 290a660260..49db0f16c4 100644 --- a/jscomp/test/dist/jscomp/test/test_alias.js +++ b/jscomp/test/dist/jscomp/test/test_alias.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__List = require("melange/list.js"); +let Stdlib__List = require("melange/list.js"); -var v = Stdlib__List.length; +let v = Stdlib__List.length; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/test_ari.js b/jscomp/test/dist/jscomp/test/test_ari.js index 983ab60e7e..a42b9fa38b 100644 --- a/jscomp/test/dist/jscomp/test/test_ari.js +++ b/jscomp/test/dist/jscomp/test/test_ari.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); -var U = require("U"); -var VV = require("VV"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); +let U = require("U"); +let VV = require("VV"); function f(x) { return function (param) { @@ -24,18 +24,18 @@ function f2(param) { return 3 + param | 0; } -var g = 7; +let g = 7; function ff(param) { return U.test_primit(3, param); } -var fff = VV.test_primit2(3); +let fff = VV.test_primit2(3); function length_aux(_len, _param) { while(true) { - var param = _param; - var len = _len; + let param = _param; + let len = _len; if (!param) { return len; } @@ -45,135 +45,135 @@ function length_aux(_len, _param) { }; } -var length = Stdlib__List.length; +let length = Stdlib__List.length; -var compare_lengths = Stdlib__List.compare_lengths; +let compare_lengths = Stdlib__List.compare_lengths; -var compare_length_with = Stdlib__List.compare_length_with; +let compare_length_with = Stdlib__List.compare_length_with; -var is_empty = Stdlib__List.is_empty; +let is_empty = Stdlib__List.is_empty; -var cons = Stdlib__List.cons; +let cons = Stdlib__List.cons; -var hd = Stdlib__List.hd; +let hd = Stdlib__List.hd; -var tl = Stdlib__List.tl; +let tl = Stdlib__List.tl; -var nth = Stdlib__List.nth; +let nth = Stdlib__List.nth; -var nth_opt = Stdlib__List.nth_opt; +let nth_opt = Stdlib__List.nth_opt; -var rev = Stdlib__List.rev; +let rev = Stdlib__List.rev; -var init = Stdlib__List.init; +let init = Stdlib__List.init; -var append = Stdlib__List.append; +let append = Stdlib__List.append; -var rev_append = Stdlib__List.rev_append; +let rev_append = Stdlib__List.rev_append; -var concat = Stdlib__List.concat; +let concat = Stdlib__List.concat; -var flatten = Stdlib__List.flatten; +let flatten = Stdlib__List.flatten; -var equal = Stdlib__List.equal; +let equal = Stdlib__List.equal; -var compare = Stdlib__List.compare; +let compare = Stdlib__List.compare; -var iter = Stdlib__List.iter; +let iter = Stdlib__List.iter; -var iteri = Stdlib__List.iteri; +let iteri = Stdlib__List.iteri; -var map = Stdlib__List.map; +let map = Stdlib__List.map; -var mapi = Stdlib__List.mapi; +let mapi = Stdlib__List.mapi; -var rev_map = Stdlib__List.rev_map; +let rev_map = Stdlib__List.rev_map; -var filter_map = Stdlib__List.filter_map; +let filter_map = Stdlib__List.filter_map; -var concat_map = Stdlib__List.concat_map; +let concat_map = Stdlib__List.concat_map; -var fold_left_map = Stdlib__List.fold_left_map; +let fold_left_map = Stdlib__List.fold_left_map; -var fold_left = Stdlib__List.fold_left; +let fold_left = Stdlib__List.fold_left; -var fold_right = Stdlib__List.fold_right; +let fold_right = Stdlib__List.fold_right; -var iter2 = Stdlib__List.iter2; +let iter2 = Stdlib__List.iter2; -var map2 = Stdlib__List.map2; +let map2 = Stdlib__List.map2; -var rev_map2 = Stdlib__List.rev_map2; +let rev_map2 = Stdlib__List.rev_map2; -var fold_left2 = Stdlib__List.fold_left2; +let fold_left2 = Stdlib__List.fold_left2; -var fold_right2 = Stdlib__List.fold_right2; +let fold_right2 = Stdlib__List.fold_right2; -var for_all = Stdlib__List.for_all; +let for_all = Stdlib__List.for_all; -var exists = Stdlib__List.exists; +let exists = Stdlib__List.exists; -var for_all2 = Stdlib__List.for_all2; +let for_all2 = Stdlib__List.for_all2; -var exists2 = Stdlib__List.exists2; +let exists2 = Stdlib__List.exists2; -var mem = Stdlib__List.mem; +let mem = Stdlib__List.mem; -var memq = Stdlib__List.memq; +let memq = Stdlib__List.memq; -var find = Stdlib__List.find; +let find = Stdlib__List.find; -var find_opt = Stdlib__List.find_opt; +let find_opt = Stdlib__List.find_opt; -var find_index = Stdlib__List.find_index; +let find_index = Stdlib__List.find_index; -var find_map = Stdlib__List.find_map; +let find_map = Stdlib__List.find_map; -var find_mapi = Stdlib__List.find_mapi; +let find_mapi = Stdlib__List.find_mapi; -var filter = Stdlib__List.filter; +let filter = Stdlib__List.filter; -var find_all = Stdlib__List.find_all; +let find_all = Stdlib__List.find_all; -var filteri = Stdlib__List.filteri; +let filteri = Stdlib__List.filteri; -var partition = Stdlib__List.partition; +let partition = Stdlib__List.partition; -var partition_map = Stdlib__List.partition_map; +let partition_map = Stdlib__List.partition_map; -var assoc = Stdlib__List.assoc; +let assoc = Stdlib__List.assoc; -var assoc_opt = Stdlib__List.assoc_opt; +let assoc_opt = Stdlib__List.assoc_opt; -var assq = Stdlib__List.assq; +let assq = Stdlib__List.assq; -var assq_opt = Stdlib__List.assq_opt; +let assq_opt = Stdlib__List.assq_opt; -var mem_assoc = Stdlib__List.mem_assoc; +let mem_assoc = Stdlib__List.mem_assoc; -var mem_assq = Stdlib__List.mem_assq; +let mem_assq = Stdlib__List.mem_assq; -var remove_assoc = Stdlib__List.remove_assoc; +let remove_assoc = Stdlib__List.remove_assoc; -var remove_assq = Stdlib__List.remove_assq; +let remove_assq = Stdlib__List.remove_assq; -var split = Stdlib__List.split; +let split = Stdlib__List.split; -var combine = Stdlib__List.combine; +let combine = Stdlib__List.combine; -var sort = Stdlib__List.sort; +let sort = Stdlib__List.sort; -var stable_sort = Stdlib__List.stable_sort; +let stable_sort = Stdlib__List.stable_sort; -var fast_sort = Stdlib__List.fast_sort; +let fast_sort = Stdlib__List.fast_sort; -var sort_uniq = Stdlib__List.sort_uniq; +let sort_uniq = Stdlib__List.sort_uniq; -var merge = Stdlib__List.merge; +let merge = Stdlib__List.merge; -var to_seq = Stdlib__List.to_seq; +let to_seq = Stdlib__List.to_seq; -var of_seq = Stdlib__List.of_seq; +let of_seq = Stdlib__List.of_seq; exports.f = f; exports.f1 = f1; diff --git a/jscomp/test/dist/jscomp/test/test_array.js b/jscomp/test/dist/jscomp/test/test_array.js index 0cd3060432..3f16251931 100644 --- a/jscomp/test/dist/jscomp/test/test_array.js +++ b/jscomp/test/dist/jscomp/test/test_array.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Stdlib__Array = require("melange/array.js"); -var v = Caml_array.make(6, 5); +let v = Caml_array.make(6, 5); Caml_array.make_float(30); -var h = Stdlib__Array.sub(v, 0, 2); +let h = Stdlib__Array.sub(v, 0, 2); -var hhh = Stdlib__Array.append([ +let hhh = Stdlib__Array.append([ 1, 2, 3, @@ -22,7 +22,7 @@ var hhh = Stdlib__Array.append([ 5 ]); -var u = Caml_array.concat({ +let u = Caml_array.concat({ hd: [ 1, 2 @@ -42,7 +42,7 @@ var u = Caml_array.concat({ } }); -var hh = Stdlib__Array.blit; +let hh = Stdlib__Array.blit; exports.v = v; exports.h = h; diff --git a/jscomp/test/dist/jscomp/test/test_array_append.js b/jscomp/test/dist/jscomp/test/test_array_append.js index 0b984e2bce..09f469b4f5 100644 --- a/jscomp/test/dist/jscomp/test/test_array_append.js +++ b/jscomp/test/dist/jscomp/test/test_array_append.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__Array = require("melange/array.js"); +let Stdlib__Array = require("melange/array.js"); -var const_v = Stdlib__Array.append([ +let const_v = Stdlib__Array.append([ 1, 2 ], [3]); diff --git a/jscomp/test/dist/jscomp/test/test_array_primitive.js b/jscomp/test/dist/jscomp/test/test_array_primitive.js index d6deafbe05..ff156fbcca 100644 --- a/jscomp/test/dist/jscomp/test/test_array_primitive.js +++ b/jscomp/test/dist/jscomp/test/test_array_primitive.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function caml_array_sub(x, offset, len) { - var result = new Array(len); - for(var j = 0; j < len; ++j){ + let result = new Array(len); + for(let j = 0; j < len; ++j){ Caml_array.set(result, j, Caml_array.get(x, offset + j | 0)); } return result; @@ -33,8 +33,8 @@ function caml_array_get(xs, index) { } function caml_make_vect(len, init) { - var b = new Array(len); - for(var i = 0; i < len; ++i){ + let b = new Array(len); + for(let i = 0; i < len; ++i){ Caml_array.set(b, i, init); } return b; diff --git a/jscomp/test/dist/jscomp/test/test_bool_equal.js b/jscomp/test/dist/jscomp/test/test_bool_equal.js index b93812fb3c..56db2c06bb 100644 --- a/jscomp/test/dist/jscomp/test/test_bool_equal.js +++ b/jscomp/test/dist/jscomp/test/test_bool_equal.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); function bool_equal(x, y) { if (x) { diff --git a/jscomp/test/dist/jscomp/test/test_bs_this.js b/jscomp/test/dist/jscomp/test/test_bs_this.js index 4269d1747f..820fc59164 100644 --- a/jscomp/test/dist/jscomp/test/test_bs_this.js +++ b/jscomp/test/dist/jscomp/test/test_bs_this.js @@ -3,18 +3,18 @@ function uux_this(x, y) { - var o = this ; + let o = this ; return (o.length + x | 0) + y | 0; } function even(x) { - var o = this ; + let o = this ; return x + o | 0; } function bark(param) { return function (x, y) { - var o = this ; + let o = this ; console.log([ o.length, o.x, @@ -26,9 +26,9 @@ function bark(param) { }; } -var js_obj = { +let js_obj = { bark: (function (x, y) { - var o = this ; + let o = this ; console.log(o); return x + y | 0; }) @@ -36,11 +36,11 @@ var js_obj = { function f(x) { x.onload = (function () { - var o = this ; + let o = this ; console.log(o); }); x.addEventListener("onload", (function () { - var o = this ; + let o = this ; console.log(o.response); })); } diff --git a/jscomp/test/dist/jscomp/test/test_bug.js b/jscomp/test/dist/jscomp/test/test_bug.js index 2db6181dc9..3884374bdf 100644 --- a/jscomp/test/dist/jscomp/test/test_bug.js +++ b/jscomp/test/dist/jscomp/test/test_bug.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Test_char = require("./test_char.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Test_char = require("./test_char.js"); function escaped(s) { - var n = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ - var c = s[i]; - var tmp; - var exit = 0; + let n = 0; + for(let i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let c = s[i]; + let tmp; + let exit = 0; if (c >= 14) { if (c !== 34 && c !== 92) { exit = 1; @@ -36,11 +36,11 @@ function escaped(s) { if (n === s.length) { return Stdlib__Bytes.copy(s); } - var s$p = Caml_bytes.caml_create_bytes(n); + let s$p = Caml_bytes.caml_create_bytes(n); n = 0; - for(var i$1 = 0 ,i_finish$1 = s.length; i$1 < i_finish$1; ++i$1){ - var c$1 = s[i$1]; - var exit$1 = 0; + 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) { if (c$1 >= 14) { exit$1 = 1; diff --git a/jscomp/test/dist/jscomp/test/test_bytes.js b/jscomp/test/dist/jscomp/test/test_bytes.js index 7ee0a2b929..51f9edb2d4 100644 --- a/jscomp/test/dist/jscomp/test/test_bytes.js +++ b/jscomp/test/dist/jscomp/test/test_bytes.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); -var f = Caml_bytes.bytes_to_string; +let f = Caml_bytes.bytes_to_string; -var ff = Caml_bytes.bytes_to_string; +let ff = Caml_bytes.bytes_to_string; exports.f = f; exports.ff = ff; diff --git a/jscomp/test/dist/jscomp/test/test_case_opt_collision.js b/jscomp/test/dist/jscomp/test/test_case_opt_collision.js index 797e4384d0..fab5984823 100644 --- a/jscomp/test/dist/jscomp/test/test_case_opt_collision.js +++ b/jscomp/test/dist/jscomp/test/test_case_opt_collision.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -16,8 +16,8 @@ function eq(loc, x, y) { } function f(xOpt, y) { - var x = xOpt !== undefined ? xOpt : 3; - var xOpt$1 = x + 2 | 0; + let x = xOpt !== undefined ? xOpt : 3; + let xOpt$1 = x + 2 | 0; console.log(xOpt$1); return xOpt$1 + y | 0; } diff --git a/jscomp/test/dist/jscomp/test/test_case_set.js b/jscomp/test/dist/jscomp/test/test_case_set.js index a77805b46d..eb2b081517 100644 --- a/jscomp/test/dist/jscomp/test/test_case_set.js +++ b/jscomp/test/dist/jscomp/test/test_case_set.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); function f(x) { x.case = 3; diff --git a/jscomp/test/dist/jscomp/test/test_closure.js b/jscomp/test/dist/jscomp/test/test_closure.js index 568d38b0b9..537c318614 100644 --- a/jscomp/test/dist/jscomp/test/test_closure.js +++ b/jscomp/test/dist/jscomp/test/test_closure.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); -var v = { +let v = { contents: 0 }; function f(param) { - var arr = Caml_array.make(10, (function (param) { + let arr = Caml_array.make(10, (function (param) { })); - for(var i = 0; i <= 9; ++i){ + for(let i = 0; i <= 9; ++i){ Caml_array.set(arr, i, (function(i){ return function (param) { v.contents = v.contents + i | 0; @@ -24,7 +24,7 @@ function f(param) { return arr; } -var u = f(undefined); +let u = f(undefined); Stdlib__Array.iter((function (x) { Curry._1(x, undefined); diff --git a/jscomp/test/dist/jscomp/test/test_common.js b/jscomp/test/dist/jscomp/test/test_common.js index 0e8ca09c73..3a12b6914c 100644 --- a/jscomp/test/dist/jscomp/test/test_common.js +++ b/jscomp/test/dist/jscomp/test/test_common.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); -var U = /* @__PURE__ */Caml_exceptions.create("Test_common.U"); +let U = /* @__PURE__ */Caml_exceptions.create("Test_common.U"); -var H = /* @__PURE__ */Caml_exceptions.create("Test_common.H"); +let H = /* @__PURE__ */Caml_exceptions.create("Test_common.H"); exports.U = U; exports.H = H; diff --git a/jscomp/test/dist/jscomp/test/test_cpp.js b/jscomp/test/dist/jscomp/test/test_cpp.js index ad397c7baf..8dd5192963 100644 --- a/jscomp/test/dist/jscomp/test/test_cpp.js +++ b/jscomp/test/dist/jscomp/test/test_cpp.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); +let Caml = require("melange.js/caml.js"); -var f = Caml.caml_int_compare; +let f = Caml.caml_int_compare; exports.f = f; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/test_cps.js b/jscomp/test/dist/jscomp/test/test_cps.js index 840f2bbd3b..5898467e83 100644 --- a/jscomp/test/dist/jscomp/test/test_cps.js +++ b/jscomp/test/dist/jscomp/test/test_cps.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); function f(_n, _acc) { while(true) { - var acc = _acc; - var n = _n; + let acc = _acc; + let n = _n; if (n === 0) { return Curry._1(acc, undefined); } @@ -23,10 +23,10 @@ function f(_n, _acc) { } function test_closure(param) { - var arr = Caml_array.make(6, (function (x) { + let arr = Caml_array.make(6, (function (x) { return x; })); - for(var i = 0; i <= 6; ++i){ + for(let i = 0; i <= 6; ++i){ Caml_array.set(arr, i, (function(i){ return function (param) { return i; diff --git a/jscomp/test/dist/jscomp/test/test_demo.js b/jscomp/test/dist/jscomp/test/test_demo.js index 544b64ac74..8638fd9345 100644 --- a/jscomp/test/dist/jscomp/test/test_demo.js +++ b/jscomp/test/dist/jscomp/test/test_demo.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); function fib(n) { if (n === 2 || n === 1) { @@ -31,8 +31,8 @@ function map(f, param) { } function sum(n) { - var v = 0; - for(var i = 0; i <= n; ++i){ + let v = 0; + for(let i = 0; i <= n; ++i){ v = v + i | 0; } return v; @@ -43,32 +43,32 @@ function f(x, y, z) { } function g(x, y) { - var u = x + y | 0; + let u = x + y | 0; return function (z) { return u + z | 0; }; } function g1(x, y) { - var u = x + y | 0; + let u = x + y | 0; return function (xx, yy) { return (xx + yy | 0) + u | 0; }; } -var u = 8; +let u = 8; -var x = u + 6 | 0; +let x = u + 6 | 0; -var u$1 = 7; +let u$1 = 7; function v(param) { return (6 + param | 0) + u$1 | 0; } -var nil = /* Nil */0; +let nil = /* Nil */0; -var len = Stdlib__List.length; +let len = Stdlib__List.length; exports.fib = fib; exports.nil = nil; diff --git a/jscomp/test/dist/jscomp/test/test_exception.js b/jscomp/test/dist/jscomp/test/test_exception.js index 03d2f7b96c..fb779b4a34 100644 --- a/jscomp/test/dist/jscomp/test/test_exception.js +++ b/jscomp/test/dist/jscomp/test/test_exception.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); -var Test_common = require("./test_common.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); +let Test_common = require("./test_common.js"); -var Local = /* @__PURE__ */Caml_exceptions.create("Test_exception.Local"); +let Local = /* @__PURE__ */Caml_exceptions.create("Test_exception.Local"); function f(param) { throw new Caml_js_exceptions.MelangeError(Local, { @@ -41,9 +41,9 @@ function xx(param) { }); } -var Nullary = /* @__PURE__ */Caml_exceptions.create("Test_exception.Nullary"); +let Nullary = /* @__PURE__ */Caml_exceptions.create("Test_exception.Nullary"); -var a = { +let a = { MEL_EXN_ID: Nullary }; diff --git a/jscomp/test/dist/jscomp/test/test_exception_escape.js b/jscomp/test/dist/jscomp/test/test_exception_escape.js index acbe358a76..c19dc34418 100644 --- a/jscomp/test/dist/jscomp/test/test_exception_escape.js +++ b/jscomp/test/dist/jscomp/test/test_exception_escape.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var A = /* @__PURE__ */Caml_exceptions.create("Test_exception_escape.N.A"); +let A = /* @__PURE__ */Caml_exceptions.create("Test_exception_escape.N.A"); -var f; +let f; try { throw new Caml_js_exceptions.MelangeError(A, { @@ -18,7 +18,7 @@ catch (exn){ f = 3; } -var N = { +let N = { f: f }; diff --git a/jscomp/test/dist/jscomp/test/test_external.js b/jscomp/test/dist/jscomp/test/test_external.js index 6f4087836d..d8dd0fbc2a 100644 --- a/jscomp/test/dist/jscomp/test/test_external.js +++ b/jscomp/test/dist/jscomp/test/test_external.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); -var xx = document(); +let xx = document(); alert("hehha"); -var b = Curry._1(ff("x"), 3); +let b = Curry._1(ff("x"), 3); exports.xx = xx; exports.b = b; diff --git a/jscomp/test/dist/jscomp/test/test_external_unit.js b/jscomp/test/dist/jscomp/test/test_external_unit.js index a9e84d85ca..06ca3b9438 100644 --- a/jscomp/test/dist/jscomp/test/test_external_unit.js +++ b/jscomp/test/dist/jscomp/test/test_external_unit.js @@ -4,9 +4,9 @@ console.log(3); -var v = console.log(3); +let v = console.log(3); -var u; +let u; exports.u = u; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/test_fib.js b/jscomp/test/dist/jscomp/test/test_fib.js index e30bafec01..bb57f1426b 100644 --- a/jscomp/test/dist/jscomp/test/test_fib.js +++ b/jscomp/test/dist/jscomp/test/test_fib.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function fib(n) { if (n === 0 || n === 1) { @@ -19,21 +19,21 @@ function fib2(n) { } } -var v = 0; +let v = 0; -for(var i = 0; i <= 10; ++i){ +for(let i = 0; i <= 10; ++i){ v = v + i | 0; } -var sum = v; +let sum = v; -var v$1 = 0; +let v$1 = 0; -for(var 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; } -var sumdown = v$1; +let sumdown = v$1; function cons(x, y) { return /* Cons */{ @@ -62,8 +62,8 @@ function map(f, x) { } function f(x) { - var v = x; - var sum = 0; + let v = x; + let sum = 0; while(v > 0) { sum = sum + v | 0; v = v - 1 | 0; @@ -72,13 +72,13 @@ function f(x) { } function fib3(n) { - var _a = 0; - var _b = 1; - var _n = n; + let _a = 0; + let _b = 1; + let _n = n; while(true) { - var n$1 = _n; - var b = _b; - var a = _a; + let n$1 = _n; + let b = _b; + let a = _a; if (n$1 <= 0) { return a; } @@ -89,7 +89,7 @@ function fib3(n) { }; } -var b = fib; +let b = fib; exports.fib = fib; exports.fib2 = fib2; diff --git a/jscomp/test/dist/jscomp/test/test_filename.js b/jscomp/test/dist/jscomp/test/test_filename.js index 4cf6b39df3..6e1ef8f033 100644 --- a/jscomp/test/dist/jscomp/test/test_filename.js +++ b/jscomp/test/dist/jscomp/test/test_filename.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Stdlib__Filename = require("melange/filename.js"); -var Stdlib__List = require("melange/list.js"); +let Stdlib__Filename = require("melange/filename.js"); +let Stdlib__List = require("melange/list.js"); -var u = Stdlib__Filename.chop_extension; +let u = Stdlib__Filename.chop_extension; -var v = Stdlib__List.length; +let v = Stdlib__List.length; exports.u = u; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/test_for_loop.js b/jscomp/test/dist/jscomp/test/test_for_loop.js index f49ef9bc80..b7696f0d2e 100644 --- a/jscomp/test/dist/jscomp/test/test_for_loop.js +++ b/jscomp/test/dist/jscomp/test/test_for_loop.js @@ -1,31 +1,31 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); function for_(x) { - for(var 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(var 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)); } } function for_3(x) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i <= i_finish; ++i){ - var j = (i << 1); + for(let i = 0 ,i_finish = x.length; i <= i_finish; ++i){ + let j = (i << 1); Caml_array.set(arr, i, (function(j){ return function (param) { v.contents = v.contents + j | 0; @@ -39,15 +39,15 @@ function for_3(x) { } function for_4(x) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i <= i_finish; ++i){ - var j = (i << 1); - var k = (j << 1); + 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(k){ return function (param) { v.contents = v.contents + k | 0; @@ -61,14 +61,14 @@ function for_4(x) { } function for_5(x, u) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - for(var i = 0 ,i_finish = x.length; i <= i_finish; ++i){ - var k = Math.imul((u << 1), u); + 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(k){ return function (param) { v.contents = v.contents + k | 0; @@ -82,28 +82,28 @@ function for_5(x, u) { } function for_6(x, u) { - var v = { + let v = { contents: 0 }; - var arr = Stdlib__Array.map((function (param, param$1) { + let arr = Stdlib__Array.map((function (param, param$1) { }), x); - var v4 = { + let v4 = { contents: 0 }; - var v5 = { + let v5 = { contents: 0 }; v4.contents = v4.contents + 1 | 0; - for(var _j = 0; _j <= 1; ++_j){ + for(let _j = 0; _j <= 1; ++_j){ v5.contents = v5.contents + 1 | 0; - var v2 = { + let v2 = { contents: 0 }; (function(v2){ - for(var i = 0 ,i_finish = x.length; i <= i_finish; ++i){ - var k = Math.imul((u << 1), u); - var h = (v5.contents << 1); + 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; Caml_array.set(arr, i, (function(k,h){ return function (param) { diff --git a/jscomp/test/dist/jscomp/test/test_for_map.js b/jscomp/test/dist/jscomp/test/test_for_map.js index 8fcd12792b..89ff8c4cae 100644 --- a/jscomp/test/dist/jscomp/test/test_for_map.js +++ b/jscomp/test/dist/jscomp/test/test_for_map.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var funarg = { +let funarg = { compare: compare }; @@ -24,8 +24,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -46,14 +46,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -80,10 +80,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -119,11 +119,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -138,14 +138,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -155,9 +155,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -172,24 +172,24 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -211,26 +211,26 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -248,24 +248,24 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -287,26 +287,26 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -324,11 +324,11 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -339,11 +339,11 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -354,9 +354,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -374,11 +374,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -392,7 +392,7 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -411,7 +411,7 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -428,7 +428,7 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_binding(l), param.v, param.d, param.r); } else { @@ -448,7 +448,7 @@ function merge(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return bal(t1, match[0], match[1], remove_min_binding(t2)); } @@ -456,23 +456,23 @@ function remove(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return merge(l, r); } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return m; } else { @@ -482,17 +482,17 @@ function remove(x, m) { function update(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -506,21 +506,21 @@ function update(x, f, m) { } } if (c < 0) { - var ll = update(x, f, l); + let ll = update(x, f, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = update(x, f, r); + let rr = update(x, f, r); if (r === rr) { return m; } else { return bal(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -535,7 +535,7 @@ function update(x, f, m) { } function add_to_list(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -553,7 +553,7 @@ function add_to_list(x, data, m) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -568,9 +568,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map(f, param.r); + let l$p = map(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -584,10 +584,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi(f, param.r); + let v = param.v; + let l$p = mapi(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi(f, param.r); return /* Node */{ l: l$p, v: v, @@ -599,8 +599,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -612,7 +612,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -629,7 +629,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -667,8 +667,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, l.d, join(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -685,7 +685,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -705,11 +705,11 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -718,14 +718,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -735,9 +735,9 @@ function split(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge$1(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$1(f, s1.r, match[2])); } @@ -745,8 +745,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split(v2, s1); + let v2 = s2.v; + let match$1 = split(v2, s1); return concat_or_join(merge$1(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$1(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -766,25 +766,25 @@ function union(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split(v1, s2); - var d2$1 = match[1]; - var l = union(f, s1.l, match[0]); - var r = union(f, s1.r, match[2]); + let match = split(v1, s2); + let d2$1 = match[1]; + let l = union(f, s1.l, match[0]); + let r = union(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join(l, v1, d1, r); } } - var match$1 = split(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union(f, match$1[0], s2.l); - var r$1 = union(f, match$1[2], s2.r); + let match$1 = split(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union(f, match$1[0], s2.l); + let r$1 = union(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -796,13 +796,13 @@ function filter(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -818,10 +818,10 @@ function filter_map(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map(f, param.r); + let v = param.v; + let l$p = filter_map(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map(f, param.r); if (fvd !== undefined) { return join(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -836,15 +836,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -860,8 +860,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -877,11 +877,11 @@ function cons_enum(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -892,11 +892,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -907,11 +907,11 @@ function compare$1(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -944,8 +944,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -985,7 +985,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._2, c._3); + let partial_arg = cons_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -998,7 +998,7 @@ function seq_of_enum_(c, param) { } function to_seq(m) { - var partial_arg = cons_enum(m, /* End */0); + let partial_arg = cons_enum(m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1006,8 +1006,8 @@ function to_seq(m) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1026,7 +1026,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._2, c._3); + let partial_arg = snoc_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1039,24 +1039,24 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1079,13 +1079,13 @@ function to_seq_from(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var IntMap = { +let IntMap = { empty: /* Empty */0, add: add, add_to_list: add_to_list, @@ -1132,11 +1132,11 @@ var IntMap = { }; function assertion_test(param) { - var m = /* Empty */0; - for(var i = 0; i <= 1000000; ++i){ + let m = /* Empty */0; + for(let i = 0; i <= 1000000; ++i){ m = Curry._3(add, i, i, m); } - for(var i$1 = 0; i$1 <= 1000000; ++i$1){ + for(let i$1 = 0; i$1 <= 1000000; ++i$1){ Curry._2(find, i$1, m); } } diff --git a/jscomp/test/dist/jscomp/test/test_for_map2.js b/jscomp/test/dist/jscomp/test/test_for_map2.js index bb24253b4c..11289438c4 100644 --- a/jscomp/test/dist/jscomp/test/test_for_map2.js +++ b/jscomp/test/dist/jscomp/test/test_for_map2.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Int_map = require("./int_map.js"); +let Int_map = require("./int_map.js"); /* Int_map Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_format.js b/jscomp/test/dist/jscomp/test/test_format.js index 8c6ca7de28..030deb9d66 100644 --- a/jscomp/test/dist/jscomp/test/test_format.js +++ b/jscomp/test/dist/jscomp/test/test_format.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Format = require("melange/format.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Format = require("melange/format.js"); Curry._1(Stdlib__Format.fprintf(Stdlib__Format.std_formatter)(/* Format */{ _0: { diff --git a/jscomp/test/dist/jscomp/test/test_functor_dead_code.js b/jscomp/test/dist/jscomp/test/test_functor_dead_code.js index 64be3304d7..8c780bce37 100644 --- a/jscomp/test/dist/jscomp/test/test_functor_dead_code.js +++ b/jscomp/test/dist/jscomp/test/test_functor_dead_code.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function is_empty(param) { if (param) { @@ -11,7 +11,7 @@ function is_empty(param) { } } -var v = Curry._1(is_empty, /* Empty */0); +let v = Curry._1(is_empty, /* Empty */0); exports.v = v; /* M Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_generative_module.js b/jscomp/test/dist/jscomp/test/test_generative_module.js index 3bdf2a1acf..3b6ba026af 100644 --- a/jscomp/test/dist/jscomp/test/test_generative_module.js +++ b/jscomp/test/dist/jscomp/test/test_generative_module.js @@ -8,7 +8,7 @@ function M($star) { }; } -var V = { +let V = { v: 3 }; diff --git a/jscomp/test/dist/jscomp/test/test_global_print.js b/jscomp/test/dist/jscomp/test/test_global_print.js index 33a84b7dac..5fb38e0439 100644 --- a/jscomp/test/dist/jscomp/test/test_global_print.js +++ b/jscomp/test/dist/jscomp/test/test_global_print.js @@ -2,11 +2,11 @@ 'use strict'; -var List = { +let List = { u: 3 }; -var X = { +let X = { List: List }; diff --git a/jscomp/test/dist/jscomp/test/test_google_closure.js b/jscomp/test/dist/jscomp/test/test_google_closure.js index c8cd460008..98a47a0d3f 100644 --- a/jscomp/test/dist/jscomp/test/test_google_closure.js +++ b/jscomp/test/dist/jscomp/test/test_google_closure.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Stdlib__Array = require("melange/array.js"); function f(a, b, param) { return a + b | 0; @@ -14,15 +14,15 @@ function f2(a) { }; } -var a = String(3); +let a = String(3); -var b = 101; +let b = 101; -var arr = Stdlib__Array.init(2, (function (param) { +let arr = Stdlib__Array.init(2, (function (param) { return 0; })); -for(var i = 0; i <= 1; ++i){ +for(let i = 0; i <= 1; ++i){ Caml_array.set(arr, i, i + 1 | 0); } @@ -32,7 +32,7 @@ console.log([ arr ]); -var c = arr; +let c = arr; exports.f = f; exports.f2 = f2; diff --git a/jscomp/test/dist/jscomp/test/test_http_server.js b/jscomp/test/dist/jscomp/test/test_http_server.js index 82ce0f079c..d988e5533a 100644 --- a/jscomp/test/dist/jscomp/test/test_http_server.js +++ b/jscomp/test/dist/jscomp/test/test_http_server.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var Http = require("http"); +let Http = require("http"); -var hostname = "127.0.0.1"; +let hostname = "127.0.0.1"; function create_server(http) { - var server = http.createServer(function (req, resp) { + let server = http.createServer(function (req, resp) { resp.statusCode = 200; resp.setHeader("Content-Type", "text/plain"); return resp.end("Hello world\n"); diff --git a/jscomp/test/dist/jscomp/test/test_include.js b/jscomp/test/dist/jscomp/test/test_include.js index c67633370f..79d9dff512 100644 --- a/jscomp/test/dist/jscomp/test/test_include.js +++ b/jscomp/test/dist/jscomp/test/test_include.js @@ -1,159 +1,159 @@ // Generated by Melange 'use strict'; -var Stdlib__List = require("melange/list.js"); -var Stdlib__String = require("melange/string.js"); -var Test_order = require("./test_order.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__String = require("melange/string.js"); +let Test_order = require("./test_order.js"); function Make(U) { - var compare = U.compare; + let compare = U.compare; return { compare: compare, v: compare }; } -var X = { +let X = { compare: Stdlib__String.compare, v: Stdlib__String.compare }; -var U = { +let U = { compare: Test_order.compare, v: Test_order.compare }; -var v = Stdlib__List.length; +let v = Stdlib__List.length; -var length = Stdlib__List.length; +let length = Stdlib__List.length; -var compare_lengths = Stdlib__List.compare_lengths; +let compare_lengths = Stdlib__List.compare_lengths; -var compare_length_with = Stdlib__List.compare_length_with; +let compare_length_with = Stdlib__List.compare_length_with; -var is_empty = Stdlib__List.is_empty; +let is_empty = Stdlib__List.is_empty; -var cons = Stdlib__List.cons; +let cons = Stdlib__List.cons; -var hd = Stdlib__List.hd; +let hd = Stdlib__List.hd; -var tl = Stdlib__List.tl; +let tl = Stdlib__List.tl; -var nth = Stdlib__List.nth; +let nth = Stdlib__List.nth; -var nth_opt = Stdlib__List.nth_opt; +let nth_opt = Stdlib__List.nth_opt; -var rev = Stdlib__List.rev; +let rev = Stdlib__List.rev; -var init = Stdlib__List.init; +let init = Stdlib__List.init; -var append = Stdlib__List.append; +let append = Stdlib__List.append; -var rev_append = Stdlib__List.rev_append; +let rev_append = Stdlib__List.rev_append; -var concat = Stdlib__List.concat; +let concat = Stdlib__List.concat; -var flatten = Stdlib__List.flatten; +let flatten = Stdlib__List.flatten; -var equal = Stdlib__List.equal; +let equal = Stdlib__List.equal; -var compare = Stdlib__List.compare; +let compare = Stdlib__List.compare; -var iter = Stdlib__List.iter; +let iter = Stdlib__List.iter; -var iteri = Stdlib__List.iteri; +let iteri = Stdlib__List.iteri; -var map = Stdlib__List.map; +let map = Stdlib__List.map; -var mapi = Stdlib__List.mapi; +let mapi = Stdlib__List.mapi; -var rev_map = Stdlib__List.rev_map; +let rev_map = Stdlib__List.rev_map; -var filter_map = Stdlib__List.filter_map; +let filter_map = Stdlib__List.filter_map; -var concat_map = Stdlib__List.concat_map; +let concat_map = Stdlib__List.concat_map; -var fold_left_map = Stdlib__List.fold_left_map; +let fold_left_map = Stdlib__List.fold_left_map; -var fold_left = Stdlib__List.fold_left; +let fold_left = Stdlib__List.fold_left; -var fold_right = Stdlib__List.fold_right; +let fold_right = Stdlib__List.fold_right; -var iter2 = Stdlib__List.iter2; +let iter2 = Stdlib__List.iter2; -var map2 = Stdlib__List.map2; +let map2 = Stdlib__List.map2; -var rev_map2 = Stdlib__List.rev_map2; +let rev_map2 = Stdlib__List.rev_map2; -var fold_left2 = Stdlib__List.fold_left2; +let fold_left2 = Stdlib__List.fold_left2; -var fold_right2 = Stdlib__List.fold_right2; +let fold_right2 = Stdlib__List.fold_right2; -var for_all = Stdlib__List.for_all; +let for_all = Stdlib__List.for_all; -var exists = Stdlib__List.exists; +let exists = Stdlib__List.exists; -var for_all2 = Stdlib__List.for_all2; +let for_all2 = Stdlib__List.for_all2; -var exists2 = Stdlib__List.exists2; +let exists2 = Stdlib__List.exists2; -var mem = Stdlib__List.mem; +let mem = Stdlib__List.mem; -var memq = Stdlib__List.memq; +let memq = Stdlib__List.memq; -var find = Stdlib__List.find; +let find = Stdlib__List.find; -var find_opt = Stdlib__List.find_opt; +let find_opt = Stdlib__List.find_opt; -var find_index = Stdlib__List.find_index; +let find_index = Stdlib__List.find_index; -var find_map = Stdlib__List.find_map; +let find_map = Stdlib__List.find_map; -var find_mapi = Stdlib__List.find_mapi; +let find_mapi = Stdlib__List.find_mapi; -var filter = Stdlib__List.filter; +let filter = Stdlib__List.filter; -var find_all = Stdlib__List.find_all; +let find_all = Stdlib__List.find_all; -var filteri = Stdlib__List.filteri; +let filteri = Stdlib__List.filteri; -var partition = Stdlib__List.partition; +let partition = Stdlib__List.partition; -var partition_map = Stdlib__List.partition_map; +let partition_map = Stdlib__List.partition_map; -var assoc = Stdlib__List.assoc; +let assoc = Stdlib__List.assoc; -var assoc_opt = Stdlib__List.assoc_opt; +let assoc_opt = Stdlib__List.assoc_opt; -var assq = Stdlib__List.assq; +let assq = Stdlib__List.assq; -var assq_opt = Stdlib__List.assq_opt; +let assq_opt = Stdlib__List.assq_opt; -var mem_assoc = Stdlib__List.mem_assoc; +let mem_assoc = Stdlib__List.mem_assoc; -var mem_assq = Stdlib__List.mem_assq; +let mem_assq = Stdlib__List.mem_assq; -var remove_assoc = Stdlib__List.remove_assoc; +let remove_assoc = Stdlib__List.remove_assoc; -var remove_assq = Stdlib__List.remove_assq; +let remove_assq = Stdlib__List.remove_assq; -var split = Stdlib__List.split; +let split = Stdlib__List.split; -var combine = Stdlib__List.combine; +let combine = Stdlib__List.combine; -var sort = Stdlib__List.sort; +let sort = Stdlib__List.sort; -var stable_sort = Stdlib__List.stable_sort; +let stable_sort = Stdlib__List.stable_sort; -var fast_sort = Stdlib__List.fast_sort; +let fast_sort = Stdlib__List.fast_sort; -var sort_uniq = Stdlib__List.sort_uniq; +let sort_uniq = Stdlib__List.sort_uniq; -var merge = Stdlib__List.merge; +let merge = Stdlib__List.merge; -var to_seq = Stdlib__List.to_seq; +let to_seq = Stdlib__List.to_seq; -var of_seq = Stdlib__List.of_seq; +let of_seq = Stdlib__List.of_seq; exports.v = v; exports.Make = Make; diff --git a/jscomp/test/dist/jscomp/test/test_incomplete.js b/jscomp/test/dist/jscomp/test/test_incomplete.js index a9b62c69ed..5b00ced9fe 100644 --- a/jscomp/test/dist/jscomp/test/test_incomplete.js +++ b/jscomp/test/dist/jscomp/test/test_incomplete.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(x) { if (!(x > 3 || x < 1)) { diff --git a/jscomp/test/dist/jscomp/test/test_incr_ref.js b/jscomp/test/dist/jscomp/test/test_incr_ref.js index 525e367c3f..5e86b8097d 100644 --- a/jscomp/test/dist/jscomp/test/test_incr_ref.js +++ b/jscomp/test/dist/jscomp/test/test_incr_ref.js @@ -2,11 +2,11 @@ 'use strict'; -var u = 0; +let u = 0; u = u + 1 | 0; -var v; +let v; exports.v = v; /* v Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_int_map_find.js b/jscomp/test/dist/jscomp/test/test_int_map_find.js index 5a5b942308..49e80b55a8 100644 --- a/jscomp/test/dist/jscomp/test/test_int_map_find.js +++ b/jscomp/test/dist/jscomp/test/test_int_map_find.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__List = require("melange/list.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__List = require("melange/list.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; -var funarg = { +let funarg = { compare: compare }; @@ -21,8 +21,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -33,14 +33,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -67,10 +67,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -98,11 +98,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -117,14 +117,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { diff --git a/jscomp/test/dist/jscomp/test/test_internalOO.js b/jscomp/test/dist/jscomp/test/test_internalOO.js index 903bf6d777..36f44d4a94 100644 --- a/jscomp/test/dist/jscomp/test/test_internalOO.js +++ b/jscomp/test/dist/jscomp/test/test_internalOO.js @@ -1,26 +1,26 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_array = require("melange.js/caml_array.js"); -var Caml_int32 = require("melange.js/caml_int32.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_oo = require("melange.js/caml_oo.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); -var Stdlib__Sys = require("melange/sys.js"); +let Caml = require("melange.js/caml.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_int32 = require("melange.js/caml_int32.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_oo = require("melange.js/caml_oo.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); +let Stdlib__Sys = require("melange/sys.js"); function copy(o) { return Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(o)); } -var params = { +let params = { compact_table: true, copy_parent: true, clean_when_copying: true, @@ -28,11 +28,11 @@ var params = { bucket_small_size: 16 }; -var step = Stdlib__Sys.word_size / 16 | 0; +let step = Stdlib__Sys.word_size / 16 | 0; function public_method_label(s) { - var accu = 0; - for(var i = 0 ,i_finish = s.length; i < i_finish; ++i){ + let accu = 0; + 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; @@ -43,9 +43,9 @@ function public_method_label(s) { } } -var compare = Caml.caml_string_compare; +let compare = Caml.caml_string_compare; -var funarg = { +let funarg = { compare: compare }; @@ -58,8 +58,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -80,14 +80,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -114,10 +114,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -153,11 +153,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -172,14 +172,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -189,9 +189,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -206,24 +206,24 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -245,26 +245,26 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -282,24 +282,24 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -321,26 +321,26 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -358,11 +358,11 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -373,11 +373,11 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -388,9 +388,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -408,11 +408,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -426,7 +426,7 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -445,7 +445,7 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -462,7 +462,7 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_binding(l), param.v, param.d, param.r); } else { @@ -482,7 +482,7 @@ function merge(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return bal(t1, match[0], match[1], remove_min_binding(t2)); } @@ -490,23 +490,23 @@ function remove(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return merge(l, r); } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return m; } else { @@ -516,17 +516,17 @@ function remove(x, m) { function update(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -540,21 +540,21 @@ function update(x, f, m) { } } if (c < 0) { - var ll = update(x, f, l); + let ll = update(x, f, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = update(x, f, r); + let rr = update(x, f, r); if (r === rr) { return m; } else { return bal(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -569,7 +569,7 @@ function update(x, f, m) { } function add_to_list(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -587,7 +587,7 @@ function add_to_list(x, data, m) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -602,9 +602,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map(f, param.r); + let l$p = map(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -618,10 +618,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi(f, param.r); + let v = param.v; + let l$p = mapi(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi(f, param.r); return /* Node */{ l: l$p, v: v, @@ -633,8 +633,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -646,7 +646,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -663,7 +663,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -701,8 +701,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, l.d, join(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -719,7 +719,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -739,11 +739,11 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -752,14 +752,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -769,9 +769,9 @@ function split(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height(s2)) { - var match = split(v1, s2); + let match = split(v1, s2); return concat_or_join(merge$1(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$1(f, s1.r, match[2])); } @@ -779,8 +779,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split(v2, s1); + let v2 = s2.v; + let match$1 = split(v2, s1); return concat_or_join(merge$1(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$1(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -800,25 +800,25 @@ function union(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split(v1, s2); - var d2$1 = match[1]; - var l = union(f, s1.l, match[0]); - var r = union(f, s1.r, match[2]); + let match = split(v1, s2); + let d2$1 = match[1]; + let l = union(f, s1.l, match[0]); + let r = union(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join(l, v1, d1, r); } } - var match$1 = split(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union(f, match$1[0], s2.l); - var r$1 = union(f, match$1[2], s2.r); + let match$1 = split(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union(f, match$1[0], s2.l); + let r$1 = union(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -830,13 +830,13 @@ function filter(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -852,10 +852,10 @@ function filter_map(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map(f, param.r); + let v = param.v; + let l$p = filter_map(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map(f, param.r); if (fvd !== undefined) { return join(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -870,15 +870,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -894,8 +894,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -911,11 +911,11 @@ function cons_enum(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -926,11 +926,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -941,11 +941,11 @@ function compare$1(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -978,8 +978,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -1019,7 +1019,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._2, c._3); + let partial_arg = cons_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1032,7 +1032,7 @@ function seq_of_enum_(c, param) { } function to_seq(m) { - var partial_arg = cons_enum(m, /* End */0); + let partial_arg = cons_enum(m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1040,8 +1040,8 @@ function to_seq(m) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1060,7 +1060,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._2, c._3); + let partial_arg = snoc_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1073,24 +1073,24 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1113,13 +1113,13 @@ function to_seq_from(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var Vars = { +let Vars = { empty: /* Empty */0, add: add, add_to_list: add_to_list, @@ -1165,9 +1165,9 @@ var Vars = { of_seq: of_seq }; -var compare$2 = Caml.caml_string_compare; +let compare$2 = Caml.caml_string_compare; -var funarg$1 = { +let funarg$1 = { compare: compare$2 }; @@ -1180,8 +1180,8 @@ function height$1(param) { } function create$1(l, x, d, r) { - var hl = height$1(l); - var hr = height$1(r); + let hl = height$1(l); + let hr = height$1(r); return /* Node */{ l: l, v: x, @@ -1202,14 +1202,14 @@ function singleton$1(x, d) { } function bal$1(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } @@ -1236,10 +1236,10 @@ function bal$1(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } @@ -1275,11 +1275,11 @@ function add$1(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -1294,14 +1294,14 @@ function add$1(x, data, m) { } } if (c < 0) { - var ll = add$1(x, data, l); + let ll = add$1(x, data, l); if (l === ll) { return m; } else { return bal$1(ll, v, d, r); } } - var rr = add$1(x, data, r); + let rr = add$1(x, data, r); if (r === rr) { return m; } else { @@ -1311,9 +1311,9 @@ function add$1(x, data, m) { function find$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return param.d; } @@ -1328,24 +1328,24 @@ function find$1(x, _param) { function find_first$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -1367,26 +1367,26 @@ function find_first$1(f, _param) { function find_first_opt$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -1404,24 +1404,24 @@ function find_first_opt$1(f, _param) { function find_last$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -1443,26 +1443,26 @@ function find_last$1(f, _param) { function find_last_opt$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -1480,11 +1480,11 @@ function find_last_opt$1(f, _param) { function find_opt$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -1495,11 +1495,11 @@ function find_opt$1(x, _param) { function mem$1(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$1.compare, x, param.v); + let c = Curry._2(funarg$1.compare, x, param.v); if (c === 0) { return true; } @@ -1510,9 +1510,9 @@ function mem$1(x, _param) { function min_binding$1(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -1530,11 +1530,11 @@ function min_binding$1(_param) { function min_binding_opt$1(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -1548,7 +1548,7 @@ function min_binding_opt$1(_param) { function max_binding$1(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -1567,7 +1567,7 @@ function max_binding$1(_param) { function max_binding_opt$1(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -1584,7 +1584,7 @@ function max_binding_opt$1(_param) { function remove_min_binding$1(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal$1(remove_min_binding$1(l), param.v, param.d, param.r); } else { @@ -1604,7 +1604,7 @@ function merge$2(t1, t2) { if (!t2) { return t1; } - var match = min_binding$1(t2); + let match = min_binding$1(t2); return bal$1(t1, match[0], match[1], remove_min_binding$1(t2)); } @@ -1612,23 +1612,23 @@ function remove$1(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { return merge$2(l, r); } if (c < 0) { - var ll = remove$1(x, l); + let ll = remove$1(x, l); if (l === ll) { return m; } else { return bal$1(ll, v, d, r); } } - var rr = remove$1(x, r); + let rr = remove$1(x, r); if (r === rr) { return m; } else { @@ -1638,17 +1638,17 @@ function remove$1(x, m) { function update$1(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge$2(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -1662,21 +1662,21 @@ function update$1(x, f, m) { } } if (c < 0) { - var ll = update$1(x, f, l); + let ll = update$1(x, f, l); if (l === ll) { return m; } else { return bal$1(ll, v, d, r); } } - var rr = update$1(x, f, r); + let rr = update$1(x, f, r); if (r === rr) { return m; } else { return bal$1(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -1691,7 +1691,7 @@ function update$1(x, f, m) { } function add_to_list$1(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -1709,7 +1709,7 @@ function add_to_list$1(x, data, m) { function iter$1(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -1724,9 +1724,9 @@ function map$1(f, param) { if (!param) { return /* Empty */0; } - var l$p = map$1(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map$1(f, param.r); + let l$p = map$1(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map$1(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -1740,10 +1740,10 @@ function mapi$1(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi$1(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi$1(f, param.r); + let v = param.v; + let l$p = mapi$1(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi$1(f, param.r); return /* Node */{ l: l$p, v: v, @@ -1755,8 +1755,8 @@ function mapi$1(f, param) { function fold$1(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -1768,7 +1768,7 @@ function fold$1(f, _m, _accu) { function for_all$1(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -1785,7 +1785,7 @@ function for_all$1(p, _param) { function exists$1(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -1823,8 +1823,8 @@ function join$1(l, v, d, r) { if (!r) { return add_max_binding$1(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$1(l.l, l.v, l.d, join$1(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -1841,7 +1841,7 @@ function concat$1(t1, t2) { if (!t2) { return t1; } - var match = min_binding$1(t2); + let match = min_binding$1(t2); return join$1(t1, match[0], match[1], remove_min_binding$1(t2)); } @@ -1861,11 +1861,11 @@ function split$1(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg$1.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg$1.compare, x, v); if (c === 0) { return [ l, @@ -1874,14 +1874,14 @@ function split$1(x, param) { ]; } if (c < 0) { - var match = split$1(x, l); + let match = split$1(x, l); return [ match[0], match[1], join$1(match[2], v, d, r) ]; } - var match$1 = split$1(x, r); + let match$1 = split$1(x, r); return [ join$1(l, v, d, match$1[0]), match$1[1], @@ -1891,9 +1891,9 @@ function split$1(x, param) { function merge$3(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height$1(s2)) { - var match = split$1(v1, s2); + let match = split$1(v1, s2); return concat_or_join$1(merge$3(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$3(f, s1.r, match[2])); } @@ -1901,8 +1901,8 @@ function merge$3(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split$1(v2, s1); + let v2 = s2.v; + let match$1 = split$1(v2, s1); return concat_or_join$1(merge$3(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$3(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -1922,25 +1922,25 @@ function union$1(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split$1(v1, s2); - var d2$1 = match[1]; - var l = union$1(f, s1.l, match[0]); - var r = union$1(f, s1.r, match[2]); + let match = split$1(v1, s2); + let d2$1 = match[1]; + let l = union$1(f, s1.l, match[0]); + let r = union$1(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join$1(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join$1(l, v1, d1, r); } } - var match$1 = split$1(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union$1(f, match$1[0], s2.l); - var r$1 = union$1(f, match$1[2], s2.r); + let match$1 = split$1(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union$1(f, match$1[0], s2.l); + let r$1 = union$1(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join$1(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -1952,13 +1952,13 @@ function filter$1(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter$1(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter$1(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter$1(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter$1(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -1974,10 +1974,10 @@ function filter_map$1(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map$1(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map$1(f, param.r); + let v = param.v; + let l$p = filter_map$1(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map$1(f, param.r); if (fvd !== undefined) { return join$1(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -1992,15 +1992,15 @@ function partition$1(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition$1(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition$1(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition$1(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition$1(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join$1(lt, v, d, rt), @@ -2016,8 +2016,8 @@ function partition$1(p, param) { function cons_enum$1(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -2033,11 +2033,11 @@ function cons_enum$1(_m, _e) { } function compare$3(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + let _e1 = cons_enum$1(m1, /* End */0); + let _e2 = cons_enum$1(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -2048,11 +2048,11 @@ function compare$3(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg$1.compare, e1._0, e2._0); + let c = Curry._2(funarg$1.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -2063,11 +2063,11 @@ function compare$3(cmp, m1, m2) { } function equal$1(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + let _e1 = cons_enum$1(m1, /* End */0); + let _e2 = cons_enum$1(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -2100,8 +2100,8 @@ function cardinal$1(param) { function bindings_aux$1(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -2141,7 +2141,7 @@ function seq_of_enum_$1(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum$1(c._2, c._3); + let partial_arg = cons_enum$1(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -2154,7 +2154,7 @@ function seq_of_enum_$1(c, param) { } function to_seq$1(m) { - var partial_arg = cons_enum$1(m, /* End */0); + let partial_arg = cons_enum$1(m, /* End */0); return function (param) { return seq_of_enum_$1(partial_arg, param); }; @@ -2162,8 +2162,8 @@ function to_seq$1(m) { function snoc_enum$1(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -2182,7 +2182,7 @@ function rev_seq_of_enum_$1(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum$1(c._2, c._3); + let partial_arg = snoc_enum$1(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -2195,24 +2195,24 @@ function rev_seq_of_enum_$1(c, param) { } function to_rev_seq$1(c) { - var partial_arg = snoc_enum$1(c, /* End */0); + let partial_arg = snoc_enum$1(c, /* End */0); return function (param) { return rev_seq_of_enum_$1(partial_arg, param); }; } function to_seq_from$1(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg$1.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg$1.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -2235,13 +2235,13 @@ function to_seq_from$1(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_$1(partial_arg, param); }; } -var Meths = { +let Meths = { empty: /* Empty */0, add: add$1, add_to_list: add_to_list$1, @@ -2287,9 +2287,9 @@ var Meths = { of_seq: of_seq$1 }; -var compare$4 = Caml.caml_int_compare; +let compare$4 = Caml.caml_int_compare; -var funarg$2 = { +let funarg$2 = { compare: compare$4 }; @@ -2302,8 +2302,8 @@ function height$2(param) { } function create$2(l, x, d, r) { - var hl = height$2(l); - var hr = height$2(r); + let hl = height$2(l); + let hr = height$2(r); return /* Node */{ l: l, v: x, @@ -2324,14 +2324,14 @@ function singleton$2(x, d) { } function bal$2(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height$2(ll) >= height$2(lr)) { return create$2(ll, lv, ld, create$2(lr, x, d, r)); } @@ -2358,10 +2358,10 @@ function bal$2(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height$2(rr) >= height$2(rl)) { return create$2(create$2(l, x, d, rl), rv, rd, rr); } @@ -2397,11 +2397,11 @@ function add$2(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -2416,14 +2416,14 @@ function add$2(x, data, m) { } } if (c < 0) { - var ll = add$2(x, data, l); + let ll = add$2(x, data, l); if (l === ll) { return m; } else { return bal$2(ll, v, d, r); } } - var rr = add$2(x, data, r); + let rr = add$2(x, data, r); if (r === rr) { return m; } else { @@ -2433,9 +2433,9 @@ function add$2(x, data, m) { function find$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg$2.compare, x, param.v); + let c = Curry._2(funarg$2.compare, x, param.v); if (c === 0) { return param.d; } @@ -2450,24 +2450,24 @@ function find$2(x, _param) { function find_first$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -2489,26 +2489,26 @@ function find_first$2(f, _param) { function find_first_opt$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -2526,24 +2526,24 @@ function find_first_opt$2(f, _param) { function find_last$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -2565,26 +2565,26 @@ function find_last$2(f, _param) { function find_last_opt$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -2602,11 +2602,11 @@ function find_last_opt$2(f, _param) { function find_opt$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg$2.compare, x, param.v); + let c = Curry._2(funarg$2.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -2617,11 +2617,11 @@ function find_opt$2(x, _param) { function mem$2(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg$2.compare, x, param.v); + let c = Curry._2(funarg$2.compare, x, param.v); if (c === 0) { return true; } @@ -2632,9 +2632,9 @@ function mem$2(x, _param) { function min_binding$2(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -2652,11 +2652,11 @@ function min_binding$2(_param) { function min_binding_opt$2(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -2670,7 +2670,7 @@ function min_binding_opt$2(_param) { function max_binding$2(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -2689,7 +2689,7 @@ function max_binding$2(_param) { function max_binding_opt$2(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -2706,7 +2706,7 @@ function max_binding_opt$2(_param) { function remove_min_binding$2(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal$2(remove_min_binding$2(l), param.v, param.d, param.r); } else { @@ -2726,7 +2726,7 @@ function merge$4(t1, t2) { if (!t2) { return t1; } - var match = min_binding$2(t2); + let match = min_binding$2(t2); return bal$2(t1, match[0], match[1], remove_min_binding$2(t2)); } @@ -2734,23 +2734,23 @@ function remove$2(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { return merge$4(l, r); } if (c < 0) { - var ll = remove$2(x, l); + let ll = remove$2(x, l); if (l === ll) { return m; } else { return bal$2(ll, v, d, r); } } - var rr = remove$2(x, r); + let rr = remove$2(x, r); if (r === rr) { return m; } else { @@ -2760,17 +2760,17 @@ function remove$2(x, m) { function update$2(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge$4(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -2784,21 +2784,21 @@ function update$2(x, f, m) { } } if (c < 0) { - var ll = update$2(x, f, l); + let ll = update$2(x, f, l); if (l === ll) { return m; } else { return bal$2(ll, v, d, r); } } - var rr = update$2(x, f, r); + let rr = update$2(x, f, r); if (r === rr) { return m; } else { return bal$2(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -2813,7 +2813,7 @@ function update$2(x, f, m) { } function add_to_list$2(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -2831,7 +2831,7 @@ function add_to_list$2(x, data, m) { function iter$2(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -2846,9 +2846,9 @@ function map$2(f, param) { if (!param) { return /* Empty */0; } - var l$p = map$2(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map$2(f, param.r); + let l$p = map$2(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map$2(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -2862,10 +2862,10 @@ function mapi$2(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi$2(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi$2(f, param.r); + let v = param.v; + let l$p = mapi$2(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi$2(f, param.r); return /* Node */{ l: l$p, v: v, @@ -2877,8 +2877,8 @@ function mapi$2(f, param) { function fold$2(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -2890,7 +2890,7 @@ function fold$2(f, _m, _accu) { function for_all$2(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -2907,7 +2907,7 @@ function for_all$2(p, _param) { function exists$2(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -2945,8 +2945,8 @@ function join$2(l, v, d, r) { if (!r) { return add_max_binding$2(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal$2(l.l, l.v, l.d, join$2(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -2963,7 +2963,7 @@ function concat$2(t1, t2) { if (!t2) { return t1; } - var match = min_binding$2(t2); + let match = min_binding$2(t2); return join$2(t1, match[0], match[1], remove_min_binding$2(t2)); } @@ -2983,11 +2983,11 @@ function split$2(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg$2.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg$2.compare, x, v); if (c === 0) { return [ l, @@ -2996,14 +2996,14 @@ function split$2(x, param) { ]; } if (c < 0) { - var match = split$2(x, l); + let match = split$2(x, l); return [ match[0], match[1], join$2(match[2], v, d, r) ]; } - var match$1 = split$2(x, r); + let match$1 = split$2(x, r); return [ join$2(l, v, d, match$1[0]), match$1[1], @@ -3013,9 +3013,9 @@ function split$2(x, param) { function merge$5(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height$2(s2)) { - var match = split$2(v1, s2); + let match = split$2(v1, s2); return concat_or_join$2(merge$5(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$5(f, s1.r, match[2])); } @@ -3023,8 +3023,8 @@ function merge$5(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split$2(v2, s1); + let v2 = s2.v; + let match$1 = split$2(v2, s1); return concat_or_join$2(merge$5(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$5(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -3044,25 +3044,25 @@ function union$2(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split$2(v1, s2); - var d2$1 = match[1]; - var l = union$2(f, s1.l, match[0]); - var r = union$2(f, s1.r, match[2]); + let match = split$2(v1, s2); + let d2$1 = match[1]; + let l = union$2(f, s1.l, match[0]); + let r = union$2(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join$2(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join$2(l, v1, d1, r); } } - var match$1 = split$2(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union$2(f, match$1[0], s2.l); - var r$1 = union$2(f, match$1[2], s2.r); + let match$1 = split$2(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union$2(f, match$1[0], s2.l); + let r$1 = union$2(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join$2(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -3074,13 +3074,13 @@ function filter$2(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter$2(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter$2(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter$2(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter$2(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -3096,10 +3096,10 @@ function filter_map$2(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map$2(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map$2(f, param.r); + let v = param.v; + let l$p = filter_map$2(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map$2(f, param.r); if (fvd !== undefined) { return join$2(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -3114,15 +3114,15 @@ function partition$2(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition$2(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition$2(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition$2(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition$2(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join$2(lt, v, d, rt), @@ -3138,8 +3138,8 @@ function partition$2(p, param) { function cons_enum$2(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -3155,11 +3155,11 @@ function cons_enum$2(_m, _e) { } function compare$5(cmp, m1, m2) { - var _e1 = cons_enum$2(m1, /* End */0); - var _e2 = cons_enum$2(m2, /* End */0); + let _e1 = cons_enum$2(m1, /* End */0); + let _e2 = cons_enum$2(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -3170,11 +3170,11 @@ function compare$5(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg$2.compare, e1._0, e2._0); + let c = Curry._2(funarg$2.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -3185,11 +3185,11 @@ function compare$5(cmp, m1, m2) { } function equal$2(cmp, m1, m2) { - var _e1 = cons_enum$2(m1, /* End */0); - var _e2 = cons_enum$2(m2, /* End */0); + let _e1 = cons_enum$2(m1, /* End */0); + let _e2 = cons_enum$2(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -3222,8 +3222,8 @@ function cardinal$2(param) { function bindings_aux$2(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -3263,7 +3263,7 @@ function seq_of_enum_$2(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum$2(c._2, c._3); + let partial_arg = cons_enum$2(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -3276,7 +3276,7 @@ function seq_of_enum_$2(c, param) { } function to_seq$2(m) { - var partial_arg = cons_enum$2(m, /* End */0); + let partial_arg = cons_enum$2(m, /* End */0); return function (param) { return seq_of_enum_$2(partial_arg, param); }; @@ -3284,8 +3284,8 @@ function to_seq$2(m) { function snoc_enum$2(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -3304,7 +3304,7 @@ function rev_seq_of_enum_$2(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum$2(c._2, c._3); + let partial_arg = snoc_enum$2(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -3317,24 +3317,24 @@ function rev_seq_of_enum_$2(c, param) { } function to_rev_seq$2(c) { - var partial_arg = snoc_enum$2(c, /* End */0); + let partial_arg = snoc_enum$2(c, /* End */0); return function (param) { return rev_seq_of_enum_$2(partial_arg, param); }; } function to_seq_from$2(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg$2.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg$2.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -3357,13 +3357,13 @@ function to_seq_from$2(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_$2(partial_arg, param); }; } -var Labs = { +let Labs = { empty: /* Empty */0, add: add$2, add_to_list: add_to_list$2, @@ -3409,7 +3409,7 @@ var Labs = { of_seq: of_seq$2 }; -var dummy_table = { +let dummy_table = { size: 0, methods: [undefined], methods_by_name: /* Empty */0, @@ -3420,7 +3420,7 @@ var dummy_table = { initializers: /* [] */0 }; -var table_count = { +let table_count = { contents: 0 }; @@ -3434,11 +3434,11 @@ function fit_size(n) { function new_table(pub_labels) { table_count.contents = table_count.contents + 1 | 0; - var len = pub_labels.length; - var methods = Caml_array.make((len << 1) + 2 | 0, /* DummyA */0); + let len = pub_labels.length; + let methods = Caml_array.make((len << 1) + 2 | 0, /* DummyA */0); Caml_array.set(methods, 0, len); Caml_array.set(methods, 1, (Math.imul(fit_size(len), Stdlib__Sys.word_size) / 8 | 0) - 1 | 0); - for(var i = 0; i < len; ++i){ + for(let i = 0; i < len; ++i){ Caml_array.set(methods, (i << 1) + 3 | 0, Caml_array.get(pub_labels, i)); } return { @@ -3454,11 +3454,11 @@ function new_table(pub_labels) { } function resize(array, new_size) { - var old_size = array.methods.length; + let old_size = array.methods.length; if (new_size <= old_size) { return ; } - var new_buck = Caml_array.make(new_size, /* DummyA */0); + let new_buck = Caml_array.make(new_size, /* DummyA */0); Stdlib__Array.blit(array.methods, 0, new_buck, 0, old_size); array.methods = new_buck; } @@ -3468,16 +3468,16 @@ function put(array, label, element) { Caml_array.set(array.methods, label, element); } -var method_count = { +let method_count = { contents: 0 }; -var inst_var_count = { +let inst_var_count = { contents: 0 }; function new_method(table) { - var index = table.methods.length; + let index = table.methods.length; resize(table, index + 1 | 0); return index; } @@ -3487,9 +3487,9 @@ function get_method_label(table, name) { return Curry._2(find$1, name, table.methods_by_name); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var label = new_method(table); + let label = new_method(table); table.methods_by_name = Curry._3(add$1, name, label, table.methods_by_name); table.methods_by_label = Curry._3(add$2, label, true, table.methods_by_label); return label; @@ -3525,7 +3525,7 @@ function get_method(table, label) { return Stdlib__List.assoc(label, table.hidden_meths); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return Caml_array.get(table.methods, label); } @@ -3542,13 +3542,13 @@ function to_list(arr) { } function narrow(table, vars, virt_meths, concr_meths) { - var vars$1 = to_list(vars); - var virt_meths$1 = to_list(virt_meths); - var concr_meths$1 = to_list(concr_meths); - var virt_meth_labs = Stdlib__List.map((function (param) { + let vars$1 = to_list(vars); + let virt_meths$1 = to_list(virt_meths); + let concr_meths$1 = to_list(concr_meths); + let virt_meth_labs = Stdlib__List.map((function (param) { return get_method_label(table, param); }), virt_meths$1); - var concr_meth_labs = Stdlib__List.map((function (param) { + let concr_meth_labs = Stdlib__List.map((function (param) { return get_method_label(table, param); }), concr_meths$1); table.previous_states = { @@ -3569,20 +3569,20 @@ function narrow(table, vars, virt_meths, concr_meths) { return tvars; } }), table.vars, /* Empty */0); - var by_name = { + let by_name = { contents: /* Empty */0 }; - var by_label = { + let by_label = { contents: /* Empty */0 }; Stdlib__List.iter2((function (met, label) { by_name.contents = Curry._3(add$1, met, label, by_name.contents); - var tmp; + let tmp; try { tmp = Curry._2(find$2, label, table.methods_by_label); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { tmp = true; } else { @@ -3610,8 +3610,8 @@ function narrow(table, vars, virt_meths, concr_meths) { } function widen(table) { - var match = Stdlib__List.hd(table.previous_states); - var virt_meths = match[4]; + let match = Stdlib__List.hd(table.previous_states); + let virt_meths = match[4]; table.previous_states = Stdlib__List.tl(table.previous_states); table.vars = Stdlib__List.fold_left((function (s, v) { return Curry._3(add, v, Curry._2(find, v, table.vars), s); @@ -3631,7 +3631,7 @@ function widen(table) { } function new_slot(table) { - var index = table.size; + let index = table.size; table.size = index + 1 | 0; return index; } @@ -3641,9 +3641,9 @@ function new_variable(table, name) { return Curry._2(find, name, table.vars); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { - var index = new_slot(table); + let index = new_slot(table); if (name !== "") { table.vars = Curry._3(add, name, index, table.vars); } @@ -3662,14 +3662,14 @@ function to_array(arr) { } function new_methods_variables(table, meths, vals) { - var meths$1 = to_array(meths); - var nmeths = meths$1.length; - var nvals = vals.length; - var res = Caml_array.make(nmeths + nvals | 0, 0); - for(var i = 0; i < nmeths; ++i){ + let meths$1 = to_array(meths); + let nmeths = meths$1.length; + let nvals = vals.length; + let res = Caml_array.make(nmeths + nvals | 0, 0); + for(let i = 0; i < nmeths; ++i){ Caml_array.set(res, i, get_method_label(table, Caml_array.get(meths$1, i))); } - for(var i$1 = 0; i$1 < nvals; ++i$1){ + for(let i$1 = 0; i$1 < nvals; ++i$1){ Caml_array.set(res, i$1 + nmeths | 0, new_variable(table, Caml_array.get(vals, i$1))); } return res; @@ -3680,7 +3680,7 @@ function get_variable(table, name) { return Curry._2(find, name, table.vars); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -3712,10 +3712,10 @@ function create_table(public_methods) { if (public_methods === 0) { return new_table([]); } - var tags = Stdlib__Array.map(public_method_label, public_methods); - var table = new_table(tags); + let tags = Stdlib__Array.map(public_method_label, public_methods); + let table = new_table(tags); Stdlib__Array.iteri((function (i, met) { - var lab = (i << 1) + 2 | 0; + let lab = (i << 1) + 2 | 0; table.methods_by_name = Curry._3(add$1, met, lab, table.methods_by_name); table.methods_by_label = Curry._3(add$2, lab, true, table.methods_by_label); }), public_methods); @@ -3729,9 +3729,9 @@ function init_class(table) { } function inherits(cla, vals, virt_meths, concr_meths, param, top) { - var $$super = param[1]; + let $$super = param[1]; narrow(cla, vals, virt_meths, concr_meths); - var init = top ? Curry._2($$super, cla, param[3]) : Curry._1($$super, cla); + let init = top ? Curry._2($$super, cla, param[3]) : Curry._1($$super, cla); widen(cla); return Caml_array.concat({ hd: [init], @@ -3750,8 +3750,8 @@ function inherits(cla, vals, virt_meths, concr_meths, param, top) { } function make_class(pub_meths, class_init) { - var table = create_table(pub_meths); - var env_init = Curry._1(class_init, table); + let table = create_table(pub_meths); + let env_init = Curry._1(class_init, table); init_class(table); return [ Curry._1(env_init, 0), @@ -3762,15 +3762,15 @@ function make_class(pub_meths, class_init) { } function make_class_store(pub_meths, class_init, init_table) { - var table = create_table(pub_meths); - var env_init = Curry._1(class_init, table); + let table = create_table(pub_meths); + let env_init = Curry._1(class_init, table); init_class(table); init_table.class_init = class_init; init_table.env_init = env_init; } function dummy_class(loc) { - var undef = function (param) { + let undef = function (param) { throw new Caml_js_exceptions.MelangeError(Stdlib.Undefined_recursive_module, { MEL_EXN_ID: Stdlib.Undefined_recursive_module, _1: loc @@ -3786,7 +3786,7 @@ function dummy_class(loc) { function iter_f(obj, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -3797,7 +3797,7 @@ function iter_f(obj, _param) { } function run_initializers(obj, table) { - var inits = table.initializers; + let inits = table.initializers; if (Caml_obj.caml_notequal(inits, /* [] */0)) { return iter_f(obj, inits); } @@ -3808,7 +3808,7 @@ function run_initializers_opt(obj_0, obj, table) { if (obj_0) { return obj; } - var inits = table.initializers; + let inits = table.initializers; if (Caml_obj.caml_notequal(inits, /* [] */0)) { iter_f(obj, inits); } @@ -3816,13 +3816,13 @@ function run_initializers_opt(obj_0, obj, table) { } function build_path(n, keys, tables) { - var res = { + let res = { key: 0, data: /* Empty */0, next: /* Empty */0 }; - var r = res; - for(var i = 0; i <= n; ++i){ + let r = res; + for(let i = 0; i <= n; ++i){ r = /* Cons */{ _0: Caml_array.get(keys, i), _1: r, @@ -3837,10 +3837,10 @@ function lookup_keys(i, keys, tables) { if (i < 0) { return tables; } - var key = Caml_array.get(keys, i); - var _tables = tables; + let key = Caml_array.get(keys, i); + let _tables = tables; while(true) { - var tables$1 = _tables; + let tables$1 = _tables; if (tables$1.key === key) { return lookup_keys(i - 1 | 0, keys, tables$1.data); } @@ -3848,7 +3848,7 @@ function lookup_keys(i, keys, tables) { _tables = tables$1.next; continue ; } - var next = /* Cons */{ + let next = /* Cons */{ _0: key, _1: /* Empty */0, _2: /* Empty */0 @@ -3994,169 +3994,169 @@ function send_const(m, x, c) { function send_var(m, n, c) { return function (obj) { - var tmp = obj[n]; + let tmp = obj[n]; return Curry._3(Curry._3(Caml_oo.caml_get_public_method, tmp, m, 2), tmp, obj[0], c); }; } function send_env(m, e, n, c) { return function (obj) { - var tmp = obj[e][n]; + let tmp = obj[e][n]; return Curry._3(Curry._3(Caml_oo.caml_get_public_method, tmp, m, 3), tmp, obj[0], c); }; } function send_meth(m, n, c) { return function (obj) { - var tmp = Curry._1(obj[0][n], obj); + let tmp = Curry._1(obj[0][n], obj); return Curry._3(Curry._3(Caml_oo.caml_get_public_method, tmp, m, 4), tmp, obj[0], c); }; } function new_cache(table) { - var n = new_method(table); - var n$1 = n % 2 === 0 || n > (2 + Caml_int32.div((Caml_array.get(table.methods, 1) << 4), Stdlib__Sys.word_size) | 0) ? n : new_method(table); + let n = new_method(table); + let n$1 = n % 2 === 0 || n > (2 + Caml_int32.div((Caml_array.get(table.methods, 1) << 4), Stdlib__Sys.word_size) | 0) ? n : new_method(table); Caml_array.set(table.methods, n$1, 0); return n$1; } function method_impl(table, i, arr) { - var next = function (param) { + let next = function (param) { i.contents = i.contents + 1 | 0; return Caml_array.get(arr, i.contents); }; - var clo = next(undefined); + let clo = next(undefined); if (typeof clo !== "number") { return clo; } switch (clo) { case /* GetConst */0 : - var x = next(undefined); + let x = next(undefined); return function (obj) { return x; }; case /* GetVar */1 : - var n = next(undefined); + let n = next(undefined); return function (obj) { return obj[n]; }; case /* GetEnv */2 : - var e = next(undefined); - var n$1 = next(undefined); + let e = next(undefined); + let n$1 = next(undefined); return get_env(e, n$1); case /* GetMeth */3 : return get_meth(next(undefined)); case /* SetVar */4 : - var n$2 = next(undefined); + let n$2 = next(undefined); return function (obj, x) { obj[n$2] = x; }; case /* AppConst */5 : - var f = next(undefined); - var x$1 = next(undefined); + let f = next(undefined); + let x$1 = next(undefined); return function (obj) { return Curry._1(f, x$1); }; case /* AppVar */6 : - var f$1 = next(undefined); - var n$3 = next(undefined); + let f$1 = next(undefined); + let n$3 = next(undefined); return function (obj) { return Curry._1(f$1, obj[n$3]); }; case /* AppEnv */7 : - var f$2 = next(undefined); - var e$1 = next(undefined); - var n$4 = next(undefined); + let f$2 = next(undefined); + let e$1 = next(undefined); + let n$4 = next(undefined); return app_env(f$2, e$1, n$4); case /* AppMeth */8 : - var f$3 = next(undefined); - var n$5 = next(undefined); + let f$3 = next(undefined); + let n$5 = next(undefined); return app_meth(f$3, n$5); case /* AppConstConst */9 : - var f$4 = next(undefined); - var x$2 = next(undefined); - var y = next(undefined); + let f$4 = next(undefined); + let x$2 = next(undefined); + let y = next(undefined); return function (obj) { return Curry._2(f$4, x$2, y); }; case /* AppConstVar */10 : - var f$5 = next(undefined); - var x$3 = next(undefined); - var n$6 = next(undefined); + let f$5 = next(undefined); + let x$3 = next(undefined); + let n$6 = next(undefined); return app_const_var(f$5, x$3, n$6); case /* AppConstEnv */11 : - var f$6 = next(undefined); - var x$4 = next(undefined); - var e$2 = next(undefined); - var n$7 = next(undefined); + let f$6 = next(undefined); + let x$4 = next(undefined); + let e$2 = next(undefined); + let n$7 = next(undefined); return app_const_env(f$6, x$4, e$2, n$7); case /* AppConstMeth */12 : - var f$7 = next(undefined); - var x$5 = next(undefined); - var n$8 = next(undefined); + let f$7 = next(undefined); + let x$5 = next(undefined); + let n$8 = next(undefined); return app_const_meth(f$7, x$5, n$8); case /* AppVarConst */13 : - var f$8 = next(undefined); - var n$9 = next(undefined); - var x$6 = next(undefined); + let f$8 = next(undefined); + let n$9 = next(undefined); + let x$6 = next(undefined); return app_var_const(f$8, n$9, x$6); case /* AppEnvConst */14 : - var f$9 = next(undefined); - var e$3 = next(undefined); - var n$10 = next(undefined); - var x$7 = next(undefined); + let f$9 = next(undefined); + let e$3 = next(undefined); + let n$10 = next(undefined); + let x$7 = next(undefined); return app_env_const(f$9, e$3, n$10, x$7); case /* AppMethConst */15 : - var f$10 = next(undefined); - var n$11 = next(undefined); - var x$8 = next(undefined); + let f$10 = next(undefined); + let n$11 = next(undefined); + let x$8 = next(undefined); return app_meth_const(f$10, n$11, x$8); case /* MethAppConst */16 : - var n$12 = next(undefined); - var x$9 = next(undefined); + let n$12 = next(undefined); + let x$9 = next(undefined); return meth_app_const(n$12, x$9); case /* MethAppVar */17 : - var n$13 = next(undefined); - var m = next(undefined); + let n$13 = next(undefined); + let m = next(undefined); return meth_app_var(n$13, m); case /* MethAppEnv */18 : - var n$14 = next(undefined); - var e$4 = next(undefined); - var m$1 = next(undefined); + let n$14 = next(undefined); + let e$4 = next(undefined); + let m$1 = next(undefined); return meth_app_env(n$14, e$4, m$1); case /* MethAppMeth */19 : - var n$15 = next(undefined); - var m$2 = next(undefined); + let n$15 = next(undefined); + let m$2 = next(undefined); return meth_app_meth(n$15, m$2); case /* SendConst */20 : - var m$3 = next(undefined); - var x$10 = next(undefined); + let m$3 = next(undefined); + let x$10 = next(undefined); return send_const(m$3, x$10, new_cache(table)); case /* SendVar */21 : - var m$4 = next(undefined); - var n$16 = next(undefined); + let m$4 = next(undefined); + let n$16 = next(undefined); return send_var(m$4, n$16, new_cache(table)); case /* SendEnv */22 : - var m$5 = next(undefined); - var e$5 = next(undefined); - var n$17 = next(undefined); + let m$5 = next(undefined); + let e$5 = next(undefined); + let n$17 = next(undefined); return send_env(m$5, e$5, n$17, new_cache(table)); case /* SendMeth */23 : - var m$6 = next(undefined); - var n$18 = next(undefined); + let m$6 = next(undefined); + let n$18 = next(undefined); return send_meth(m$6, n$18, new_cache(table)); } } function set_methods(table, methods) { - var len = methods.length; - var i = { + let len = methods.length; + let i = { contents: 0 }; while(i.contents < len) { - var label = Caml_array.get(methods, i.contents); - var clo = method_impl(table, i, methods); + let label = Caml_array.get(methods, i.contents); + let clo = method_impl(table, i, methods); set_method(table, label, clo); i.contents = i.contents + 1 | 0; }; @@ -4170,11 +4170,11 @@ function stats(param) { }; } -var initial_object_size = 2; +let initial_object_size = 2; -var dummy_item; +let dummy_item; -var dummy_met = /* DummyA */0; +let dummy_met = /* DummyA */0; exports.copy = copy; exports.params = params; diff --git a/jscomp/test/dist/jscomp/test/test_is_js.js b/jscomp/test/dist/jscomp/test/test_is_js.js index af079e3770..ddc82e3147 100644 --- a/jscomp/test/dist/jscomp/test/test_is_js.js +++ b/jscomp/test/dist/jscomp/test/test_is_js.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/test_js_ffi.js b/jscomp/test/dist/jscomp/test/test_js_ffi.js index e1b00579de..c61fe4d836 100644 --- a/jscomp/test/dist/jscomp/test/test_js_ffi.js +++ b/jscomp/test/dist/jscomp/test/test_js_ffi.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Stdlib__String = require("melange/string.js"); +let Stdlib__String = require("melange/string.js"); function v(u) { t({ @@ -13,7 +13,7 @@ function u(v) { return v; } -var s = Stdlib__String; +let s = Stdlib__String; exports.v = v; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/test_let.js b/jscomp/test/dist/jscomp/test/test_let.js index fb924c5fdb..e543934924 100644 --- a/jscomp/test/dist/jscomp/test/test_let.js +++ b/jscomp/test/dist/jscomp/test/test_let.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); +let Stdlib = require("melange/stdlib.js"); Stdlib.print_int(3); -var b = 3; +let b = 3; exports.b = b; /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_list.js b/jscomp/test/dist/jscomp/test/test_list.js index 0d1dbd2def..f7ac5d1f24 100644 --- a/jscomp/test/dist/jscomp/test/test_list.js +++ b/jscomp/test/dist/jscomp/test/test_list.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); function length_aux(_len, _param) { while(true) { - var param = _param; - var len = _len; + let param = _param; + let len = _len; if (!param) { return len; } @@ -51,11 +51,11 @@ function nth(l, n) { _1: "List.nth" }); } - var _l = l; - var _n = n; + let _l = l; + let _n = n; while(true) { - var n$1 = _n; - var l$1 = _l; + let n$1 = _n; + let l$1 = _l; if (l$1) { if (n$1 === 0) { return l$1.hd; @@ -73,8 +73,8 @@ function nth(l, n) { function rev_append(_l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (!l1) { return l2; } @@ -103,7 +103,7 @@ function map(f, param) { if (!param) { return /* [] */0; } - var r = Curry._1(f, param.hd); + let r = Curry._1(f, param.hd); return { hd: r, tl: map(f, param.tl) @@ -114,7 +114,7 @@ function mapi(i, f, param) { if (!param) { return /* [] */0; } - var r = Curry._2(f, i, param.hd); + let r = Curry._2(f, i, param.hd); return { hd: r, tl: mapi(i + 1 | 0, f, param.tl) @@ -126,11 +126,11 @@ function mapi$1(f, l) { } function rev_map(f, l) { - var _accu = /* [] */0; - var _param = l; + let _accu = /* [] */0; + let _param = l; while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -145,7 +145,7 @@ function rev_map(f, l) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -156,11 +156,11 @@ function iter(f, _param) { } function iteri(f, l) { - var _i = 0; - var _param = l; + let _i = 0; + let _param = l; while(true) { - var param = _param; - var i = _i; + let param = _param; + let i = _i; if (!param) { return ; } @@ -173,8 +173,8 @@ function iteri(f, l) { function fold_left(f, _accu, _l) { while(true) { - var l = _l; - var accu = _accu; + let l = _l; + let accu = _accu; if (!l) { return accu; } @@ -195,7 +195,7 @@ function fold_right(f, l, accu) { function map2(f, l1, l2) { if (l1) { if (l2) { - var r = Curry._2(f, l1.hd, l2.hd); + let r = Curry._2(f, l1.hd, l2.hd); return { hd: r, tl: map2(f, l1.tl, l2.tl) @@ -216,13 +216,13 @@ function map2(f, l1, l2) { } function rev_map2(f, l1, l2) { - var _accu = /* [] */0; - var _l1 = l1; - var _l2 = l2; + let _accu = /* [] */0; + let _l1 = l1; + let _l2 = l2; while(true) { - var l2$1 = _l2; - var l1$1 = _l1; - var accu = _accu; + let l2$1 = _l2; + let l1$1 = _l1; + let accu = _accu; if (l1$1) { if (l2$1) { _l2 = l2$1.tl; @@ -250,8 +250,8 @@ function rev_map2(f, l1, l2) { function iter2(f, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (l1) { if (l2) { Curry._2(f, l1.hd, l2.hd); @@ -276,9 +276,9 @@ function iter2(f, _l1, _l2) { function fold_left2(f, _accu, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; - var accu = _accu; + let l2 = _l2; + let l1 = _l1; + let accu = _accu; if (l1) { if (l2) { _l2 = l2.tl; @@ -322,7 +322,7 @@ function fold_right2(f, l1, l2, accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -336,7 +336,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -350,8 +350,8 @@ function exists(p, _param) { function for_all2(p, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (l1) { if (l2) { if (!Curry._2(p, l1.hd, l2.hd)) { @@ -378,8 +378,8 @@ function for_all2(p, _l1, _l2) { function exists2(p, _l1, _l2) { while(true) { - var l2 = _l2; - var l1 = _l1; + let l2 = _l2; + let l1 = _l1; if (l1) { if (l2) { if (Curry._2(p, l1.hd, l2.hd)) { @@ -406,7 +406,7 @@ function exists2(p, _l1, _l2) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -420,7 +420,7 @@ function mem(x, _param) { function memq(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -434,9 +434,9 @@ function memq(x, _param) { function assoc(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var match = param.hd; + let match = param.hd; if (Caml_obj.caml_equal(match[0], x)) { return match[1]; } @@ -451,9 +451,9 @@ function assoc(x, _param) { function assq(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var match = param.hd; + let match = param.hd; if (match[0] === x) { return match[1]; } @@ -468,7 +468,7 @@ function assq(x, _param) { function mem_assoc(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -482,7 +482,7 @@ function mem_assoc(x, _param) { function mem_assq(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -498,8 +498,8 @@ function remove_assoc(x, param) { if (!param) { return /* [] */0; } - var l = param.tl; - var pair = param.hd; + let l = param.tl; + let pair = param.hd; if (Caml_obj.caml_equal(pair[0], x)) { return l; } else { @@ -514,8 +514,8 @@ function remove_assq(x, param) { if (!param) { return /* [] */0; } - var l = param.tl; - var pair = param.hd; + let l = param.tl; + let pair = param.hd; if (pair[0] === x) { return l; } else { @@ -528,9 +528,9 @@ function remove_assq(x, param) { function find(p, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var x = param.hd; + let x = param.hd; if (Curry._1(p, x)) { return x; } @@ -545,16 +545,16 @@ function find(p, _param) { function find_all(p) { return function (param) { - var _accu = /* [] */0; - var _param = param; + let _accu = /* [] */0; + let _param = param; while(true) { - var param$1 = _param; - var accu = _accu; + let param$1 = _param; + let accu = _accu; if (!param$1) { return rev_append(accu, /* [] */0); } - var l = param$1.tl; - var x = param$1.hd; + let l = param$1.tl; + let x = param$1.hd; if (Curry._1(p, x)) { _param = l; _accu = { @@ -570,21 +570,21 @@ function find_all(p) { } function partition(p, l) { - var _yes = /* [] */0; - var _no = /* [] */0; - var _param = l; + let _yes = /* [] */0; + let _no = /* [] */0; + let _param = l; while(true) { - var param = _param; - var no = _no; - var yes = _yes; + let param = _param; + let no = _no; + let yes = _yes; if (!param) { return [ rev_append(yes, /* [] */0), rev_append(no, /* [] */0) ]; } - var l$1 = param.tl; - var x = param.hd; + let l$1 = param.tl; + let x = param.hd; if (Curry._1(p, x)) { _param = l$1; _yes = { @@ -609,8 +609,8 @@ function split(param) { /* [] */0 ]; } - var match = param.hd; - var match$1 = split(param.tl); + let match = param.hd; + let match$1 = split(param.tl); return [ { hd: match[0], @@ -655,8 +655,8 @@ function merge(cmp, l1, l2) { if (!l2) { return l1; } - var h2 = l2.hd; - var h1 = l1.hd; + let h2 = l2.hd; + let h1 = l1.hd; if (Curry._2(cmp, h1, h2) <= 0) { return { hd: h1, @@ -672,8 +672,8 @@ function merge(cmp, l1, l2) { function chop(_k, _l) { while(true) { - var l = _l; - var k = _k; + let l = _l; + let k = _k; if (k === 0) { return l; } @@ -694,16 +694,16 @@ function chop(_k, _l) { } function stable_sort(cmp, l) { - var sort = function (n, l) { + let sort = function (n, l) { if (n !== 2) { if (n === 3 && l) { - var match = l.tl; + let match = l.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var x3 = match$1.hd; - var x2 = match.hd; - var x1 = l.hd; + let x3 = match$1.hd; + let x2 = match.hd; + let x1 = l.hd; if (Curry._2(cmp, x1, x2) <= 0) { if (Curry._2(cmp, x2, x3) <= 0) { return { @@ -780,10 +780,10 @@ function stable_sort(cmp, l) { } } else if (l) { - var match$2 = l.tl; + let match$2 = l.tl; if (match$2) { - var x2$1 = match$2.hd; - var x1$1 = l.hd; + let x2$1 = match$2.hd; + let x1$1 = l.hd; if (Curry._2(cmp, x1$1, x2$1) <= 0) { return { hd: x1$1, @@ -804,26 +804,26 @@ function stable_sort(cmp, l) { } } - var n1 = (n >> 1); - var n2 = n - n1 | 0; - var l2 = chop(n1, l); - var s1 = rev_sort(n1, l); - var s2 = rev_sort(n2, l2); - var _l1 = s1; - var _l2 = s2; - var _accu = /* [] */0; + let n1 = (n >> 1); + let n2 = n - n1 | 0; + let l2 = chop(n1, l); + let s1 = rev_sort(n1, l); + let s2 = rev_sort(n2, l2); + let _l1 = s1; + let _l2 = s2; + let _accu = /* [] */0; while(true) { - var accu = _accu; - var l2$1 = _l2; - var l1 = _l1; + let accu = _accu; + let l2$1 = _l2; + let l1 = _l1; if (!l1) { return rev_append(l2$1, accu); } if (!l2$1) { return rev_append(l1, accu); } - var h2 = l2$1.hd; - var h1 = l1.hd; + let h2 = l2$1.hd; + let h1 = l1.hd; if (Curry._2(cmp, h1, h2) > 0) { _accu = { hd: h1, @@ -840,16 +840,16 @@ function stable_sort(cmp, l) { continue ; }; }; - var rev_sort = function (n, l) { + let rev_sort = function (n, l) { if (n !== 2) { if (n === 3 && l) { - var match = l.tl; + let match = l.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var x3 = match$1.hd; - var x2 = match.hd; - var x1 = l.hd; + let x3 = match$1.hd; + let x2 = match.hd; + let x1 = l.hd; if (Curry._2(cmp, x1, x2) > 0) { if (Curry._2(cmp, x2, x3) > 0) { return { @@ -926,10 +926,10 @@ function stable_sort(cmp, l) { } } else if (l) { - var match$2 = l.tl; + let match$2 = l.tl; if (match$2) { - var x2$1 = match$2.hd; - var x1$1 = l.hd; + let x2$1 = match$2.hd; + let x1$1 = l.hd; if (Curry._2(cmp, x1$1, x2$1) > 0) { return { hd: x1$1, @@ -950,26 +950,26 @@ function stable_sort(cmp, l) { } } - var n1 = (n >> 1); - var n2 = n - n1 | 0; - var l2 = chop(n1, l); - var s1 = sort(n1, l); - var s2 = sort(n2, l2); - var _l1 = s1; - var _l2 = s2; - var _accu = /* [] */0; + let n1 = (n >> 1); + let n2 = n - n1 | 0; + let l2 = chop(n1, l); + let s1 = sort(n1, l); + let s2 = sort(n2, l2); + let _l1 = s1; + let _l2 = s2; + let _accu = /* [] */0; while(true) { - var accu = _accu; - var l2$1 = _l2; - var l1 = _l1; + let accu = _accu; + let l2$1 = _l2; + let l1 = _l1; if (!l1) { return rev_append(l2$1, accu); } if (!l2$1) { return rev_append(l1, accu); } - var h2 = l2$1.hd; - var h1 = l1.hd; + let h2 = l2$1.hd; + let h1 = l1.hd; if (Curry._2(cmp, h1, h2) <= 0) { _accu = { hd: h1, @@ -986,7 +986,7 @@ function stable_sort(cmp, l) { continue ; }; }; - var len = length_aux(0, l); + let len = length_aux(0, l); if (len < 2) { return l; } else { @@ -995,19 +995,19 @@ function stable_sort(cmp, l) { } function sort_uniq(cmp, l) { - var sort = function (n, l) { + let sort = function (n, l) { if (n !== 2) { if (n === 3 && l) { - var match = l.tl; + let match = l.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var x3 = match$1.hd; - var x2 = match.hd; - var x1 = l.hd; - var c = Curry._2(cmp, x1, x2); + let x3 = match$1.hd; + let x2 = match.hd; + let x1 = l.hd; + let c = Curry._2(cmp, x1, x2); if (c === 0) { - var c$1 = Curry._2(cmp, x2, x3); + let c$1 = Curry._2(cmp, x2, x3); if (c$1 === 0) { return { hd: x2, @@ -1032,7 +1032,7 @@ function sort_uniq(cmp, l) { } } if (c < 0) { - var c$2 = Curry._2(cmp, x2, x3); + let c$2 = Curry._2(cmp, x2, x3); if (c$2 === 0) { return { hd: x1, @@ -1054,7 +1054,7 @@ function sort_uniq(cmp, l) { } }; } - var c$3 = Curry._2(cmp, x1, x3); + let c$3 = Curry._2(cmp, x1, x3); if (c$3 === 0) { return { hd: x1, @@ -1087,7 +1087,7 @@ function sort_uniq(cmp, l) { }; } } - var c$4 = Curry._2(cmp, x1, x3); + let c$4 = Curry._2(cmp, x1, x3); if (c$4 === 0) { return { hd: x2, @@ -1109,7 +1109,7 @@ function sort_uniq(cmp, l) { } }; } - var c$5 = Curry._2(cmp, x2, x3); + let c$5 = Curry._2(cmp, x2, x3); if (c$5 === 0) { return { hd: x2, @@ -1148,11 +1148,11 @@ function sort_uniq(cmp, l) { } } else if (l) { - var match$2 = l.tl; + let match$2 = l.tl; if (match$2) { - var x2$1 = match$2.hd; - var x1$1 = l.hd; - var c$6 = Curry._2(cmp, x1$1, x2$1); + let x2$1 = match$2.hd; + let x1$1 = l.hd; + let c$6 = Curry._2(cmp, x1$1, x2$1); if (c$6 === 0) { return { hd: x1$1, @@ -1178,29 +1178,29 @@ function sort_uniq(cmp, l) { } } - var n1 = (n >> 1); - var n2 = n - n1 | 0; - var l2 = chop(n1, l); - var s1 = rev_sort(n1, l); - var s2 = rev_sort(n2, l2); - var _l1 = s1; - var _l2 = s2; - var _accu = /* [] */0; + let n1 = (n >> 1); + let n2 = n - n1 | 0; + let l2 = chop(n1, l); + let s1 = rev_sort(n1, l); + let s2 = rev_sort(n2, l2); + let _l1 = s1; + let _l2 = s2; + let _accu = /* [] */0; while(true) { - var accu = _accu; - var l2$1 = _l2; - var l1 = _l1; + let accu = _accu; + let l2$1 = _l2; + let l1 = _l1; if (!l1) { return rev_append(l2$1, accu); } if (!l2$1) { return rev_append(l1, accu); } - var t2 = l2$1.tl; - var h2 = l2$1.hd; - var t1 = l1.tl; - var h1 = l1.hd; - var c$7 = Curry._2(cmp, h1, h2); + let t2 = l2$1.tl; + let h2 = l2$1.hd; + let t1 = l1.tl; + let h1 = l1.hd; + let c$7 = Curry._2(cmp, h1, h2); if (c$7 === 0) { _accu = { hd: h1, @@ -1226,19 +1226,19 @@ function sort_uniq(cmp, l) { continue ; }; }; - var rev_sort = function (n, l) { + let rev_sort = function (n, l) { if (n !== 2) { if (n === 3 && l) { - var match = l.tl; + let match = l.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { - var x3 = match$1.hd; - var x2 = match.hd; - var x1 = l.hd; - var c = Curry._2(cmp, x1, x2); + let x3 = match$1.hd; + let x2 = match.hd; + let x1 = l.hd; + let c = Curry._2(cmp, x1, x2); if (c === 0) { - var c$1 = Curry._2(cmp, x2, x3); + let c$1 = Curry._2(cmp, x2, x3); if (c$1 === 0) { return { hd: x2, @@ -1263,7 +1263,7 @@ function sort_uniq(cmp, l) { } } if (c > 0) { - var c$2 = Curry._2(cmp, x2, x3); + let c$2 = Curry._2(cmp, x2, x3); if (c$2 === 0) { return { hd: x1, @@ -1285,7 +1285,7 @@ function sort_uniq(cmp, l) { } }; } - var c$3 = Curry._2(cmp, x1, x3); + let c$3 = Curry._2(cmp, x1, x3); if (c$3 === 0) { return { hd: x1, @@ -1318,7 +1318,7 @@ function sort_uniq(cmp, l) { }; } } - var c$4 = Curry._2(cmp, x1, x3); + let c$4 = Curry._2(cmp, x1, x3); if (c$4 === 0) { return { hd: x2, @@ -1340,7 +1340,7 @@ function sort_uniq(cmp, l) { } }; } - var c$5 = Curry._2(cmp, x2, x3); + let c$5 = Curry._2(cmp, x2, x3); if (c$5 === 0) { return { hd: x2, @@ -1379,11 +1379,11 @@ function sort_uniq(cmp, l) { } } else if (l) { - var match$2 = l.tl; + let match$2 = l.tl; if (match$2) { - var x2$1 = match$2.hd; - var x1$1 = l.hd; - var c$6 = Curry._2(cmp, x1$1, x2$1); + let x2$1 = match$2.hd; + let x1$1 = l.hd; + let c$6 = Curry._2(cmp, x1$1, x2$1); if (c$6 === 0) { return { hd: x1$1, @@ -1409,29 +1409,29 @@ function sort_uniq(cmp, l) { } } - var n1 = (n >> 1); - var n2 = n - n1 | 0; - var l2 = chop(n1, l); - var s1 = sort(n1, l); - var s2 = sort(n2, l2); - var _l1 = s1; - var _l2 = s2; - var _accu = /* [] */0; + let n1 = (n >> 1); + let n2 = n - n1 | 0; + let l2 = chop(n1, l); + let s1 = sort(n1, l); + let s2 = sort(n2, l2); + let _l1 = s1; + let _l2 = s2; + let _accu = /* [] */0; while(true) { - var accu = _accu; - var l2$1 = _l2; - var l1 = _l1; + let accu = _accu; + let l2$1 = _l2; + let l1 = _l1; if (!l1) { return rev_append(l2$1, accu); } if (!l2$1) { return rev_append(l1, accu); } - var t2 = l2$1.tl; - var h2 = l2$1.hd; - var t1 = l1.tl; - var h1 = l1.hd; - var c$7 = Curry._2(cmp, h1, h2); + let t2 = l2$1.tl; + let h2 = l2$1.hd; + let t1 = l1.tl; + let h1 = l1.hd; + let c$7 = Curry._2(cmp, h1, h2); if (c$7 === 0) { _accu = { hd: h1, @@ -1457,7 +1457,7 @@ function sort_uniq(cmp, l) { continue ; }; }; - var len = length_aux(0, l); + let len = length_aux(0, l); if (len < 2) { return l; } else { @@ -1465,17 +1465,17 @@ function sort_uniq(cmp, l) { } } -var u = Stdlib__List.length; +let u = Stdlib__List.length; -var append = Stdlib.$at; +let append = Stdlib.$at; -var concat = flatten; +let concat = flatten; -var filter = find_all; +let filter = find_all; -var sort = stable_sort; +let sort = stable_sort; -var fast_sort = stable_sort; +let fast_sort = stable_sort; exports.u = u; exports.length_aux = length_aux; diff --git a/jscomp/test/dist/jscomp/test/test_literal.js b/jscomp/test/dist/jscomp/test/test_literal.js index bd411df1b0..570b488888 100644 --- a/jscomp/test/dist/jscomp/test/test_literal.js +++ b/jscomp/test/dist/jscomp/test/test_literal.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Custom_inline = /* @__PURE__ */Caml_exceptions.create("Test_literal.Custom_inline"); +let Custom_inline = /* @__PURE__ */Caml_exceptions.create("Test_literal.Custom_inline"); -var v = { +let v = { MEL_EXN_ID: Custom_inline, _1: 1, _2: 2 }; -var vv = [ +let vv = [ 1, 2, 3 ]; -var long_v = [ +let long_v = [ 1, 2, 3, @@ -26,7 +26,7 @@ var long_v = [ 6 ]; -var long_int_v = [ +let long_int_v = [ 1, 2, 3, @@ -35,9 +35,9 @@ var long_int_v = [ 6 ]; -var short_int_v = [1]; +let short_int_v = [1]; -var empty = []; +let empty = []; exports.Custom_inline = Custom_inline; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/test_literals.js b/jscomp/test/dist/jscomp/test/test_literals.js index 4215b71c79..48e2575bbf 100644 --- a/jscomp/test/dist/jscomp/test/test_literals.js +++ b/jscomp/test/dist/jscomp/test/test_literals.js @@ -2,11 +2,11 @@ 'use strict'; -var node_modules = "node_modules"; +let node_modules = "node_modules"; -var node_modules_length = 12; +let node_modules_length = 12; -var bsconfig_json = "bsconfig.json"; +let bsconfig_json = "bsconfig.json"; exports.node_modules = node_modules; exports.node_modules_length = node_modules_length; diff --git a/jscomp/test/dist/jscomp/test/test_match_exception.js b/jscomp/test/dist/jscomp/test/test_match_exception.js index b9f381361c..8b10aa6a71 100644 --- a/jscomp/test/dist/jscomp/test/test_match_exception.js +++ b/jscomp/test/dist/jscomp/test/test_match_exception.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function f(g, x) { try { return Curry._1(g, x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return 3; } diff --git a/jscomp/test/dist/jscomp/test/test_mutliple.js b/jscomp/test/dist/jscomp/test/test_mutliple.js index 08a5a20783..ede4de2699 100644 --- a/jscomp/test/dist/jscomp/test/test_mutliple.js +++ b/jscomp/test/dist/jscomp/test/test_mutliple.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__List = require("melange/list.js"); +let Stdlib__List = require("melange/list.js"); -var f = Stdlib__List.length(/* [] */0); +let f = Stdlib__List.length(/* [] */0); exports.f = f; /* f Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_nat64.js b/jscomp/test/dist/jscomp/test/test_nat64.js index 23277877f2..700408a865 100644 --- a/jscomp/test/dist/jscomp/test/test_nat64.js +++ b/jscomp/test/dist/jscomp/test/test_nat64.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); -var v = Caml_int64.zero; +let v = Caml_int64.zero; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/test_nested_let.js b/jscomp/test/dist/jscomp/test/test_nested_let.js index 945d7f4235..6c5ed5645a 100644 --- a/jscomp/test/dist/jscomp/test/test_nested_let.js +++ b/jscomp/test/dist/jscomp/test/test_nested_let.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 68; +let v = 68; exports.v = v; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/test_nested_print.js b/jscomp/test/dist/jscomp/test/test_nested_print.js index c33d550be2..808189e6ad 100644 --- a/jscomp/test/dist/jscomp/test/test_nested_print.js +++ b/jscomp/test/dist/jscomp/test/test_nested_print.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function u(x, x$1) { return x$1 + x$1 | 0; } function f(g, x) { - var u = Curry._1(g, x); + let u = Curry._1(g, x); return u + u | 0; } diff --git a/jscomp/test/dist/jscomp/test/test_obj.js b/jscomp/test/dist/jscomp/test/test_obj.js index c82cd55df7..a522276bce 100644 --- a/jscomp/test/dist/jscomp/test/test_obj.js +++ b/jscomp/test/dist/jscomp/test/test_obj.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); function f(x) { return Caml_oo_curry.js1(623642069, 1, x); diff --git a/jscomp/test/dist/jscomp/test/test_obj_simple_ffi.js b/jscomp/test/dist/jscomp/test/test_obj_simple_ffi.js index a32d9b06d6..e9593e0aca 100644 --- a/jscomp/test/dist/jscomp/test/test_obj_simple_ffi.js +++ b/jscomp/test/dist/jscomp/test/test_obj_simple_ffi.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); +let Caml_option = require("melange.js/caml_option.js"); function v(displayName, param) { - var tmp = { + let tmp = { test: 3, config: 3, hi: "ghos" @@ -15,13 +15,13 @@ function v(displayName, param) { return tmp; } -var v2 = { +let v2 = { test: 3, config: 3, hi: "ghos" }; -var v3 = { +let v3 = { displayName: "display", test: 3, config: 3, diff --git a/jscomp/test/dist/jscomp/test/test_order.js b/jscomp/test/dist/jscomp/test/test_order.js index dcff1ee9b5..c88096e4a9 100644 --- a/jscomp/test/dist/jscomp/test/test_order.js +++ b/jscomp/test/dist/jscomp/test/test_order.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); +let Caml = require("melange.js/caml.js"); -var compare = Caml.caml_int_compare; +let compare = Caml.caml_int_compare; exports.compare = compare; /* No side effect */ diff --git a/jscomp/test/dist/jscomp/test/test_order_tailcall.js b/jscomp/test/dist/jscomp/test/test_order_tailcall.js index ce3d6e0e15..60eba5190c 100644 --- a/jscomp/test/dist/jscomp/test/test_order_tailcall.js +++ b/jscomp/test/dist/jscomp/test/test_order_tailcall.js @@ -4,8 +4,8 @@ function f(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; _y = x; _x = y; continue ; @@ -14,9 +14,9 @@ function f(_x, _y) { function f1(_x, _y, _z) { while(true) { - var z = _z; - var y = _y; - var x = _x; + let z = _z; + let y = _y; + let x = _x; console.log(z); _z = x; _y = z; @@ -27,7 +27,7 @@ function f1(_x, _y, _z) { function f2(x, _y) { while(true) { - var y = _y; + let y = _y; _y = y + 10 | 0; continue ; }; @@ -35,8 +35,8 @@ function f2(x, _y) { function f3(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; _y = x + 10 | 0; _x = y; continue ; @@ -45,8 +45,8 @@ function f3(_x, _y) { function f4(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; _y = y + x | 0; _x = x + 10 | 0; continue ; @@ -55,7 +55,7 @@ function f4(_x, _y) { function f5(_x, _y, z) { while(true) { - var y = _y; + let y = _y; _y = z + 20 | 0; _x = y + 10 | 0; continue ; @@ -82,8 +82,8 @@ function f7(b) { function f8(_x, _y) { while(true) { - var y = _y; - var x = _x; + let y = _y; + let x = _x; if (x > 10) { _y = y + 1 | 0; continue ; diff --git a/jscomp/test/dist/jscomp/test/test_other_exn.js b/jscomp/test/dist/jscomp/test/test_other_exn.js index 13bbdf4a8f..aa7a57401a 100644 --- a/jscomp/test/dist/jscomp/test/test_other_exn.js +++ b/jscomp/test/dist/jscomp/test/test_other_exn.js @@ -6,9 +6,9 @@ function Make($star) { return {}; } -var U = {}; +let U = {}; -var V = {}; +let V = {}; exports.Make = Make; exports.U = U; diff --git a/jscomp/test/dist/jscomp/test/test_per.js b/jscomp/test/dist/jscomp/test/test_per.js index 592ad26b91..b28984c46b 100644 --- a/jscomp/test/dist/jscomp/test/test_per.js +++ b/jscomp/test/dist/jscomp/test/test_per.js @@ -1,19 +1,19 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Caml_sys = require("melange.js/caml_sys.js"); -var CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Caml_sys = require("melange.js/caml_sys.js"); +let CamlinternalFormatBasics = require("melange/camlinternalFormatBasics.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function failwith(s) { throw new Caml_js_exceptions.MelangeError(Stdlib.Failure, { @@ -29,7 +29,7 @@ function invalid_arg(s) { }); } -var Exit = /* @__PURE__ */Caml_exceptions.create("Test_per.Exit"); +let Exit = /* @__PURE__ */Caml_exceptions.create("Test_per.Exit"); function min(x, y) { if (Caml_obj.caml_lessequal(x, y)) { @@ -59,42 +59,42 @@ function lnot(x) { return x ^ -1; } -var min_int = -2147483648; +let min_int = -2147483648; -var infinity = Caml_int64.float_of_bits([ +let infinity = Caml_int64.float_of_bits([ 2146435072, 0 ]); -var neg_infinity = Caml_int64.float_of_bits([ +let neg_infinity = Caml_int64.float_of_bits([ -1048576, 0 ]); -var nan = Caml_int64.float_of_bits([ +let nan = Caml_int64.float_of_bits([ 2146435072, 1 ]); -var max_float = Caml_int64.float_of_bits([ +let max_float = Caml_int64.float_of_bits([ 2146435071, 4294967295 ]); -var min_float = Caml_int64.float_of_bits([ +let min_float = Caml_int64.float_of_bits([ 1048576, 0 ]); -var epsilon_float = Caml_int64.float_of_bits([ +let epsilon_float = Caml_int64.float_of_bits([ 1018167296, 0 ]); function $caret(s1, s2) { - var l1 = s1.length; - var l2 = s2.length; - var s = Caml_bytes.caml_create_bytes(l1 + l2 | 0); + let l1 = s1.length; + let l2 = s2.length; + let s = Caml_bytes.caml_create_bytes(l1 + l2 | 0); Caml_bytes.caml_blit_string(s1, 0, s, 0, l1); Caml_bytes.caml_blit_string(s2, 0, s, l1, l2); return s; @@ -137,14 +137,14 @@ function string_of_int(n) { } function valid_float_lexem(s) { - var l = s.length; - var _i = 0; + let l = s.length; + let _i = 0; while(true) { - var i = _i; + let i = _i; if (i >= l) { return $caret(s, "."); } - var match = Caml_string.get(s, i); + let match = Caml_string.get(s, i); if (match >= 48) { if (match >= 58) { return s; @@ -175,11 +175,11 @@ function $at(l1, l2) { } } -var stdin = Caml_io.stdin; +let stdin = Caml_io.stdin; -var stdout = Caml_io.stdout; +let stdout = Caml_io.stdout; -var stderr = Caml_io.stderr; +let stderr = Caml_io.stderr; function open_out_gen(mode, perm, name) { return Caml_external_polyfill.resolve("caml_ml_open_descriptor_out")(Caml_external_polyfill.resolve("caml_sys_open")(name, mode, perm)); @@ -218,9 +218,9 @@ function open_out_bin(name) { } function flush_all(param) { - var _param = Caml_io.caml_ml_out_channels_list(undefined); + let _param = Caml_io.caml_ml_out_channels_list(undefined); while(true) { - var param$1 = _param; + let param$1 = _param; if (!param$1) { return ; } @@ -323,12 +323,12 @@ function input(ic, s, ofs, len) { function unsafe_really_input(ic, s, _ofs, _len) { while(true) { - var len = _len; - var ofs = _ofs; + let len = _len; + let ofs = _ofs; if (len <= 0) { return ; } - var r = Caml_external_polyfill.resolve("caml_ml_input")(ic, s, ofs, len); + let r = Caml_external_polyfill.resolve("caml_ml_input")(ic, s, ofs, len); if (r === 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { MEL_EXN_ID: Stdlib.End_of_file @@ -351,33 +351,33 @@ function really_input(ic, s, ofs, len) { } function really_input_string(ic, len) { - var s = Caml_bytes.caml_create_bytes(len); + let s = Caml_bytes.caml_create_bytes(len); really_input(ic, s, 0, len); return s; } function input_line(chan) { - var build_result = function (buf, _pos, _param) { + let build_result = function (buf, _pos, _param) { while(true) { - var param = _param; - var pos = _pos; + let param = _param; + let pos = _pos; if (!param) { return buf; } - var hd = param.hd; - var len = hd.length; + let hd = param.hd; + let len = hd.length; Caml_bytes.caml_blit_string(hd, 0, buf, pos - len | 0, len); _param = param.tl; _pos = pos - len | 0; continue ; }; }; - var _accu = /* [] */0; - var _len = 0; + let _accu = /* [] */0; + let _len = 0; while(true) { - var len = _len; - var accu = _accu; - var n = Caml_external_polyfill.resolve("caml_ml_input_scan_line")(chan); + let len = _len; + let accu = _accu; + let n = Caml_external_polyfill.resolve("caml_ml_input_scan_line")(chan); if (n === 0) { if (accu) { return build_result(Caml_bytes.caml_create_bytes(len), len, accu); @@ -387,19 +387,19 @@ function input_line(chan) { }); } if (n > 0) { - var res = Caml_bytes.caml_create_bytes(n - 1 | 0); + let res = Caml_bytes.caml_create_bytes(n - 1 | 0); Caml_external_polyfill.resolve("caml_ml_input")(chan, res, 0, n - 1 | 0); Caml_external_polyfill.resolve("caml_ml_input_char")(chan); if (!accu) { return res; } - var len$1 = (len + n | 0) - 1 | 0; + let len$1 = (len + n | 0) - 1 | 0; return build_result(Caml_bytes.caml_create_bytes(len$1), len$1, { hd: res, tl: accu }); } - var beg = Caml_bytes.caml_create_bytes(-n | 0); + let beg = Caml_bytes.caml_create_bytes(-n | 0); Caml_external_polyfill.resolve("caml_ml_input")(chan, beg, 0, -n | 0); _len = len - n | 0; _accu = { @@ -494,7 +494,7 @@ function read_float(param) { return Caml_format.caml_float_of_string((Caml_io.caml_ml_flush(stdout), input_line(stdin))); } -var LargeFile = {}; +let LargeFile = {}; function string_of_format(param) { return param._1; @@ -507,12 +507,12 @@ function $caret$caret(param, param$1) { }; } -var exit_function = { +let exit_function = { contents: flush_all }; function at_exit(f) { - var g = exit_function.contents; + let g = exit_function.contents; exit_function.contents = (function (param) { Curry._1(f, undefined); Curry._1(g, undefined); @@ -530,7 +530,7 @@ function exit(retcode) { Caml_external_polyfill.resolve("caml_register_named_value")("Pervasives.do_at_exit", do_at_exit); -var max_int = 2147483647; +let max_int = 2147483647; exports.failwith = failwith; exports.invalid_arg = invalid_arg; diff --git a/jscomp/test/dist/jscomp/test/test_pervasive.js b/jscomp/test/dist/jscomp/test/test_pervasive.js index 30ddaa6919..0b0960f4d5 100644 --- a/jscomp/test/dist/jscomp/test/test_pervasive.js +++ b/jscomp/test/dist/jscomp/test/test_pervasive.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var Stdlib$1 = { +let Stdlib$1 = { length: Stdlib__List.length, compare_lengths: Stdlib__List.compare_lengths, compare_length_with: Stdlib__List.compare_length_with, @@ -245,7 +245,7 @@ function a18(prim0, prim1) { return Math.pow(prim0, prim1); } -var f = Stdlib.$at; +let f = Stdlib.$at; exports.Stdlib = Stdlib$1; exports.f = f; diff --git a/jscomp/test/dist/jscomp/test/test_pervasives2.js b/jscomp/test/dist/jscomp/test/test_pervasives2.js index 11795c56b2..28e4d77e9d 100644 --- a/jscomp/test/dist/jscomp/test/test_pervasives2.js +++ b/jscomp/test/dist/jscomp/test/test_pervasives2.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Stack = require("melange/stack.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Stack = require("melange/stack.js"); -var List = { +let List = { length: Stdlib__List.length, compare_lengths: Stdlib__List.compare_lengths, compare_length_with: Stdlib__List.compare_length_with, @@ -170,7 +170,7 @@ var List = { do_domain_local_at_exit: Stdlib.do_domain_local_at_exit }; -var U = { +let U = { Empty: Stdlib__Stack.Empty, create: Stdlib__Stack.create, push: Stdlib__Stack.push, @@ -288,11 +288,11 @@ var U = { do_domain_local_at_exit: Stdlib.do_domain_local_at_exit }; -var f = Stdlib.$at; +let f = Stdlib.$at; -var ff = Stdlib__List.length; +let ff = Stdlib__List.length; -var fff = Stdlib.$at; +let fff = Stdlib.$at; exports.List = List; exports.U = U; diff --git a/jscomp/test/dist/jscomp/test/test_pervasives3.js b/jscomp/test/dist/jscomp/test/test_pervasives3.js index 2cbf585ce2..864484cd44 100644 --- a/jscomp/test/dist/jscomp/test/test_pervasives3.js +++ b/jscomp/test/dist/jscomp/test/test_pervasives3.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); -var Stdlib$1 = { +let Stdlib$1 = { invalid_arg: Stdlib.invalid_arg, failwith: Stdlib.failwith, Exit: Stdlib.Exit, @@ -170,7 +170,7 @@ var Stdlib$1 = { of_seq: Stdlib__List.of_seq }; -var v = Stdlib.$at; +let v = Stdlib.$at; exports.Stdlib = Stdlib$1; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/test_primitive.js b/jscomp/test/dist/jscomp/test/test_primitive.js index 1db0682339..5cd36c4a4a 100644 --- a/jscomp/test/dist/jscomp/test/test_primitive.js +++ b/jscomp/test/dist/jscomp/test/test_primitive.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var CamlinternalLazy = require("melange/camlinternalLazy.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_array = require("melange.js/caml_array.js"); +let CamlinternalLazy = require("melange/camlinternalLazy.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function a4(prim) { return [ @@ -32,18 +32,18 @@ function a6(prim) { ]; } -var test_float = 3; +let test_float = 3; -var test_abs = Math.abs(3.0); +let test_abs = Math.abs(3.0); -var v = [ +let v = [ 1.0, 2.0 ]; -var xxx = "a"; +let xxx = "a"; -var a = /* 'a' */97; +let a = /* 'a' */97; function u(b) { if (b) { @@ -60,7 +60,7 @@ function f2(h, b, param) { Caml_array.set(v, 1, 3.0); -var unboxed_x = { +let unboxed_x = { u: 0, v: 0 }; @@ -73,26 +73,26 @@ function f(x) { return x.length; } -var is_lazy_force = CamlinternalLazy.force; +let is_lazy_force = CamlinternalLazy.force; function fib(n) { if (n === 0 || n === 1) { return 1; } - var fib1 = fib(n - 1 | 0); - var fib2 = fib(n - 2 | 0); + let fib1 = fib(n - 1 | 0); + let fib2 = fib(n - 2 | 0); return (fib1 + fib2 | 0) + 3 | 0; } -var a0 = "File \"jscomp/test/test_primitive.ml\", line 25, characters 9-16"; +let a0 = "File \"jscomp/test/test_primitive.ml\", line 25, characters 9-16"; -var a1 = "Test_primitive"; +let a1 = "Test_primitive"; -var a2 = 27; +let a2 = 27; -var a3 = "Test_primitive"; +let a3 = "Test_primitive"; -var xx = [ +let xx = [ 0, 0 ]; diff --git a/jscomp/test/dist/jscomp/test/test_promise_bind.js b/jscomp/test/dist/jscomp/test/test_promise_bind.js index 0d1c831a3e..3c041cbc10 100644 --- a/jscomp/test/dist/jscomp/test/test_promise_bind.js +++ b/jscomp/test/dist/jscomp/test/test_promise_bind.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var $$Promise = require("./promise.js"); +let $$Promise = require("./promise.js"); -var v = $$Promise.f; +let v = $$Promise.f; exports.v = v; /* Promise Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_ramification.js b/jscomp/test/dist/jscomp/test/test_ramification.js index 03949a5fe3..7bede7c5f2 100644 --- a/jscomp/test/dist/jscomp/test/test_ramification.js +++ b/jscomp/test/dist/jscomp/test/test_ramification.js @@ -3,7 +3,7 @@ function ff(x) { - var a; + let a; switch (x) { case "0" : case "1" : @@ -26,28 +26,28 @@ function ff(x) { } function f(x) { - var y; + let y; y = x.TAG === /* A */0 ? 3 : 4; return y + 32 | 0; } function f2(x) { - var v = 0; - var y; + let v = 0; + let y; v = 1; if (x.TAG === /* A */0) { - var z = 33; + let z = 33; y = z + 3 | 0; } else { - var z$1 = 33; + let z$1 = 33; y = z$1 + 4 | 0; } return y + 32 | 0; } function f3(x) { - var v = 0; - var y; + let v = 0; + let y; v = 1; y = x.TAG === /* A */0 ? 3 : 4; return y + 32 | 0; diff --git a/jscomp/test/dist/jscomp/test/test_react.js b/jscomp/test/dist/jscomp/test/test_react.js index 3250395858..f4e9acfdd0 100644 --- a/jscomp/test/dist/jscomp/test/test_react.js +++ b/jscomp/test/dist/jscomp/test/test_react.js @@ -1,12 +1,12 @@ // Generated by Melange 'use strict'; -var C = require("a/b/c"); -var C$1 = require("b/c"); -var C$2 = require("c"); -var React = require("react"); -var ReactDom = require("react-dom"); -var Xxx = require("xxx"); +let C = require("a/b/c"); +let C$1 = require("b/c"); +let C$2 = require("c"); +let React = require("react"); +let ReactDom = require("react-dom"); +let Xxx = require("xxx"); console.log("hey"); @@ -34,9 +34,9 @@ function f(param) { C$2.y(); } -var v; +let v; -var u = 33; +let u = 33; exports.v = v; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/test_regex.js b/jscomp/test/dist/jscomp/test/test_regex.js index 2c1d2a7971..d98c85a7c4 100644 --- a/jscomp/test/dist/jscomp/test/test_regex.js +++ b/jscomp/test/dist/jscomp/test/test_regex.js @@ -2,11 +2,11 @@ 'use strict'; -var v = /b/ig; +let v = /b/ig; -var r = /Bucklescript是一个程序语言/; +let r = /Bucklescript是一个程序语言/; -var c = v; +let c = v; exports.v = v; exports.r = r; diff --git a/jscomp/test/dist/jscomp/test/test_require.js b/jscomp/test/dist/jscomp/test/test_require.js index 07ad702f88..8c03da8b73 100644 --- a/jscomp/test/dist/jscomp/test/test_require.js +++ b/jscomp/test/dist/jscomp/test/test_require.js @@ -2,12 +2,12 @@ 'use strict'; -var u = typeof require === "undefined" ? undefined : require; +let u = typeof require === "undefined" ? undefined : require; if (u !== undefined) { console.log(u.resolve("./test_require.js")); - var match = typeof module === "undefined" ? undefined : module; - var match$1 = u.main; + let match = typeof module === "undefined" ? undefined : module; + let match$1 = u.main; if (match !== undefined && match$1 !== undefined && match === match$1) { console.log("is main"); } else { diff --git a/jscomp/test/dist/jscomp/test/test_runtime_encoding.js b/jscomp/test/dist/jscomp/test/test_runtime_encoding.js index c02c27573b..5a4cf6a749 100644 --- a/jscomp/test/dist/jscomp/test/test_runtime_encoding.js +++ b/jscomp/test/dist/jscomp/test/test_runtime_encoding.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); +let Caml_array = require("melange.js/caml_array.js"); function g(x) { return [ @@ -41,7 +41,7 @@ function aaaa(x) { } function f(x) { - for(var i = 0; i <= 10; ++i){ + for(let i = 0; i <= 10; ++i){ Caml_array.set(x, i, i); } } diff --git a/jscomp/test/dist/jscomp/test/test_scope.js b/jscomp/test/dist/jscomp/test/test_scope.js index 406f56a8f3..80f2170ddd 100644 --- a/jscomp/test/dist/jscomp/test/test_scope.js +++ b/jscomp/test/dist/jscomp/test/test_scope.js @@ -2,9 +2,9 @@ 'use strict'; -var h = x(3); +let h = x(3); -var hh = x(3); +let hh = x(3); function f(x, y) { return x + y; diff --git a/jscomp/test/dist/jscomp/test/test_seq.js b/jscomp/test/dist/jscomp/test/test_seq.js index 9349bb7ba3..f4bd699179 100644 --- a/jscomp/test/dist/jscomp/test/test_seq.js +++ b/jscomp/test/dist/jscomp/test/test_seq.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); -var Bad = /* @__PURE__ */Caml_exceptions.create("Test_seq.Bad"); +let Bad = /* @__PURE__ */Caml_exceptions.create("Test_seq.Bad"); -var Help = /* @__PURE__ */Caml_exceptions.create("Test_seq.Help"); +let Help = /* @__PURE__ */Caml_exceptions.create("Test_seq.Help"); -var Stop = /* @__PURE__ */Caml_exceptions.create("Test_seq.Stop"); +let Stop = /* @__PURE__ */Caml_exceptions.create("Test_seq.Stop"); function assoc3(x, _l) { while(true) { - var l = _l; + let l = _l; if (l) { - var match = l.hd; + let match = l.hd; if (Caml_obj.caml_equal(match[0], x)) { return match[1]; } @@ -50,13 +50,13 @@ function f(g, speclist) { } function add_help(speclist) { - var add1; + let add1; try { assoc3("-help", speclist); add1 = /* [] */0; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { add1 = { hd: [ @@ -73,13 +73,13 @@ function add_help(speclist) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } - var add2; + let add2; try { assoc3("--help", speclist); add2 = /* [] */0; } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { add2 = { hd: [ diff --git a/jscomp/test/dist/jscomp/test/test_set.js b/jscomp/test/dist/jscomp/test/test_set.js index dc83162cf3..3b4dd451e7 100644 --- a/jscomp/test/dist/jscomp/test/test_set.js +++ b/jscomp/test/dist/jscomp/test/test_set.js @@ -1,22 +1,22 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); function Make(Ord) { - var height = function (param) { + let height = function (param) { if (param) { return param._3; } else { return 0; } }; - var create = function (l, v, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let create = function (l, v, r) { + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; return /* Node */{ _0: l, _1: v, @@ -24,14 +24,14 @@ function Make(Ord) { _3: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; }; - var bal = function (l, v, r) { - var hl = l ? l._3 : 0; - var hr = r ? r._3 : 0; + let bal = function (l, v, r) { + let hl = l ? l._3 : 0; + let hr = r ? r._3 : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l._2; - var lv = l._1; - var ll = l._0; + let lr = l._2; + let lv = l._1; + let ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -57,9 +57,9 @@ function Make(Ord) { }; } if (r) { - var rr = r._2; - var rv = r._1; - var rl = r._0; + let rr = r._2; + let rv = r._1; + let rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -76,7 +76,7 @@ function Make(Ord) { _1: "Set.bal" }); }; - var add = function (x, t) { + let add = function (x, t) { if (!t) { return /* Node */{ _0: /* Empty */0, @@ -85,10 +85,10 @@ function Make(Ord) { _3: 1 }; } - var r = t._2; - var v = t._1; - var l = t._0; - var c = Curry._2(Ord.compare, x, v); + let r = t._2; + let v = t._1; + let l = t._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return t; } else if (c < 0) { @@ -97,7 +97,7 @@ function Make(Ord) { return bal(l, v, add(x, r)); } }; - var singleton = function (x) { + let singleton = function (x) { return /* Node */{ _0: /* Empty */0, _1: x, @@ -105,29 +105,29 @@ function Make(Ord) { _3: 1 }; }; - var add_min_element = function (v, param) { + let add_min_element = function (v, param) { if (param) { return bal(add_min_element(v, param._0), param._1, param._2); } else { return singleton(v); } }; - var add_max_element = function (v, param) { + let add_max_element = function (v, param) { if (param) { return bal(param._0, param._1, add_max_element(v, param._2)); } else { return singleton(v); } }; - var join = function (l, v, r) { + let join = function (l, v, r) { if (!l) { return add_min_element(v, r); } if (!r) { return add_max_element(v, l); } - var rh = r._3; - var lh = l._3; + let rh = r._3; + let lh = l._3; if (lh > (rh + 2 | 0)) { return bal(l._0, l._1, join(l._2, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -136,11 +136,11 @@ function Make(Ord) { return create(l, v, r); } }; - var min_elt = function (_param) { + let min_elt = function (_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param._0; + let l = param._0; if (!l) { return param._1; } @@ -152,9 +152,9 @@ function Make(Ord) { }); }; }; - var max_elt = function (_param) { + let max_elt = function (_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param._2) { return param._1; @@ -167,9 +167,9 @@ function Make(Ord) { }); }; }; - var remove_min_elt = function (param) { + let remove_min_elt = function (param) { if (param) { - var l = param._0; + let l = param._0; if (l) { return bal(remove_min_elt(l), param._1, param._2); } else { @@ -181,7 +181,7 @@ function Make(Ord) { _1: "Set.remove_min_elt" }); }; - var merge = function (t1, t2) { + let merge = function (t1, t2) { if (t1) { if (t2) { return bal(t1, min_elt(t2), remove_min_elt(t2)); @@ -192,7 +192,7 @@ function Make(Ord) { return t2; } }; - var concat = function (t1, t2) { + let concat = function (t1, t2) { if (t1) { if (t2) { return join(t1, min_elt(t2), remove_min_elt(t2)); @@ -203,7 +203,7 @@ function Make(Ord) { return t2; } }; - var split = function (x, param) { + let split = function (x, param) { if (!param) { return [ /* Empty */0, @@ -211,10 +211,10 @@ function Make(Ord) { /* Empty */0 ]; } - var r = param._2; - var v = param._1; - var l = param._0; - var c = Curry._2(Ord.compare, x, v); + let r = param._2; + let v = param._1; + let l = param._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return [ l, @@ -223,34 +223,34 @@ function Make(Ord) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, match$1[0]), match$1[1], match$1[2] ]; }; - var is_empty = function (param) { + let is_empty = function (param) { if (param) { return false; } else { return true; } }; - var mem = function (x, _param) { + let mem = function (x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(Ord.compare, x, param._1); + let c = Curry._2(Ord.compare, x, param._1); if (c === 0) { return true; } @@ -258,14 +258,14 @@ function Make(Ord) { continue ; }; }; - var remove = function (x, param) { + let remove = function (x, param) { if (!param) { return /* Empty */0; } - var r = param._2; - var v = param._1; - var l = param._0; - var c = Curry._2(Ord.compare, x, v); + let r = param._2; + let v = param._1; + let l = param._0; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return merge(l, r); } else if (c < 0) { @@ -274,70 +274,70 @@ function Make(Ord) { return bal(l, v, remove(x, r)); } }; - var union = function (s1, s2) { + let union = function (s1, s2) { if (!s1) { return s2; } if (!s2) { return s1; } - var h2 = s2._3; - var v2 = s2._1; - var h1 = s1._3; - var v1 = s1._1; + let h2 = s2._3; + let v2 = s2._1; + let h1 = s1._3; + let v1 = s1._1; if (h1 >= h2) { if (h2 === 1) { return add(v2, s1); } - var match = split(v1, s2); + let match = split(v1, s2); return join(union(s1._0, match[0]), v1, union(s1._2, match[2])); } if (h1 === 1) { return add(v1, s2); } - var match$1 = split(v2, s1); + let match$1 = split(v2, s1); return join(union(match$1[0], s2._0), v2, union(match$1[2], s2._2)); }; - var inter = function (s1, s2) { + let inter = function (s1, s2) { if (!s1) { return /* Empty */0; } if (!s2) { return /* Empty */0; } - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return join(inter(l1, l2), v1, inter(r1, match[2])); } else { return concat(inter(l1, l2), inter(r1, match[2])); } }; - var diff = function (s1, s2) { + let diff = function (s1, s2) { if (!s1) { return /* Empty */0; } if (!s2) { return s1; } - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return concat(diff(l1, l2), diff(r1, match[2])); } else { return join(diff(l1, l2), v1, diff(r1, match[2])); } }; - var cons_enum = function (_s, _e) { + let cons_enum = function (_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -350,10 +350,10 @@ function Make(Ord) { continue ; }; }; - var compare_aux = function (_e1, _e2) { + let compare_aux = function (_e1, _e2) { while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -364,7 +364,7 @@ function Make(Ord) { if (!e2) { return 1; } - var c = Curry._2(Ord.compare, e1._0, e2._0); + let c = Curry._2(Ord.compare, e1._0, e2._0); if (c !== 0) { return c; } @@ -373,28 +373,28 @@ function Make(Ord) { continue ; }; }; - var compare = function (s1, s2) { + let compare = function (s1, s2) { return compare_aux(cons_enum(s1, /* End */0), cons_enum(s2, /* End */0)); }; - var equal = function (s1, s2) { + let equal = function (s1, s2) { return compare(s1, s2) === 0; }; - var subset = function (_s1, _s2) { + let subset = function (_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2._2; - var l2 = s2._0; - var r1 = s1._2; - var v1 = s1._1; - var l1 = s1._0; - var c = Curry._2(Ord.compare, v1, s2._1); + let r2 = s2._2; + let l2 = s2._0; + let r1 = s1._2; + let v1 = s1._1; + let l1 = s1._0; + let c = Curry._2(Ord.compare, v1, s2._1); if (c === 0) { if (!subset(l1, l2)) { return false; @@ -427,9 +427,9 @@ function Make(Ord) { continue ; }; }; - var iter = function (f, _param) { + let iter = function (f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -439,10 +439,10 @@ function Make(Ord) { continue ; }; }; - var fold = function (f, _s, _accu) { + let fold = function (f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -451,9 +451,9 @@ function Make(Ord) { continue ; }; }; - var for_all = function (p, _param) { + let for_all = function (p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -467,9 +467,9 @@ function Make(Ord) { continue ; }; }; - var exists = function (p, _param) { + let exists = function (p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -483,35 +483,35 @@ function Make(Ord) { continue ; }; }; - var filter = function (p, param) { + let filter = function (p, param) { if (!param) { return /* Empty */0; } - var v = param._1; - var l$p = filter(p, param._0); - var pv = Curry._1(p, v); - var r$p = filter(p, param._2); + let v = param._1; + let l$p = filter(p, param._0); + let pv = Curry._1(p, v); + let r$p = filter(p, param._2); if (pv) { return join(l$p, v, r$p); } else { return concat(l$p, r$p); } }; - var partition = function (p, param) { + let partition = function (p, param) { if (!param) { return [ /* Empty */0, /* Empty */0 ]; } - var v = param._1; - var match = partition(p, param._0); - var lf = match[1]; - var lt = match[0]; - var pv = Curry._1(p, v); - var match$1 = partition(p, param._2); - var rf = match$1[1]; - var rt = match$1[0]; + let v = param._1; + let match = partition(p, param._0); + let lf = match[1]; + let lt = match[0]; + let pv = Curry._1(p, v); + let match$1 = partition(p, param._2); + let rf = match$1[1]; + let rt = match$1[0]; if (pv) { return [ join(lt, v, rt), @@ -524,17 +524,17 @@ function Make(Ord) { ]; } }; - var cardinal = function (param) { + let cardinal = function (param) { if (param) { return (cardinal(param._0) + 1 | 0) + cardinal(param._2) | 0; } else { return 0; } }; - var elements_aux = function (_accu, _param) { + let elements_aux = function (_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -546,15 +546,15 @@ function Make(Ord) { continue ; }; }; - var elements = function (s) { + let elements = function (s) { return elements_aux(/* [] */0, s); }; - var find = function (x, _param) { + let find = function (x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param._1; - var c = Curry._2(Ord.compare, x, v); + let v = param._1; + let c = Curry._2(Ord.compare, x, v); if (c === 0) { return v; } @@ -566,8 +566,8 @@ function Make(Ord) { }); }; }; - var of_sorted_list = function (l) { - var sub = function (n, l) { + let of_sorted_list = function (l) { + let sub = function (n, l) { switch (n) { case 0 : return [ @@ -589,7 +589,7 @@ function Make(Ord) { break; case 2 : if (l) { - var match = l.tl; + let match = l.tl; if (match) { return [ /* Node */{ @@ -611,9 +611,9 @@ function Make(Ord) { break; case 3 : if (l) { - var match$1 = l.tl; + let match$1 = l.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return [ /* Node */{ @@ -643,11 +643,11 @@ function Make(Ord) { default: } - var nl = n / 2 | 0; - var match$3 = sub(nl, l); - var l$1 = match$3[1]; + let nl = n / 2 | 0; + let match$3 = sub(nl, l); + let l$1 = match$3[1]; if (l$1) { - var match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); + let match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); return [ create(match$3[0], l$1.hd, match$4[0]), match$4[1] @@ -664,27 +664,27 @@ function Make(Ord) { }; return sub(Stdlib__List.length(l), l)[0]; }; - var of_list = function (l) { + let of_list = function (l) { if (!l) { return /* Empty */0; } - var match = l.tl; - var x0 = l.hd; + let match = l.tl; + let x0 = l.hd; if (!match) { return singleton(x0); } - var match$1 = match.tl; - var x1 = match.hd; + let match$1 = match.tl; + let x1 = match.hd; if (!match$1) { return add(x1, singleton(x0)); } - var match$2 = match$1.tl; - var x2 = match$1.hd; + let match$2 = match$1.tl; + let x2 = match$1.hd; if (!match$2) { return add(x2, add(x1, singleton(x0))); } - var match$3 = match$2.tl; - var x3 = match$2.hd; + let match$3 = match$2.tl; + let x3 = match$2.hd; if (match$3) { if (match$3.tl) { return of_sorted_list(Stdlib__List.sort_uniq(Ord.compare, l)); @@ -738,7 +738,7 @@ function Make(Ord) { }; } -var N = { +let N = { a: 3 }; diff --git a/jscomp/test/dist/jscomp/test/test_side_effect_functor.js b/jscomp/test/dist/jscomp/test/test_side_effect_functor.js index a85dd55b57..5872a6cc7a 100644 --- a/jscomp/test/dist/jscomp/test/test_side_effect_functor.js +++ b/jscomp/test/dist/jscomp/test/test_side_effect_functor.js @@ -2,7 +2,7 @@ 'use strict'; -var v = 0; +let v = 0; v = v + 1 | 0; @@ -12,7 +12,7 @@ function unuse_v(param) { return 35; } -var h = unuse_v; +let h = unuse_v; exports.h = h; /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/test_simple_include.js b/jscomp/test/dist/jscomp/test/test_simple_include.js index 5d0f8f74de..814e620aab 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_include.js +++ b/jscomp/test/dist/jscomp/test/test_simple_include.js @@ -1,109 +1,109 @@ // Generated by Melange 'use strict'; -var Stdlib__Array = require("melange/array.js"); +let Stdlib__Array = require("melange/array.js"); -var v = { +let v = { contents: 32 }; v.contents = 0; -var N = { +let N = { a: 3, v: v }; -var v$1 = { +let v$1 = { contents: 32 }; -var NN = { +let NN = { a: 3, v: v$1 }; -var init = Stdlib__Array.init; +let init = Stdlib__Array.init; -var make_matrix = Stdlib__Array.make_matrix; +let make_matrix = Stdlib__Array.make_matrix; -var append = Stdlib__Array.append; +let append = Stdlib__Array.append; -var concat = Stdlib__Array.concat; +let concat = Stdlib__Array.concat; -var sub = Stdlib__Array.sub; +let sub = Stdlib__Array.sub; -var copy = Stdlib__Array.copy; +let copy = Stdlib__Array.copy; -var fill = Stdlib__Array.fill; +let fill = Stdlib__Array.fill; -var blit = Stdlib__Array.blit; +let blit = Stdlib__Array.blit; -var to_list = Stdlib__Array.to_list; +let to_list = Stdlib__Array.to_list; -var of_list = Stdlib__Array.of_list; +let of_list = Stdlib__Array.of_list; -var iter = Stdlib__Array.iter; +let iter = Stdlib__Array.iter; -var iteri = Stdlib__Array.iteri; +let iteri = Stdlib__Array.iteri; -var map = Stdlib__Array.map; +let map = Stdlib__Array.map; -var map_inplace = Stdlib__Array.map_inplace; +let map_inplace = Stdlib__Array.map_inplace; -var mapi = Stdlib__Array.mapi; +let mapi = Stdlib__Array.mapi; -var mapi_inplace = Stdlib__Array.mapi_inplace; +let mapi_inplace = Stdlib__Array.mapi_inplace; -var fold_left = Stdlib__Array.fold_left; +let fold_left = Stdlib__Array.fold_left; -var fold_left_map = Stdlib__Array.fold_left_map; +let fold_left_map = Stdlib__Array.fold_left_map; -var fold_right = Stdlib__Array.fold_right; +let fold_right = Stdlib__Array.fold_right; -var iter2 = Stdlib__Array.iter2; +let iter2 = Stdlib__Array.iter2; -var map2 = Stdlib__Array.map2; +let map2 = Stdlib__Array.map2; -var for_all = Stdlib__Array.for_all; +let for_all = Stdlib__Array.for_all; -var exists = Stdlib__Array.exists; +let exists = Stdlib__Array.exists; -var for_all2 = Stdlib__Array.for_all2; +let for_all2 = Stdlib__Array.for_all2; -var exists2 = Stdlib__Array.exists2; +let exists2 = Stdlib__Array.exists2; -var mem = Stdlib__Array.mem; +let mem = Stdlib__Array.mem; -var memq = Stdlib__Array.memq; +let memq = Stdlib__Array.memq; -var find_opt = Stdlib__Array.find_opt; +let find_opt = Stdlib__Array.find_opt; -var find_index = Stdlib__Array.find_index; +let find_index = Stdlib__Array.find_index; -var find_map = Stdlib__Array.find_map; +let find_map = Stdlib__Array.find_map; -var find_mapi = Stdlib__Array.find_mapi; +let find_mapi = Stdlib__Array.find_mapi; -var split = Stdlib__Array.split; +let split = Stdlib__Array.split; -var combine = Stdlib__Array.combine; +let combine = Stdlib__Array.combine; -var sort = Stdlib__Array.sort; +let sort = Stdlib__Array.sort; -var stable_sort = Stdlib__Array.stable_sort; +let stable_sort = Stdlib__Array.stable_sort; -var fast_sort = Stdlib__Array.fast_sort; +let fast_sort = Stdlib__Array.fast_sort; -var to_seq = Stdlib__Array.to_seq; +let to_seq = Stdlib__Array.to_seq; -var to_seqi = Stdlib__Array.to_seqi; +let to_seqi = Stdlib__Array.to_seqi; -var of_seq = Stdlib__Array.of_seq; +let of_seq = Stdlib__Array.of_seq; -var Floatarray = Stdlib__Array.Floatarray; +let Floatarray = Stdlib__Array.Floatarray; -var a = 3; +let a = 3; exports.init = init; exports.make_matrix = make_matrix; diff --git a/jscomp/test/dist/jscomp/test/test_simple_obj.js b/jscomp/test/dist/jscomp/test/test_simple_obj.js index 70b878c661..6efc6688fd 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_obj.js +++ b/jscomp/test/dist/jscomp/test/test_simple_obj.js @@ -1,33 +1,33 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_oo_curry = require("melange.js/caml_oo_curry.js"); -var CamlinternalOO = require("melange/camlinternalOO.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_oo_curry = require("melange.js/caml_oo_curry.js"); +let CamlinternalOO = require("melange/camlinternalOO.js"); -var shared = ["add"]; +let shared = ["add"]; -var $$class = CamlinternalOO.create_table([ +let $$class = CamlinternalOO.create_table([ "hi", "id1", "id2", "hello" ]); -var ids = CamlinternalOO.get_method_labels($$class, [ +let ids = CamlinternalOO.get_method_labels($$class, [ "id2", "id1", "hi", "hello" ]); -var id2 = ids[0]; +let id2 = ids[0]; -var id1 = ids[1]; +let id1 = ids[1]; -var hi = ids[2]; +let hi = ids[2]; -var hello = ids[3]; +let hello = ids[3]; CamlinternalOO.set_methods($$class, [ hi, @@ -50,11 +50,11 @@ CamlinternalOO.set_methods($$class, [ CamlinternalOO.init_class($$class); -var u = CamlinternalOO.create_object_opt(undefined, $$class); +let u = CamlinternalOO.create_object_opt(undefined, $$class); -var $$class$1 = CamlinternalOO.create_table(["id"]); +let $$class$1 = CamlinternalOO.create_table(["id"]); -var id = CamlinternalOO.get_method_label($$class$1, "id"); +let id = CamlinternalOO.get_method_label($$class$1, "id"); CamlinternalOO.set_method($$class$1, id, (function (self$2) { return "uu"; @@ -62,11 +62,11 @@ CamlinternalOO.set_method($$class$1, id, (function (self$2) { CamlinternalOO.init_class($$class$1); -var uu = CamlinternalOO.create_object_opt(undefined, $$class$1); +let uu = CamlinternalOO.create_object_opt(undefined, $$class$1); -var $$class$2 = CamlinternalOO.create_table(shared); +let $$class$2 = CamlinternalOO.create_table(shared); -var add = CamlinternalOO.get_method_label($$class$2, "add"); +let add = CamlinternalOO.get_method_label($$class$2, "add"); CamlinternalOO.set_method($$class$2, add, (function (self$3, x, y) { return x + y | 0; @@ -74,11 +74,11 @@ CamlinternalOO.set_method($$class$2, add, (function (self$3, x, y) { CamlinternalOO.init_class($$class$2); -var uuu = CamlinternalOO.create_object_opt(undefined, $$class$2); +let uuu = CamlinternalOO.create_object_opt(undefined, $$class$2); -var $$class$3 = CamlinternalOO.create_table(shared); +let $$class$3 = CamlinternalOO.create_table(shared); -var add$1 = CamlinternalOO.get_method_label($$class$3, "add"); +let add$1 = CamlinternalOO.get_method_label($$class$3, "add"); CamlinternalOO.set_method($$class$3, add$1, (function (self$4, x, y) { return x + y | 0; @@ -86,7 +86,7 @@ CamlinternalOO.set_method($$class$3, add$1, (function (self$4, x, y) { CamlinternalOO.init_class($$class$3); -var v = CamlinternalOO.create_object_opt(undefined, $$class$3); +let v = CamlinternalOO.create_object_opt(undefined, $$class$3); function test(param) { if (Caml_oo_curry.js1(23515, 1, uu) !== "uu") { diff --git a/jscomp/test/dist/jscomp/test/test_simple_pattern_match.js b/jscomp/test/dist/jscomp/test/test_simple_pattern_match.js index 8f8c6cd4a5..c191323a35 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_pattern_match.js +++ b/jscomp/test/dist/jscomp/test/test_simple_pattern_match.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__Sys = require("melange/sys.js"); +let Stdlib__Sys = require("melange/sys.js"); -var match; +let match; switch (Stdlib__Sys.os_type) { case "Cygwin" : @@ -20,9 +20,9 @@ switch (Stdlib__Sys.os_type) { ]; } -var a = match[0]; +let a = match[0]; -var b = match[1]; +let b = match[1]; exports.a = a; exports.b = b; diff --git a/jscomp/test/dist/jscomp/test/test_simple_ref.js b/jscomp/test/dist/jscomp/test/test_simple_ref.js index c13c075991..3304e87423 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_ref.js +++ b/jscomp/test/dist/jscomp/test/test_simple_ref.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); -var v = { +let v = { contents: 0 }; @@ -12,23 +12,23 @@ function gen(param) { return v.contents; } -var h = { +let h = { contents: 0 }; -var a = 0; +let a = 0; -var c = { +let c = { contents: 0 }; -var not_real_escape = a; +let not_real_escape = a; function real_escape(f, v) { return Curry._1(f, c); } -var u = h; +let u = h; exports.u = u; exports.gen = gen; diff --git a/jscomp/test/dist/jscomp/test/test_simple_tailcall.js b/jscomp/test/dist/jscomp/test/test_simple_tailcall.js index bccd193bf7..63c8f2428f 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_tailcall.js +++ b/jscomp/test/dist/jscomp/test/test_simple_tailcall.js @@ -18,12 +18,12 @@ function non_length(x) { function length(_acc, _x) { while(true) { - var x = _x; - var acc = _acc; + let x = _x; + let acc = _acc; if (!x) { return acc; } - var match = x.tl; + let match = x.tl; if (match) { return 1 + length(acc + 1 | 0, match.tl) | 0; } diff --git a/jscomp/test/dist/jscomp/test/test_small.js b/jscomp/test/dist/jscomp/test/test_small.js index 61029b7fcc..d93e920bb7 100644 --- a/jscomp/test/dist/jscomp/test/test_small.js +++ b/jscomp/test/dist/jscomp/test/test_small.js @@ -2,9 +2,9 @@ 'use strict'; -var fib = 3; +let fib = 3; -var u = 3; +let u = 3; exports.fib = fib; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/test_sprintf.js b/jscomp/test/dist/jscomp/test/test_sprintf.js index 6f84211c8b..220ddee63d 100644 --- a/jscomp/test/dist/jscomp/test/test_sprintf.js +++ b/jscomp/test/dist/jscomp/test/test_sprintf.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Stdlib__Printf = require("melange/printf.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Printf = require("melange/printf.js"); console.error(Curry._2(Stdlib__Printf.sprintf(/* Format */{ _0: { diff --git a/jscomp/test/dist/jscomp/test/test_stack.js b/jscomp/test/dist/jscomp/test/test_stack.js index 31e21daa18..30fa2f6eba 100644 --- a/jscomp/test/dist/jscomp/test/test_stack.js +++ b/jscomp/test/dist/jscomp/test/test_stack.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); +let Caml_obj = require("melange.js/caml_obj.js"); function v(x) { return Caml_obj.caml_equal(x.c, /* [] */0); diff --git a/jscomp/test/dist/jscomp/test/test_static_catch_ident.js b/jscomp/test/dist/jscomp/test/test_static_catch_ident.js index 44ea7e1249..759be1f458 100644 --- a/jscomp/test/dist/jscomp/test/test_static_catch_ident.js +++ b/jscomp/test/dist/jscomp/test/test_static_catch_ident.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Stdlib = require("melange/stdlib.js"); -var Scan_failure = /* @__PURE__ */Caml_exceptions.create("Test_static_catch_ident.Scan_failure"); +let Scan_failure = /* @__PURE__ */Caml_exceptions.create("Test_static_catch_ident.Scan_failure"); function scanf_bad_input(ib, x) { - var s; + let s; if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure) { s = x._1; } else { throw new Caml_js_exceptions.MelangeError(x.MEL_EXN_ID, x); } - for(var _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/dist/jscomp/test/test_string.js b/jscomp/test/dist/jscomp/test/test_string.js index ec6cab581c..c290d11729 100644 --- a/jscomp/test/dist/jscomp/test/test_string.js +++ b/jscomp/test/dist/jscomp/test/test_string.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_string = require("melange.js/caml_string.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_string = require("melange.js/caml_string.js"); function f(param) { switch (param) { @@ -43,7 +43,7 @@ function h(s, b) { } } -var v = 2; +let v = 2; exports.f = f; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/test_string_case.js b/jscomp/test/dist/jscomp/test/test_string_case.js index ea9f125a0a..3f3c232ecf 100644 --- a/jscomp/test/dist/jscomp/test/test_string_case.js +++ b/jscomp/test/dist/jscomp/test/test_string_case.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function f(param) { switch (param) { diff --git a/jscomp/test/dist/jscomp/test/test_string_const.js b/jscomp/test/dist/jscomp/test/test_string_const.js index 2c452936bf..7d2a595319 100644 --- a/jscomp/test/dist/jscomp/test/test_string_const.js +++ b/jscomp/test/dist/jscomp/test/test_string_const.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Stdlib = require("melange/stdlib.js"); -var hh; +let hh; try { hh = Caml_string.get("ghsogh", -3); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { console.log(exn._1); hh = /* 'a' */97; @@ -20,7 +20,7 @@ catch (raw_exn){ } } -var f = /* 'o' */111; +let f = /* 'o' */111; exports.f = f; exports.hh = hh; diff --git a/jscomp/test/dist/jscomp/test/test_string_map.js b/jscomp/test/dist/jscomp/test/test_string_map.js index 05c66a358f..483d388bfe 100644 --- a/jscomp/test/dist/jscomp/test/test_string_map.js +++ b/jscomp/test/dist/jscomp/test/test_string_map.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml = require("melange.js/caml.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); -var compare = Caml.caml_string_compare; +let compare = Caml.caml_string_compare; -var funarg = { +let funarg = { compare: compare }; @@ -21,8 +21,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -33,14 +33,14 @@ function create(l, x, d, r) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -67,10 +67,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -98,11 +98,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -117,14 +117,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -134,9 +134,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -156,16 +156,16 @@ function timing(label, f) { } function assertion_test(param) { - var m = { + let m = { contents: /* Empty */0 }; timing("building", (function (param) { - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ m.contents = Curry._3(add, String(i), String(i), m.contents); } })); timing("querying", (function (param) { - for(var i = 0; i <= 1000000; ++i){ + for(let i = 0; i <= 1000000; ++i){ Curry._2(find, String(i), m.contents); } })); diff --git a/jscomp/test/dist/jscomp/test/test_string_switch.js b/jscomp/test/dist/jscomp/test/test_string_switch.js index 82a3817e59..49cd0efda6 100644 --- a/jscomp/test/dist/jscomp/test/test_string_switch.js +++ b/jscomp/test/dist/jscomp/test/test_string_switch.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Stdlib__Sys = require("melange/sys.js"); +let Stdlib__Sys = require("melange/sys.js"); -var os_version; +let os_version; switch (Stdlib__Sys.os_type) { case "Cygwin" : diff --git a/jscomp/test/dist/jscomp/test/test_switch.js b/jscomp/test/dist/jscomp/test/test_switch.js index 6f89ec4504..a90c4724cf 100644 --- a/jscomp/test/dist/jscomp/test/test_switch.js +++ b/jscomp/test/dist/jscomp/test/test_switch.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function f(param) { if (typeof param === "number") { diff --git a/jscomp/test/dist/jscomp/test/test_trywith.js b/jscomp/test/dist/jscomp/test/test_trywith.js index 4a5469fa60..fd6b15dd89 100644 --- a/jscomp/test/dist/jscomp/test/test_trywith.js +++ b/jscomp/test/dist/jscomp/test/test_trywith.js @@ -1,16 +1,16 @@ // Generated by Melange 'use strict'; -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function ff(g, x) { try { Curry._1(g, x); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID !== Stdlib.Not_found) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -20,7 +20,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID !== Stdlib.Out_of_memory) { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } @@ -30,7 +30,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$2){ - var exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); + let exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); if (exn$2.MEL_EXN_ID !== Stdlib.Sys_error) { throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); } @@ -40,7 +40,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$3){ - var exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + let exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID !== Stdlib.Invalid_argument) { throw new Caml_js_exceptions.MelangeError(exn$3.MEL_EXN_ID, exn$3); } @@ -50,7 +50,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$4){ - var exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); + let exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); if (exn$4.MEL_EXN_ID !== Stdlib.End_of_file) { throw new Caml_js_exceptions.MelangeError(exn$4.MEL_EXN_ID, exn$4); } @@ -60,7 +60,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$5){ - var exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); + let exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); if (exn$5.MEL_EXN_ID !== Stdlib.Match_failure) { throw new Caml_js_exceptions.MelangeError(exn$5.MEL_EXN_ID, exn$5); } @@ -70,7 +70,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$6){ - var exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); + let exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); if (exn$6.MEL_EXN_ID !== Stdlib.Stack_overflow) { throw new Caml_js_exceptions.MelangeError(exn$6.MEL_EXN_ID, exn$6); } @@ -80,7 +80,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$7){ - var exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); + let exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); if (exn$7.MEL_EXN_ID !== Stdlib.Sys_blocked_io) { throw new Caml_js_exceptions.MelangeError(exn$7.MEL_EXN_ID, exn$7); } @@ -90,7 +90,7 @@ function ff(g, x) { Curry._1(g, x); } catch (raw_exn$8){ - var exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); + let exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); if (exn$8.MEL_EXN_ID !== Stdlib.Assert_failure) { throw new Caml_js_exceptions.MelangeError(exn$8.MEL_EXN_ID, exn$8); } @@ -100,7 +100,7 @@ function ff(g, x) { return Curry._1(g, x); } catch (raw_exn$9){ - var exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); + let exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); if (exn$9.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { return ; } @@ -131,9 +131,9 @@ function f(x) { }); } -var u1 = "bad character decimal encoding \\"; +let u1 = "bad character decimal encoding \\"; -var v = "bad character decimal encoding \\%c%c%c"; +let v = "bad character decimal encoding \\%c%c%c"; exports.ff = ff; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/test_tuple.js b/jscomp/test/dist/jscomp/test/test_tuple.js index eb83ff1819..d5c583ad92 100644 --- a/jscomp/test/dist/jscomp/test/test_tuple.js +++ b/jscomp/test/dist/jscomp/test/test_tuple.js @@ -2,11 +2,11 @@ 'use strict'; -var r = 0; +let r = 0; -for(var _k = 1; _k <= 10; ++_k){ - for(var i = 1; i <= 10; ++i){ - var match = i % 2 === 0 ? [ +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/jscomp/test/dist/jscomp/test/test_tuple_destructring.js b/jscomp/test/dist/jscomp/test/test_tuple_destructring.js index 65d90b3f35..cfcc3e1097 100644 --- a/jscomp/test/dist/jscomp/test/test_tuple_destructring.js +++ b/jscomp/test/dist/jscomp/test/test_tuple_destructring.js @@ -2,19 +2,19 @@ 'use strict'; -var N = { +let N = { b: 3 }; -var v = 3; +let v = 3; -var u = 3; +let u = 3; -var h = 4; +let h = 4; -var g = 3; +let g = 3; -var gg = 4; +let gg = 4; exports.N = N; exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/test_type_based_arity.js b/jscomp/test/dist/jscomp/test/test_type_based_arity.js index 4f27d06926..c39eac9f9f 100644 --- a/jscomp/test/dist/jscomp/test/test_type_based_arity.js +++ b/jscomp/test/dist/jscomp/test/test_type_based_arity.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function f0(g, x) { return Curry._1(g, x); @@ -11,7 +11,7 @@ function f1(g, x) { Curry._1(g, x); } -var X = {}; +let X = {}; function f2(g, x) { return Curry._1(g, x); @@ -37,7 +37,7 @@ function f7(g, x) { return Curry._1(g, x); } -var X0 = {}; +let X0 = {}; function f8(g, x) { return Curry._1(g, x); @@ -63,7 +63,7 @@ function f13(g, x) { return Curry._1(g, x); } -var X2 = { +let X2 = { f13: f13 }; diff --git a/jscomp/test/dist/jscomp/test/test_u.js b/jscomp/test/dist/jscomp/test/test_u.js index c1dccd6c1c..4476e7e274 100644 --- a/jscomp/test/dist/jscomp/test/test_u.js +++ b/jscomp/test/dist/jscomp/test/test_u.js @@ -3,8 +3,8 @@ function f(x) { - var v = x; - var sum = 0; + let v = x; + let sum = 0; while(v > 0) { sum = sum + v | 0; v = v - 1 | 0; diff --git a/jscomp/test/dist/jscomp/test/test_unsupported_primitive.js b/jscomp/test/dist/jscomp/test/test_unsupported_primitive.js index cd019ee670..121a8a014a 100644 --- a/jscomp/test/dist/jscomp/test/test_unsupported_primitive.js +++ b/jscomp/test/dist/jscomp/test/test_unsupported_primitive.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_external_polyfill = require("melange.js/caml_external_polyfill.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); function to_buffer(buff, ofs, len, v, flags) { if (ofs < 0 || len < 0 || ofs > (buff.length - len | 0)) { diff --git a/jscomp/test/dist/jscomp/test/test_while_closure.js b/jscomp/test/dist/jscomp/test/test_while_closure.js index ecffb386d2..c9820f51a9 100644 --- a/jscomp/test/dist/jscomp/test/test_while_closure.js +++ b/jscomp/test/dist/jscomp/test/test_while_closure.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var Caml_array = require("melange.js/caml_array.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib__Array = require("melange/array.js"); +let Caml_array = require("melange.js/caml_array.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib__Array = require("melange/array.js"); -var v = { +let v = { contents: 0 }; -var arr = Caml_array.make(10, (function (param) { +let arr = Caml_array.make(10, (function (param) { })); function f(param) { - var n = 0; + let n = 0; while(n < 10) { - var j = n; + let j = n; Caml_array.set(arr, j, (function(j){ return function (param) { v.contents = v.contents + j | 0; @@ -46,7 +46,7 @@ if (v.contents !== 45) { }); } -var count = 10; +let count = 10; exports.v = v; exports.count = count; diff --git a/jscomp/test/dist/jscomp/test/test_while_side_effect.js b/jscomp/test/dist/jscomp/test/test_while_side_effect.js index 2ad03a0231..1f5100ab56 100644 --- a/jscomp/test/dist/jscomp/test/test_while_side_effect.js +++ b/jscomp/test/dist/jscomp/test/test_while_side_effect.js @@ -2,7 +2,7 @@ 'use strict'; -var v = { +let v = { contents: 0 }; @@ -18,12 +18,12 @@ function fib(n) { } } -var x = { +let x = { contents: 3 }; while((function () { - var y = 3; + let y = 3; console.log(String(x.contents)); y = y + 1 | 0; x.contents = x.contents + 1 | 0; diff --git a/jscomp/test/dist/jscomp/test/test_zero_nullable.js b/jscomp/test/dist/jscomp/test/test_zero_nullable.js index 3c37e34b41..f5fa5b09ba 100644 --- a/jscomp/test/dist/jscomp/test/test_zero_nullable.js +++ b/jscomp/test/dist/jscomp/test/test_zero_nullable.js @@ -1,15 +1,15 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -47,7 +47,7 @@ function f2(x) { } function f5(h, x) { - var u = Curry._1(h, 32); + let u = Curry._1(h, 32); if (u !== null) { return u + 1 | 0; } else { @@ -56,8 +56,8 @@ function f5(h, x) { } function f4(h, x) { - var u = Curry._1(h, 32); - var v = 32 + x | 0; + let u = Curry._1(h, 32); + let v = 32 + x | 0; if (u !== null) { return u + 1 | 0; } else { @@ -85,7 +85,7 @@ function f8(x) { } } -var u = f8(undefined); +let u = f8(undefined); function f9(x) { if (x === null) { @@ -99,9 +99,9 @@ function f10(x) { return x === null; } -var f11 = false; +let f11 = false; -var Test_null = { +let Test_null = { f1: f1, f2: f2, f5: f5, @@ -132,7 +132,7 @@ function f2$1(x) { } function f5$1(h, x) { - var u = Curry._1(h, 32); + let u = Curry._1(h, 32); if (u !== undefined) { return u + 1 | 0; } else { @@ -141,8 +141,8 @@ function f5$1(h, x) { } function f4$1(h, x) { - var u = Curry._1(h, 32); - var v = 32 + x | 0; + let u = Curry._1(h, 32); + let v = 32 + x | 0; if (u !== undefined) { return u + 1 | 0; } else { @@ -170,7 +170,7 @@ function f8$1(x) { } } -var u$1 = f8$1(undefined); +let u$1 = f8$1(undefined); function f9$1(x) { if (x === undefined) { @@ -184,9 +184,9 @@ function f10$1(x) { return x === undefined; } -var f11$1 = false; +let f11$1 = false; -var Test_def = { +let Test_def = { f1: f1$1, f2: f2$1, f5: f5$1, @@ -217,7 +217,7 @@ function f2$2(x) { } function f5$2(h, x) { - var u = Curry._1(h, 32); + let u = Curry._1(h, 32); if (u == null) { return 3; } else { @@ -226,8 +226,8 @@ function f5$2(h, x) { } function f4$2(h, x) { - var u = Curry._1(h, 32); - var v = 32 + x | 0; + let u = Curry._1(h, 32); + let v = 32 + x | 0; if (u == null) { return 1 + v | 0; } else { @@ -253,7 +253,7 @@ function f8$2(x) { } } -var u$2 = f8$2(undefined); +let u$2 = f8$2(undefined); function f9$2(x) { if (x == null) { @@ -267,9 +267,9 @@ function f10$2(x) { return x == null; } -var f11$2 = false; +let f11$2 = false; -var Test_null_def = { +let Test_null_def = { f1: f1$2, f2: f2$2, f5: f5$2, diff --git a/jscomp/test/dist/jscomp/test/testing.js b/jscomp/test/dist/jscomp/test/testing.js index 8bbabf5567..84bedd6619 100644 --- a/jscomp/test/dist/jscomp/test/testing.js +++ b/jscomp/test/dist/jscomp/test/testing.js @@ -1,20 +1,20 @@ // Generated by Melange 'use strict'; -var Caml_io = require("melange.js/caml_io.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Scanf = require("melange/scanf.js"); +let Caml_io = require("melange.js/caml_io.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Scanf = require("melange/scanf.js"); -var all_tests_ok = { +let all_tests_ok = { contents: true }; function finish(param) { - var match = all_tests_ok.contents; + let match = all_tests_ok.contents; if (match) { console.log("\nAll tests succeeded."); } else { @@ -24,7 +24,7 @@ function finish(param) { Stdlib.at_exit(finish); -var test_num = { +let test_num = { contents: -1 }; @@ -114,7 +114,7 @@ function test_raises_exc_p(pred, f, x) { return false; } catch (raw_x){ - var x$1 = Caml_js_exceptions.internalToOCamlException(raw_x); + let x$1 = Caml_js_exceptions.internalToOCamlException(raw_x); if (Curry._1(pred, x$1)) { return true; } else { diff --git a/jscomp/test/dist/jscomp/test/tfloat_record_test.js b/jscomp/test/dist/jscomp/test/tfloat_record_test.js index 8bcecd9794..8ceee942ea 100644 --- a/jscomp/test/dist/jscomp/test/tfloat_record_test.js +++ b/jscomp/test/dist/jscomp/test/tfloat_record_test.js @@ -1,18 +1,18 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Float_array = require("./float_array.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Array = require("melange/array.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Format = require("melange/format.js"); +let Curry = require("melange.js/curry.js"); +let Float_array = require("./float_array.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Array = require("melange/array.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Format = require("melange/format.js"); -var buf = Stdlib__Buffer.create(50); +let buf = Stdlib__Buffer.create(50); -var fmt = Stdlib__Format.formatter_of_buffer(buf); +let fmt = Stdlib__Format.formatter_of_buffer(buf); function print_float(f) { Curry._1(Stdlib__Format.fprintf(fmt)(/* Format */{ @@ -36,7 +36,7 @@ function print_newline(param) { }); } -var s = { +let s = { f: 1.0 }; @@ -44,9 +44,9 @@ print_float(1.0); print_newline(undefined); -var b = Float_array.small_float_array(12); +let b = Float_array.small_float_array(12); -var c = Float_array.longer_float_array(34); +let c = Float_array.longer_float_array(34); function print_array(a) { Stdlib__Array.iter((function (f) { @@ -60,11 +60,11 @@ print_array(b[0]); print_array(c[0]); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; diff --git a/jscomp/test/dist/jscomp/test/ticker.js b/jscomp/test/dist/jscomp/test/ticker.js index 077fb332ae..8287db0823 100644 --- a/jscomp/test/dist/jscomp/test/ticker.js +++ b/jscomp/test/dist/jscomp/test/ticker.js @@ -1,35 +1,35 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Seq = require("melange/seq.js"); -var Stdlib__String = require("melange/string.js"); +let Caml = require("melange.js/caml.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Seq = require("melange/seq.js"); +let Stdlib__String = require("melange/string.js"); function split(delim, s) { - var len = s.length; + let len = s.length; if (len !== 0) { - var _l = /* [] */0; - var _i = len; + let _l = /* [] */0; + let _i = len; while(true) { - var i = _i; - var l = _l; + let i = _i; + let l = _l; if (i === 0) { return l; } - var i$p; + let i$p; try { i$p = Stdlib__String.rindex_from(s, i - 1 | 0, delim); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: Stdlib__String.sub(s, 0, i), @@ -38,12 +38,12 @@ function split(delim, s) { } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - var l_0 = Stdlib__String.sub(s, i$p + 1 | 0, (i - i$p | 0) - 1 | 0); - var l$1 = { + let l_0 = Stdlib__String.sub(s, i$p + 1 | 0, (i - i$p | 0) - 1 | 0); + let l$1 = { hd: l_0, tl: l }; - var l$2 = i$p === 0 ? ({ + let l$2 = i$p === 0 ? ({ hd: "", tl: l$1 }) : l$1; @@ -64,7 +64,7 @@ function string_of_float_option(param) { } } -var Util = { +let Util = { split: split, string_of_float_option: string_of_float_option }; @@ -114,9 +114,9 @@ function print_all_composite(all_tickers) { }), all_tickers); } -var compare = Caml_obj.caml_compare; +let compare = Caml_obj.caml_compare; -var funarg = { +let funarg = { compare: compare }; @@ -129,8 +129,8 @@ function height(param) { } function create(l, x, d, r) { - var hl = height(l); - var hr = height(r); + let hl = height(l); + let hr = height(r); return /* Node */{ l: l, v: x, @@ -151,14 +151,14 @@ function singleton(x, d) { } function bal(l, x, d, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var ld = l.d; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let ld = l.d; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } @@ -185,10 +185,10 @@ function bal(l, x, d, r) { }; } if (r) { - var rr = r.r; - var rd = r.d; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rd = r.d; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } @@ -224,11 +224,11 @@ function add(x, data, m) { h: 1 }; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (d === data) { return m; @@ -243,14 +243,14 @@ function add(x, data, m) { } } if (c < 0) { - var ll = add(x, data, l); + let ll = add(x, data, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = add(x, data, r); + let rr = add(x, data, r); if (r === rr) { return m; } else { @@ -260,9 +260,9 @@ function add(x, data, m) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return param.d; } @@ -277,24 +277,24 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -316,26 +316,26 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.l; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _d0 = param$1.d; @@ -353,24 +353,24 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -392,26 +392,26 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _d0 = param.d; - var _param$1 = param.r; + let _v0 = v; + let _d0 = param.d; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var d0 = _d0; - var v0 = _v0; + let param$1 = _param$1; + let d0 = _d0; + let v0 = _v0; if (!param$1) { return [ v0, d0 ]; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _d0 = param$1.d; @@ -429,11 +429,11 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return Caml_option.some(param.d); } @@ -444,11 +444,11 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -459,9 +459,9 @@ function mem(x, _param) { function min_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -479,11 +479,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return [ param.v, @@ -497,7 +497,7 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return [ @@ -516,7 +516,7 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -533,7 +533,7 @@ function max_binding_opt(_param) { function remove_min_binding(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_binding(l), param.v, param.d, param.r); } else { @@ -553,7 +553,7 @@ function merge(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return bal(t1, match[0], match[1], remove_min_binding(t2)); } @@ -561,23 +561,23 @@ function remove(x, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return merge(l, r); } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return m; } else { @@ -587,17 +587,17 @@ function remove(x, m) { function update(x, f, m) { if (m) { - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var c = Curry._2(funarg.compare, x, v); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { - var data = Curry._1(f, Caml_option.some(d)); + let data = Curry._1(f, Caml_option.some(d)); if (data === undefined) { return merge(l, r); } - var data$1 = Caml_option.valFromOption(data); + let data$1 = Caml_option.valFromOption(data); if (d === data$1) { return m; } else { @@ -611,21 +611,21 @@ function update(x, f, m) { } } if (c < 0) { - var ll = update(x, f, l); + let ll = update(x, f, l); if (l === ll) { return m; } else { return bal(ll, v, d, r); } } - var rr = update(x, f, r); + let rr = update(x, f, r); if (r === rr) { return m; } else { return bal(l, v, d, rr); } } - var data$2 = Curry._1(f, undefined); + let data$2 = Curry._1(f, undefined); if (data$2 !== undefined) { return /* Node */{ l: /* Empty */0, @@ -640,7 +640,7 @@ function update(x, f, m) { } function add_to_list(x, data, m) { - var add = function (param) { + let add = function (param) { if (param !== undefined) { return { hd: data, @@ -658,7 +658,7 @@ function add_to_list(x, data, m) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -673,9 +673,9 @@ function map(f, param) { if (!param) { return /* Empty */0; } - var l$p = map(f, param.l); - var d$p = Curry._1(f, param.d); - var r$p = map(f, param.r); + let l$p = map(f, param.l); + let d$p = Curry._1(f, param.d); + let r$p = map(f, param.r); return /* Node */{ l: l$p, v: param.v, @@ -689,10 +689,10 @@ function mapi(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = mapi(f, param.l); - var d$p = Curry._2(f, v, param.d); - var r$p = mapi(f, param.r); + let v = param.v; + let l$p = mapi(f, param.l); + let d$p = Curry._2(f, v, param.d); + let r$p = mapi(f, param.r); return /* Node */{ l: l$p, v: v, @@ -704,8 +704,8 @@ function mapi(f, param) { function fold(f, _m, _accu) { while(true) { - var accu = _accu; - var m = _m; + let accu = _accu; + let m = _m; if (!m) { return accu; } @@ -717,7 +717,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -734,7 +734,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -772,8 +772,8 @@ function join(l, v, d, r) { if (!r) { return add_max_binding(v, d, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, l.d, join(l.r, v, d, r)); } else if (rh > (lh + 2 | 0)) { @@ -790,7 +790,7 @@ function concat(t1, t2) { if (!t2) { return t1; } - var match = min_binding(t2); + let match = min_binding(t2); return join(t1, match[0], match[1], remove_min_binding(t2)); } @@ -810,11 +810,11 @@ function split$1(x, param) { /* Empty */0 ]; } - var r = param.r; - var d = param.d; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let d = param.d; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -823,14 +823,14 @@ function split$1(x, param) { ]; } if (c < 0) { - var match = split$1(x, l); + let match = split$1(x, l); return [ match[0], match[1], join(match[2], v, d, r) ]; } - var match$1 = split$1(x, r); + let match$1 = split$1(x, r); return [ join(l, v, d, match$1[0]), match$1[1], @@ -840,9 +840,9 @@ function split$1(x, param) { function merge$1(f, s1, s2) { if (s1) { - var v1 = s1.v; + let v1 = s1.v; if (s1.h >= height(s2)) { - var match = split$1(v1, s2); + let match = split$1(v1, s2); return concat_or_join(merge$1(f, s1.l, match[0]), v1, Curry._3(f, v1, Caml_option.some(s1.d), match[1]), merge$1(f, s1.r, match[2])); } @@ -850,8 +850,8 @@ function merge$1(f, s1, s2) { return /* Empty */0; } if (s2) { - var v2 = s2.v; - var match$1 = split$1(v2, s1); + let v2 = s2.v; + let match$1 = split$1(v2, s1); return concat_or_join(merge$1(f, match$1[0], s2.l), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2.d)), merge$1(f, match$1[2], s2.r)); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -871,25 +871,25 @@ function union(f, s1, s2) { if (!s2) { return s1; } - var d2 = s2.d; - var v2 = s2.v; - var d1 = s1.d; - var v1 = s1.v; + let d2 = s2.d; + let v2 = s2.v; + let d1 = s1.d; + let v1 = s1.v; if (s1.h >= s2.h) { - var match = split$1(v1, s2); - var d2$1 = match[1]; - var l = union(f, s1.l, match[0]); - var r = union(f, s1.r, match[2]); + let match = split$1(v1, s2); + let d2$1 = match[1]; + let l = union(f, s1.l, match[0]); + let r = union(f, s1.r, match[2]); if (d2$1 !== undefined) { return concat_or_join(l, v1, Curry._3(f, v1, d1, Caml_option.valFromOption(d2$1)), r); } else { return join(l, v1, d1, r); } } - var match$1 = split$1(v2, s1); - var d1$1 = match$1[1]; - var l$1 = union(f, match$1[0], s2.l); - var r$1 = union(f, match$1[2], s2.r); + let match$1 = split$1(v2, s1); + let d1$1 = match$1[1]; + let l$1 = union(f, match$1[0], s2.l); + let r$1 = union(f, match$1[2], s2.r); if (d1$1 !== undefined) { return concat_or_join(l$1, v2, Curry._3(f, v2, Caml_option.valFromOption(d1$1), d2), r$1); } else { @@ -901,13 +901,13 @@ function filter(p, m) { if (!m) { return /* Empty */0; } - var r = m.r; - var d = m.d; - var v = m.v; - var l = m.l; - var l$p = filter(p, l); - var pvd = Curry._2(p, v, d); - var r$p = filter(p, r); + let r = m.r; + let d = m.d; + let v = m.v; + let l = m.l; + let l$p = filter(p, l); + let pvd = Curry._2(p, v, d); + let r$p = filter(p, r); if (pvd) { if (l === l$p && r === r$p) { return m; @@ -923,10 +923,10 @@ function filter_map(f, param) { if (!param) { return /* Empty */0; } - var v = param.v; - var l$p = filter_map(f, param.l); - var fvd = Curry._2(f, v, param.d); - var r$p = filter_map(f, param.r); + let v = param.v; + let l$p = filter_map(f, param.l); + let fvd = Curry._2(f, v, param.d); + let r$p = filter_map(f, param.r); if (fvd !== undefined) { return join(l$p, v, Caml_option.valFromOption(fvd), r$p); } else { @@ -941,15 +941,15 @@ function partition(p, param) { /* Empty */0 ]; } - var d = param.d; - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pvd = Curry._2(p, v, d); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let d = param.d; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pvd = Curry._2(p, v, d); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pvd) { return [ join(lt, v, d, rt), @@ -965,8 +965,8 @@ function partition(p, param) { function cons_enum(_m, _e) { while(true) { - var e = _e; - var m = _m; + let e = _e; + let m = _m; if (!m) { return e; } @@ -982,11 +982,11 @@ function cons_enum(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -997,11 +997,11 @@ function compare$1(cmp, m1, m2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } - var c$1 = Curry._2(cmp, e1._1, e2._1); + let c$1 = Curry._2(cmp, e1._1, e2._1); if (c$1 !== 0) { return c$1; } @@ -1012,11 +1012,11 @@ function compare$1(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + let _e1 = cons_enum(m1, /* End */0); + let _e2 = cons_enum(m2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return false; @@ -1049,8 +1049,8 @@ function cardinal(param) { function bindings_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -1090,7 +1090,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._2, c._3); + let partial_arg = cons_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1103,7 +1103,7 @@ function seq_of_enum_(c, param) { } function to_seq(m) { - var partial_arg = cons_enum(m, /* End */0); + let partial_arg = cons_enum(m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1111,8 +1111,8 @@ function to_seq(m) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1131,7 +1131,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._2, c._3); + let partial_arg = snoc_enum(c._2, c._3); return /* Cons */{ _0: [ c._0, @@ -1144,24 +1144,24 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, m) { - var aux = function (low, _m, _c) { + let aux = function (low, _m, _c) { while(true) { - var c = _c; - var m = _m; + let c = _c; + let m = _m; if (!m) { return c; } - var r = m.r; - var d = m.d; - var v = m.v; - var n = Curry._2(funarg.compare, v, low); + let r = m.r; + let d = m.d; + let v = m.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1184,13 +1184,13 @@ function to_seq_from(low, m) { continue ; }; }; - var partial_arg = aux(low, m, /* End */0); + let partial_arg = aux(low, m, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var Ticker_map = { +let Ticker_map = { empty: /* Empty */0, add: add, add_to_list: add_to_list, @@ -1238,8 +1238,8 @@ var Ticker_map = { function compute_update_sequences(all_tickers) { Stdlib__List.fold_left((function (counter, ticker) { - var loop = function (counter, ticker) { - var rank = ticker.rank; + let loop = function (counter, ticker) { + let rank = ticker.rank; if (typeof rank !== "number") { return counter; } @@ -1247,18 +1247,18 @@ function compute_update_sequences(all_tickers) { return counter; } ticker.rank = /* Visited */1; - var match = ticker.type_; + let match = ticker.type_; if (match) { - var match$1 = match._0; - var counter$1 = loop(counter, match$1.lhs); - var counter$2 = loop(counter$1, match$1.rhs); - var counter$3 = counter$2 + 1 | 0; + let match$1 = match._0; + let counter$1 = loop(counter, match$1.lhs); + let counter$2 = loop(counter$1, match$1.rhs); + let counter$3 = counter$2 + 1 | 0; ticker.rank = /* Ranked */{ _0: counter$3 }; return counter$3; } - var counter$4 = counter + 1 | 0; + let counter$4 = counter + 1 | 0; ticker.rank = /* Ranked */{ _0: counter$4 }; @@ -1266,23 +1266,23 @@ function compute_update_sequences(all_tickers) { }; return loop(counter, ticker); }), 0, all_tickers); - var map = Stdlib__List.fold_left((function (map, ticker) { + let map = Stdlib__List.fold_left((function (map, ticker) { if (!ticker.type_) { return Curry._3(add, ticker.ticker_name, { hd: ticker, tl: /* [] */0 }, map); } - var loop = function (_up, _map, _ticker) { + let loop = function (_up, _map, _ticker) { while(true) { - var ticker = _ticker; - var map = _map; - var up = _up; - var type_ = ticker.type_; - var ticker_name = ticker.ticker_name; + let ticker = _ticker; + let map = _map; + let up = _up; + let type_ = ticker.type_; + let ticker_name = ticker.ticker_name; if (type_) { - var match = type_._0; - var map$1 = loop({ + let match = type_._0; + let map$1 = loop({ hd: ticker, tl: up }, map, match.lhs); @@ -1294,22 +1294,22 @@ function compute_update_sequences(all_tickers) { }; continue ; } - var l = Curry._2(find, ticker_name, map); + let l = Curry._2(find, ticker_name, map); return Curry._3(add, ticker_name, Stdlib.$at(up, l), map); }; }; return loop(/* [] */0, map, ticker); }), /* Empty */0, Stdlib__List.rev(all_tickers)); return Curry._3(fold, (function (k, l, map) { - var l$1 = Stdlib__List.sort_uniq((function (lhs, rhs) { - var x = lhs.rank; + let l$1 = Stdlib__List.sort_uniq((function (lhs, rhs) { + let x = lhs.rank; if (typeof x === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: "All nodes should be ranked" }); } - var y = rhs.rank; + let y = rhs.rank; if (typeof y === "number") { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", @@ -1323,14 +1323,14 @@ function compute_update_sequences(all_tickers) { } function process_quote(ticker_map, new_ticker, new_value) { - var update_sequence = Curry._2(find, new_ticker, ticker_map); + let update_sequence = Curry._2(find, new_ticker, ticker_map); Stdlib__List.iter((function (ticker) { - var match = ticker.type_; + let match = ticker.type_; if (match) { - var match$1 = match._0; - var match$2 = match$1.lhs.value; - var match$3 = match$1.rhs.value; - var value = match$2 !== undefined && match$3 !== undefined ? ( + let match$1 = match._0; + let match$2 = match$1.lhs.value; + let match$3 = match$1.rhs.value; + let value = match$2 !== undefined && match$3 !== undefined ? ( match$1.op ? match$2 - match$3 : match$2 + match$3 ) : undefined; ticker.value = value; @@ -1348,9 +1348,9 @@ function process_quote(ticker_map, new_ticker, new_value) { } function process_input_line(ticker_map, all_tickers, line) { - var make_binary_op = function (ticker_name, lhs, rhs, op) { - var lhs$1 = find_ticker_by_name(all_tickers, lhs); - var rhs$1 = find_ticker_by_name(all_tickers, rhs); + let make_binary_op = function (ticker_name, lhs, rhs, op) { + let lhs$1 = find_ticker_by_name(all_tickers, lhs); + let rhs$1 = find_ticker_by_name(all_tickers, rhs); return { value: undefined, rank: /* Uninitialized */0, @@ -1364,13 +1364,13 @@ function process_input_line(ticker_map, all_tickers, line) { } }; }; - var tokens = split(/* '|' */124, line); + let tokens = split(/* '|' */124, line); if (tokens) { switch (tokens.hd) { case "Q" : - var match = tokens.tl; + let match = tokens.tl; if (match) { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1) { if (match$1.tl) { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -1378,8 +1378,8 @@ function process_input_line(ticker_map, all_tickers, line) { _1: "Invalid input line" }); } - var ticker_map$1 = ticker_map !== undefined ? Caml_option.valFromOption(ticker_map) : compute_update_sequences(all_tickers); - var value = Caml_format.caml_float_of_string(match$1.hd); + let ticker_map$1 = ticker_map !== undefined ? Caml_option.valFromOption(ticker_map) : compute_update_sequences(all_tickers); + let value = Caml_format.caml_float_of_string(match$1.hd); process_quote(ticker_map$1, match.hd, value); return [ all_tickers, @@ -1396,16 +1396,16 @@ function process_input_line(ticker_map, all_tickers, line) { _1: "Invalid input line" }); case "R" : - var match$2 = tokens.tl; + let match$2 = tokens.tl; if (match$2) { - var match$3 = match$2.tl; + let match$3 = match$2.tl; if (match$3) { - var ticker_name = match$2.hd; + let ticker_name = match$2.hd; switch (match$3.hd) { case "+" : - var match$4 = match$3.tl; + let match$4 = match$3.tl; if (match$4) { - var match$5 = match$4.tl; + let match$5 = match$4.tl; if (match$5) { if (match$5.tl) { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -1431,9 +1431,9 @@ function process_input_line(ticker_map, all_tickers, line) { _1: "Invalid input line" }); case "-" : - var match$6 = match$3.tl; + let match$6 = match$3.tl; if (match$6) { - var match$7 = match$6.tl; + let match$7 = match$6.tl; if (match$7) { if (match$7.tl) { throw new Caml_js_exceptions.MelangeError("Failure", { @@ -1511,9 +1511,9 @@ function process_input_line(ticker_map, all_tickers, line) { function loop(_lines, _param) { while(true) { - var param = _param; - var lines = _lines; - var all_tickers = param[0]; + let param = _param; + let lines = _lines; + let all_tickers = param[0]; if (!lines) { return print_all_composite(all_tickers); } @@ -1523,7 +1523,7 @@ function loop(_lines, _param) { }; } -var lines = { +let lines = { hd: "R|MSFT|S", tl: { hd: "R|IBM|S", diff --git a/jscomp/test/dist/jscomp/test/to_string_test.js b/jscomp/test/dist/jscomp/test/to_string_test.js index 9f1d73d384..d0050179a8 100644 --- a/jscomp/test/dist/jscomp/test/to_string_test.js +++ b/jscomp/test/dist/jscomp/test/to_string_test.js @@ -1,10 +1,10 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var ff = Stdlib.string_of_float; +let ff = Stdlib.string_of_float; function f(v) { return String(v); diff --git a/jscomp/test/dist/jscomp/test/topsort_test.js b/jscomp/test/dist/jscomp/test/topsort_test.js index b7f61032f9..a18b2fd02d 100644 --- a/jscomp/test/dist/jscomp/test/topsort_test.js +++ b/jscomp/test/dist/jscomp/test/topsort_test.js @@ -1,17 +1,17 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_option = require("melange.js/caml_option.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Seq = require("melange/seq.js"); -var Stdlib__String = require("melange/string.js"); - -var graph = { +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Seq = require("melange/seq.js"); +let Stdlib__String = require("melange/string.js"); + +let graph = { hd: [ "a", "b" @@ -76,13 +76,13 @@ function nexts(x, g) { function dfs1(_nodes, graph, _visited) { while(true) { - var visited = _visited; - var nodes = _nodes; + let visited = _visited; + let nodes = _nodes; if (!nodes) { return Stdlib__List.rev(visited); } - var xs = nodes.tl; - var x = nodes.hd; + let xs = nodes.tl; + let x = nodes.hd; if (Stdlib__List.mem(x, visited)) { _nodes = xs; continue ; @@ -170,15 +170,15 @@ if (!Caml_obj.caml_equal(dfs1({ } function dfs2(nodes, graph, visited) { - var aux = function (_nodes, graph, _visited) { + let aux = function (_nodes, graph, _visited) { while(true) { - var visited = _visited; - var nodes = _nodes; + let visited = _visited; + let nodes = _nodes; if (!nodes) { return visited; } - var xs = nodes.tl; - var x = nodes.hd; + let xs = nodes.tl; + let x = nodes.hd; if (Stdlib__List.mem(x, visited)) { _nodes = xs; continue ; @@ -265,10 +265,10 @@ if (!Caml_obj.caml_equal(dfs2({ } function dfs3(nodes, graph) { - var visited = { + let visited = { contents: /* [] */0 }; - var aux = function (node, graph) { + let aux = function (node, graph) { if (!Stdlib__List.mem(node, visited.contents)) { visited.contents = { hd: node, @@ -356,7 +356,7 @@ if (!Caml_obj.caml_equal(dfs3({ }); } -var grwork = { +let grwork = { hd: [ "wake", "shower" @@ -395,14 +395,14 @@ var grwork = { }; function unsafe_topsort(graph) { - var visited = { + let visited = { contents: /* [] */0 }; - var sort_node = function (node) { + let sort_node = function (node) { if (Stdlib__List.mem(node, visited.contents)) { return ; } - var nodes = nexts(node, graph); + let nodes = nexts(node, graph); Stdlib__List.iter(sort_node, nodes); visited.contents = { hd: node, @@ -444,7 +444,7 @@ if (!Caml_obj.caml_equal(unsafe_topsort(grwork), { }); } -var funarg = { +let funarg = { compare: Stdlib__String.compare }; @@ -457,8 +457,8 @@ function height(param) { } function create(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; return /* Node */{ l: l, v: v, @@ -468,13 +468,13 @@ function create(l, v, r) { } function bal(l, v, r) { - var hl = l ? l.h : 0; - var hr = r ? r.h : 0; + let hl = l ? l.h : 0; + let hr = r ? r.h : 0; if (hl > (hr + 2 | 0)) { if (l) { - var lr = l.r; - var lv = l.v; - var ll = l.l; + let lr = l.r; + let lv = l.v; + let ll = l.l; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } @@ -500,9 +500,9 @@ function bal(l, v, r) { }; } if (r) { - var rr = r.r; - var rv = r.v; - var rl = r.l; + let rr = r.r; + let rv = r.v; + let rl = r.l; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } @@ -529,22 +529,22 @@ function add(x, t) { h: 1 }; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return t; } if (c < 0) { - var ll = add(x, l); + let ll = add(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = add(x, r); + let rr = add(x, r); if (r === rr) { return t; } else { @@ -584,8 +584,8 @@ function join(l, v, r) { if (!r) { return add_max_element(v, l); } - var rh = r.h; - var lh = l.h; + let rh = r.h; + let lh = l.h; if (lh > (rh + 2 | 0)) { return bal(l.l, l.v, join(l.r, v, r)); } else if (rh > (lh + 2 | 0)) { @@ -597,9 +597,9 @@ function join(l, v, r) { function min_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { - var l = param.l; + let l = param.l; if (!l) { return param.v; } @@ -614,11 +614,11 @@ function min_elt(_param) { function min_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var l = param.l; + let l = param.l; if (!l) { return Caml_option.some(param.v); } @@ -629,7 +629,7 @@ function min_elt_opt(_param) { function max_elt(_param) { while(true) { - var param = _param; + let param = _param; if (param) { if (!param.r) { return param.v; @@ -645,7 +645,7 @@ function max_elt(_param) { function max_elt_opt(_param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -659,7 +659,7 @@ function max_elt_opt(_param) { function remove_min_elt(param) { if (param) { - var l = param.l; + let l = param.l; if (l) { return bal(remove_min_elt(l), param.v, param.r); } else { @@ -692,10 +692,10 @@ function split(x, param) { /* Empty */0 ]; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return [ l, @@ -704,14 +704,14 @@ function split(x, param) { ]; } if (c < 0) { - var match = split(x, l); + let match = split(x, l); return [ match[0], match[1], join(match[2], v, r) ]; } - var match$1 = split(x, r); + let match$1 = split(x, r); return [ join(l, v, match$1[0]), match$1[1], @@ -729,11 +729,11 @@ function is_empty(param) { function mem(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } - var c = Curry._2(funarg.compare, x, param.v); + let c = Curry._2(funarg.compare, x, param.v); if (c === 0) { return true; } @@ -746,10 +746,10 @@ function remove(x, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var c = Curry._2(funarg.compare, x, v); + let r = t.r; + let v = t.v; + let l = t.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { if (l) { if (r) { @@ -762,14 +762,14 @@ function remove(x, t) { } } if (c < 0) { - var ll = remove(x, l); + let ll = remove(x, l); if (l === ll) { return t; } else { return bal(ll, v, r); } } - var rr = remove(x, r); + let rr = remove(x, r); if (r === rr) { return t; } else { @@ -784,21 +784,21 @@ function union(s1, s2) { if (!s2) { return s1; } - var h2 = s2.h; - var v2 = s2.v; - var h1 = s1.h; - var v1 = s1.v; + let h2 = s2.h; + let v2 = s2.v; + let h1 = s1.h; + let v1 = s1.v; if (h1 >= h2) { if (h2 === 1) { return add(v2, s1); } - var match = split(v1, s2); + let match = split(v1, s2); return join(union(s1.l, match[0]), v1, union(s1.r, match[2])); } if (h1 === 1) { return add(v1, s2); } - var match$1 = split(v2, s1); + let match$1 = split(v2, s1); return join(union(match$1[0], s2.l), v2, union(match$1[2], s2.r)); } @@ -809,11 +809,11 @@ function inter(s1, s2) { if (!s2) { return /* Empty */0; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return join(inter(l1, l2), v1, inter(r1, match[2])); } else { @@ -830,19 +830,19 @@ function split_bis(x, param) { }) }; } - var r = param.r; - var v = param.v; - var l = param.l; - var c = Curry._2(funarg.compare, x, v); + let r = param.r; + let v = param.v; + let l = param.l; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return /* Found */0; } if (c < 0) { - var match = split_bis(x, l); + let match = split_bis(x, l); if (!match) { return /* Found */0; } - var rl = match._1; + let rl = match._1; return /* NotFound */{ _0: match._0, _1: (function (param) { @@ -850,7 +850,7 @@ function split_bis(x, param) { }) }; } - var match$1 = split_bis(x, r); + let match$1 = split_bis(x, r); if (match$1) { return /* NotFound */{ _0: join(l, v, match$1._0), @@ -863,8 +863,8 @@ function split_bis(x, param) { function disjoint(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } @@ -874,7 +874,7 @@ function disjoint(_s1, _s2) { if (s1 === s2) { return false; } - var match = split_bis(s1.v, s2); + let match = split_bis(s1.v, s2); if (!match) { return false; } @@ -894,11 +894,11 @@ function diff(s1, s2) { if (!s2) { return s1; } - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var match = split(v1, s2); - var l2 = match[0]; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let match = split(v1, s2); + let l2 = match[0]; if (match[1]) { return concat(diff(l1, l2), diff(r1, match[2])); } else { @@ -908,8 +908,8 @@ function diff(s1, s2) { function cons_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -924,11 +924,11 @@ function cons_enum(_s, _e) { } function compare(s1, s2) { - var _e1 = cons_enum(s1, /* End */0); - var _e2 = cons_enum(s2, /* End */0); + let _e1 = cons_enum(s1, /* End */0); + let _e2 = cons_enum(s2, /* End */0); while(true) { - var e2 = _e2; - var e1 = _e1; + let e2 = _e2; + let e1 = _e1; if (!e1) { if (e2) { return -1; @@ -939,7 +939,7 @@ function compare(s1, s2) { if (!e2) { return 1; } - var c = Curry._2(funarg.compare, e1._0, e2._0); + let c = Curry._2(funarg.compare, e1._0, e2._0); if (c !== 0) { return c; } @@ -955,20 +955,20 @@ function equal(s1, s2) { function subset(_s1, _s2) { while(true) { - var s2 = _s2; - var s1 = _s1; + let s2 = _s2; + let s1 = _s1; if (!s1) { return true; } if (!s2) { return false; } - var r2 = s2.r; - var l2 = s2.l; - var r1 = s1.r; - var v1 = s1.v; - var l1 = s1.l; - var c = Curry._2(funarg.compare, v1, s2.v); + let r2 = s2.r; + let l2 = s2.l; + let r1 = s1.r; + let v1 = s1.v; + let l1 = s1.l; + let c = Curry._2(funarg.compare, v1, s2.v); if (c === 0) { if (!subset(l1, l2)) { return false; @@ -1004,7 +1004,7 @@ function subset(_s1, _s2) { function iter(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } @@ -1017,8 +1017,8 @@ function iter(f, _param) { function fold(f, _s, _accu) { while(true) { - var accu = _accu; - var s = _s; + let accu = _accu; + let s = _s; if (!s) { return accu; } @@ -1030,7 +1030,7 @@ function fold(f, _s, _accu) { function for_all(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return true; } @@ -1047,7 +1047,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return false; } @@ -1066,12 +1066,12 @@ function filter(p, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter(p, l); - var pv = Curry._1(p, v); - var r$p = filter(p, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter(p, l); + let pv = Curry._1(p, v); + let r$p = filter(p, r); if (pv) { if (l === l$p && r === r$p) { return t; @@ -1090,14 +1090,14 @@ function partition(p, param) { /* Empty */0 ]; } - var v = param.v; - var match = partition(p, param.l); - var lf = match[1]; - var lt = match[0]; - var pv = Curry._1(p, v); - var match$1 = partition(p, param.r); - var rf = match$1[1]; - var rt = match$1[0]; + let v = param.v; + let match = partition(p, param.l); + let lf = match[1]; + let lt = match[0]; + let pv = Curry._1(p, v); + let match$1 = partition(p, param.r); + let rf = match$1[1]; + let rt = match$1[0]; if (pv) { return [ join(lt, v, rt), @@ -1121,8 +1121,8 @@ function cardinal(param) { function elements_aux(_accu, _param) { while(true) { - var param = _param; - var accu = _accu; + let param = _param; + let accu = _accu; if (!param) { return accu; } @@ -1141,10 +1141,10 @@ function elements(s) { function find(x, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; - var c = Curry._2(funarg.compare, x, v); + let v = param.v; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return v; } @@ -1159,19 +1159,19 @@ function find(x, _param) { function find_first(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -1192,21 +1192,21 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.l; + let _v0 = v; + let _param$1 = param.l; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.l; _v0 = v$1; @@ -1223,19 +1223,19 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { - var param = _param; + let param = _param; if (param) { - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return v0; } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -1256,21 +1256,21 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; + let v = param.v; if (Curry._1(f, v)) { - var _v0 = v; - var _param$1 = param.r; + let _v0 = v; + let _param$1 = param.r; while(true) { - var param$1 = _param$1; - var v0 = _v0; + let param$1 = _param$1; + let v0 = _v0; if (!param$1) { return Caml_option.some(v0); } - var v$1 = param$1.v; + let v$1 = param$1.v; if (Curry._1(f, v$1)) { _param$1 = param$1.r; _v0 = v$1; @@ -1287,12 +1287,12 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { - var param = _param; + let param = _param; if (!param) { return ; } - var v = param.v; - var c = Curry._2(funarg.compare, x, v); + let v = param.v; + let c = Curry._2(funarg.compare, x, v); if (c === 0) { return Caml_option.some(v); } @@ -1313,12 +1313,12 @@ function map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = map(f, l); - var v$p = Curry._1(f, v); - var r$p = map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = map(f, l); + let v$p = Curry._1(f, v); + let r$p = map(f, r); if (l === l$p && v === v$p && r === r$p) { return t; } else { @@ -1330,12 +1330,12 @@ function filter_map(f, t) { if (!t) { return /* Empty */0; } - var r = t.r; - var v = t.v; - var l = t.l; - var l$p = filter_map(f, l); - var v$p = Curry._1(f, v); - var r$p = filter_map(f, r); + let r = t.r; + let v = t.v; + let l = t.l; + let l$p = filter_map(f, l); + let v$p = Curry._1(f, v); + let r$p = filter_map(f, r); if (v$p === undefined) { if (l$p) { if (r$p) { @@ -1347,7 +1347,7 @@ function filter_map(f, t) { return r$p; } } - var v$p$1 = Caml_option.valFromOption(v$p); + let v$p$1 = Caml_option.valFromOption(v$p); if (l === l$p && v === v$p$1 && r === r$p) { return t; } else { @@ -1359,27 +1359,27 @@ function of_list(l) { if (!l) { return /* Empty */0; } - var match = l.tl; - var x0 = l.hd; + let match = l.tl; + let x0 = l.hd; if (!match) { return singleton(x0); } - var match$1 = match.tl; - var x1 = match.hd; + let match$1 = match.tl; + let x1 = match.hd; if (!match$1) { return add(x1, singleton(x0)); } - var match$2 = match$1.tl; - var x2 = match$1.hd; + let match$2 = match$1.tl; + let x2 = match$1.hd; if (!match$2) { return add(x2, add(x1, singleton(x0))); } - var match$3 = match$2.tl; - var x3 = match$2.hd; + let match$3 = match$2.tl; + let x3 = match$2.hd; if (match$3) { if (match$3.tl) { - var l$1 = Stdlib__List.sort_uniq(funarg.compare, l); - var sub = function (n, l) { + let l$1 = Stdlib__List.sort_uniq(funarg.compare, l); + let sub = function (n, l) { switch (n) { case 0 : return [ @@ -1401,7 +1401,7 @@ function of_list(l) { break; case 2 : if (l) { - var match = l.tl; + let match = l.tl; if (match) { return [ /* Node */{ @@ -1423,9 +1423,9 @@ function of_list(l) { break; case 3 : if (l) { - var match$1 = l.tl; + let match$1 = l.tl; if (match$1) { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2) { return [ /* Node */{ @@ -1455,11 +1455,11 @@ function of_list(l) { default: } - var nl = n / 2 | 0; - var match$3 = sub(nl, l); - var l$1 = match$3[1]; + let nl = n / 2 | 0; + let match$3 = sub(nl, l); + let l$1 = match$3[1]; if (l$1) { - var match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); + let match$4 = sub((n - nl | 0) - 1 | 0, l$1.tl); return [ create(match$3[0], l$1.hd, match$4[0]), match$4[1] @@ -1497,7 +1497,7 @@ function seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = cons_enum(c._1, c._2); + let partial_arg = cons_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1507,7 +1507,7 @@ function seq_of_enum_(c, param) { } function to_seq(c) { - var partial_arg = cons_enum(c, /* End */0); + let partial_arg = cons_enum(c, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; @@ -1515,8 +1515,8 @@ function to_seq(c) { function snoc_enum(_s, _e) { while(true) { - var e = _e; - var s = _s; + let e = _e; + let s = _s; if (!s) { return e; } @@ -1534,7 +1534,7 @@ function rev_seq_of_enum_(c, param) { if (!c) { return /* Nil */0; } - var partial_arg = snoc_enum(c._1, c._2); + let partial_arg = snoc_enum(c._1, c._2); return /* Cons */{ _0: c._0, _1: (function (param) { @@ -1544,23 +1544,23 @@ function rev_seq_of_enum_(c, param) { } function to_rev_seq(c) { - var partial_arg = snoc_enum(c, /* End */0); + let partial_arg = snoc_enum(c, /* End */0); return function (param) { return rev_seq_of_enum_(partial_arg, param); }; } function to_seq_from(low, s) { - var aux = function (low, _s, _c) { + let aux = function (low, _s, _c) { while(true) { - var c = _c; - var s = _s; + let c = _c; + let s = _s; if (!s) { return c; } - var r = s.r; - var v = s.v; - var n = Curry._2(funarg.compare, v, low); + let r = s.r; + let v = s.v; + let n = Curry._2(funarg.compare, v, low); if (n === 0) { return /* More */{ _0: v, @@ -1581,13 +1581,13 @@ function to_seq_from(low, s) { continue ; }; }; - var partial_arg = aux(low, s, /* End */0); + let partial_arg = aux(low, s, /* End */0); return function (param) { return seq_of_enum_(partial_arg, param); }; } -var String_set = { +let String_set = { empty: /* Empty */0, add: add, singleton: singleton, @@ -1633,20 +1633,20 @@ var String_set = { of_seq: of_seq }; -var Cycle = /* @__PURE__ */Caml_exceptions.create("Topsort_test.Cycle"); +let Cycle = /* @__PURE__ */Caml_exceptions.create("Topsort_test.Cycle"); function pathsort(graph) { - var visited = { + let visited = { contents: /* [] */0 }; - var empty_path_0 = /* Empty */0; - var empty_path = [ + let empty_path_0 = /* Empty */0; + let empty_path = [ empty_path_0, /* [] */0 ]; - var $plus$great = function (node, param) { - var stack = param[1]; - var set = param[0]; + let $plus$great = function (node, param) { + let stack = param[1]; + let set = param[0]; if (Curry._2(mem, node, set)) { throw new Caml_js_exceptions.MelangeError(Cycle, { MEL_EXN_ID: Cycle, @@ -1664,12 +1664,12 @@ function pathsort(graph) { } ]; }; - var sort_nodes = function (path, nodes) { + let sort_nodes = function (path, nodes) { Stdlib__List.iter((function (node) { sort_node(path, node); }), nodes); }; - var sort_node = function (path, node) { + let sort_node = function (path, node) { if (!Stdlib__List.mem(node, visited.contents)) { sort_nodes($plus$great(node, path), nexts(node, graph)); visited.contents = { @@ -1733,16 +1733,16 @@ try { }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - var exit = 0; + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exit = 0; if (exn.MEL_EXN_ID === Cycle) { - var match = exn._1; + let match = exn._1; if (match && match.hd === "go") { - var match$1 = match.tl; + let match$1 = match.tl; if (match$1 && match$1.hd === "washup") { - var match$2 = match$1.tl; + let match$2 = match$1.tl; if (match$2 && match$2.hd === "eat") { - var match$3 = match$2.tl; + let match$3 = match$2.tl; if (!(match$3 && match$3.hd === "go" && !match$3.tl)) { exit = 1; } diff --git a/jscomp/test/dist/jscomp/test/tramp_fib.js b/jscomp/test/dist/jscomp/test/tramp_fib.js index ba478a0a03..75cc211c79 100644 --- a/jscomp/test/dist/jscomp/test/tramp_fib.js +++ b/jscomp/test/dist/jscomp/test/tramp_fib.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -32,7 +32,7 @@ function fib(n, k) { } } -var u = fib(10, (function (x) { +let u = fib(10, (function (x) { return { TAG: /* Continue */0, _0: x @@ -41,7 +41,7 @@ var u = fib(10, (function (x) { function iter(_bounce) { while(true) { - var bounce = _bounce; + let bounce = _bounce; if (bounce.TAG === /* Continue */0) { return bounce._0; } diff --git a/jscomp/test/dist/jscomp/test/tscanf_test.js b/jscomp/test/dist/jscomp/test/tscanf_test.js index 7fef9756e3..dd780202ff 100644 --- a/jscomp/test/dist/jscomp/test/tscanf_test.js +++ b/jscomp/test/dist/jscomp/test/tscanf_test.js @@ -1,31 +1,31 @@ // Generated by Melange 'use strict'; -var Caml = require("melange.js/caml.js"); -var Caml_bytes = require("melange.js/caml_bytes.js"); -var Caml_format = require("melange.js/caml_format.js"); -var Caml_int64 = require("melange.js/caml_int64.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Caml_string = require("melange.js/caml_string.js"); -var Curry = require("melange.js/curry.js"); -var Mt = require("./mt.js"); -var Mt_global = require("./mt_global.js"); -var Stdlib = require("melange/stdlib.js"); -var Stdlib__Buffer = require("melange/buffer.js"); -var Stdlib__Bytes = require("melange/bytes.js"); -var Stdlib__Int32 = require("melange/int32.js"); -var Stdlib__List = require("melange/list.js"); -var Stdlib__Printf = require("melange/printf.js"); -var Stdlib__Scanf = require("melange/scanf.js"); -var Stdlib__String = require("melange/string.js"); -var Testing = require("./testing.js"); - -var suites = { +let Caml = require("melange.js/caml.js"); +let Caml_bytes = require("melange.js/caml_bytes.js"); +let Caml_format = require("melange.js/caml_format.js"); +let Caml_int64 = require("melange.js/caml_int64.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Caml_string = require("melange.js/caml_string.js"); +let Curry = require("melange.js/curry.js"); +let Mt = require("./mt.js"); +let Mt_global = require("./mt_global.js"); +let Stdlib = require("melange/stdlib.js"); +let Stdlib__Buffer = require("melange/buffer.js"); +let Stdlib__Bytes = require("melange/bytes.js"); +let Stdlib__Int32 = require("melange/int32.js"); +let Stdlib__List = require("melange/list.js"); +let Stdlib__Printf = require("melange/printf.js"); +let Stdlib__Scanf = require("melange/scanf.js"); +let Stdlib__String = require("melange/string.js"); +let Testing = require("./testing.js"); + +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -895,14 +895,14 @@ function test7(param) { test("File \"jscomp/test/tscanf_test.ml\", line 168, characters 5-12", test7(undefined)); function verify_read(c) { - var s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let s = Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Caml_char */1, _0: /* End_of_format */0 }, _1: "%C" }), c); - var ib = Stdlib__Scanf.Scanning.from_string(s); + let ib = Stdlib__Scanf.Scanning.from_string(s); if (Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Caml_char */1, @@ -923,7 +923,7 @@ function verify_read(c) { } function verify_scan_Chars(param) { - for(var i = 0; i <= 255; ++i){ + for(let i = 0; i <= 255; ++i){ verify_read(Stdlib.char_of_int(i)); } } @@ -935,7 +935,7 @@ function test8(param) { test("File \"jscomp/test/tscanf_test.ml\", line 183, characters 5-12", verify_scan_Chars(undefined) === undefined); function unit(fmt, s) { - var ib = Stdlib__Scanf.Scanning.from_string(Curry._1(Stdlib__Printf.sprintf(/* Format */{ + let ib = Stdlib__Scanf.Scanning.from_string(Curry._1(Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* Caml_string */3, _0: /* No_padding */0, @@ -950,9 +950,9 @@ function test_fmt(fmt, s) { return unit(fmt, s) === s; } -var test9_string = "\xef\xbb\xbf"; +let test9_string = "\xef\xbb\xbf"; -var partial_arg = /* Format */{ +let partial_arg = /* Format */{ _0: { TAG: /* Caml_string */3, _0: /* No_padding */0, @@ -1030,8 +1030,8 @@ function test9(param) { test("File \"jscomp/test/tscanf_test.ml\", line 230, characters 5-12", test9(undefined)); function test10(param) { - var unit = function (s) { - var ib = Stdlib__Scanf.Scanning.from_string(s); + let unit = function (s) { + let ib = Stdlib__Scanf.Scanning.from_string(s); return Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Caml_string */3, @@ -1041,7 +1041,7 @@ function test10(param) { _1: "%S" }), id); }; - var res = Curry._1(Stdlib__Scanf.sscanf("Une chaine: \"celle-ci\" et \"celle-la\"!", /* Format */{ + let res = Curry._1(Stdlib__Scanf.sscanf("Une chaine: \"celle-ci\" et \"celle-la\"!", /* Format */{ _0: { TAG: /* String */2, _0: /* No_padding */0, @@ -1679,7 +1679,7 @@ function scan_int_list(ib) { }, _1: "[ " }), undefined); - var accu = scan_elems(ib, /* [] */0); + let accu = scan_elems(ib, /* [] */0); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -1835,7 +1835,7 @@ function scan_elems$2(ib, accu) { })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { @@ -2136,15 +2136,15 @@ function scan_int_list$3(ib) { } function test18(param) { - var ib = Stdlib__Scanf.Scanning.from_string("[]"); + let ib = Stdlib__Scanf.Scanning.from_string("[]"); if (!Caml_obj.caml_equal(Stdlib__List.rev(scan_elems$4(ib, /* [] */0)), /* [] */0)) { return false; } - var ib$1 = Stdlib__Scanf.Scanning.from_string("[ ]"); + let ib$1 = Stdlib__Scanf.Scanning.from_string("[ ]"); if (!Caml_obj.caml_equal(Stdlib__List.rev(scan_elems$4(ib$1, /* [] */0)), /* [] */0)) { return false; } - var ib$2 = Stdlib__Scanf.Scanning.from_string("[1;2;3;4]"); + let ib$2 = Stdlib__Scanf.Scanning.from_string("[1;2;3;4]"); if (!Caml_obj.caml_equal(Stdlib__List.rev(scan_elems$4(ib$2, /* [] */0)), { hd: 1, tl: { @@ -2160,7 +2160,7 @@ function test18(param) { })) { return false; } - var ib$3 = Stdlib__Scanf.Scanning.from_string("[1;2;3;4; ]"); + let ib$3 = Stdlib__Scanf.Scanning.from_string("[1;2;3;4; ]"); return Caml_obj.caml_equal(Stdlib__List.rev(scan_elems$4(ib$3, /* [] */0)), { hd: 1, tl: { @@ -2227,7 +2227,7 @@ function scan_rest$1(ib, accu) { }, _1: " %i " }), (function (i) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -2246,7 +2246,7 @@ function scan_rest$1(ib, accu) { case "]" : return accu$1; default: - var s = Stdlib__Printf.sprintf(/* Format */{ + let s = Stdlib__Printf.sprintf(/* Format */{ _0: { TAG: /* String_literal */11, _0: "scan_int_list", @@ -2317,7 +2317,7 @@ test("File \"jscomp/test/tscanf_test.ml\", line 506, characters 5-12", test22(un function scan_elems$5(ib, scan_elem, accu) { try { return Curry._2(scan_elem, ib, (function (i, s) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -2329,7 +2329,7 @@ function scan_elems$5(ib, scan_elem, accu) { })); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { return accu; } @@ -2346,7 +2346,7 @@ function scan_list(scan_elem, ib) { }, _1: "[ " }), undefined); - var accu = scan_elems$5(ib, scan_elem, /* [] */0); + let accu = scan_elems$5(ib, scan_elem, /* [] */0); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -2568,7 +2568,7 @@ test("File \"jscomp/test/tscanf_test.ml\", line 609, characters 5-12", test28(un function scan_elems$6(ib, scan_elem, accu) { return Curry._3(scan_elem, ib, (function (i, s) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -2591,7 +2591,7 @@ function scan_list$1(scan_elem, ib) { }, _1: "[ " }), undefined); - var accu = scan_elems$6(ib, scan_elem, /* [] */0); + let accu = scan_elems$6(ib, scan_elem, /* [] */0); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -2733,7 +2733,7 @@ function scan_elem(fmt, ib, f, ek) { function scan_elems$7(ib, scan_elem, accu) { return Curry._3(scan_elem, ib, (function (i) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -2772,7 +2772,7 @@ function scan_list$2(scan_elem, ib) { }, _1: "[ " }), undefined); - var accu = scan_elems$7(ib, scan_elem, /* [] */0); + let accu = scan_elems$7(ib, scan_elem, /* [] */0); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -2784,7 +2784,7 @@ function scan_list$2(scan_elem, ib) { return Stdlib__List.rev(accu); } -var partial_arg$1 = /* Format */{ +let partial_arg$1 = /* Format */{ _0: { TAG: /* Char_literal */12, _0: /* ' ' */32, @@ -2807,7 +2807,7 @@ function scan_int_list$6(param) { return scan_list$2(partial_arg$2, param); } -var partial_arg$3 = /* Format */{ +let partial_arg$3 = /* Format */{ _0: { TAG: /* Char_literal */12, _0: /* ' ' */32, @@ -2906,7 +2906,7 @@ function scan_elems$8(ib, scan_elem_fmt, accu) { return Curry._1(Stdlib__Scanf.kscanf(ib, (function (ib, exc) { return accu; }), scan_elem_fmt), (function (i) { - var accu$1 = { + let accu$1 = { hd: i, tl: accu }; @@ -2945,7 +2945,7 @@ function scan_list$3(scan_elem_fmt, ib) { }, _1: "[ " }), undefined); - var accu = scan_elems$8(ib, scan_elem_fmt, /* [] */0); + let accu = scan_elems$8(ib, scan_elem_fmt, /* [] */0); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -2957,7 +2957,7 @@ function scan_list$3(scan_elem_fmt, ib) { return Stdlib__List.rev(accu); } -var partial_arg$5 = /* Format */{ +let partial_arg$5 = /* Format */{ _0: { TAG: /* Int */4, _0: /* Int_i */3, @@ -2972,7 +2972,7 @@ function scan_int_list$7(param) { return scan_list$3(partial_arg$5, param); } -var partial_arg$6 = /* Format */{ +let partial_arg$6 = /* Format */{ _0: { TAG: /* Caml_string */3, _0: /* No_padding */0, @@ -3070,7 +3070,7 @@ function scan_elems$9(scan_elem, accu, ib) { _1: "%r" }), (function (ib) { return Curry._2(scan_elem, ib, (function (elem) { - var accu$1 = { + let accu$1 = { hd: elem, tl: accu }; @@ -3112,7 +3112,7 @@ function scan_list$4(scan_elem, ib) { }, _1: "[ " }), undefined); - var accu = scan_elems$9(scan_elem, /* [] */0, ib); + let accu = scan_elems$9(scan_elem, /* [] */0, ib); Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* String_literal */11, @@ -3579,14 +3579,14 @@ function test38(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1020, characters 5-12", test38(undefined)); function test39(param) { - var is_empty_buff = function (ib) { + let is_empty_buff = function (ib) { if (Stdlib__Scanf.Scanning.beginning_of_input(ib)) { return Stdlib__Scanf.Scanning.end_of_input(ib); } else { return false; } }; - var ib = Stdlib__Scanf.Scanning.from_string(""); + let ib = Stdlib__Scanf.Scanning.from_string(""); if (is_empty_buff(ib)) { return is_empty_buff(ib); } else { @@ -3597,7 +3597,7 @@ function test39(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1036, characters 5-12", test39(undefined)); function test40(param) { - var ib = Stdlib__Scanf.Scanning.from_string("cba"); + let ib = Stdlib__Scanf.Scanning.from_string("cba"); return Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Scan_char_set */20, @@ -3625,7 +3625,7 @@ function test40(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1046, characters 5-12", test40(undefined)); function test41(param) { - var ib = Stdlib__Scanf.Scanning.from_string("cba"); + let ib = Stdlib__Scanf.Scanning.from_string("cba"); return Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Scan_char_set */20, @@ -3654,8 +3654,8 @@ function test41(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1055, characters 5-12", test41(undefined)); function test42(param) { - var s = "defcbaaghi"; - var ib = Stdlib__Scanf.Scanning.from_string(s); + let s = "defcbaaghi"; + let ib = Stdlib__Scanf.Scanning.from_string(s); if (!Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Scan_char_set */20, @@ -3685,7 +3685,7 @@ function test42(param) { }))) { return false; } - var ib$1 = Stdlib__Scanf.Scanning.from_string(s); + let ib$1 = Stdlib__Scanf.Scanning.from_string(s); return Curry._1(Stdlib__Scanf.bscanf(ib$1, /* Format */{ _0: { TAG: /* String */2, @@ -3707,7 +3707,7 @@ function test42(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1067, characters 5-12", test42(undefined)); -var ib$1 = Stdlib__Scanf.Scanning.from_string(""); +let ib$1 = Stdlib__Scanf.Scanning.from_string(""); function test43(param) { return Curry._1(Stdlib__Scanf.bscanf(ib$1, /* Format */{ @@ -3752,7 +3752,7 @@ Testing.test_raises_this_exc({ })(test44, undefined); function test45(param) { - var ib = Stdlib__Scanf.Scanning.from_string("12.2"); + let ib = Stdlib__Scanf.Scanning.from_string("12.2"); return Curry._1(Stdlib__Scanf.bscanf(ib, /* Format */{ _0: { TAG: /* Scan_char_set */20, @@ -3881,10 +3881,10 @@ test("File \"jscomp/test/tscanf_test.ml\", line 1104, characters 5-12", test46(u test("File \"jscomp/test/tscanf_test.ml\", line 1106, characters 5-12", test47(undefined) === "1 %s, in english."); function test48(param) { - var test_meta_read = function (s, fmt, efmt) { + let test_meta_read = function (s, fmt, efmt) { return Caml_obj.caml_equal(Stdlib__Scanf.format_from_string(s, fmt), efmt); }; - var fmt = /* Format */{ + let fmt = /* Format */{ _0: { TAG: /* Int */4, _0: /* Int_i */3, @@ -3968,7 +3968,7 @@ function test48(param) { }))) { return false; } - var k = function (s) { + let k = function (s) { return Curry._1(Stdlib__Scanf.sscanf(s, /* Format */{ _0: { TAG: /* Format_subst */14, @@ -3996,7 +3996,7 @@ function test48(param) { if (k("\" : %4f\": 9.87654321") !== 9.87) { return false; } - var h = function (s) { + let h = function (s) { return Curry._1(Stdlib__Scanf.sscanf(s, /* Format */{ _0: { TAG: /* String_literal */11, @@ -4028,7 +4028,7 @@ function test48(param) { if (h("Read integers with \"%4x\"987654321") !== 39030) { return false; } - var i = function (s) { + let i = function (s) { return Curry._1(Stdlib__Scanf.sscanf(s, /* Format */{ _0: { TAG: /* String_literal */11, @@ -4078,7 +4078,7 @@ function test48(param) { ])) { return false; } - var j = function (s) { + let j = function (s) { return Curry._1(Stdlib__Scanf.sscanf(s, /* Format */{ _0: { TAG: /* String_literal */11, @@ -4330,14 +4330,14 @@ function test49(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1176, characters 5-12", test49(undefined)); function next_char(ob, param) { - var s = Stdlib__Buffer.contents(ob); - var len = s.length; + let s = Stdlib__Buffer.contents(ob); + let len = s.length; if (len === 0) { throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { MEL_EXN_ID: Stdlib.End_of_file }); } - var c = Caml_string.get(s, 0); + let c = Caml_string.get(s, 0); ob.position = 0; Stdlib__Buffer.add_string(ob, Stdlib__String.sub(s, 1, len - 1 | 0)); return c; @@ -4383,14 +4383,14 @@ function writer(ib, ob) { return i; })); default: - var i = Caml_format.caml_int_of_string(s); + let i = Caml_format.caml_int_of_string(s); send_string(ob, String(i)); return reader(ib, ob); } })); } -var count = { +let count = { contents: 0 }; @@ -4417,7 +4417,7 @@ function reader(ib, ob) { send_string(ob, "stop"); return writer(ib, ob); } - var l = s.length; + let l = s.length; count.contents = l + count.contents | 0; if (count.contents >= 100) { send_string(ob, "stop"); @@ -4431,8 +4431,8 @@ function reader(ib, ob) { } function go(param) { - var ob = Stdlib__Buffer.create(17); - var ib = Stdlib__Scanf.Scanning.from_function(function (param) { + let ob = Stdlib__Buffer.create(17); + let ib = Stdlib__Scanf.Scanning.from_function(function (param) { return next_char(ob, param); }); return reader(ib, ob); @@ -4932,7 +4932,7 @@ function test53(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1301, characters 5-12", test53(undefined)); function test56(param) { - var g = function (s) { + let g = function (s) { return Curry._1(Stdlib__Scanf.sscanf(s, /* Format */{ _0: { TAG: /* Int */4, @@ -4972,7 +4972,7 @@ function test56(param) { test("File \"jscomp/test/tscanf_test.ml\", line 1316, characters 5-12", test56(undefined)); function test57(param) { - var test_format_scan = function (s, fmt, efmt) { + let test_format_scan = function (s, fmt, efmt) { return Caml_obj.caml_equal(Stdlib__Scanf.format_from_string(s, fmt), efmt); }; if (test_format_scan(" %i ", /* Format */{ @@ -5377,7 +5377,7 @@ test("File \"jscomp/test/tscanf_test.ml\", line 1414, characters 5-12", test60(u Mt.from_pair_suites("Tscanf_test", suites.contents); -var tscanf_data_file_lines = { +let tscanf_data_file_lines = { hd: [ "Objective", "Caml" diff --git a/jscomp/test/dist/jscomp/test/tuple_alloc.js b/jscomp/test/dist/jscomp/test/tuple_alloc.js index f915e178db..589d17b886 100644 --- a/jscomp/test/dist/jscomp/test/tuple_alloc.js +++ b/jscomp/test/dist/jscomp/test/tuple_alloc.js @@ -1,9 +1,9 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); -var v = { +let v = { contents: 0 }; @@ -15,7 +15,7 @@ function incr(param) { v.contents = v.contents + 1 | 0; } -var vv = { +let vv = { contents: 0 }; @@ -28,9 +28,9 @@ function incr2(param) { } function f(a, b, d, e) { - var h = Curry._1(a, b); - var u = Curry._1(d, h); - var v = Curry._1(e, h); + let h = Curry._1(a, b); + let u = Curry._1(d, h); + let v = Curry._1(e, h); return u + v | 0; } diff --git a/jscomp/test/dist/jscomp/test/typeof_test.js b/jscomp/test/dist/jscomp/test/typeof_test.js index 17c0952c2c..b33df3ac1c 100644 --- a/jscomp/test/dist/jscomp/test/typeof_test.js +++ b/jscomp/test/dist/jscomp/test/typeof_test.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Js__Js_types = require("melange.js/js_types.js"); -var Mt = require("./mt.js"); +let Js__Js_types = require("melange.js/js_types.js"); +let Mt = require("./mt.js"); function string_or_number(x) { - var ty = Js__Js_types.classify(x); + let ty = Js__Js_types.classify(x); if (typeof ty === "number") { switch (ty) { case /* JSFalse */0 : @@ -31,7 +31,7 @@ function string_or_number(x) { } } -var suites_0 = [ +let suites_0 = [ "int_type", (function (param) { return { @@ -42,7 +42,7 @@ var suites_0 = [ }) ]; -var suites_1 = { +let suites_1 = { hd: [ "string_type", (function (param) { @@ -182,7 +182,7 @@ var suites_1 = { } }; -var suites = { +let suites = { hd: suites_0, tl: suites_1 }; diff --git a/jscomp/test/dist/jscomp/test/unboxed_attribute_test.js b/jscomp/test/dist/jscomp/test/unboxed_attribute_test.js index 2e5cc9970a..38de6b1ddb 100644 --- a/jscomp/test/dist/jscomp/test/unboxed_attribute_test.js +++ b/jscomp/test/dist/jscomp/test/unboxed_attribute_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -23,25 +23,25 @@ function get(param) { return param; } -var x = "foo"; +let x = "foo"; eq("File \"jscomp/test/unboxed_attribute_test.ml\", line 18, characters 3-10", x, x); -var x$1 = "foo"; +let x$1 = "foo"; eq("File \"jscomp/test/unboxed_attribute_test.ml\", line 26, characters 3-10", x$1, x$1); -var x$2 = "foo"; +let x$2 = "foo"; eq("File \"jscomp/test/unboxed_attribute_test.ml\", line 33, characters 3-10", x$2, x$2); -var y = {}; +let y = {}; y._0 = y; Mt.from_pair_suites("jscomp/test/unboxed_attribute_test.ml", suites.contents); -var v0 = 3; +let v0 = 3; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/unboxed_crash.js b/jscomp/test/dist/jscomp/test/unboxed_crash.js index eb244fbe4b..f36d1a7766 100644 --- a/jscomp/test/dist/jscomp/test/unboxed_crash.js +++ b/jscomp/test/dist/jscomp/test/unboxed_crash.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); +let Curry = require("melange.js/curry.js"); function g(x) { return Curry._1(x, x); } -var loop = g(g); +let loop = g(g); exports.g = g; exports.loop = loop; diff --git a/jscomp/test/dist/jscomp/test/unboxed_use_case.js b/jscomp/test/dist/jscomp/test/unboxed_use_case.js index 7219a8a254..ba80c08b85 100644 --- a/jscomp/test/dist/jscomp/test/unboxed_use_case.js +++ b/jscomp/test/dist/jscomp/test/unboxed_use_case.js @@ -1,8 +1,8 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); function map_pair(r, param) { return [ @@ -20,7 +20,7 @@ map_pair(u, [ true ]); -var hi = [ +let hi = [ 3, 2, "x" @@ -30,14 +30,14 @@ console.log(3); console.log("x"); -var v0 = {}; +let v0 = {}; Caml_obj.update_dummy(v0, { NAME: "A", VAL: v0 }); -var v1 = { +let v1 = { NAME: "A", VAL: "B" }; diff --git a/jscomp/test/dist/jscomp/test/uncurry_external_test.js b/jscomp/test/dist/jscomp/test/uncurry_external_test.js index 9f50b7e185..f27654a4ab 100644 --- a/jscomp/test/dist/jscomp/test/uncurry_external_test.js +++ b/jscomp/test/dist/jscomp/test/uncurry_external_test.js @@ -1,13 +1,13 @@ // Generated by Melange 'use strict'; -var Mt = require("./mt.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -33,7 +33,7 @@ function sum(a,b){ } ; -var h = sum(1.0, 2.0); +let h = sum(1.0, 2.0); eq("File \"jscomp/test/uncurry_external_test.ml\", line 25, characters 5-12", h, 3); diff --git a/jscomp/test/dist/jscomp/test/uncurry_glob_test.js b/jscomp/test/dist/jscomp/test/uncurry_glob_test.js index f8ce2fb1f4..59a18ee811 100644 --- a/jscomp/test/dist/jscomp/test/uncurry_glob_test.js +++ b/jscomp/test/dist/jscomp/test/uncurry_glob_test.js @@ -3,7 +3,7 @@ function M(U) { - var v = U.f(100, "x"); + let v = U.f(100, "x"); return { v: v }; diff --git a/jscomp/test/dist/jscomp/test/uncurry_method.js b/jscomp/test/dist/jscomp/test/uncurry_method.js index 0f189c9154..835fbd7dd2 100644 --- a/jscomp/test/dist/jscomp/test/uncurry_method.js +++ b/jscomp/test/dist/jscomp/test/uncurry_method.js @@ -2,7 +2,7 @@ 'use strict'; -var obj = { +let obj = { hi: (function (a, b) { return a + b | 0; }), @@ -18,7 +18,7 @@ function f(x, a, b) { return x.hi(a, b); } -var h = obj.hi; +let h = obj.hi; console.log(f(obj, 3, 4)); @@ -30,22 +30,22 @@ function f1(u) { u.exit(2); } -var obj3 = { +let obj3 = { hi: (function (name, age) { console.log(name); }), hh: (function () { - var self = this ; + let self = this ; self.hi("x", 20); }) }; -var obj2 = { +let obj2 = { hi: (function (a, b) { return a + b | 0; }), say: (function (a, b) { - var self = this ; + let self = this ; return self.hi(a, b) - 1 | 0; }), xx: (function (a, b) { diff --git a/jscomp/test/dist/jscomp/test/undef_regression2_test.js b/jscomp/test/dist/jscomp/test/undef_regression2_test.js index 9172d46790..20a1f20c90 100644 --- a/jscomp/test/dist/jscomp/test/undef_regression2_test.js +++ b/jscomp/test/dist/jscomp/test/undef_regression2_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -45,12 +45,12 @@ function ok(loc, x) { }; } -var match = typeof ___undefined_value === "undefined" ? undefined : ___undefined_value; +let match = typeof ___undefined_value === "undefined" ? undefined : ___undefined_value; -var a = match !== undefined ? 2 : 1; +let a = match !== undefined ? 2 : 1; function test(param) { - var match = typeof __DEV__ === "undefined" ? undefined : __DEV__; + let match = typeof __DEV__ === "undefined" ? undefined : __DEV__; if (match !== undefined) { console.log("dev mode"); } else { @@ -59,7 +59,7 @@ function test(param) { } function test2(param) { - var f = typeof __filename === "undefined" ? undefined : __filename; + let f = typeof __filename === "undefined" ? undefined : __filename; if (f !== undefined) { console.log(f); } else { diff --git a/jscomp/test/dist/jscomp/test/undef_regression_test.js b/jscomp/test/dist/jscomp/test/undef_regression_test.js index 48485ce9b4..e645e6a90c 100644 --- a/jscomp/test/dist/jscomp/test/undef_regression_test.js +++ b/jscomp/test/dist/jscomp/test/undef_regression_test.js @@ -6,7 +6,7 @@ function f(obj) { if (typeof obj === "function") { return ; } - var size = obj.length; + let size = obj.length; if (size !== undefined) { console.log(size); return ; diff --git a/jscomp/test/dist/jscomp/test/unit_undefined_test.js b/jscomp/test/dist/jscomp/test/unit_undefined_test.js index 74cba7c5a2..9338db06f9 100644 --- a/jscomp/test/dist/jscomp/test/unit_undefined_test.js +++ b/jscomp/test/dist/jscomp/test/unit_undefined_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_option = require("melange.js/caml_option.js"); -var Mt = require("./mt.js"); +let Caml_option = require("melange.js/caml_option.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -42,13 +42,13 @@ function u0(x) { return Caml_option.some(x); } -var u1 = Caml_option.some(undefined); +let u1 = Caml_option.some(undefined); function u2(x) { return Caml_option.some(x); } -var u3 = Caml_option.some(undefined); +let u3 = Caml_option.some(undefined); eq("File \"jscomp/test/unit_undefined_test.ml\", line 31, characters 6-13", Caml_option.some(undefined), Caml_option.some(undefined)); @@ -62,7 +62,7 @@ eq("File \"jscomp/test/unit_undefined_test.ml\", line 35, characters 6-13", unde Mt.from_pair_suites("jscomp/test/unit_undefined_test.ml", suites.contents); -var u4; +let u4; exports.suites = suites; exports.test_id = test_id; diff --git a/jscomp/test/dist/jscomp/test/unsafe_obj_external.js b/jscomp/test/dist/jscomp/test/unsafe_obj_external.js index 782237b45f..ef137293b1 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_obj_external.js +++ b/jscomp/test/dist/jscomp/test/unsafe_obj_external.js @@ -2,17 +2,17 @@ 'use strict'; -var v = { +let v = { x: (function () { return 3; }), say: (function (x) { - var self = this ; + let self = this ; return self.x() + x | 0; }) }; -var u = v.x() + v.say(3) | 0; +let u = v.x() + v.say(3) | 0; exports.v = v; exports.u = u; diff --git a/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js b/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js index 6fc58eabaf..fe17600bad 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js +++ b/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js @@ -1,30 +1,30 @@ // Generated by Melange 'use strict'; -var Curry = require("melange.js/curry.js"); -var Ffi_js_test = require("./ffi_js_test.js"); -var Mt = require("./mt.js"); -var Stdlib = require("melange/stdlib.js"); +let Curry = require("melange.js/curry.js"); +let Ffi_js_test = require("./ffi_js_test.js"); +let Mt = require("./mt.js"); +let Stdlib = require("melange/stdlib.js"); -var x = "\x01\x02\x03"; +let x = "\x01\x02\x03"; -var max = Math.max; +let max = Math.max; function $$test(x,y){ return x + y; } ; -var regression3 = Math.max; +let regression3 = Math.max; -var regression4 = Math.max; +let regression4 = Math.max; function g(a) { - var regression = (function(x,y){ + let regression = (function(x,y){ return "" } ); - var regression2 = Math.max; + let regression2 = Math.max; regression(a, Stdlib.failwith); Curry._2(regression2, 3, 2); regression3(3, 2); @@ -33,7 +33,7 @@ function g(a) { })); } -var max2 = Math.max; +let max2 = Math.max; function umax(a, b) { return max2(a, b); @@ -43,15 +43,15 @@ function u(h) { return max2(3, h); } -var max3 = Math.max; +let max3 = Math.max; function uu(h) { return max2(3, h); } -var empty = Object.keys(3); +let empty = Object.keys(3); -var v = $$test(1, 2); +let v = $$test(1, 2); Mt.from_pair_suites("Unsafe_ppx_test", { hd: [ diff --git a/jscomp/test/dist/jscomp/test/unsafe_this.js b/jscomp/test/dist/jscomp/test/unsafe_this.js index 67533ddf5c..09e3c899b1 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_this.js +++ b/jscomp/test/dist/jscomp/test/unsafe_this.js @@ -2,7 +2,7 @@ 'use strict'; -var u = { +let u = { x: 3, y: 32, bark: (function ($$this, x, y) { @@ -18,15 +18,15 @@ var u = { u.bark(u, 1, 2); function uux_this(x, y) { - var o = this ; + let o = this ; return (o.length + x | 0) + y | 0; } -var js_obj = { +let js_obj = { x: 3, y: 32, bark: (function (x, y) { - var o = this ; + let o = this ; console.log([ o.length, o.x, diff --git a/jscomp/test/dist/jscomp/test/update_record_test.js b/jscomp/test/dist/jscomp/test/update_record_test.js index 5f4d000c92..65eacac12f 100644 --- a/jscomp/test/dist/jscomp/test/update_record_test.js +++ b/jscomp/test/dist/jscomp/test/update_record_test.js @@ -1,14 +1,14 @@ // Generated by Melange 'use strict'; -var Caml_obj = require("melange.js/caml_obj.js"); -var Mt = require("./mt.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Mt = require("./mt.js"); -var suites = { +let suites = { contents: /* [] */0 }; -var test_id = { +let test_id = { contents: 0 }; @@ -34,7 +34,7 @@ function eq(loc, x, y) { } function f(x) { - var y = Caml_obj.caml_obj_dup(x); + let y = Caml_obj.caml_obj_dup(x); return { a0: 1, a1: y.a1, @@ -54,7 +54,7 @@ eq("File \"jscomp/test/update_record_test.ml\", line 30, characters 5-12", 1, f( a5: 0 }).a0); -var val0 = { +let val0 = { "invalid_js_id'": 3, x: 2 }; @@ -66,7 +66,7 @@ function fff(x) { }; } -var val1 = fff(val0); +let val1 = fff(val0); eq("File \"jscomp/test/update_record_test.ml\", line 42, characters 5-12", 3, 3); diff --git a/jscomp/test/dist/jscomp/test/variant.js b/jscomp/test/dist/jscomp/test/variant.js index 93f42c44d9..667ad52430 100644 --- a/jscomp/test/dist/jscomp/test/variant.js +++ b/jscomp/test/dist/jscomp/test/variant.js @@ -1,11 +1,11 @@ // Generated by Melange 'use strict'; -var Caml_exceptions = require("melange.js/caml_exceptions.js"); -var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); -var Caml_obj = require("melange.js/caml_obj.js"); -var Curry = require("melange.js/curry.js"); -var Stdlib = require("melange/stdlib.js"); +let Caml_exceptions = require("melange.js/caml_exceptions.js"); +let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); +let Caml_obj = require("melange.js/caml_obj.js"); +let Curry = require("melange.js/curry.js"); +let Stdlib = require("melange/stdlib.js"); function foo(param) { if (typeof param === "number") { @@ -21,7 +21,7 @@ function foo(param) { case /* C */1 : return param._0 + param._1 | 0; case /* D */2 : - var match = param._0; + let match = param._0; return match[0] + match[1] | 0; } @@ -56,17 +56,17 @@ function switchNum(param) { } } -var same = Caml_obj.caml_equal; +let same = Caml_obj.caml_equal; -var compare = Caml_obj.caml_compare; +let compare = Caml_obj.caml_compare; -var Path = { +let Path = { same: same, compare: compare }; function Make(M) { - var find = function (x) { + let find = function (x) { }; return { @@ -78,7 +78,7 @@ function find(x) { } -var M = { +let M = { find: find }; @@ -87,7 +87,7 @@ function rollback_path(subst, p) { return "try"; } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { switch (p.TAG | 0) { case /* Pdot */1 : @@ -103,22 +103,22 @@ function rollback_path(subst, p) { } } -var EA1 = /* @__PURE__ */Caml_exceptions.create("Variant.EA1"); +let EA1 = /* @__PURE__ */Caml_exceptions.create("Variant.EA1"); -var EA2 = /* @__PURE__ */Caml_exceptions.create("Variant.EA2"); +let EA2 = /* @__PURE__ */Caml_exceptions.create("Variant.EA2"); -var EB = /* @__PURE__ */Caml_exceptions.create("Variant.EB"); +let EB = /* @__PURE__ */Caml_exceptions.create("Variant.EB"); -var EC = /* @__PURE__ */Caml_exceptions.create("Variant.EC"); +let EC = /* @__PURE__ */Caml_exceptions.create("Variant.EC"); -var ED = /* @__PURE__ */Caml_exceptions.create("Variant.ED"); +let ED = /* @__PURE__ */Caml_exceptions.create("Variant.ED"); function fooExn(f) { try { return Curry._1(f, undefined); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === EA1) { return 1; } @@ -132,29 +132,29 @@ function fooExn(f) { return exn._1 + exn._2 | 0; } if (exn.MEL_EXN_ID === ED) { - var match = exn._1; + let match = exn._1; return match[0] + match[1] | 0; } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } -var a1 = /* A1 */0; +let a1 = /* A1 */0; -var a2 = /* A2 */1; +let a2 = /* A2 */1; -var b = { +let b = { TAG: /* B */0, _0: 34 }; -var c = { +let c = { TAG: /* C */1, _0: 4, _1: 2 }; -var d = { +let d = { TAG: /* D */2, _0: [ 4, diff --git a/jscomp/test/dist/jscomp/test/watch_test.js b/jscomp/test/dist/jscomp/test/watch_test.js index e817a77dcc..536fa95532 100644 --- a/jscomp/test/dist/jscomp/test/watch_test.js +++ b/jscomp/test/dist/jscomp/test/watch_test.js @@ -1,7 +1,7 @@ // Generated by Melange 'use strict'; -var Fs = require("fs"); +let Fs = require("fs"); function test(path) { Fs.watch(path, { diff --git a/jscomp/test/dist/jscomp/test/webpack_config.js b/jscomp/test/dist/jscomp/test/webpack_config.js index bd59a445e1..bb540148f9 100644 --- a/jscomp/test/dist/jscomp/test/webpack_config.js +++ b/jscomp/test/dist/jscomp/test/webpack_config.js @@ -1,23 +1,23 @@ // Generated by Melange 'use strict'; -var WebpackConfigJs = require("../../../webpack.config.js"); -var WebpackMiddlewareConfigJs = require("../../../webpack.middleware.config.js"); -var Local = require("./local"); -var List = require("List"); -var Stdlib__List = require("melange/list.js"); -var List$1 = require("reactV"); -var List$2 = require("reactX"); +let WebpackConfigJs = require("../../../webpack.config.js"); +let WebpackMiddlewareConfigJs = require("../../../webpack.middleware.config.js"); +let Local = require("./local"); +let List = require("List"); +let Stdlib__List = require("melange/list.js"); +let List$1 = require("reactV"); +let List$2 = require("reactX"); -var configx = WebpackConfigJs; +let configx = WebpackConfigJs; -var WebpackConfig = { +let WebpackConfig = { configx: configx }; -var configx$1 = WebpackMiddlewareConfigJs; +let configx$1 = WebpackMiddlewareConfigJs; -var WebpackDevMiddlewareConfig = { +let WebpackDevMiddlewareConfig = { configx: configx$1 }; @@ -29,13 +29,13 @@ function configX$1(prim) { return WebpackConfigJs.configX(); } -var U = { +let U = { configX: configX$1 }; -var A = {}; +let A = {}; -var B = {}; +let B = {}; function f(param) { return [ diff --git a/test/blackbox-tests/as-ppx-config-attribute.t b/test/blackbox-tests/as-ppx-config-attribute.t index 78755fea4c..abe3c5c998 100644 --- a/test/blackbox-tests/as-ppx-config-attribute.t +++ b/test/blackbox-tests/as-ppx-config-attribute.t @@ -12,7 +12,7 @@ 'use strict'; - var x = 1; + let x = 1; exports.x = x; /* No side effect */ diff --git a/test/blackbox-tests/bigint.t b/test/blackbox-tests/bigint.t index 0284dc31db..a8346f2425 100644 --- a/test/blackbox-tests/bigint.t +++ b/test/blackbox-tests/bigint.t @@ -40,11 +40,11 @@ Test `Js.Bigint` code generation 'use strict'; - var a = BigInt("5"); + let a = BigInt("5"); - var b = BigInt("3"); + let b = BigInt("3"); - var x = b * (a + b) - b; + let x = b * (a + b) - b; console.log(x); diff --git a/test/blackbox-tests/complex-constant-inline.t b/test/blackbox-tests/complex-constant-inline.t index 1d1aa5d49e..f75aa1e81f 100644 --- a/test/blackbox-tests/complex-constant-inline.t +++ b/test/blackbox-tests/complex-constant-inline.t @@ -32,21 +32,21 @@ 'use strict'; - var person1 = { + let person1 = { TAG: /* Teacher */0, age: 12345 }; - var message; + let message; if (person1.TAG === /* Teacher */0) { message = "b"; } else { - var tmp = 12345; + let tmp = 12345; message = typeof tmp === "number" || tmp.TAG === /* Vacations */0 ? "a" : "b"; } - var Test1 = { + let Test1 = { person1: person1, message: message }; diff --git a/test/blackbox-tests/deriving-separate.t b/test/blackbox-tests/deriving-separate.t index 81cf6a7ba4..2ce678758c 100644 --- a/test/blackbox-tests/deriving-separate.t +++ b/test/blackbox-tests/deriving-separate.t @@ -32,7 +32,7 @@ Tests for deriving `jsProperties, getSet` 'use strict'; - var t = { + let t = { height: 2, width: "bar" }; diff --git a/test/blackbox-tests/dune-melange-mode.t/run.t b/test/blackbox-tests/dune-melange-mode.t/run.t index 8928e9d8d5..5a185ad532 100644 --- a/test/blackbox-tests/dune-melange-mode.t/run.t +++ b/test/blackbox-tests/dune-melange-mode.t/run.t @@ -26,9 +26,9 @@ Demonstrate dune produces JS files corresponding to the original file name import * as A__Other from "./other.js"; - var x = A__Other.t; + let x = A__Other.t; - var t = 1; + let t = 1; export { x , diff --git a/test/blackbox-tests/es6-default-exports.t b/test/blackbox-tests/es6-default-exports.t index 7e71d58ecf..6533a53533 100644 --- a/test/blackbox-tests/es6-default-exports.t +++ b/test/blackbox-tests/es6-default-exports.t @@ -32,7 +32,7 @@ Consume the default export // Generated by Melange - var $$default = "world"; + let $$default = "world"; export { $$default as default, @@ -63,7 +63,7 @@ CommonJS: 'use strict'; - var $$default = "world"; + let $$default = "world"; exports.default = $$default; exports.__esModule = true; @@ -73,7 +73,7 @@ CommonJS: // Generated by Melange 'use strict'; - var Melange__Exports_something = require("./exports_something.js"); + let Melange__Exports_something = require("./exports_something.js"); console.log("Hello, " + Melange__Exports_something.default); diff --git a/test/blackbox-tests/exn-cause.t b/test/blackbox-tests/exn-cause.t index 3d1b9a5611..e3b7e002ca 100644 --- a/test/blackbox-tests/exn-cause.t +++ b/test/blackbox-tests/exn-cause.t @@ -25,20 +25,20 @@ // Generated by Melange 'use strict'; - var Caml_exceptions = require("melange.js/caml_exceptions.js"); - var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); - var Js__Js_exn = require("melange.js/js_exn.js"); + let Caml_exceptions = require("melange.js/caml_exceptions.js"); + let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + let Js__Js_exn = require("melange.js/js_exn.js"); - var A = /* @__PURE__ */Caml_exceptions.create("Melange__X.A"); + let A = /* @__PURE__ */Caml_exceptions.create("Melange__X.A"); - var a0; + let a0; try { a0 = ((function (){throw 2} ()) ); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === A || exn.MEL_EXN_ID === Js__Js_exn.$$Error) { a0 = exn._1; } else { @@ -83,20 +83,20 @@ Raise `null` / `undefined` // Generated by Melange 'use strict'; - var Caml_exceptions = require("melange.js/caml_exceptions.js"); - var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); - var Js__Js_exn = require("melange.js/js_exn.js"); + let Caml_exceptions = require("melange.js/caml_exceptions.js"); + let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + let Js__Js_exn = require("melange.js/js_exn.js"); - var A = /* @__PURE__ */Caml_exceptions.create("Melange__X.A"); + let A = /* @__PURE__ */Caml_exceptions.create("Melange__X.A"); - var a0; + let a0; try { a0 = ((function (){throw undefined} ()) ); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === A || exn.MEL_EXN_ID === Js__Js_exn.$$Error) { a0 = exn._1; } else { @@ -111,14 +111,14 @@ Raise `null` / `undefined` } } - var a1; + let a1; try { a1 = ((function (){throw null} ()) ); } catch (raw_exn$1){ - var exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); + let exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === A || exn$1.MEL_EXN_ID === Js__Js_exn.$$Error) { a1 = exn$1._1; } else { diff --git a/test/blackbox-tests/export-invalid-names.t b/test/blackbox-tests/export-invalid-names.t index 12473b70e8..906917c802 100644 --- a/test/blackbox-tests/export-invalid-names.t +++ b/test/blackbox-tests/export-invalid-names.t @@ -32,9 +32,9 @@ Export otherwise invalid OCaml identifiers to JavaScript 'use strict'; - var GET = 2; + let GET = 2; - var $$class = 2; + let $$class = 2; exports.GET = GET; exports.$$class = $$class; @@ -56,9 +56,9 @@ Export otherwise invalid OCaml identifiers to JavaScript 'use strict'; - var post = 1; + let post = 1; - var POST = 1; + let POST = 1; exports.post = post; exports.POST = POST; diff --git a/test/blackbox-tests/external-relative-module-path.t b/test/blackbox-tests/external-relative-module-path.t index f70f93f063..34796797de 100644 --- a/test/blackbox-tests/external-relative-module-path.t +++ b/test/blackbox-tests/external-relative-module-path.t @@ -23,7 +23,7 @@ path invariant. // Generated by Melange 'use strict'; - var Nano = require("./nano"); + let Nano = require("./nano"); function nano(prim) { return Nano.nano(prim); diff --git a/test/blackbox-tests/externals-non-inline-arrow-types.t b/test/blackbox-tests/externals-non-inline-arrow-types.t index b9cf4f7872..86885bcfda 100644 --- a/test/blackbox-tests/externals-non-inline-arrow-types.t +++ b/test/blackbox-tests/externals-non-inline-arrow-types.t @@ -10,7 +10,7 @@ Melange can't optimize `external` FFI where arrow type isn't inlined // Generated by Melange 'use strict'; - var Curry = require("melange.js/curry.js"); + let Curry = require("melange.js/curry.js"); Curry._2(foo, 42, undefined); diff --git a/test/blackbox-tests/inline-functor-open.t/run.t b/test/blackbox-tests/inline-functor-open.t/run.t index 8cef90cb11..b9d6e32f0a 100644 --- a/test/blackbox-tests/inline-functor-open.t/run.t +++ b/test/blackbox-tests/inline-functor-open.t/run.t @@ -29,11 +29,11 @@ // Generated by Melange 'use strict'; - var Curry = require("melange.js/curry.js"); - var Samplelib = require("./samplelib.js"); + let Curry = require("melange.js/curry.js"); + let Samplelib = require("./samplelib.js"); function test3(param) { - var open = Samplelib.MonadOps(Samplelib.$$Promise); + let open = Samplelib.MonadOps(Samplelib.$$Promise); return Curry._1(open.$$return, 2); } diff --git a/test/blackbox-tests/intoverflow.t b/test/blackbox-tests/intoverflow.t index 7b502aa17b..fd4c887fae 100644 --- a/test/blackbox-tests/intoverflow.t +++ b/test/blackbox-tests/intoverflow.t @@ -54,25 +54,25 @@ 'use strict'; - var v1 = 2147483647; + let v1 = 2147483647; - var v2 = -2147483648; + let v2 = -2147483648; - var v3 = -2147483647; + let v3 = -2147483647; - var v4 = -2147483647; + let v4 = -2147483647; - var v5 = -2147483648; + let v5 = -2147483648; - var v6 = 2147483647; + let v6 = 2147483647; - var v7 = -1; + let v7 = -1; - var v8 = 1; + let v8 = 1; - var v9 = 0; + let v9 = 0; - var v10 = 0; + let v10 = 0; exports.v1 = v1; exports.v2 = v2; diff --git a/test/blackbox-tests/mel-as-inline-records.t b/test/blackbox-tests/mel-as-inline-records.t index 6c99a8dc6e..c38b053cf5 100644 --- a/test/blackbox-tests/mel-as-inline-records.t +++ b/test/blackbox-tests/mel-as-inline-records.t @@ -16,10 +16,10 @@ Test `@mel.as` in inline records / record extensions // Generated by Melange 'use strict'; - var Caml_exceptions = require("melange.js/caml_exceptions.js"); - var Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + let Caml_exceptions = require("melange.js/caml_exceptions.js"); + let Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); - var UserException = /* @__PURE__ */Caml_exceptions.create("X.UserException"); + let UserException = /* @__PURE__ */Caml_exceptions.create("X.UserException"); function user3(param) { try { @@ -29,7 +29,7 @@ Test `@mel.as` in inline records / record extensions }); } catch (raw_exn){ - var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + let exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === UserException) { console.log("name:", exn.renamed); return ; @@ -38,11 +38,11 @@ Test `@mel.as` in inline records / record extensions } } - var user = { + let user = { renamed: "Corentin" }; - var user2 = /* User */{ + let user2 = /* User */{ renamed: "Corentin" }; diff --git a/test/blackbox-tests/mel-as-modules.t b/test/blackbox-tests/mel-as-modules.t index 46e7c918f5..b184c3a866 100644 --- a/test/blackbox-tests/mel-as-modules.t +++ b/test/blackbox-tests/mel-as-modules.t @@ -26,7 +26,7 @@ Use `[@mel.as]` to change how module output name in resulting JS 'use strict'; - var Obj = {}; + let Obj = {}; exports.Obj = Obj; /* No side effect */ @@ -48,7 +48,7 @@ Also applies to signatures 'use strict'; - var Obj2 = {}; + let Obj2 = {}; exports.Obj2 = Obj2; /* No side effect */ diff --git a/test/blackbox-tests/mel-new-with-send.t b/test/blackbox-tests/mel-new-with-send.t index b8df1df065..f05cc82079 100644 --- a/test/blackbox-tests/mel-new-with-send.t +++ b/test/blackbox-tests/mel-new-with-send.t @@ -12,7 +12,7 @@ Test the interaction between `[@@mel.new]` and `[@@mel.send]` // Generated by Melange 'use strict'; - var BlueJs = require("path/to/blue.js"); + let BlueJs = require("path/to/blue.js"); new (BlueJs.Red)("foo"); @@ -32,7 +32,7 @@ Test `@mel.variadic` integration // Generated by Melange 'use strict'; - var BlueJs = require("path/to/blue.js"); + let BlueJs = require("path/to/blue.js"); new (BlueJs.Red)("foo", "bar"); @@ -51,7 +51,7 @@ Test `@mel.variadic` integration // Generated by Melange 'use strict'; - var BlueJs = require("path/to/blue.js"); + let BlueJs = require("path/to/blue.js"); new (BlueJs.Red)("foo"); @@ -71,7 +71,7 @@ Test `@mel.variadic` + `@mel.send.pipe` integration // Generated by Melange 'use strict'; - var BlueJs = require("path/to/blue.js"); + let BlueJs = require("path/to/blue.js"); new (BlueJs.Red)("foo", "bar"); diff --git a/test/blackbox-tests/mel-obj.t b/test/blackbox-tests/mel-obj.t index f15cf1fab3..6ea0438a15 100644 --- a/test/blackbox-tests/mel-obj.t +++ b/test/blackbox-tests/mel-obj.t @@ -18,7 +18,7 @@ Test `@mel.as` in `@mel.obj` and `%mel.obj` 'use strict'; - var x = { + let x = { bar: "x", "poly-param1": { NAME: "Str", @@ -27,7 +27,7 @@ Test `@mel.as` in `@mel.obj` and `%mel.obj` "poly-param2": 5 }; - var y = { + let y = { lo: 3, hi: 42 }; @@ -50,7 +50,7 @@ Test `@mel.as` in `@mel.obj` and `%mel.obj` 'use strict'; - var x = { + let x = { "Content-Type": "text/plain", "Content-Length": "50" }; diff --git a/test/blackbox-tests/mel-unwrap-for-obj.t b/test/blackbox-tests/mel-unwrap-for-obj.t index 59ef83be0f..f7b75fae74 100644 --- a/test/blackbox-tests/mel-unwrap-for-obj.t +++ b/test/blackbox-tests/mel-unwrap-for-obj.t @@ -20,12 +20,12 @@ Test `@mel.unwrap` in `@mel.obj` 'use strict'; - var x = { + let x = { param: "x", polyParam: "hi" }; - var y = { + let y = { param: "x", polyParam: "hello" }; diff --git a/test/blackbox-tests/melange-playground/compile-ml-belt.t b/test/blackbox-tests/melange-playground/compile-ml-belt.t index 45dc45ac16..06c46e87b8 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-belt.t +++ b/test/blackbox-tests/melange-playground/compile-ml-belt.t @@ -10,7 +10,7 @@ '\n' + 'import * as Belt__Belt_List from "melange.belt/belt_List.js";\n' + '\n' + - 'var foo = Belt__Belt_List.map;\n' + + 'let foo = Belt__Belt_List.map;\n' + '\n' + 'export {\n' + ' foo ,\n' + diff --git a/test/blackbox-tests/melange-playground/compile-ml-deriving.t b/test/blackbox-tests/melange-playground/compile-ml-deriving.t index 3bf04dc996..cd1cfb1173 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-deriving.t +++ b/test/blackbox-tests/melange-playground/compile-ml-deriving.t @@ -14,7 +14,7 @@ js_code: '// Generated by Melange\n' + '\n' + '\n' + - 'var person1 = {\n' + + 'let person1 = {\n' + ' name: "joe",\n' + ' age: 10\n' + '};\n' + diff --git a/test/blackbox-tests/melange-playground/compile-ml-mel-attr.t b/test/blackbox-tests/melange-playground/compile-ml-mel-attr.t index 3f9b47f347..83b2ba653a 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-mel-attr.t +++ b/test/blackbox-tests/melange-playground/compile-ml-mel-attr.t @@ -9,7 +9,7 @@ js_code: '// Generated by Melange\n' + '\n' + '\n' + - 'var res = Math.imul(1, 2);\n' + + 'let res = Math.imul(1, 2);\n' + '\n' + 'export {\n' + ' res ,\n' + diff --git a/test/blackbox-tests/melange-playground/compile-ml-obj.t b/test/blackbox-tests/melange-playground/compile-ml-obj.t index 11681bb5de..6c6cdf899d 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-obj.t +++ b/test/blackbox-tests/melange-playground/compile-ml-obj.t @@ -13,7 +13,7 @@ $ node input.js { - "js_code": "// Generated by Melange\n\n\nvar john = {\n name: \"john\",\n age: 99\n};\n\nvar t = john.name;\n\nexport {\n john ,\n t ,\n}\n/* t Not a pure module */\n", + "js_code": "// Generated by Melange\n\n\nlet john = {\n name: \"john\",\n age: 99\n};\n\nlet t = john.name;\n\nexport {\n john ,\n t ,\n}\n/* t Not a pure module */\n", "warnings": [], "type_hints": [ { diff --git a/test/blackbox-tests/melange-playground/compile-ml-simple.t b/test/blackbox-tests/melange-playground/compile-ml-simple.t index 9649e1ca07..3e5e5c72fb 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-simple.t +++ b/test/blackbox-tests/melange-playground/compile-ml-simple.t @@ -9,7 +9,7 @@ js_code: '// Generated by Melange\n' + '\n' + '\n' + - 'var t = 1;\n' + + 'let t = 1;\n' + '\n' + 'export {\n' + ' t ,\n' + diff --git a/test/blackbox-tests/melange-playground/compile-ml-warning-alert.t b/test/blackbox-tests/melange-playground/compile-ml-warning-alert.t index fec2671ece..3893e05fd8 100644 --- a/test/blackbox-tests/melange-playground/compile-ml-warning-alert.t +++ b/test/blackbox-tests/melange-playground/compile-ml-warning-alert.t @@ -9,13 +9,13 @@ js_code: '// Generated by Melange\n' + '\n' + '\n' + - 'var x = null;\n' + + 'let x = null;\n' + '\n' + - 'var Deprecated = {\n' + + 'let Deprecated = {\n' + ' x: x\n' + '};\n' + '\n' + - 'var t = x;\n' + + 'let t = x;\n' + '\n' + 'export {\n' + ' Deprecated ,\n' + diff --git a/test/blackbox-tests/melange-playground/compile-re-simple.t b/test/blackbox-tests/melange-playground/compile-re-simple.t index a009dac908..45bb95707a 100644 --- a/test/blackbox-tests/melange-playground/compile-re-simple.t +++ b/test/blackbox-tests/melange-playground/compile-re-simple.t @@ -9,7 +9,7 @@ js_code: '// Generated by Melange\n' + '\n' + '\n' + - 'var t = 1;\n' + + 'let t = 1;\n' + '\n' + 'export {\n' + ' t ,\n' + diff --git a/test/blackbox-tests/missing-namespace.t/run.t b/test/blackbox-tests/missing-namespace.t/run.t index 2d5233c69d..bfc0d52c33 100644 --- a/test/blackbox-tests/missing-namespace.t/run.t +++ b/test/blackbox-tests/missing-namespace.t/run.t @@ -9,10 +9,10 @@ for the module. // Generated by Melange 'use strict'; - var Curry = require("melange.js/curry.js"); - var Melange__FieldsRequestDescr = require("./fieldsRequestDescr.js"); + let Curry = require("melange.js/curry.js"); + let Melange__FieldsRequestDescr = require("./fieldsRequestDescr.js"); - var dr = Curry._1(Melange__FieldsRequestDescr.Fields.Field_dsl.Aggregations.any, 2); + let dr = Curry._1(Melange__FieldsRequestDescr.Fields.Field_dsl.Aggregations.any, 2); exports.dr = dr; /* dr Not a pure module */ diff --git a/test/blackbox-tests/module-alias-not-exported-in-js.t b/test/blackbox-tests/module-alias-not-exported-in-js.t index 50e258bdb0..8983bf6251 100644 --- a/test/blackbox-tests/module-alias-not-exported-in-js.t +++ b/test/blackbox-tests/module-alias-not-exported-in-js.t @@ -29,7 +29,7 @@ Output does not contain B_alias 'use strict'; - var App = {}; + let App = {}; exports.App = App; /* No side effect */ @@ -54,7 +54,7 @@ Output does not contain B_alias // Generated by Melange 'use strict'; - var B = require("../app/b.js"); + let B = require("../app/b.js"); console.log(B.t); diff --git a/test/blackbox-tests/no-package-flags-to-cmj.t b/test/blackbox-tests/no-package-flags-to-cmj.t index c9a5435720..d4f97fec2a 100644 --- a/test/blackbox-tests/no-package-flags-to-cmj.t +++ b/test/blackbox-tests/no-package-flags-to-cmj.t @@ -31,7 +31,7 @@ gets used (the correct way to do separate compilation is to use the import * as A from "../lib/a.js"; - var t = A.t; + let t = A.t; export { t , @@ -58,9 +58,9 @@ B depends on A, so it should import a.js in the right path, the default module s // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/no-package-name-in-js-objs.t b/test/blackbox-tests/no-package-name-in-js-objs.t index f774ed3ad4..8bbcd10cce 100644 --- a/test/blackbox-tests/no-package-name-in-js-objs.t +++ b/test/blackbox-tests/no-package-name-in-js-objs.t @@ -37,9 +37,9 @@ B depends on A, so it should import a.js in the right path // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/no-package-name-in-js.t b/test/blackbox-tests/no-package-name-in-js.t index 520cd866da..2ba33bf75d 100644 --- a/test/blackbox-tests/no-package-name-in-js.t +++ b/test/blackbox-tests/no-package-name-in-js.t @@ -49,9 +49,9 @@ B depends on A, so it should import a.js in the right path // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ @@ -78,7 +78,7 @@ Now generate ES6 imports and a `.mjs` extension from the same `.cmj` import * as A from "../lib/a.mjs"; - var t = A.t; + let t = A.t; export { t , diff --git a/test/blackbox-tests/no-package-name-unmangle-js-files.t b/test/blackbox-tests/no-package-name-unmangle-js-files.t index 376027bb53..b74a2ace13 100644 --- a/test/blackbox-tests/no-package-name-unmangle-js-files.t +++ b/test/blackbox-tests/no-package-name-unmangle-js-files.t @@ -35,9 +35,9 @@ Path should point to proper name of the .js dep // Generated by Melange 'use strict'; - var Lib__A = require("../lib/a.js"); + let Lib__A = require("../lib/a.js"); - var t = Lib__A.t; + let t = Lib__A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/node-modules.t b/test/blackbox-tests/node-modules.t index fdb55182f5..7887c0af65 100644 --- a/test/blackbox-tests/node-modules.t +++ b/test/blackbox-tests/node-modules.t @@ -32,17 +32,17 @@ B depends on A, so it should import a.js in the right path // Generated by Melange 'use strict'; - var A = require("../node_modules/a.js"); - var Stdlib__List = require("melange/list.js"); + let A = require("../node_modules/a.js"); + let Stdlib__List = require("melange/list.js"); - var t = Stdlib__List.map((function (greeting) { + let t = Stdlib__List.map((function (greeting) { return greeting; }), { hd: "Hello", tl: /* [] */0 }); - var u = A.t; + let u = A.t; exports.u = u; exports.t = t; diff --git a/test/blackbox-tests/node-ppx.t b/test/blackbox-tests/node-ppx.t index 7768b010ed..45d466d026 100644 --- a/test/blackbox-tests/node-ppx.t +++ b/test/blackbox-tests/node-ppx.t @@ -22,13 +22,13 @@ Test `[%mel.node ... ]` // Generated by Melange 'use strict'; - var Caml_option = require("melange.js/caml_option.js"); - var Js__Js_undefined = require("melange.js/js_undefined.js"); - var Stdlib__Option = require("melange/option.js"); + let Caml_option = require("melange.js/caml_option.js"); + let Js__Js_undefined = require("melange.js/js_undefined.js"); + let Stdlib__Option = require("melange/option.js"); - var $$require = Stdlib__Option.get(Caml_option.undefined_to_opt(typeof require === "undefined" ? undefined : require)); + let $$require = Stdlib__Option.get(Caml_option.undefined_to_opt(typeof require === "undefined" ? undefined : require)); - var main = Js__Js_undefined.getExn($$require.main); + let main = Js__Js_undefined.getExn($$require.main); console.log(main.exports); diff --git a/test/blackbox-tests/option-shape.t b/test/blackbox-tests/option-shape.t index 90c0dfe265..cc83620ee4 100644 --- a/test/blackbox-tests/option-shape.t +++ b/test/blackbox-tests/option-shape.t @@ -12,7 +12,7 @@ 'use strict'; - var X = {}; + let X = {}; console.log("OK"); diff --git a/test/blackbox-tests/preamble.t b/test/blackbox-tests/preamble.t index 96056537c1..822e54f040 100644 --- a/test/blackbox-tests/preamble.t +++ b/test/blackbox-tests/preamble.t @@ -11,7 +11,7 @@ Demonstrate usage of `--preamble` 'use strict'; - var x = 1; + let x = 1; exports.x = x; /* No side effect */ @@ -26,7 +26,7 @@ Demonstrate usage of `--preamble` 'use strict'; - var x = 1; + let x = 1; exports.x = x; /* No side effect */ diff --git a/test/blackbox-tests/set-package-name-in-js-objs.t b/test/blackbox-tests/set-package-name-in-js-objs.t index 54fd5336c9..761fce75ab 100644 --- a/test/blackbox-tests/set-package-name-in-js-objs.t +++ b/test/blackbox-tests/set-package-name-in-js-objs.t @@ -34,9 +34,9 @@ B depends on A, so it should import a.js in the right path // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/set-package-name-in-js.t b/test/blackbox-tests/set-package-name-in-js.t index 4e936f92e3..f4ab2e4e19 100644 --- a/test/blackbox-tests/set-package-name-in-js.t +++ b/test/blackbox-tests/set-package-name-in-js.t @@ -47,9 +47,9 @@ B depends on A, so it should import a.js in the right path // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/set-package-name-unmangle-js-files.t b/test/blackbox-tests/set-package-name-unmangle-js-files.t index 303753557c..cf9d22c9e0 100644 --- a/test/blackbox-tests/set-package-name-unmangle-js-files.t +++ b/test/blackbox-tests/set-package-name-unmangle-js-files.t @@ -37,9 +37,9 @@ Path should point to proper name of the .js dep // Generated by Melange 'use strict'; - var Lib__A = require("../lib/lib__A.js"); + let Lib__A = require("../lib/lib__A.js"); - var t = Lib__A.t; + let t = Lib__A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/simple.t b/test/blackbox-tests/simple.t index 51162a6081..2cb5e5dc85 100644 --- a/test/blackbox-tests/simple.t +++ b/test/blackbox-tests/simple.t @@ -46,9 +46,9 @@ B imports A with the correct paths // Generated by Melange 'use strict'; - var A = require("../lib/a.js"); + let A = require("../lib/a.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/stdlib-array.t b/test/blackbox-tests/stdlib-array.t index f2797a47e1..1e32136f1e 100644 --- a/test/blackbox-tests/stdlib-array.t +++ b/test/blackbox-tests/stdlib-array.t @@ -22,20 +22,20 @@ Test cases for stdlib Array // Generated by Melange 'use strict'; - var Caml_array = require("melange.js/caml_array.js"); - var Stdlib__Array = require("melange/array.js"); + let Caml_array = require("melange.js/caml_array.js"); + let Stdlib__Array = require("melange/array.js"); - var t = Caml_array.make_float(10); + let t = Caml_array.make_float(10); - var t2 = Stdlib__Array.init(10, (function (prim) { + let t2 = Stdlib__Array.init(10, (function (prim) { return prim; })); - var m = Stdlib__Array.make_matrix(2, 2, undefined); + let m = Stdlib__Array.make_matrix(2, 2, undefined); - var x = Stdlib__Array.append([2], [3]); + let x = Stdlib__Array.append([2], [3]); - var c = Stdlib__Array.concat({ + let c = Stdlib__Array.concat({ hd: [1], tl: { hd: [2], @@ -43,15 +43,15 @@ Test cases for stdlib Array } }); - var s = Stdlib__Array.sub(c, 1, 1); + let s = Stdlib__Array.sub(c, 1, 1); - var s2 = Stdlib__Array.copy(s); + let s2 = Stdlib__Array.copy(s); Stdlib__Array.fill(s, 0, 2, 42); - var fl = Caml_array.make_float(3); + let fl = Caml_array.make_float(3); - for(var i = 0; i <= 2; ++i){ + for(let i = 0; i <= 2; ++i){ fl[i] = 42; } diff --git a/test/blackbox-tests/stdout.t b/test/blackbox-tests/stdout.t index d07a145464..584789eecf 100644 --- a/test/blackbox-tests/stdout.t +++ b/test/blackbox-tests/stdout.t @@ -6,7 +6,7 @@ // Generated by Melange 'use strict'; - var Stdlib__Format = require("melange/format.js"); + let Stdlib__Format = require("melange/format.js"); Stdlib__Format.eprintf(/* Format */{ _0: { diff --git a/test/blackbox-tests/unicode-format-strings.t b/test/blackbox-tests/unicode-format-strings.t index 1462f183df..c148674752 100644 --- a/test/blackbox-tests/unicode-format-strings.t +++ b/test/blackbox-tests/unicode-format-strings.t @@ -20,8 +20,8 @@ // Generated by Melange 'use strict'; - var Curry = require("melange.js/curry.js"); - var Stdlib__Format = require("melange/format.js"); + let Curry = require("melange.js/curry.js"); + let Stdlib__Format = require("melange/format.js"); console.log(Curry._1(Stdlib__Format.sprintf(/* Format */{ _0: { diff --git a/test/blackbox-tests/unmangling-uppercase.t b/test/blackbox-tests/unmangling-uppercase.t index 80e48e1f63..6672b46130 100644 --- a/test/blackbox-tests/unmangling-uppercase.t +++ b/test/blackbox-tests/unmangling-uppercase.t @@ -24,9 +24,9 @@ b.js produces a require to a.js, but with lower case // Generated by Melange 'use strict'; - var A = require("../lib/A.js"); + let A = require("../lib/A.js"); - var t = A.t; + let t = A.t; exports.t = t; /* No side effect */ diff --git a/test/blackbox-tests/using-stdlib.t b/test/blackbox-tests/using-stdlib.t index 695f1e8007..30e262d617 100644 --- a/test/blackbox-tests/using-stdlib.t +++ b/test/blackbox-tests/using-stdlib.t @@ -24,7 +24,7 @@ Check b.js output import * as Stdlib__List from "melange/list.js"; - var t = Stdlib__List.map((function (greeting) { + let t = Stdlib__List.map((function (greeting) { return greeting; }), { hd: "Hello",